Configure-de

From AMule Project FAQ
Revision as of 15:45, 28 November 2007 by Vollstrecker (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
English | Deutsch

Translation in Progress. Will be finished soon

Einleitung

configure konfiguriert aMule zur Verwendung auf vielen verschiedenen Systemen.

Sein Zeck is es, das Portieren auf unterschiedliche Plattformen zu vereinfachen, und das Kompilieren und Ausführen auf diesen zu vereinfachen.

Du kannst viele Parameter nutzen, um es auf dein System anzupassen, oder die Funktionalität zu beeinflussen.

ACHTUNG: Dieser Artikel bezieht sich auf aMules configure. Andere configure Skripte arbeiten ähnlich, aber deren Optionen können abweichen. Dieser Artikel kann für diese auch nützlich sein, aber sie k&oouml;nnen Optionen enthalten oder auch nicht enthalten die hier aufgeführt sind.

Grunds&umul;tzliche Nutzung

Grundsätzlich wird ./configure [OPTION]... [VARIABLE=WERT]... genutzt.

Du kannst also sein Verhalten durch Optionen und Variablen verändern.

Optionen

Du kannst eine odere mehrere Optionen definieren. Die verfügbaren Optionen in aMules configure sind hier aufgeführt. Um besser zu verstehen was sie bedeuten, wurden sie zu Gruppen, die configure in ähnlicher Weise steuern, zusammengefaßt.

Beachte, das configure sich (in den meisten Fällen) nicht beschwert, wenn du eine ungültige Variable oder Option eingibst. Also achte darauf die korrekten Optionen zu übergeben (keine Schreibfehler) oder sie werden ignoriert werden und configure wird sich anders verhalten als du es erwartest.

Haupt Optionen

Diese Optionen existieren in jedem configure Skript der Welt. Sie lassen das configure Skript nicht dein Programm konfigurieren, sondern geben Informationen aus die du vielleicht benötigst.

Grund Optionen
-h oder --help Gibt eine Hilfeseite mit allen configure Ooptionen aus.
--help=short Dies gibt eine Hilfeseite mit allen Optionen die spezifisch für diese Anwendung sind.
-V oder --version Gibt die Versionsinformationen aus.

Nicht kompilationsbezogene Optionen

Diese Optionen sollten auch in jedem configure Skript enthalten sein. Sie stellen einige Optionen ein, die sich nicht auf den eigentlichen Kompilier Vorgang beziehen.

Optionen die sich direkt auf das configure Skript beziehen
-q oder --quiet oder --silent Gebe nicht die 'checking...' Meldungen, sondern nur die abschließende Zusammenfassung aus.
--cache-file=DATEI Speicher die "checking" Ausgaben in DATEI in einem Skript Format, so das sie ohne erneuten configure-Lauf wiederverwendet werden k&oouml;nnen (Lies die DATEI für mehr Informationen)
-C oder --config-cache Das selbe wie --cache-file=config.cache
-n oder --no-create Nur configure ausführen aber keine Dateien erstellen
--srcdir=DIR Suche die Quellen in DIR. Voreinstellung, das configure oder das übergeordnete (../) Verzeichnis

Allgemeine Optionen

Auch diese Optionen sollten in jedem configure Skript zu finden sein. Dieses Mal beeinflussen sie aber direkt des Kompilierevorgang, nutze sie also vorsichtig. Du solltest einen Blick in das README Dokument (falls verfügbar) werfen falls du eine von ihnen verwenden willst (und auch falls du das nicht willst, weil es sein kann das du einige von ihnen nutzen musst).

Installations Verzeichnis Optionen
--prefix=PREFIX Architektur unabhängige Dateien (Daten) werden inPREFIX instaliert. Voreinstellung ist /usr/local
--exec-prefix=EPREFIX Architekturabhängige Datei (meistens Programme werden in EPREFIX installiert. Voreinstellung ist das selbe wie PREFIX.
Erweiterte Installationsverzeichnis Optionen
--bindir=PFAD Wo werden Programme für Benutzer installiert. Voreinstellung, EPREFIX/bin
--sbindir=PFAD Wo werden Programme für den Administrator installiert. Voreinstellung, EPREFIX/sbin
--libexecdir=PFAD Wo ausführbare Programme werden. Voreinstellung EPREFIX/libexec
--datadir=PFAD Wo unveränderliche architekturunabhängige Daten gespeichert werden. Voreinstellung, EPREFIX/share
--sysconfdir=PFAD Wo Daten die sich auf die einzelne Maschine beziehengespeichert werden. Voreinstellung, PREFIX/etc
--sharedstatedir=PFAD Wo architekturabhängige veränderliche Daten gespeichert werden. Voreinstellung PREFIX/com
--localstatedir=PFAD Wo veränderliche maschinenbezogene Daten gespeichert werden. Voreinstellung, PREFIX/var
--libdir=PFAD Wo Bibliothekscode gesucht werden soll. Voreinstellung, EPREFIX/lib
--includedir=PFAD Verzeichnis der C Headerdateien. Voreinstellung, PREFIX/include
--oldincludedir=PFAD Verzeichnis der nicht-GCC C Headerdateien. Voreinstellung, /usr/include
--infodir=PFAD Wo die nDokumentation gespeichert wird. Voreinstellung, EPREFIX/info
--mandir=PFAD Wo die Hilfeseiten für 'man' gespeichert werden. Voreinstellung, EPREFIX/man
Generelle Regeln um Programmteile zu (de)aktivieren und Pfade anzugeben
--program-prefix=PRÄFIX PRÄFIX das installierten Programmen vorangestellt wird
--program-suffix=SUFFIX SUFFIX das installierten Programmen angehängt wird
--program-transform-name=ERSETZUNG F&umul;hre sed ERSETZUNG am installierten Programnamen
Generelle Regel um Funktionen zu (de)aktivieren (manchmal (de)aktiviert dies das Kompilieren eines ganzen Programms)
--disable-FUNKTION Nutze FUNKTION nicht. Equivalent zu --enable-FUNKTION=no (siehe unten)
--enable-FUNKTION Nutze FUNKTION. Equivalent zu --enable-FUNKTION=yes (siehe unten)
--enable-FUNKTION=WERT Nutze FUNKTION und spezifiziere deren Wert mit WERT. Die Bedeutung dieses Wertes solte in der Ausgabe von configure --help erklärt sein
--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 non-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-embedded_crypto Do not use aMule's cryptography code, instead, use external libraries' code. This option is not recommended and it could possibly break the compilation
--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. By default, looks for them in the path specified in --with-gdlib-exec-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. By default, looks for them in the path specified in --with-libpng-exec-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. By default, looks for them in the path specified in --with-wx-exec-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. By default, looks for them in the path specified in --with-wxbase-exec-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. By default, looks for them in the path specified in --with-gtk-exec-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. | |}