Changes between Version 1 and Version 2 of Getting-Started/Autoconf

Apr 28, 2009 2:21:29 PM (15 years ago)



  • Getting-Started/Autoconf

    v1 v2  
     43.1 Supported Targets 
     6The new, autoconf based GNU build system can be used to build the libraries/applications for the following targets: 
     8    * Linux/uC-Linux (i386, Opteron, Itanium, MIPS, PowerPC, etc.), 
     9    * MacOS X (PowerPC), 
     10    * mingw (i386), 
     11    * FreeBSD and maybe other BSD's (i386, Opteron, etc.), 
     12    * RTEMS with cross compilation (ARM, powerpc), 
     13    * etc. 
     163.2 Requirements 
     18In order to use PJ's GNU build system, these typical GNU tools are needed: 
     20    * GNU make (other make will not work), 
     21    * GNU binutils for the target, and 
     22    * GNU gcc for the target. 
     24In addition, the following libraries are optional, but they will be used if they are present: 
     26    * ALSA header files/libraries (optional) if ALSA support is wanted. 
     27    * OpenSSL header files/libraries (optional) if TLS support is wanted. 
     29The build system is known to work on the following hosts: 
     31    * Linux, many types of distributions. 
     32    * MacOS X 10.2 
     33    * mingw (Win2K, XP) 
     34    * FreeBSD (must use gmake instead of make) 
     36Building Win32 applications with Cygwin is currently not supported by the autoconf script (there are some conflicts with Windows headers), but one can still use the old configure script by calling ./configure-legacy. More over, cross-compilations might also work with Cygwin using this build system. 
     393.3 Running configure 
     40Using Default Settings 
     42Run "./configure" without any options to let the script detect the appropriate settings for the host: 
     45$ cd pjproject 
     46$ ./configure 
     50    The default settings build the libraries in "release" mode, with default CFLAGS set to "-O2". To change the default CFLAGS, we can use the usual "./configure CFLAGS='-g'" construct.  
     52Features Customization 
     54With the new autoconf based build system, most configuration/customization can be specified as configure arguments. The list of customizable features can be viewed by running "./configure --help" command: 
     57$ cd pjproject 
     58$ ./configure --help 
     60Optional Features: 
     61--disable-floating-point        Disable floating point where possible 
     62--disable-sound         Exclude sound (i.e. use null sound) 
     63--disable-small-filter  Exclude small filter in resampling 
     64--disable-large-filter  Exclude large filter in resampling 
     65--disable-g711-plc      Exclude G.711 Annex A PLC 
     66--disable-speex-aec     Exclude Speex Acoustic Echo Canceller/AEC 
     67--disable-g711-codec    Exclude G.711 codecs from the build 
     68--disable-l16-codec     Exclude Linear/L16 codec family from the build 
     69--disable-gsm-codec     Exclude GSM codec in the build 
     70--disable-speex-codec   Exclude Speex codecs in the build 
     71--disable-ilbc-codec    Exclude iLBC codec in the build 
     72--disable-tls   Force excluding TLS support (default is autodetected based on OpenSSL availability) 
     74Configuring Debug Version and Other Customizations 
     76The configure script accepts standard customization, which details can be obtained by executing ./configure --help. 
     78Below is an example of specifying CFLAGS in configure: 
     81$ ./configure CFLAGS="-O3 -DNDEBUG -msoft-float -fno-builtin" 
     83Configuring TLS Support 
     85By default, TLS support is configured based on the availability of OpenSSL header files and libraries. If OpenSSL is available at the default include and library path locations, TLS will be enabled by the configure script. 
     87You can explicitly disable TLS support by giving the configure script --disable-tls option. 
     903.4 Cross Compilation 
     92Cross compilation should be supported, using the usual autoconf syntax: 
     95$ ./configure --host=arm-elf-linux 
     98Since cross-compilation is not tested as often as the "normal" build, please watch for the ./configure output for incorrect settings (well ideally this should be done for normal build too). 
     100Please refer to Porting Guide for further information about porting PJ software. 
     1033.5 Running make 
     105Once the configure script completes successfully, start the build process by invoking these commands: 
     108$ cd pjproject 
     109$ make dep 
     110$ make 
     113    gmake may need to be specified instead of make for some hosts, to invoke GNU make instead of the native make.  
     117Description of all make targets supported by the Makefile's: 
     120    The default (or first) target to build the libraries/binaries.  
     121dep, depend 
     122    Build dependencies rule from the source files.  
     124    Clean the object files for current target, but keep the output library/binary files intact.  
     125distclean, realclean 
     126    Remove all generated files (object, libraries, binaries, and dependency files) for current target.  
     132    make can be invoked either in the top-level PJ directory or in build directory under each project to build only the particular project. 
     1353.6 Build Customizations 
     137Build features can be customized by specifying the options when running ./configure as described in Running Configure above. 
     139In addition, additional CFLAGS and LDFLAGS options can be put in user.mak file in PJ root directory (this file may need to be created if it doesn't exist). Below is a sample of user.mak file contents: 
     142export CFLAGS += -msoft-float -fno-builtin 
     143export LDFLAGS +=