Ignore:
Timestamp:
Aug 20, 2006 8:47:34 PM (18 years ago)
Author:
bennylp
Message:

Finishing autoconf work, also fixed compilation error in publish.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure.ac

    r625 r689  
    1 AC_INIT(pjproject,0.5.7) 
     1AC_INIT(pjproject,0.5.8) 
     2AC_CANONICAL_BUILD 
     3AC_CANONICAL_HOST 
    24AC_CANONICAL_TARGET 
    3 AC_CONFIG_HEADER(pjlib/include/pj/compat/os_auto.h) 
     5AC_CONFIG_HEADER([pjlib/include/pj/compat/os_auto.h 
     6                  pjlib/include/pj/compat/m_auto.h 
     7                 ]) 
     8AC_CONFIG_FILES([build.mak  
     9                 build/os-auto.mak  
     10                 pjlib/build/os-auto.mak  
     11                 pjlib-util/build/os-auto.mak  
     12                 pjmedia/build/os-auto.mak 
     13                 pjsip/build/os-auto.mak 
     14                ]) 
    415AC_PROG_CC 
     16AC_PROG_CXX 
    517AC_LANG_C 
     18 
     19AC_CHECK_LIB(pthread,pthread_create) 
     20 
     21AC_MSG_RESULT([Setting PJ_M_NAME to $target_cpu]) 
     22AC_DEFINE_UNQUOTED(PJ_M_NAME,["$target_cpu"]) 
     23 
     24# Endianness detection 
     25AC_C_BIGENDIAN([AC_SUBST(ac_bigendian,1) 
     26                AC_DEFINE(PJ_IS_LITTLE_ENDIAN,0) 
     27                AC_DEFINE(PJ_IS_BIG_ENDIAN,1) 
     28               ], 
     29               [AC_SUBST(ac_bigendian,0) 
     30                AC_DEFINE(PJ_IS_LITTLE_ENDIAN,1) 
     31                AC_DEFINE(PJ_IS_BIG_ENDIAN,0) 
     32               ]) 
     33 
     34# --disable-floating-point option 
     35AC_ARG_ENABLE(floating-point, 
     36              AC_HELP_STRING([--disable-floating-point], 
     37                             [Disable floating point where possible]), 
     38              [if test "$enable_floating_point" = "no"; then 
     39                AC_DEFINE(PJ_HAS_FLOATING_POINT,0) 
     40                AC_MSG_RESULT([Checking if floating point is disabled... yes]) 
     41               fi], 
     42              [ 
     43                AC_DEFINE(PJ_HAS_FLOATING_POINT,1) 
     44                AC_MSG_RESULT([Checking if floating point is disabled... no])  
     45                AC_CHECK_LIB(m,fmod) 
     46              ]) 
     47 
    648 
    749AC_CHECK_HEADER(arpa/inet.h,[AC_DEFINE(PJ_HAS_ARPA_INET_H,1)]) 
     
    3173AC_CHECK_HEADER(winsock2.h,[AC_DEFINE(PJ_HAS_WINSOCK2_H,1)]) 
    3274 
    33 AC_CHECK_HEADER(alsa/version.h) 
     75AC_MSG_RESULT([Setting PJ_OS_NAME to $target]) 
     76AC_DEFINE_UNQUOTED(PJ_OS_NAME,["$target"]) 
     77 
     78AC_MSG_RESULT([Setting PJ_HAS_ERRNO_VAR to 1]) 
     79AC_DEFINE(PJ_HAS_ERRNO_VAR,1) 
     80 
     81AC_MSG_RESULT([Setting PJ_HAS_HIGH_RES_TIMER to 1]) 
     82AC_DEFINE(PJ_HAS_HIGH_RES_TIMER,1) 
     83 
     84AC_MSG_RESULT([Setting PJ_HAS_MALLOC to 1]) 
     85AC_DEFINE(PJ_HAS_MALLOC,1) 
     86 
     87AC_MSG_RESULT([Setting PJ_NATIVE_STRING_IS_UNICODE to 0]) 
     88AC_DEFINE(PJ_NATIVE_STRING_IS_UNICODE,0) 
     89 
     90AC_MSG_RESULT([Setting PJ_ATOMIC_VALUE_TYPE to long]) 
     91AC_DEFINE(PJ_ATOMIC_VALUE_TYPE,long) 
    3492 
    3593# Determine if inet_aton() is available 
     
    69127                  [AC_DEFINE(PJ_EMULATE_RWMUTEX,0) 
    70128                   AC_MSG_RESULT(yes)], 
    71                   AC_MSG_RESULT(no)) 
     129                  [AC_DEFINE(PJ_EMULATE_RWMUTEX,1) 
     130                   AC_MSG_RESULT(no)]) 
     131 
     132 
     133########################################## 
     134# 
     135# PJMEDIA 
     136# 
     137 
     138# Sound device backend selection 
     139AC_SUBST(ac_pjmedia_snd) 
     140case $target in 
     141  *cygwin* | *win* | *mingw*) 
     142        ac_pjmedia_snd=pa_win32 
     143        AC_MSG_RESULT([Checking sound device backend... win32 sound]) 
     144        ;; 
     145  *rtems*) 
     146        ac_pjmedia_snd=null 
     147        AC_MSG_RESULT([Checking sound device backend... null sound]) 
     148        ;; 
     149  *darwin*) 
     150        ac_pjmedia_snd=pa_darwin_os 
     151        AC_MSG_RESULT([Checking sound device backend... coreaudio]) 
     152        ;; 
     153  *) 
     154        ac_pjmedia_snd=pa_unix 
     155        AC_CHECK_HEADER(alsa/version.h, 
     156                        [AC_SUBST(ac_pa_use_alsa,1) 
     157                         LIBS="$LIBS -lasound" 
     158                        ], 
     159                        [AC_SUBST(ac_pa_use_alsa,0)]) 
     160        AC_MSG_RESULT([Checking sound device backend... unix]) 
     161        ;; 
     162esac 
     163 
     164# Include resampling small filter 
     165AC_SUBST(ac_no_small_filter) 
     166AC_ARG_ENABLE(small-filter, 
     167              AC_HELP_STRING([--disable-small-filter], 
     168                             [Exclude small filter in resampling]), 
     169              [if test "$enable_small_filter" = "no"; then 
     170                [ac_no_small_filter='-DPJMEDIA_HAS_SMALL_FILTER=0'] 
     171                AC_MSG_RESULT([Checking if small filter is disabled... yes]) 
     172               fi], 
     173              AC_MSG_RESULT([Checking if small filter is disabled... no])) 
     174 
     175# Include resampling large filter 
     176AC_SUBST(ac_no_large_filter) 
     177AC_ARG_ENABLE(large-filter, 
     178              AC_HELP_STRING([--disable-large-filter], 
     179                             [Exclude large filter in resampling]), 
     180              [if test "$enable_large_filter" = "no"; then 
     181                [ac_no_large_filter='-DPJMEDIA_HAS_LARGE_FILTER=0'] 
     182                AC_MSG_RESULT([Checking if large filter is disabled... yes]) 
     183               fi], 
     184              AC_MSG_RESULT([Checking if large filter is disabled... no])) 
     185 
     186# Include G.711 Annex A PLC 
     187AC_SUBST(ac_no_g711_plc) 
     188AC_ARG_ENABLE(g711-plc, 
     189              AC_HELP_STRING([--disable-g711-plc], 
     190                             [Exclude G.711 Annex A PLC]), 
     191              [if test "$enable_g711_plc" = "no"; then 
     192                [ac_no_g711_plc='-DPJMEDIA_HAS_G711_PLC=0'] 
     193                AC_MSG_RESULT([Checking if G.711 Annex A PLC is disabled...yes]) 
     194               fi], 
     195              AC_MSG_RESULT([Checking if G.711 Annex A PLC is disabled...no])) 
     196 
     197# Include Speex AEC 
     198AC_SUBST(ac_no_speex_aec) 
     199AC_ARG_ENABLE(speex-aec, 
     200              AC_HELP_STRING([--disable-speex-aec], 
     201                             [Exclude Speex Acoustic Echo Canceller/AEC]), 
     202              [if test "$enable_speex_aec" = "no"; then 
     203                [ac_no_speex_aec='-DPJMEDIA_HAS_SPEEX_AEC=0'] 
     204                AC_MSG_RESULT([Checking if Speex AEC is disabled...yes]) 
     205               fi], 
     206              AC_MSG_RESULT([Checking if Speex AEC is disabled...no])) 
     207 
     208# Include G711 codec 
     209AC_SUBST(ac_no_g711_codec) 
     210AC_ARG_ENABLE(g711-codec, 
     211              AC_HELP_STRING([--disable-g711-codec], 
     212                             [Exclude G.711 codecs from the build]), 
     213              [if test "$enable_g711_codec" = "no"; then 
     214                [ac_no_g711_codec=1] 
     215                AC_MSG_RESULT([Checking if G.711 codec is disabled...yes]) 
     216               fi], 
     217              AC_MSG_RESULT([Checking if G.711 codec is disabled...no])) 
     218 
     219 
     220# Include L16 codec 
     221AC_SUBST(ac_no_l16_codec) 
     222AC_ARG_ENABLE(l16-codec, 
     223              AC_HELP_STRING([--disable-l16-codec], 
     224                             [Exclude Linear/L16 codec family from the build]), 
     225              [if test "$enable_l16_codec" = "no"; then 
     226                [ac_no_l16_codec=1] 
     227                AC_MSG_RESULT([Checking if L16 codecs are disabled...yes]) 
     228               fi], 
     229              AC_MSG_RESULT([Checking if G.711 codec is disabled...no])) 
     230 
     231 
     232# Include GSM codec 
     233AC_SUBST(ac_no_gsm_codec) 
     234AC_ARG_ENABLE(gsm-codec, 
     235              AC_HELP_STRING([--disable-gsm-codec], 
     236                             [Exclude GSM codec in the build]), 
     237              [if test "$enable_gsm_codec" = "no"; then 
     238                [ac_no_gsm_codec=1] 
     239                AC_MSG_RESULT([Checking if GSM codec is disabled...yes]) 
     240               fi], 
     241              AC_MSG_RESULT([Checking if GSM codec is disabled...no])) 
     242 
     243# Include Speex codec 
     244AC_SUBST(ac_no_speex_codec) 
     245AC_ARG_ENABLE(speex-codec, 
     246              AC_HELP_STRING([--disable-speex-codec], 
     247                             [Exclude Speex codecs in the build]), 
     248              [if test "$enable_speex_codec" = "no"; then 
     249                [ac_no_speex_codec=1] 
     250                AC_MSG_RESULT([Checking if Speex codec is disabled...yes]) 
     251               fi], 
     252              AC_MSG_RESULT([Checking if Speex codec is disabled...no])) 
     253 
     254# Include iLBC codec 
     255AC_SUBST(ac_no_ilbc_codec) 
     256AC_ARG_ENABLE(ilbc-codec, 
     257              AC_HELP_STRING([--disable-ilbc-codec], 
     258                             [Exclude iLBC codec in the build]), 
     259              [if test "$enable_ilbc_codec" = "no"; then 
     260                [ac_no_ilbc_codec=1] 
     261                AC_MSG_RESULT([Checking if iLBC codec is disabled...yes]) 
     262               fi], 
     263              AC_MSG_RESULT([Checking if iLBC codec is disabled...no])) 
     264 
     265 
     266 
     267########################################## 
     268# 
     269# MANUAL CONFIG 
     270# 
     271 
    72272 
    73273# Determine if select() requires nfds to be filled up with 
    74274# correct value (max_fd+1). If zero, nfds will be filled up with 
    75275# PJ_FD_SETSIZE 
     276AC_MSG_CHECKING([if select() needs correct nfds]) 
    76277case $target in 
    77278  *rtems*) AC_DEFINE(PJ_SELECT_NEEDS_NFDS,1) 
    78            AC_MSG_CHECKING([if select() needs correct nfds]) 
    79279           AC_MSG_RESULT(yes) 
    80280        ;; 
     
    126326esac 
    127327 
    128 AC_MSG_RESULT([Setting PJ_OS_NAME to $target]) 
    129 AC_DEFINE_UNQUOTED(PJ_OS_NAME,["$target"]) 
    130  
    131 AC_MSG_RESULT([Setting PJ_HAS_ERRNO_VAR to 1]) 
    132 AC_DEFINE(PJ_HAS_ERRNO_VAR,1) 
    133  
    134 AC_MSG_RESULT([Setting PJ_HAS_HIGH_RES_TIMER to 1]) 
    135 AC_DEFINE(PJ_HAS_HIGH_RES_TIMER,1) 
    136  
    137 AC_MSG_RESULT([Setting PJ_HAS_MALLOC to 1]) 
    138 AC_DEFINE(PJ_HAS_MALLOC,1) 
    139  
    140 AC_MSG_RESULT([Setting PJ_NATIVE_STRING_IS_UNICODE to 0]) 
    141 AC_DEFINE(PJ_NATIVE_STRING_IS_UNICODE,0) 
    142  
    143 AC_MSG_RESULT([Setting PJ_ATOMIC_VALUE_TYPE to long]) 
    144 AC_DEFINE(PJ_ATOMIC_VALUE_TYPE,long) 
    145  
    146  
     328 
     329AC_SUBST(target) 
     330AC_SUBST(ac_cross_compile) 
     331if test "$build" = "$host"; then 
     332    ac_cross_compile= 
     333else 
     334    ac_cross_compile=${host}- 
     335fi 
     336AC_SUBST(ac_linux_poll,select) 
     337AC_SUBST(ac_host,unix) 
     338AC_SUBST(ac_main_obj) 
     339case $target in 
     340  *rtems*) 
     341        ac_main_obj=main_rtems.o 
     342        ;; 
     343  *) 
     344        ac_main_obj=main.o 
     345        ;; 
     346esac 
     347AC_SUBST(CC) 
    147348AC_OUTPUT() 
    148349 
Note: See TracChangeset for help on using the changeset viewer.