LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   basic configure-make-make install question (http://www.linuxquestions.org/questions/slackware-14/basic-configure-make-make-install-question-519153/)

bigwheel 01-14-2007 07:10 AM

basic configure-make-make install question
 
When you download an application, where do you put the tarball, and where do you extract it to?

Does configure-make-make install move it to the appropriate directory, or do you have to know where to put it?

Having installed the application, how do you know where in the directory structure you have to be to execute the application?

Links to tutorials or how-to's would be appreciated.

Example: I typically download everything from the web to /home/paul/Downloads. I then extracted mplayer from the tarball and by default(?) it was extracted further down the /home/paul/Downloads/ tree:

/home/paul/Downloads/MPlayer-1.0rc1/MPlayer-1.0rc1/

after running configure-make-make install in this directory, I can get mplayer to work from the command line but only when I cd into this directory. I would like to be able to use it from the KDE menu.

I'm not sure if the problem is that it was extracted incorrectly or if I did configure-make-make install incorrectly, or both.

Slackware 10.2

Andrew Benton 01-14-2007 07:44 AM

By default make install usually installs applications in /usr/local. You can change the prefix by running ./configure with the option --prefix=/some/place
./configure --prefix=/usr is a good choice because then the executable will be put in /usr/bin and should be in your $PATH, /usr/local/bin may not be in your path. Find what else you can tweak about the build by running ./configure --help

titopoquito 01-14-2007 07:47 AM

Quote:

Originally Posted by bigwheel
When you download an application, where do you put the tarball, and where do you extract it to?

It does not really matter. Put it in /usr/src if you want or anywhere.

Quote:

Does configure-make-make install move it to the appropriate directory, or do you have to know where to put it?
Most applications install as default to /usr/local. If you want it to install to for example /usr you usually have to tell it explicitly when configuring the source.

Quote:

Having installed the application, how do you know where in the directory structure you have to be to execute the application?
Most applications can be executed from commandline from anywhere. As long as the binary file that is installed is found in your PATH (for example /usr/bin, /usr/local/bin and /opt/kde/bin are in the PATH for a normal user).

Quote:

Example:
after running configure-make-make install in this directory, I can get mplayer to work from the command line but only when I cd into this directory. I would like to be able to use it from the KDE menu.
The mplayer binary should be installed to /usr/bin or /usr/local/bin. Open up a terminal window and type "mplayer" to see if it is found. The program files should be in /usr/local/lib/MPlayer... or /usr/lib/MPlayer... (not sure about Caps)

The Headacher 01-14-2007 07:57 AM

Quote:

When you download an application, where do you put the tarball, and where do you extract it to?
That's personal. I always put stuff I'm going to build in a 'build' subdirectory in my home directory

Quote:

Does configure-make-make install move it to the appropriate directory, or do you have to know where to put it?
make install copies the compiled source to the appropriate directory (well, it does some other stuff too). If you just used ./configure without any arguments, the prefix /usr/local will be used: the executable (binary) file goes to /usr/local/bin, libraries go to /usr/local/lib etcetera.

I always use
Code:

./ configure --prefix=/usr
This ensures that the pkg-config file will go to the right directory.
Quote:

I can get mplayer to work from the command line but only when I cd into this directory. I would like to be able to use it from the KDE menu.
Perhaps /usr/local/bin is not in your PATH. You should be able to add menu entries yourself with KDE (I'm not using it now so I can't tell exactly how). look for the gmplayer executable in /usr/local/bin.

duryodhan 01-14-2007 10:09 AM

I dont think you will have gmplayer installed as during build you have to do --enable-gui. See the mplayer install notes.

Putting mplayer in KDE menu is pretty useless until you have gmplayer, cos mplayer needs the file as argument. In KDE, when you want to open a movie file right click and say open with... , put in mplayer and tick "Remember".

The KDE menu can be edited by the Configure menu command in the "settings" submenu of KDE start menu.


All times are GMT -5. The time now is 12:51 PM.