Changes between Version 12 and Version 13 of Getting-Started/Autoconf


Ignore:
Timestamp:
May 17, 2012 10:07:45 AM (12 years ago)
Author:
ismangil
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Getting-Started/Autoconf

    v12 v13  
    55== Supported Targets == 
    66 
    7 The new, autoconf based GNU build system can be used to build the libraries/applications for the following targets: 
     7The autoconf based GNU build system can be used to build the libraries/applications for the following targets: 
    88 
    99    * Linux/uC-Linux (i386, Opteron, Itanium, MIPS, PowerPC, etc.), 
     
    1717== Requirements == 
    1818 
     19=== Tools and development libraries === 
     20 
    1921In order to use PJ's GNU build system, these typical GNU tools are needed: 
    2022 
     
    2830    * OpenSSL header files/libraries (optional) if TLS support is wanted. 
    2931 
     32=== Video Support (for 2.0 and above) === 
     33 
     34The following components are needed for video: 
     35 1. Linux: Video4Linux2 (v4l2) development library. 
     36 1. Mac OS X: You might have an old libbz2 for older system, in that case it has to be rebuild (needed by ffmpeg H.264 support) 
     37 1. [http://www.libsdl.org/ SDL] '''version 1.3'''.  
     38    - Note that this is the newer and not yet released SDL library, hence most likely it won't be installed by default on your system. You can download the source snapshot or from the Mercurial repository from http://www.libsdl.org/hg.php. 
     39 1. [http://ffmpeg.org/ ffmpeg] development library. We tested with ffmpeg version ranging from 0.5.1 (from circa 2009) to 0.10.  
     40    - Note that for H.264 support, you need newer releases (October 2011 onwards), and it needs libz too. 
     41    - Build with at least: 
     42      {{{ 
     43$ ./configure --enable-shared --disable-static --enable-memalign-hack 
     44                      # add other options if needed, e.g: optimization, install dir, search path  
     45                      # particularly CFLAGS and LDFLAGS for x264 
     46                      # to enable H264, add "--enable-gpl --enable-libx264" 
     47$ make && make install 
     48      }}} 
     49 1. Optional for H.264: [http://www.videolan.org/developers/x264.html libx264]. We tested with the latest from git (as of October 2011): 
     50     {{{ 
     51$ ./configure --enable-static      # add options if needed, e.g: optimization, install dir, search path 
     52$ make && make install-lib-static  # default install dir is /usr/local 
     53      }}} 
     54 1. Optional: [http://qt.nokia.com/downloads/ Qt development SDK] for building the [#vidgui video GUI sample]. We tested with version 4.6 or later. 
     55    - without this you can still enjoy video with pjsua console application 
     56 
     57 
     58=== Host requirements === 
    3059The build system is known to work on the following hosts: 
    3160 
     
    5281Notes: 
    5382    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.  
     83 
     84==== Configure with Video Support ==== 
     85 
     86Video requirements will be detected by the {{{configure}}} script. Pay attention to the following output (the sample below was taken on a Mac): 
     87 
     88{{{ 
     89... 
     90Using SDL prefix... /Users/pjsip/Desktop/opt 
     91checking SDL availability..... 1.3.0 
     92Using ffmpeg prefix... /Users/pjsip/Desktop/opt 
     93checking for pkg-config... no 
     94checking for python... python pkgconfig.py 
     95checking ffmpeg packages...  libavformat libavcodec libswscale libavutil 
     96checking for v4l2_open in -lv4l2... no 
     97... 
     98}}} 
     99 
     100The above output shows the SDL version detected, 1.3.0 in this case, and the ffmpeg packages found (libavformat, libavcodec, etc.). Note that for this particular build, alternative locations (prefixes) are specified for both SDL and ffmpeg with '''{{{--with-sdl}}}''' and '''{{{-with-ffmpeg}}}''' options respectively.  
     101 
     102'''Note on ffmpeg libraries dependencies:''' 
     103 
     104  The ''pkg-config'' tool is used to detect the correct compilation settings and library dependency for the ffmpeg packages. The ''pkg-config'' is not installed by default on Mac, as the output above shows, hence we use the alternate ''pkgconfig.py'' script. You need to have Python installed to run this script of course, and the configure script detects its availability automatically. If Python is not available, you will need to supply the correct CFLAGS and LDFLAGS manually prior to running ''{{{configure}}}'' so that it is able to detect ffmpeg libraries. 
     105 
     106  For example, if ffmpeg was built with x264 and mp3 encoder support, you will need to pass additional "{{{-lx264 -lmp3lame}}}" flags when linking libavformat. With manual checking in the configure script, the {{{AC_CHECK_LIB(avformat)}}} would not be able to detect that it needs to add "{{{-lx264 -lmp3lame}}}" as the dependency, hence you need to put this in the LDFLAGS prior to running configure. 
     107 
    54108 
    55109=== Features Customization === 
     
    98152You can explicitly disable TLS support by giving the configure script --disable-tls option. 
    99153 
    100  
    101 == Video Support == 
    102  
    103 Please see '''[wiki:Video_Users_Guide Video User's Guide]''' for video requirements, build, and usage instructions for pjsip version 2.x. 
    104  
    105  
    106154== Cross Compilation == 
    107155 
     
    170218 
    171219Follow the steps described in [wiki:Getting_Started_Using building applications with GNU tools] 
     220You can also go to '''[wiki:Video_Users_Guide Video User's Guide]''' for video usage instructions for pjsip version 2.x.