Difference between revisions of "Configure"

From AMule Project FAQ
Jump to: navigation, search
(Embedded crypto++ no longer supported)
 
(37 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 +
<center>'''English''' | [[Configure-de|Deutsch]]</center>
 
== Introduction ==
 
== Introduction ==
  
Line 5: Line 6:
 
Its purpose is to make it easy to port it to many platforms and to compile it and use it in all platforms in the very same way.
 
Its purpose is to make it easy to port it to many platforms and to compile it and use it in all platforms in the very same way.
  
You can set lots of parameters in it to adapt it to your system and to tweak it's features.
+
You can set lots of parameters in it to adapt it to your system and to tweak its features.
  
'''NOTE:''' This article is focused in [[aMule]]'s configure. Other configure scripts work in a similar way, but their options will differ. This article maight be usefull for them as well, but have in mind that they might have options not listed here and lack some listed here too.
+
'''NOTE:''' This article is focused in [[aMule]]'s ''configure''. Other ''configure'' scripts work in a similar way, but their options will differ. This article might be useful for them as well, but have in mind that they might have options not listed here and lack some listed here too.
  
 
== Main usage ==
 
== Main usage ==
  
It's usage is ''./configure [OPTION]... [VARIABLE=VALUE]...''
+
Its usage is ''./configure [OPTION]... [VARIABLE=VALUE]...''
  
So, as you can see, you can define its behaviour both through [[#Options|options]] and through [[#Variables|Variables]]
+
So, as you can see, you can define its behaviour both through [[#Options|options]] and through [[#Variables|variables]]
  
 
== Options ==
 
== Options ==
  
You can define one or more options. The available options in [[aMule]]'s configure are listed below. To better understand their meaning, they have been grouped into several tables with options which affect the behaviour of ''configure'' in a similar way.
+
You can define one or more options. The available options in [[aMule]]'s ''configure'' are listed below. To better understand their meaning, they have been grouped into several tables with options which affect the behaviour of ''configure'' in a similar way.
  
Please note that ''configure'' will (in most cases) not complain if you enter a non valid options or variables. So make sure you enter the options correctly (no typos) or they wil not only just do nothing, but also don't behave in the way you expected for taht specific options.
+
Please note that ''configure'' will (in most cases) not complain if you enter an invalid option or variable. So make sure you enter the options correctly (no typos) or they will have no effect and configure won't behave in the way you expected.
  
 
=== Main options ===
 
=== Main options ===
  
This options should exist in any configure script around the world. <They won't run the configure script to configure your application's compilation, but only output information you might need.
+
These options should exist in any ''configure'' script around the world. They won't run the ''configure'' script to configure your application's compilation, but only output information you might need.
  
 
{| border=1
 
{| border=1
 
|+ Basic options
 
|+ Basic options
 
|''-h'' or ''--help'' || This will display a help message summing up all ''configure'' options
 
|''-h'' or ''--help'' || This will display a help message summing up all ''configure'' options
 +
|-
 +
|''--help=short'' || This will display a help message summing up all ''configure'' options specific to this application (doesn't display generic configure options)
 
|-
 
|-
 
|''-V'' or ''--version'' || This will display the version information
 
|''-V'' or ''--version'' || This will display the version information
Line 34: Line 37:
 
=== Non-compilation common options ===
 
=== Non-compilation common options ===
  
This options should also exist on any configure script around the world. They will set some non-compilation related preferences.
+
These options should also exist on any ''configure'' script around the world. They will set some non-compilation related preferences.
  
{|
+
{| border=1
|+  
+
|+ Options directly related to the ''configure'' script
 
|''-q'' or ''--quiet'' or ''--silent'' || Do not print the `checking...' messages, only the final summed up ouput
 
|''-q'' or ''--quiet'' or ''--silent'' || Do not print the `checking...' messages, only the final summed up ouput
 
|-
 
|-
|''--cache-file=FILE || Store the checkings' ouputs in '''FILE''' in a script format, so you can reuse without the need to rerun ''configure'' (read the cached file for more information)
+
|''--cache-file=FILE'' || Store the checkings' ouputs in '''FILE''' in a script format, so you can reuse without the need to rerun ''configure'' (read the cached file for more information)
 
|-
 
|-
 
|''-C'' or ''--config-cache || Same as ''--cache-file=config.cache''
 
|''-C'' or ''--config-cache || Same as ''--cache-file=config.cache''
 
|-
 
|-
|''-n'' or ''--no-create || Just run configure, but do not create any file
+
|''-n'' or ''--no-create || Just run ''configure'', but do not create any files
 
|-
 
|-
 
|''--srcdir=DIR'' || Look for the sources in '''DIR'''. By default, the ''configure'' dir or its parent (''../'')
 
|''--srcdir=DIR'' || Look for the sources in '''DIR'''. By default, the ''configure'' dir or its parent (''../'')
Line 51: Line 54:
 
=== Common options ===
 
=== Common options ===
  
This options should also exist on any configure script around the world. This time, this ones will affect the compilation of the application, so be careful when using them. You should take a close look at the application's ''README'' document (if available) if you want to use any of them (and even if you don't, still take a look at it, since you might '''have''' to use some).  
+
These options should also exist on any ''configure'' script around the world. This time, these ones will affect the compilation of the application, so be careful when using them. You should take a close look at the application's ''README'' document (if available) if you want to use any of them (and even if you don't, still take a look at it, since you might '''have''' to use some).  
  
 
{| border=1
 
{| border=1
Line 66: Line 69:
 
| ''--sbindir=DIR'' || Where to store system administrator executables. By default, '''''EPREFIX'''/sbin''
 
| ''--sbindir=DIR'' || Where to store system administrator executables. By default, '''''EPREFIX'''/sbin''
 
|-
 
|-
| ''--libexecdir=DIR'' || Where to store program executable. By default '''''EPREFIX'''/libexeec''
+
| ''--libexecdir=DIR'' || Where to store program executable. By default '''''EPREFIX'''/libexec''
 
|-
 
|-
 
| ''--datadir=DIR'' || Where to store read-only architecture independent data. By default, '''''EPREFIX'''/share''
 
| ''--datadir=DIR'' || Where to store read-only architecture independent data. By default, '''''EPREFIX'''/share''
Line 72: Line 75:
 
| ''--sysconfdir=DIR'' || Where to install read-only single-machine data. By default, '''''PREFIX'''/etc''
 
| ''--sysconfdir=DIR'' || Where to install read-only single-machine data. By default, '''''PREFIX'''/etc''
 
|-
 
|-
| ''--sharedstatedir=DIR'' || Directory with hangable architacture-independent data. By default '''''PREFIX'''/com''
+
| ''--sharedstatedir=DIR'' || Where to store modifiable architacture-independent data. By default '''''PREFIX'''/com''
 
|-
 
|-
| ''--localstatedir=DIR'' || Modifiable single-machine data. By default, '''''PREFIX'''/var''
+
| ''--localstatedir=DIR'' || Where to store modifiable single-machine data. By default, '''''PREFIX'''/var''
 
|-
 
|-
| ''--libdir=DIR || Directory to search libs object code libraries. By default, '''''EPREFIX'''/lib''
+
| ''--libdir=DIR || Where to search libs object code libraries. By default, '''''EPREFIX'''/lib''
 
|-
 
|-
| ''--includedir=DIR'' || Directory containing the C header files. By default, '''''PREFIX'''''/include''
+
| ''--includedir=DIR'' || Directory containing the [http://en.wikipedia.org/wiki/C_programming_language C] header files. By default, '''''PREFIX'''''/include''
 
|-
 
|-
| ''--oldincludedir=DIR'' || Directory containing C header files for non-GCC. By default, ''/usr/include''
+
| ''--oldincludedir=DIR'' || Directory containing [http://en.wikipedia.org/wiki/C_programming_language C] header files for non-GCC. By default, ''/usr/include''
 
|-
 
|-
| ''--infodir=DIR'' ||Where to store info and documentation files. By default, '''''EPREFIX'''/info''
+
| ''--infodir=DIR'' || Where to store info and documentation files. By default, '''''EPREFIX'''/info''
 
|-
 
|-
 
| ''--mandir=DIR'' || Where to store man pages. By default, '''''EPREFIX'''/man
 
| ''--mandir=DIR'' || Where to store man pages. By default, '''''EPREFIX'''/man
Line 89: Line 92:
 
{| border=1
 
{| border=1
 
|+ General rule to program enabling and dirs specification
 
|+ General rule to program enabling and dirs specification
| ''--PROGRAM-prefix=PREFIX'' || Prepend '''PREFIX''' to installed '''PROGRAM''' directories
+
| ''--program-prefix=PREFIX'' || Prepend '''PREFIX''' to installed program names
 
|-
 
|-
| ''--PROGRAM-suffix=SUFFIX'' || Append '''SUFFIX''' to installed '''PROGRAM''' directories
+
| ''--program-suffix=SUFFIX'' || Append '''SUFFIX''' to installed program names
 
|-
 
|-
| ''--PROGRAM-transform-name=SUBST'' || Run ''sed '''SUBST''''' on installed '''PROGRAM''' names
+
| ''--program-transform-name=SUBST'' || Run ''[http://www.gnu.org/software/sed/sed.html sed] '''SUBST''''' on installed program names
 
|}
 
|}
  
Line 100: Line 103:
 
| ''--disable-FEATURE'' || Do not include '''FEATURE'''. Equivalent to ''--enable-'''FEATURE'''=no'' (see below)
 
| ''--disable-FEATURE'' || Do not include '''FEATURE'''. Equivalent to ''--enable-'''FEATURE'''=no'' (see below)
 
|-
 
|-
| ''--enable-FEATURE'' || Include ''FEATURE'''. Equivalent to ''--enable-'''FEATURE'''=yes'' (see below)
+
| ''--enable-FEATURE'' || Include '''FEATURE'''. Equivalent to ''--enable-'''FEATURE'''=yes'' (see below)
 
|-
 
|-
| ''--enable-FEATURE=VALUE || Include '''FEATURE''' and specify it's value to '''VALUE'''. The meaning of the value should be explained in the ''configure --help'' output of the script
+
| ''--enable-FEATURE=VALUE'' || Include '''FEATURE''' and specify it's value to '''VALUE'''. The meaning of the value should be explained in the ''configure --help'' output of the script
 
|}
 
|}
  
Line 125: Line 128:
 
=== Very-common options ===
 
=== Very-common options ===
  
In most configure scripts, or at least on most of the configure scripts delivered with X applications, you will be able to use this options.
+
In most ''configure'' scripts you will also be able to use these options.
  
 
{| border=1
 
{| border=1
|+ X directory specifications
+
|+ Quite common compiler options
| ''--with-x'' || Use the X Window System
+
| ''--with-gnu-ld'' || Use the [http://www.gnu.org/software/binutils/manual/ld-2.9.1/ld.html GNU ld] as linker, without testing if it is the default linker in the system
|-
+
| ''--x-includes=DIR'' || '''DIR''' contains X's include files
+
|-
+
| ''--x-libraries=DIR'' || '''DIR''' contains X's libraries
+
 
|}
 
|}
  
 
{| border=1
 
{| border=1
|+ Other very common options
+
|+ X directory specifications
| ''--with-gnu-ld'' || Use as the linker, without testing if it is the default linker in the system
+
| ''--with-x'' || Use the [http://www.xfree86.org X Window System]
 +
|-
 +
| ''--x-includes=DIR'' || '''DIR''' contains [http://www.xfree86.org X]'s include files
 +
|-
 +
| ''--x-libraries=DIR'' || '''DIR''' contains [http://www.xfree86.org X]'s libraries
 
|}
 
|}
  
 
=== [[aMule]] options ===
 
=== [[aMule]] options ===
  
The following options are specific to [[aMule]]'s configure script. They will allow you to enable and disable them, so you should really take a look at them or you might sadly find out you lack things you would like to have in you [[aMule]] system ;-)
+
The following options are specific to [[aMule]]'s ''configure'' script. They will allow you to enable and disable them, so you should really take a look at them or you might sadly find out you lack things you would like to have in your [[aMule]] system ;-)
  
 
{| border=1
 
{| border=1
|+ Optional features
+
|+ Developer options
 
|-
 
|-
| ''--enable-maintainer-mode'' || enable make rules and dependencies not useful (and sometimes confusing) to the casual installer
+
| ''--enable-maintainer-mode'' || Activate some extra instructions only useful for developers (and totaly non-recommended to normal users)
 
|-
 
|-
| ''--disable-dependency-tracking'' || speeds up one-time build
+
| ''--disable-dependency-tracking'' || Makes the application compile faster, but causes problems if you change the source code and try to compile again. Dependency tracking allows the make process to know which things to rebuild when something changes. If you do not plan to compile the application again with those same sources, you can safely use this option
 
|-
 
|-
| ''--enable-dependency-tracking'' || do not reject slow dependency extractors
+
| ''--enable-dependency-tracking'' || Keep track of the dependencies so that on next build, only changed files will be recompiled. It slows down the compilation a little. This is the default
 
|-
 
|-
| ''--enable-debug'' || enable additional debugging output
+
| ''--enable-ccache'' || Enable [http://ccache.samba.org ccache]. This will make following compilations faster since only the modified bits of code will be recompiled. If you don't plan to compile [[aMule]] very often, don't enable this, since it takes longer to compile on the first compilation and it requires lots of disk space
 
|-
 
|-
| ''--disable-debug'' || disable additional debugging output
+
| ''--enable-profile'' || Enable code profiling (which allows to see how much time and resources are spent on each part of the code, though it will make [[aMule]] run much slower, so, in most cases, don't use it). The output file is ''gmon.out'' and can be viewed with ''gprof''. For more information, ''man [http://www.cs.utah.edu/dept/old/texinfo/as/gprof_toc.html gprof]'' and ''man [http://gcc.gnu.org gcc]'' (in the man pages of ''[http://gcc.gnu.org gcc]'', search for the command line option ''-pg'')
 +
|}
 +
 
 +
{| border=1
 +
|+ Compilation tweaks
 +
| ''--disable-debug'' || Disables outputing information of the application execution. This information is useful to track bugs, so you might not want to use this option or you will not be able to report bugs properly
 
|-
 
|-
| ''--enable-optimize'' || enable code optimizing
+
| ''--enable-optimize'' || Optimizes the code to run (a little) faster. Using this option will not allow you to create useful bug reports so you might not want to enable it
 
|-
 
|-
| ''--enable-optimise'' || enable code optimizing (deprecated)
+
| ''--disable-rpath'' || Do not write the libraries' path into the binary. Useful only if you plan to move the binary to other systems or if you move your libraries often. Only use it if you know what you're doing, since it will make [[aMule]] run slower
 
|-
 
|-
| ''--enable-profile'' || enable code profiling
+
| ''--enable-static'' || Creates statically linked executables, which means that they will need no libraries since any needed library will be included in the executable file. The executable might run faster, and will be easily portable between systems using the same platform, but will be incredibly bigger in size
|-
+
|}
| ''--enable-static'' || produce a statically linked executable
+
 
|-
+
{| border=1
| ''--enable-embedded_crypto'' || use embedded Crypto code (default)
+
|+ Compilation of external libraries
|-
+
| ''--disable-nls'' || Do not use [http://www.vitavoom.com/postgresql-docs/nls.html Native Language Support]. This way [http://www.gnu.org/software/gettext gettext] won't be required, but translations will be disabled
| ''--enable-amulecmd'' || compile aMule command line client
+
|}
|-
+
 
| ''--enable-amulecmdgui'' || compile aMule command line client (GUI version)
+
{| border=1
|-
+
|+ [[aMule]] binaries selection
| ''--enable-amule-gui'' || compile aMule remote GUI (EXPERIMENTAL)
+
| ''--disable-monolithic'' || disable building of the [[aMule|monolithic aMule]] app. This is normally not recommended, unless you really know what you are doing (e.g. to compile only the [[aMuled|daemon]])
|-
+
| ''--enable-amule-daemon'' || compile aMule daemon version
+
 
|-
 
|-
| ''--enable-webserver'' || compile aMule WebServer
+
| ''--enable-amule-daemon'' || Compile [[aMuled|aMule daemon]]
 
|-
 
|-
| ''--enable-webservergui'' || compile aMule WebServer GUI
+
| ''--enable-amulecmd'' || Compile the [[aMuleCMD|aMule command line client]]
 
|-
 
|-
| ''--enable-cas'' || compile C aMule Statistics
+
| ''--enable-webserver'' || Compile [[aMuleWeb|aMule's WebServer]]
 
|-
 
|-
| ''--enable-wxcas'' || compile aMule GUI Statistics
+
| ''--enable-amule-gui'' || Compile [[aMuleGUI|aMule remote GUI]]
 
|-
 
|-
| ''--disable-ed2k'' || don't compile aMule ed2k links handler
+
| ''--enable-cas'' || Compile [[CAS|C aMule Statistics]]
 
|-
 
|-
| ''--enable-alc'' || compile aMuleLinkCreator GUI version
+
| ''--enable-wxcas'' || Compile [[wxCAS|aMule GUI Statistics]]
 
|-
 
|-
| ''--enable-alcc'' || compile aMuleLinkCreator for console
+
| ''--disable-ed2k'' || Don't compile [[ed2k command|aMule's ed2k links handler]]
 
|-
 
|-
| ''--disable-gsocket'' || disable gsocket.c linking
+
| ''--enable-alc'' || Compile [[aLinkCreator|aMuleLinkCreator GUI version]]
 
|-
 
|-
| ''--disable-gtk'' || disable pure GTK code in amule
+
| ''--enable-alcc'' || Compile [[aLinkCreatorConsole|aMuleLinkCreator for console]]
|-
+
|}
| ''--enable-utf8-systray'' || use UTF-8 encoded strings in the systray
+
 
|-
+
{| border=1
| ''--disable-systray'' || disable SysTray compilation
+
|+ Configure tweaks
|-
+
| ''--disable-gtktest'' || Do not try to compile a test [http://www.gtk.org GTK] (either [http://www.gtk.org GTK]1 or [http://www.gtk.org GTK]2 depending on your system's configuration) program to see if your system has a proper [http://www.gtk.org GTK] configuration. This will make the ''configure'' script run a (very) little faster, but you should still not use it unless you know what you are doing, since the ''configure'' script could miss some tests.
| ''--disable-monolithic'' || disable building of the monolithic aMule app
+
|-
+
| ''--disable-gtktest'' || do not try to compile and run a test GTK+ program
+
|-
+
| ''--disable-gtktest'' || do not try to compile and run a test GTK program
+
|-
+
| ''--disable-rpath'' || do not hardcode runtime library paths
+
|-
+
| ''--disable-nls'' || do not use Native Language Support
+
|-
+
| ''--enable-ccache'' || enable ccache support for fast recompilation
+
 
|}
 
|}
  
Line 214: Line 209:
  
 
This options are specific to [[aMule]]'s configure script, but they are not directly related to [[aMule]]. They just tell were some libraries or headers are located in your system, so that [[aMule]] can find them when compiling. Use them if you have those files in non-standard paths or when you know what you are doing.
 
This options are specific to [[aMule]]'s configure script, but they are not directly related to [[aMule]]. They just tell were some libraries or headers are located in your system, so that [[aMule]] can find them when compiling. Use them if you have those files in non-standard paths or when you know what you are doing.
 +
 +
To better understand these options, take a look at the [[#Common options|common options]] chapter in this article.
  
 
{| border=1
 
{| border=1
|+ Optional packages
+
|+ [http://www.gzip.org/zlib zLib]
| ''--with-zlib=PREFIX'' || use zlib in PREFIX
+
| ''--with-zlib=PREFIX'' || Look for [http://www.gzip.org/zlib zLib] files in '''PREFIX'''
 +
|}
 +
 
 +
{| border=1
 +
|+ [http://curl.haxx.se Curl]
 +
| ''--with-curl-config=CONFIG'' || '''CONFIG''' is the path of ''curl-config''
 +
|}
 +
 
 +
{| border=1
 +
|+ [http://www.libgd.org LibGD]
 +
| ''--with-gdlib-prefix=PREFIX'' || Look for [http://www.libgd.org LibGD] files in '''PREFIX'''
 
|-
 
|-
| ''--with-curl-config=CONFIG'' || curl-config script to use (optional)
+
| ''--with-gdlib-exec-prefix=PREFIX'' || Look for GDLib libraries in '''PREFIX'''.
 
|-
 
|-
| ''--with-curl-prefix=PREFIX'' || prefix where curl is installed (optional) (unused)
+
| ''--with-gdlib-config=CONFIG'' || '''CONFIG''' is the path of ''gdlib-config''
 +
|}
 +
 
 +
{| border=1
 +
|+ [http://www.libpng.org LibPNG]
 +
| ''--with-libpng-prefix=PREFIX'' || Look for [http://www.libpng.org LibPNG] files in '''PREFIX'''
 
|-
 
|-
| ''--with-gdlib-prefix=PREFIX'' || prefix where gdlib is installed (optional)
+
| ''--with-libpng-exec-prefix=PREFIX'' || Look for [http://www.libpng.org LibPNG] libraries in '''PREFIX'''
 
|-
 
|-
| ''--with-gdlib-exec-prefix=PREFIX'' || exec prefix where gdlib  is installed (optional)
+
| ''--with-libpng-config=CONFIG'' || '''CONFIG''' is the path of ''libpng-config''
 +
|}
 +
 
 +
{| border=1
 +
|+ [[wxWidgets]]
 +
| ''--with-wx-prefix=PREFIX'' || Look for [[wxWidgets]] files in '''PREFIX'''
 
|-
 
|-
| ''--with-gdlib-config=CONFIG'' || gdlib-config script to use (optional)
+
| ''--with-wx-exec-prefix=PREFIX'' || Look for [[wxWidgets]] libraries in '''PREFIX'''
 
|-
 
|-
| ''--with-libpng-prefix=PREFIX'' || prefix where libpng is installed
+
| ''--with-wx-config=CONFIG'' || '''CONFIG''' is the path of ''wx-config''
 +
|}
 +
 
 +
{| border=1
 +
|+ [[wxBase]]
 +
| ''--with-wxbase-prefix=PREFIX'' || Look for [[wxBase]] files in '''PREFIX'''
 
|-
 
|-
| ''--with-libpng-exec-prefix=PREFIX'' || exec prefix where libpng  is installed
+
| ''--with-wxbase-exec-prefix=PREFIX'' || Look for [[wxBase]] libraries in '''PREFIX'''
 
|-
 
|-
| ''--with-libpng-config=CONFIG'' || libpng-config script to use
+
| ''--with-wxbase-config=CONFIG'' || '''CONFIG''' is the path of ''wxbase-config''
 +
|}
 +
 
 +
{| border=1
 +
|+ [http://www.gtk.org GTK]
 +
| ''--with-gtk-prefix=PREFIX'' || Look for [http://www.gtk.org GTK] (not [http://www.gtk.org GTK]2) files in '''PREFIX'''
 
|-
 
|-
| ''--with-wx-prefix=PREFIX'' || prefix where wxWidgets is installed (optional)
+
| ''--with-gtk-exec-prefix=PREFIX'' || Look for [http://www.gtk.org GTK] (not [http://www.gtk.org GTK]2) libraries in '''PREFIX'''
 +
|}
 +
 
 +
{| border=1
 +
|+ [http://www.openssl.org/docs/crypto/crypto.html Crypto++]
 +
| ''--with-crypto-prefix=PREFIX'' || Look for [http://www.openssl.org/docs/crypto/crypto.html Crypto++] files in '''PREFIX'''
 +
|}
 +
 
 +
{| border=1
 +
|+ [http://www.gnu.org/software/libiconv LibIConv]
 +
| ''--with-libiconv-prefix=PREFIX'' || Look for [http://www.gnu.org/software/libiconv LibIConv] files in '''''PREFIX'''/include'' and '''''PREFIX'''/lib''
 
|-
 
|-
| ''--with-wx-exec-prefix=PREFIX'' || exec prefix where wxWidgets is installed (optional)
+
| ''--without-libiconv-prefix'' || Don't search for [http://www.gnu.org/software/libiconv LibIConv] in includedir and libdir
|-
+
|}
| ''--with-wx-config=CONFIG'' || wx-config script to use (optional)
+
 
 +
{| border=1
 +
|+ [http://www.gnu.org/software/gettext gettext]
 +
| ''--with-included-gettext'' || Use the [http://www.gnu.org/software/gettext GNU gettext] library included in the ''intl/'' directory instead of the system's. This is only for strange systems where [http://www.gnu.org/software/gettext gettext], for some reason, will not handle [[aMule]]'s catalog files
 +
|}
 +
 
 +
{| border=1
 +
|+ [http://gnuwin32.sourceforge.net/packages/libintl.htm LibIntl]
 +
| ''--with-libintl-prefix=PREFIX'' || Look for [http://gnuwin32.sourceforge.net/packages/libintl.htm LibIntl] files in '''''PREFIX'''/include''' and '''''PREFIX'''/lib''''
 
|-
 
|-
| ''--with-wxbase-prefix=PREFIX'' || prefix where wxWidgets base is installed (optional)
+
| ''--without-libintl-prefix'' || Don't search for [http://gnuwin32.sourceforge.net/packages/libintl.htm LibIntl] in includedir and libdir
|-
+
|}
| ''--with-wxbase-exec-prefix=PREFIX'' || exec prefix where wxWidgetsbase is installed (optional)
+
 
|-
+
{| border=1
| ''--with-wxbase-config=CONFIG'' || wxbase-config script to use (optional)
+
|+ [http://ccache.samba.org ccache]
|-
+
| ''--with-ccache-prefix=PREFIX'' || Look for [http://ccache.samba.org ccache] files in '''PREFIX'''
| ''--with-gtk-prefix=PREFIX'' || prefix where GTK is installed (optional)
+
|-
+
| ''--with-gtk-exec-prefix=PREFIX'' || exec prefix where GTK is installed (optional)
+
|-
+
| ''--with-crypto-prefix=PREFIX'' || prefix where crypto++ is installed (optional)
+
|-
+
| ''--with-libiconv-prefix=DIR'' || search for libiconv in DIR/include and DIR/lib
+
|-
+
| ''--without-libiconv-prefix'' || don't search for libiconv in includedir and libdir
+
|-
+
| ''--with-included-gettext'' || use the GNU gettext library included here
+
|-
+
| ''--with-libintl-prefix=DIR'' || search for libintl in DIR/include and DIR/lib
+
|-
+
| ''--without-libintl-prefix'' || don't search for libintl in includedir and libdir
+
|-
+
| ''--with-ccache-prefix=PREFIX'' || prefix where ccache is installed (optional)
+
 
|}
 
|}
  
 
== Variables ==
 
== Variables ==
  
Before you take a look at the [[#Variables and what they mean|variables and what they mean]], you must take a look at the two variable's [[#Usage types|usage types]] available.
+
Before you take a look at the [[#Variables and what they mean|variables and what they mean]], you must take a look at the two variable [[#Usage types|usage types]] available.
  
 
=== Usage types ===
 
=== Usage types ===
  
You can either use [[#Environmental variables|environmental variables]] or you can [[#Configure variables|enter variables directly into the ''configure'' command]].
+
You can either use [[#Environment variables|environment variables]] or you can [[#Configure variables|enter variables directly into the ''configure'' command]].
  
==== Environmental variables ====
+
==== Environment variables ====
  
If you plan to use environmental variables, you will affect the behaviour of ''configure'' and any other program you run in that same shell untill you end your session. You must set them '''before''' running configure. To set them, run
+
If you plan to use environment variables, you will affect the behaviour of ''configure'' and any other program you run in that same shell until you end your session. You must set them '''before''' running configure. To set them, run
  
 
  export ''VAR=VALUE'''
 
  export ''VAR=VALUE'''
Line 284: Line 312:
 
==== Configure variables ====
 
==== Configure variables ====
  
If you don't want to use environmental variables, you can pass them into the ''configure'' command, this way:
+
If you don't want to use environment variables, you can pass them into the ''configure'' command, this way:
  
 
  configure VAR=VALUE
 
  configure VAR=VALUE
Line 292: Line 320:
 
=== Variables and what they mean ===
 
=== Variables and what they mean ===
  
Do '''NOT''' touch this variables if you don't know what you are doing!
+
Do '''NOT''' touch these variables if you don't know what you are doing!
  
This are some of the most commonly used environmental for ''configure'':
+
These are some of the most commonly used variables for ''configure'':
  
 
{| border=1
 
{| border=1
|+ Environmental variables
+
|+ Variables
| ''CC'' || C compiler command to use
+
| ''CC'' || [http://en.wikipedia.org/wiki/C_programming_language C] compiler command to use
 
|-
 
|-
| ''CXX'' || C++ compiler command to use (e.g. ''g++'')
+
| ''CXX'' || [http://en.wikipedia.org/wiki/C_Plus_Plus C++] compiler command to use (e.g. ''[http://gcc.gnu.org g++]'')
 
|-
 
|-
| ''CPP'' || C preprocessor command to use
+
| ''CPP'' || [http://en.wikipedia.org/wiki/C_programming_language C] preprocessor command to use
 
|-
 
|-
| ''CFLAGS'' || C compiler flags
+
| ''CFLAGS'' || [http://en.wikipedia.org/wiki/C_programming_language C] compiler flags
 
|-
 
|-
| ''CXXCPP'' || C++ preprocessor command to use
+
| ''CXXCPP'' || [http://en.wikipedia.org/wiki/C_Plus_Plus C++] preprocessor command to use
 
|-
 
|-
| ''CXXFLAGS'' || C++ compiler flags
+
| ''CXXFLAGS'' || [http://en.wikipedia.org/wiki/C_Plus_Plus C++] compiler flags
 
|-
 
|-
 
| ''LDFLAGS'' || Linker flags. Usually used to specify additional library directories (e.g. ''LDFLAGS="-L/usr/lib"'')
 
| ''LDFLAGS'' || Linker flags. Usually used to specify additional library directories (e.g. ''LDFLAGS="-L/usr/lib"'')
 
|-
 
|-
| ''CPPFLAGS'' || C/C++ preprocessor flags (e.g. ''CPPFLAGS="-I/usr/include"'')
+
| ''CPPFLAGS'' || [http://en.wikipedia.org/wiki/C_programming_language C]/[http://en.wikipedia.org/wiki/C_Plus_Plus C++] preprocessor flags (e.g. ''CPPFLAGS="-I/usr/include"'')
 
|}
 
|}
  
Line 319: Line 347:
 
This article is mainly an explanation (dummy-proof) of the output of ''configure --help''.
 
This article is mainly an explanation (dummy-proof) of the output of ''configure --help''.
  
Anyway, it could (rarely) be out of date. So, if tehre's something you want to do with ''configure'' that is not listed here, run ''configure --help'' and see if it is listed there.
+
Anyway, it could (rarely) be out of date. So, if there's something you want to do with ''configure'' that is not listed here, run ''configure --help'' and see if it is listed there.
  
Of course, you can always take a look at the [http://www.airs.com/ian/configure|GNU configure page]].
+
Of course, you can always take a look at the [http://www.airs.com/ian/configure GNU configure page].

Latest revision as of 22:20, 6 May 2009

English | Deutsch

Introduction

configure configures aMule to adapt to many kinds of systems.

Its purpose is to make it easy to port it to many platforms and to compile it and use it in all platforms in the very same way.

You can set lots of parameters in it to adapt it to your system and to tweak its features.

NOTE: This article is focused in aMule's configure. Other configure scripts work in a similar way, but their options will differ. This article might be useful for them as well, but have in mind that they might have options not listed here and lack some listed here too.

Main usage

Its usage is ./configure [OPTION]... [VARIABLE=VALUE]...

So, as you can see, you can define its behaviour both through options and through variables

Options

You can define one or more options. The available options in aMule's configure are listed below. To better understand their meaning, they have been grouped into several tables with options which affect the behaviour of configure in a similar way.

Please note that configure will (in most cases) not complain if you enter an invalid option or variable. So make sure you enter the options correctly (no typos) or they will have no effect and configure won't behave in the way you expected.

Main options

These options should exist in any configure script around the world. They won't run the configure script to configure your application's compilation, but only output information you might need.

Basic options
-h or --help This will display a help message summing up all configure options
--help=short This will display a help message summing up all configure options specific to this application (doesn't display generic configure options)
-V or --version This will display the version information

Non-compilation common options

These options should also exist on any configure script around the world. They will set some non-compilation related preferences.

Options directly related to the configure script
-q or --quiet or --silent Do not print the `checking...' messages, only the final summed up ouput
--cache-file=FILE Store the checkings' ouputs in FILE in a script format, so you can reuse without the need to rerun configure (read the cached file for more information)
-C or --config-cache Same as --cache-file=config.cache
-n or --no-create Just run configure, but do not create any files
--srcdir=DIR Look for the sources in DIR. By default, the configure dir or its parent (../)

Common options

These options should also exist on any configure script around the world. This time, these ones will affect the compilation of the application, so be careful when using them. You should take a close look at the application's README document (if available) if you want to use any of them (and even if you don't, still take a look at it, since you might have to use some).

Installation directories options
--prefix=PREFIX Set where to install architecture-independent files (data) in PREFIX. By dafault, this is set to /usr/local
--exec-prefix=EPREFIX Set where to install architecture-dependent files (mainly binaries) in EPREFIX. By default, this is set to the same value as PREFIX.
Advanced installation directories options
--bindir=DIR Where to store user executables. By default, EPREFIX/bin
--sbindir=DIR Where to store system administrator executables. By default, EPREFIX/sbin
--libexecdir=DIR Where to store program executable. By default EPREFIX/libexec
--datadir=DIR Where to store read-only architecture independent data. By default, EPREFIX/share
--sysconfdir=DIR Where to install read-only single-machine data. By default, PREFIX/etc
--sharedstatedir=DIR Where to store modifiable architacture-independent data. By default PREFIX/com
--localstatedir=DIR Where to store modifiable single-machine data. By default, PREFIX/var
--libdir=DIR Where to search libs object code libraries. By default, EPREFIX/lib
--includedir=DIR Directory containing the C header files. By default, PREFIX/include
--oldincludedir=DIR Directory containing C header files for non-GCC. By default, /usr/include
--infodir=DIR Where to store info and documentation files. By default, EPREFIX/info
--mandir=DIR Where to store man pages. By default, EPREFIX/man
General rule to program enabling and dirs specification
--program-prefix=PREFIX Prepend PREFIX to installed program names
--program-suffix=SUFFIX Append SUFFIX to installed program names
--program-transform-name=SUBST Run sed SUBST on installed program names
General rule to enabling or disabling features (sometimes it enables or disables the compilation of a program)
--disable-FEATURE Do not include FEATURE. Equivalent to --enable-FEATURE=no (see below)
--enable-FEATURE Include FEATURE. Equivalent to --enable-FEATURE=yes (see below)
--enable-FEATURE=VALUE Include FEATURE and specify it's value to VALUE. The meaning of the value should be explained in the configure --help output of the script
--without-PACKAGE Do not use PACKAGE. Equivalent to --with-PACKAGE=no (see below)
--with-PACKAGE use PACKAGE. Equivalent to --with-PACKAGE=yes (see below)
--with-PACKAGE=VALUE Use PACKAGE and set its value to VALUE
System specifications
--build=BUILD Configure for building on BUILD platform. By default, it guesses the platform it is being run on
--host=HOST Cross-compile to build programs to run on HOST platforms. By default, same as BUILD
--target=TARGET Configure for building compilers for TARGET platfroms. By default, same as HOST

Very-common options

In most configure scripts you will also be able to use these options.

Quite common compiler options
--with-gnu-ld Use the GNU ld as linker, without testing if it is the default linker in the system
X directory specifications
--with-x Use the X Window System
--x-includes=DIR DIR contains X's include files
--x-libraries=DIR DIR contains X's libraries

aMule options

The following options are specific to aMule's configure script. They will allow you to enable and disable them, so you should really take a look at them or you might sadly find out you lack things you would like to have in your aMule system ;-)

Developer options
--enable-maintainer-mode Activate some extra instructions only useful for developers (and totaly non-recommended to normal users)
--disable-dependency-tracking Makes the application compile faster, but causes problems if you change the source code and try to compile again. Dependency tracking allows the make process to know which things to rebuild when something changes. If you do not plan to compile the application again with those same sources, you can safely use this option
--enable-dependency-tracking Keep track of the dependencies so that on next build, only changed files will be recompiled. It slows down the compilation a little. This is the default
--enable-ccache Enable ccache. This will make following compilations faster since only the modified bits of code will be recompiled. If you don't plan to compile aMule very often, don't enable this, since it takes longer to compile on the first compilation and it requires lots of disk space
--enable-profile Enable code profiling (which allows to see how much time and resources are spent on each part of the code, though it will make aMule run much slower, so, in most cases, don't use it). The output file is gmon.out and can be viewed with gprof. For more information, man gprof and man gcc (in the man pages of gcc, search for the command line option -pg)
Compilation tweaks
--disable-debug Disables outputing information of the application execution. This information is useful to track bugs, so you might not want to use this option or you will not be able to report bugs properly
--enable-optimize Optimizes the code to run (a little) faster. Using this option will not allow you to create useful bug reports so you might not want to enable it
--disable-rpath Do not write the libraries' path into the binary. Useful only if you plan to move the binary to other systems or if you move your libraries often. Only use it if you know what you're doing, since it will make aMule run slower
--enable-static Creates statically linked executables, which means that they will need no libraries since any needed library will be included in the executable file. The executable might run faster, and will be easily portable between systems using the same platform, but will be incredibly bigger in size
Compilation of external libraries
--disable-nls Do not use Native Language Support. This way gettext won't be required, but translations will be disabled
aMule binaries selection
--disable-monolithic disable building of the monolithic aMule app. This is normally not recommended, unless you really know what you are doing (e.g. to compile only the daemon)
--enable-amule-daemon Compile aMule daemon
--enable-amulecmd Compile the aMule command line client
--enable-webserver Compile aMule's WebServer
--enable-amule-gui Compile aMule remote GUI
--enable-cas Compile C aMule Statistics
--enable-wxcas Compile aMule GUI Statistics
--disable-ed2k Don't compile aMule's ed2k links handler
--enable-alc Compile aMuleLinkCreator GUI version
--enable-alcc Compile aMuleLinkCreator for console
Configure tweaks
--disable-gtktest Do not try to compile a test GTK (either GTK1 or GTK2 depending on your system's configuration) program to see if your system has a proper GTK configuration. This will make the configure script run a (very) little faster, but you should still not use it unless you know what you are doing, since the configure script could miss some tests.

aMule compilation settings

This options are specific to aMule's configure script, but they are not directly related to aMule. They just tell were some libraries or headers are located in your system, so that aMule can find them when compiling. Use them if you have those files in non-standard paths or when you know what you are doing.

To better understand these options, take a look at the common options chapter in this article.

zLib
--with-zlib=PREFIX Look for zLib files in PREFIX
Curl
--with-curl-config=CONFIG CONFIG is the path of curl-config
LibGD
--with-gdlib-prefix=PREFIX Look for LibGD files in PREFIX
--with-gdlib-exec-prefix=PREFIX Look for GDLib libraries in PREFIX.
--with-gdlib-config=CONFIG CONFIG is the path of gdlib-config
LibPNG
--with-libpng-prefix=PREFIX Look for LibPNG files in PREFIX
--with-libpng-exec-prefix=PREFIX Look for LibPNG libraries in PREFIX
--with-libpng-config=CONFIG CONFIG is the path of libpng-config
wxWidgets
--with-wx-prefix=PREFIX Look for wxWidgets files in PREFIX
--with-wx-exec-prefix=PREFIX Look for wxWidgets libraries in PREFIX
--with-wx-config=CONFIG CONFIG is the path of wx-config
wxBase
--with-wxbase-prefix=PREFIX Look for wxBase files in PREFIX
--with-wxbase-exec-prefix=PREFIX Look for wxBase libraries in PREFIX
--with-wxbase-config=CONFIG CONFIG is the path of wxbase-config
GTK
--with-gtk-prefix=PREFIX Look for GTK (not GTK2) files in PREFIX
--with-gtk-exec-prefix=PREFIX Look for GTK (not GTK2) libraries in PREFIX
Crypto++
--with-crypto-prefix=PREFIX Look for Crypto++ files in PREFIX
LibIConv
--with-libiconv-prefix=PREFIX Look for LibIConv files in PREFIX/include and PREFIX/lib
--without-libiconv-prefix Don't search for LibIConv in includedir and libdir
gettext
--with-included-gettext Use the GNU gettext library included in the intl/ directory instead of the system's. This is only for strange systems where gettext, for some reason, will not handle aMule's catalog files
LibIntl
--with-libintl-prefix=PREFIX Look for LibIntl files in PREFIX/include and PREFIX/lib'
--without-libintl-prefix Don't search for LibIntl in includedir and libdir
ccache
--with-ccache-prefix=PREFIX Look for ccache files in PREFIX

Variables

Before you take a look at the variables and what they mean, you must take a look at the two variable usage types available.

Usage types

You can either use environment variables or you can enter variables directly into the configure command.

Environment variables

If you plan to use environment variables, you will affect the behaviour of configure and any other program you run in that same shell until you end your session. You must set them before running configure. To set them, run

export VAR=VALUE'

where VAR is the name of the environmental variable and VALUE is it's value.

Configure variables

If you don't want to use environment variables, you can pass them into the configure command, this way:

configure VAR=VALUE

where VAR stands for the variable name and VALUE is its value.

Variables and what they mean

Do NOT touch these variables if you don't know what you are doing!

These are some of the most commonly used variables for configure:

Variables
CC C compiler command to use
CXX C++ compiler command to use (e.g. g++)
CPP C preprocessor command to use
CFLAGS C compiler flags
CXXCPP C++ preprocessor command to use
CXXFLAGS C++ compiler flags
LDFLAGS Linker flags. Usually used to specify additional library directories (e.g. LDFLAGS="-L/usr/lib")
CPPFLAGS C/C++ preprocessor flags (e.g. CPPFLAGS="-I/usr/include")

More information

This article is mainly an explanation (dummy-proof) of the output of configure --help.

Anyway, it could (rarely) be out of date. So, if there's something you want to do with configure that is not listed here, run configure --help and see if it is listed there.

Of course, you can always take a look at the GNU configure page.