LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-04-2003, 02:09 PM   #1
jkpalmer52
Member
 
Registered: Oct 2003
Location: Chicago
Distribution: RH 7.2, RH 8.0 and RH 9.0
Posts: 32

Rep: Reputation: 15
Question What does ./configure mean?


I've seen many references in installation procedures for Apache and PHP to
do a
./configure --activate./.......

or
./configure --without-mysql.........

What directory should I be in and what user should I be logged in as?

How do I know what directory I should be in?

Is this is one of those "hidden" tricks of Linux.?

TIA

JP
 
Old 11-04-2003, 02:25 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,430

Rep: Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938Reputation: 1938
configure is a script that checks to see if you have the required software dependencies to compile the application and it will configure the make file for any specific options like --without-mysql. Which means I do not want to compile mysql database support.

The configure script is specific to the application you are compiling which is why you have the ./ i.e. current working directory. Depends on the application but to install you usually need to be logged in as root. The readme instructions will specify which steps that require you to be root.

The usual steps to compile and install a program.
./configure
make
make install
 
Old 11-04-2003, 02:29 PM   #3
LogicG8
Member
 
Registered: Jun 2003
Location: Long Island, NY
Distribution: Gentoo Unstable (what a misnomer)
Posts: 380

Rep: Reputation: 30
When you download the source code for a project
for example Apache it's usually in a "tar ball"
(looks like project-version.tar.gz)
when you extract the tar ball (tar xzvf project-version.tar.gz)
it usually creates a directory project-version
inside that directory there is the source code
Large projects get very complicated so in order to
simplify things the programmers use build tools like
autoconf. ./configure runs a script that automagically
configures things. You can pass arguments to the
configure script so it can create a Makefile that suits
your computer system. For example a project includes
a gui client but your computer doesn't have X but you
still want that program ./configure --no-gui
the options that you pass a configure script are entirely
up to the project so they vary considerably from script
to script. Usually there is the option ./configure --help
and it will list all of the possible options.

This isn't really one of the "hidden" tricks of linux like
messing w/ the kernel directly through /proc it's
pretty well documented. In fact most projects have
a file called README or INSTALL that tells you what
you need to do. Of course to make use of these
files you need to know how to extract an archive.

Good luck.

Oh yes ./ is a shorcut refering to the directory you are
in. so ./configure executes the configure script in the
directory you are in if there is one.
 
Old 11-04-2003, 02:57 PM   #4
Lostman
Member
 
Registered: Nov 2003
Location: Chicago, IL
Posts: 238

Rep: Reputation: 30
let's say, like in the case of gaim, there is no configure file. If I type "make" I get nothing. If I type "make install" I get nothing. I d/l a tar.gz, is there another way to install these?
 
Old 11-04-2003, 03:16 PM   #5
LogicG8
Member
 
Registered: Jun 2003
Location: Long Island, NY
Distribution: Gentoo Unstable (what a misnomer)
Posts: 380

Rep: Reputation: 30
In the case of gaim there are those readme and install files
that tell you all the secrets
 
Old 11-04-2003, 03:25 PM   #6
LogicG8
Member
 
Registered: Jun 2003
Location: Long Island, NY
Distribution: Gentoo Unstable (what a misnomer)
Posts: 380

Rep: Reputation: 30
I just d/led the gaim archive from sourceforge and
it does have a configure file

and there is a file called Install with installation instructions:

Quote:
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.

The file `configure.ac' is used to create `configure' by a program
called `autoconf'. You only need `configure.ac' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.

The simplest way to compile this package is:

1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.

Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.

2. Type `make' to compile the package.

3. Optionally, type `make check' to run any self-tests that come with
the package.

4. Type `make install' to install the programs and any data files and
documentation.

5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.

Compilers and Options
=====================

Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure

Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Configure dhcpd (Configure DHCP Server) hanserver2004 LinuxQuestions.org Member Success Stories 3 10-23-2006 07:39 AM
ardour wont configure: configure: error: C preprocessor "/lib/cpp" fails sanity check disciple061 Linux - Software 4 01-22-2005 01:35 PM
Configure dhcpd (Configure DHCP Server) hanserver2004 General 1 08-16-2004 02:39 PM
How to use GNU autoconf to generate a new configure from configure.in ?? vanhelsing Programming 5 08-05-2004 11:02 AM
configure: error: when trying to install / configure new software ? met tomfer007 Linux - Software 1 07-25-2004 04:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration