diff --git a/configure b/configure index c32a38a954..dd84a65ed3 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 44013 . +# From configure.ac Revision: 44467 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.60a. # @@ -2034,6 +2034,8 @@ ac_config_headers="$ac_config_headers include/asterisk/autoconfig.h" case "${host_os}" in freebsd*) ac_default_prefix=/usr/local + CPPFLAGS=-I/usr/local/include + LDFLAGS=-L/usr/local/lib ;; *) ac_default_prefix=/usr @@ -5351,11 +5353,11 @@ case ${withval} in USE_ALSA=no ;; y|ye|yes) - ALSA_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} ALSA" ;; *) ALSA_DIR="${withval}" - ALSA_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} ALSA" ;; esac @@ -5378,11 +5380,11 @@ case ${withval} in USE_CAP=no ;; y|ye|yes) - CAP_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} CAP" ;; *) CAP_DIR="${withval}" - CAP_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} CAP" ;; esac @@ -5405,11 +5407,11 @@ case ${withval} in USE_CURL=no ;; y|ye|yes) - CURL_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} CURL" ;; *) CURL_DIR="${withval}" - CURL_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} CURL" ;; esac @@ -5432,11 +5434,11 @@ case ${withval} in USE_CURSES=no ;; y|ye|yes) - CURSES_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} CURSES" ;; *) CURSES_DIR="${withval}" - CURSES_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} CURSES" ;; esac @@ -5459,11 +5461,11 @@ case ${withval} in USE_GNUTLS=no ;; y|ye|yes) - GNUTLS_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} GNUTLS" ;; *) GNUTLS_DIR="${withval}" - GNUTLS_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} GNUTLS" ;; esac @@ -5486,11 +5488,11 @@ case ${withval} in USE_GSM=no ;; y|ye|yes) - GSM_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} GSM" ;; *) GSM_DIR="${withval}" - GSM_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} GSM" ;; esac @@ -5513,11 +5515,11 @@ case ${withval} in USE_IKSEMEL=no ;; y|ye|yes) - IKSEMEL_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} IKSEMEL" ;; *) IKSEMEL_DIR="${withval}" - IKSEMEL_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} IKSEMEL" ;; esac @@ -5540,11 +5542,11 @@ case ${withval} in USE_IMAP_TK=no ;; y|ye|yes) - IMAP_TK_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} IMAP_TK" ;; *) IMAP_TK_DIR="${withval}" - IMAP_TK_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} IMAP_TK" ;; esac @@ -5567,11 +5569,11 @@ case ${withval} in USE_ISDNNET=no ;; y|ye|yes) - ISDNNET_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} ISDNNET" ;; *) ISDNNET_DIR="${withval}" - ISDNNET_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} ISDNNET" ;; esac @@ -5594,11 +5596,11 @@ case ${withval} in USE_KDE=no ;; y|ye|yes) - KDE_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} KDE" ;; *) KDE_DIR="${withval}" - KDE_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} KDE" ;; esac @@ -5621,11 +5623,11 @@ case ${withval} in USE_MISDN=no ;; y|ye|yes) - MISDN_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} MISDN" ;; *) MISDN_DIR="${withval}" - MISDN_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} MISDN" ;; esac @@ -5648,11 +5650,11 @@ case ${withval} in USE_NBS=no ;; y|ye|yes) - NBS_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} NBS" ;; *) NBS_DIR="${withval}" - NBS_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} NBS" ;; esac @@ -5675,11 +5677,11 @@ case ${withval} in USE_NCURSES=no ;; y|ye|yes) - NCURSES_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} NCURSES" ;; *) NCURSES_DIR="${withval}" - NCURSES_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} NCURSES" ;; esac @@ -5702,11 +5704,11 @@ case ${withval} in USE_NETSNMP=no ;; y|ye|yes) - NETSNMP_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} NETSNMP" ;; *) NETSNMP_DIR="${withval}" - NETSNMP_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} NETSNMP" ;; esac @@ -5729,11 +5731,11 @@ case ${withval} in USE_NEWT=no ;; y|ye|yes) - NEWT_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} NEWT" ;; *) NEWT_DIR="${withval}" - NEWT_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} NEWT" ;; esac @@ -5756,11 +5758,11 @@ case ${withval} in USE_UNIXODBC=no ;; y|ye|yes) - UNIXODBC_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} UNIXODBC" ;; *) UNIXODBC_DIR="${withval}" - UNIXODBC_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} UNIXODBC" ;; esac @@ -5783,11 +5785,11 @@ case ${withval} in USE_OGG=no ;; y|ye|yes) - OGG_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} OGG" ;; *) OGG_DIR="${withval}" - OGG_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} OGG" ;; esac @@ -5810,11 +5812,11 @@ case ${withval} in USE_OSPTK=no ;; y|ye|yes) - OSPTK_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} OSPTK" ;; *) OSPTK_DIR="${withval}" - OSPTK_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} OSPTK" ;; esac @@ -5837,11 +5839,11 @@ case ${withval} in USE_OSS=no ;; y|ye|yes) - OSS_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} OSS" ;; *) OSS_DIR="${withval}" - OSS_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} OSS" ;; esac @@ -5864,11 +5866,11 @@ case ${withval} in USE_POPT=no ;; y|ye|yes) - POPT_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} POPT" ;; *) POPT_DIR="${withval}" - POPT_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} POPT" ;; esac @@ -5891,11 +5893,11 @@ case ${withval} in USE_PGSQL=no ;; y|ye|yes) - PGSQL_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} PGSQL" ;; *) PGSQL_DIR="${withval}" - PGSQL_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} PGSQL" ;; esac @@ -5918,11 +5920,11 @@ case ${withval} in USE_PRI=no ;; y|ye|yes) - PRI_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} PRI" ;; *) PRI_DIR="${withval}" - PRI_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} PRI" ;; esac @@ -5945,11 +5947,11 @@ case ${withval} in USE_SS7=no ;; y|ye|yes) - SS7_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} SS7" ;; *) SS7_DIR="${withval}" - SS7_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} SS7" ;; esac @@ -5972,11 +5974,11 @@ case ${withval} in USE_PWLIB=no ;; y|ye|yes) - PWLIB_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} PWLIB" ;; *) PWLIB_DIR="${withval}" - PWLIB_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} PWLIB" ;; esac @@ -5999,11 +6001,11 @@ case ${withval} in USE_OPENH323=no ;; y|ye|yes) - OPENH323_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} OPENH323" ;; *) OPENH323_DIR="${withval}" - OPENH323_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} OPENH323" ;; esac @@ -6026,11 +6028,11 @@ case ${withval} in USE_QT=no ;; y|ye|yes) - QT_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} QT" ;; *) QT_DIR="${withval}" - QT_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} QT" ;; esac @@ -6053,11 +6055,11 @@ case ${withval} in USE_RADIUS=no ;; y|ye|yes) - RADIUS_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} RADIUS" ;; *) RADIUS_DIR="${withval}" - RADIUS_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} RADIUS" ;; esac @@ -6080,11 +6082,11 @@ case ${withval} in USE_SPEEX=no ;; y|ye|yes) - SPEEX_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} SPEEX" ;; *) SPEEX_DIR="${withval}" - SPEEX_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} SPEEX" ;; esac @@ -6107,11 +6109,11 @@ case ${withval} in USE_SQLITE=no ;; y|ye|yes) - SQLITE_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} SQLITE" ;; *) SQLITE_DIR="${withval}" - SQLITE_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} SQLITE" ;; esac @@ -6134,11 +6136,11 @@ case ${withval} in USE_SUPPSERV=no ;; y|ye|yes) - SUPPSERV_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} SUPPSERV" ;; *) SUPPSERV_DIR="${withval}" - SUPPSERV_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} SUPPSERV" ;; esac @@ -6161,11 +6163,11 @@ case ${withval} in USE_OPENSSL=no ;; y|ye|yes) - OPENSSL_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} OPENSSL" ;; *) OPENSSL_DIR="${withval}" - OPENSSL_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} OPENSSL" ;; esac @@ -6188,11 +6190,11 @@ case ${withval} in USE_FREETDS=no ;; y|ye|yes) - FREETDS_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} FREETDS" ;; *) FREETDS_DIR="${withval}" - FREETDS_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} FREETDS" ;; esac @@ -6215,11 +6217,11 @@ case ${withval} in USE_TERMCAP=no ;; y|ye|yes) - TERMCAP_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} TERMCAP" ;; *) TERMCAP_DIR="${withval}" - TERMCAP_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} TERMCAP" ;; esac @@ -6242,11 +6244,11 @@ case ${withval} in USE_TINFO=no ;; y|ye|yes) - TINFO_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} TINFO" ;; *) TINFO_DIR="${withval}" - TINFO_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} TINFO" ;; esac @@ -6269,11 +6271,11 @@ case ${withval} in USE_TONEZONE=no ;; y|ye|yes) - TONEZONE_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} TONEZONE" ;; *) TONEZONE_DIR="${withval}" - TONEZONE_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} TONEZONE" ;; esac @@ -6296,11 +6298,11 @@ case ${withval} in USE_VORBIS=no ;; y|ye|yes) - VORBIS_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} VORBIS" ;; *) VORBIS_DIR="${withval}" - VORBIS_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} VORBIS" ;; esac @@ -6323,11 +6325,11 @@ case ${withval} in USE_VPB=no ;; y|ye|yes) - VPB_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} VPB" ;; *) VPB_DIR="${withval}" - VPB_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} VPB" ;; esac @@ -6350,11 +6352,11 @@ case ${withval} in USE_ZLIB=no ;; y|ye|yes) - ZLIB_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} ZLIB" ;; *) ZLIB_DIR="${withval}" - ZLIB_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} ZLIB" ;; esac @@ -6377,11 +6379,11 @@ case ${withval} in USE_ZAPTEL=no ;; y|ye|yes) - ZAPTEL_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} ZAPTEL" ;; *) ZAPTEL_DIR="${withval}" - ZAPTEL_MANDATORY="yes" + ac_mandatory_list="${ac_mandatory_list} ZAPTEL" ;; esac @@ -14340,10 +14342,18 @@ fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext -{ echo "$as_me:$LINENO: checking for RTLD_NOLOAD" >&5 -echo $ECHO_N "checking for RTLD_NOLOAD... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + + if test "x${PBX_RTLD_NOLOAD}" != "x1" -a "${USE_RTLD_NOLOAD}" != "no"; then + { echo "$as_me:$LINENO: checking for RTLD_NOLOAD in dlfcn.h" >&5 +echo $ECHO_N "checking for RTLD_NOLOAD in dlfcn.h... $ECHO_C" >&6; } + saved_cppflags="${CPPFLAGS}" + if test "x${RTLD_NOLOAD_DIR}" != "x"; then + RTLD_NOLOAD_INCLUDE= "-I${RTLD_NOLOAD_DIR}/include" + fi + CPPFLAGS="${CPPFLAGS} ${RTLD_NOLOAD_INCLUDE}" + + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF @@ -14357,14 +14367,14 @@ int foo = RTLD_NOLOAD; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -14381,7 +14391,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -14391,24 +14401,33 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: yes" >&5 + { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } + PBX_RTLD_NOLOAD=1 cat >>confdefs.h <<\_ACEOF #define HAVE_RTLD_NOLOAD 1 _ACEOF + +cat >>confdefs.h <<\_ACEOF +#define HAVE_RTLD_NOLOAD_VERSION +_ACEOF + + else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: result: no" >&5 + { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CPPFLAGS="${saved_cppflags}" + fi + if test "${ac_cv_header_libkern_OSAtomic_h+set}" = set; then { echo "$as_me:$LINENO: checking for libkern/OSAtomic.h" >&5 @@ -15086,7 +15105,7 @@ _ACEOF # do the package library checks now -if test "${USE_ALSA}" != "no"; then +if test "x${PBX_ALSA}" != "x1" -a "${USE_ALSA}" != "no"; then pbxlibdir="" if test "x${ALSA_DIR}" != "x"; then if test -d ${ALSA_DIR}/lib; then @@ -15095,9 +15114,14 @@ if test "${USE_ALSA}" != "no"; then pbxlibdir="-L${ALSA_DIR}" fi fi - { echo "$as_me:$LINENO: checking for snd_spcm_init in -lasound" >&5 -echo $ECHO_N "checking for snd_spcm_init in -lasound... $ECHO_C" >&6; } -if test "${ac_cv_lib_asound_snd_spcm_init+set}" = set; then + pbxfuncname="snd_spcm_init" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_ALSA_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_asound_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lasound" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lasound... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15115,11 +15139,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char snd_spcm_init (); +char ${pbxfuncname} (); int main () { -return snd_spcm_init (); +return ${pbxfuncname} (); ; return 0; } @@ -15158,26 +15182,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_asound_snd_spcm_init=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_asound_snd_spcm_init=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_asound_snd_spcm_init" >&5 -echo "${ECHO_T}$ac_cv_lib_asound_snd_spcm_init" >&6; } -if test $ac_cv_lib_asound_snd_spcm_init = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_ALSA_FOUND=yes else AST_ALSA_FOUND=no fi + fi if test "${AST_ALSA_FOUND}" = "yes"; then ALSA_LIB="-lasound -lm -ldl" @@ -15507,46 +15533,31 @@ fi fi fi if test "x${ALSA_HEADER_FOUND}" = "x0" ; then - if test ! -z "${ALSA_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the asound development package installed." >&5 -echo "$as_me: *** It appears that you do not have the asound development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${ALSA_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${ALSA_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${ALSA_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${ALSA_OPTION}" >&6;} - exit 1 - fi ALSA_LIB="" ALSA_INCLUDE="" - PBX_ALSA=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + ALSA_LIB="" + fi PBX_ALSA=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_ALSA 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_ALSA_VERSION +_ACEOF + fi - elif test ! -z "${ALSA_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${ALSA_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${ALSA_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${ALSA_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${ALSA_OPTION}" >&6;} - exit 1 fi fi -if test "${USE_CURSES}" != "no"; then +if test "x${PBX_CURSES}" != "x1" -a "${USE_CURSES}" != "no"; then pbxlibdir="" if test "x${CURSES_DIR}" != "x"; then if test -d ${CURSES_DIR}/lib; then @@ -15555,9 +15566,14 @@ if test "${USE_CURSES}" != "no"; then pbxlibdir="-L${CURSES_DIR}" fi fi - { echo "$as_me:$LINENO: checking for initscr in -lcurses" >&5 -echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6; } -if test "${ac_cv_lib_curses_initscr+set}" = set; then + pbxfuncname="initscr" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_CURSES_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_curses_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lcurses" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lcurses... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -15575,11 +15591,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char initscr (); +char ${pbxfuncname} (); int main () { -return initscr (); +return ${pbxfuncname} (); ; return 0; } @@ -15618,26 +15634,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_curses_initscr=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_curses_initscr=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_curses_initscr" >&5 -echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6; } -if test $ac_cv_lib_curses_initscr = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_CURSES_FOUND=yes else AST_CURSES_FOUND=no fi + fi if test "${AST_CURSES_FOUND}" = "yes"; then CURSES_LIB="-lcurses " @@ -15967,47 +15985,32 @@ fi fi fi if test "x${CURSES_HEADER_FOUND}" = "x0" ; then - if test ! -z "${CURSES_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the curses development package installed." >&5 -echo "$as_me: *** It appears that you do not have the curses development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${CURSES_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${CURSES_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${CURSES_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${CURSES_OPTION}" >&6;} - exit 1 - fi CURSES_LIB="" CURSES_INCLUDE="" - PBX_CURSES=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + CURSES_LIB="" + fi PBX_CURSES=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_CURSES 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_CURSES_VERSION +_ACEOF + fi - elif test ! -z "${CURSES_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${CURSES_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${CURSES_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${CURSES_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${CURSES_OPTION}" >&6;} - exit 1 fi fi if test "x${host_os}" = "xlinux-gnu" ; then -if test "${USE_CAP}" != "no"; then +if test "x${PBX_CAP}" != "x1" -a "${USE_CAP}" != "no"; then pbxlibdir="" if test "x${CAP_DIR}" != "x"; then if test -d ${CAP_DIR}/lib; then @@ -16016,9 +16019,14 @@ if test "${USE_CAP}" != "no"; then pbxlibdir="-L${CAP_DIR}" fi fi - { echo "$as_me:$LINENO: checking for cap_from_text in -lcap" >&5 -echo $ECHO_N "checking for cap_from_text in -lcap... $ECHO_C" >&6; } -if test "${ac_cv_lib_cap_cap_from_text+set}" = set; then + pbxfuncname="cap_from_text" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_CAP_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_cap_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lcap" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lcap... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -16036,11 +16044,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char cap_from_text (); +char ${pbxfuncname} (); int main () { -return cap_from_text (); +return ${pbxfuncname} (); ; return 0; } @@ -16079,26 +16087,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_cap_cap_from_text=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_cap_cap_from_text=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_cap_cap_from_text" >&5 -echo "${ECHO_T}$ac_cv_lib_cap_cap_from_text" >&6; } -if test $ac_cv_lib_cap_cap_from_text = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_CAP_FOUND=yes else AST_CAP_FOUND=no fi + fi if test "${AST_CAP_FOUND}" = "yes"; then CAP_LIB="-lcap " @@ -16428,40 +16438,25 @@ fi fi fi if test "x${CAP_HEADER_FOUND}" = "x0" ; then - if test ! -z "${CAP_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the cap development package installed." >&5 -echo "$as_me: *** It appears that you do not have the cap development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${CAP_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${CAP_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${CAP_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${CAP_OPTION}" >&6;} - exit 1 - fi CAP_LIB="" CAP_INCLUDE="" - PBX_CAP=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + CAP_LIB="" + fi PBX_CAP=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_CAP 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_CAP_VERSION +_ACEOF + fi - elif test ! -z "${CAP_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${CAP_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${CAP_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${CAP_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${CAP_OPTION}" >&6;} - exit 1 fi fi @@ -16586,7 +16581,7 @@ fi fi -if test "${USE_IKSEMEL}" != "no"; then +if test "x${PBX_IKSEMEL}" != "x1" -a "${USE_IKSEMEL}" != "no"; then pbxlibdir="" if test "x${IKSEMEL_DIR}" != "x"; then if test -d ${IKSEMEL_DIR}/lib; then @@ -16595,9 +16590,14 @@ if test "${USE_IKSEMEL}" != "no"; then pbxlibdir="-L${IKSEMEL_DIR}" fi fi - { echo "$as_me:$LINENO: checking for iks_start_sasl in -liksemel" >&5 -echo $ECHO_N "checking for iks_start_sasl in -liksemel... $ECHO_C" >&6; } -if test "${ac_cv_lib_iksemel_iks_start_sasl+set}" = set; then + pbxfuncname="iks_start_sasl" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_IKSEMEL_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_iksemel_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -liksemel" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -liksemel... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -16615,11 +16615,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char iks_start_sasl (); +char ${pbxfuncname} (); int main () { -return iks_start_sasl (); +return ${pbxfuncname} (); ; return 0; } @@ -16658,26 +16658,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_iksemel_iks_start_sasl=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_iksemel_iks_start_sasl=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_iksemel_iks_start_sasl" >&5 -echo "${ECHO_T}$ac_cv_lib_iksemel_iks_start_sasl" >&6; } -if test $ac_cv_lib_iksemel_iks_start_sasl = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_IKSEMEL_FOUND=yes else AST_IKSEMEL_FOUND=no fi + fi if test "${AST_IKSEMEL_FOUND}" = "yes"; then IKSEMEL_LIB="-liksemel " @@ -17007,47 +17009,32 @@ fi fi fi if test "x${IKSEMEL_HEADER_FOUND}" = "x0" ; then - if test ! -z "${IKSEMEL_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the iksemel development package installed." >&5 -echo "$as_me: *** It appears that you do not have the iksemel development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${IKSEMEL_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${IKSEMEL_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${IKSEMEL_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${IKSEMEL_OPTION}" >&6;} - exit 1 - fi IKSEMEL_LIB="" IKSEMEL_INCLUDE="" - PBX_IKSEMEL=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + IKSEMEL_LIB="" + fi PBX_IKSEMEL=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_IKSEMEL 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_IKSEMEL_VERSION +_ACEOF + fi - elif test ! -z "${IKSEMEL_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${IKSEMEL_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${IKSEMEL_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${IKSEMEL_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${IKSEMEL_OPTION}" >&6;} - exit 1 fi fi if test "${PBX_IKSEMEL}" = 1; then -if test "${USE_GNUTLS}" != "no"; then +if test "x${PBX_GNUTLS}" != "x1" -a "${USE_GNUTLS}" != "no"; then pbxlibdir="" if test "x${GNUTLS_DIR}" != "x"; then if test -d ${GNUTLS_DIR}/lib; then @@ -17056,9 +17043,14 @@ if test "${USE_GNUTLS}" != "no"; then pbxlibdir="-L${GNUTLS_DIR}" fi fi - { echo "$as_me:$LINENO: checking for gnutls_bye in -lgnutls" >&5 -echo $ECHO_N "checking for gnutls_bye in -lgnutls... $ECHO_C" >&6; } -if test "${ac_cv_lib_gnutls_gnutls_bye+set}" = set; then + pbxfuncname="gnutls_bye" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_GNUTLS_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_gnutls_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lgnutls" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lgnutls... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17076,11 +17068,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char gnutls_bye (); +char ${pbxfuncname} (); int main () { -return gnutls_bye (); +return ${pbxfuncname} (); ; return 0; } @@ -17119,26 +17111,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_gnutls_gnutls_bye=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_gnutls_gnutls_bye=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_gnutls_gnutls_bye" >&5 -echo "${ECHO_T}$ac_cv_lib_gnutls_gnutls_bye" >&6; } -if test $ac_cv_lib_gnutls_gnutls_bye = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_GNUTLS_FOUND=yes else AST_GNUTLS_FOUND=no fi + fi if test "${AST_GNUTLS_FOUND}" = "yes"; then GNUTLS_LIB="-lgnutls " @@ -17468,40 +17462,25 @@ fi fi fi if test "x${GNUTLS_HEADER_FOUND}" = "x0" ; then - if test ! -z "${GNUTLS_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the gnutls development package installed." >&5 -echo "$as_me: *** It appears that you do not have the gnutls development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${GNUTLS_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${GNUTLS_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${GNUTLS_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${GNUTLS_OPTION}" >&6;} - exit 1 - fi GNUTLS_LIB="" GNUTLS_INCLUDE="" - PBX_GNUTLS=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + GNUTLS_LIB="" + fi PBX_GNUTLS=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_GNUTLS 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_GNUTLS_VERSION +_ACEOF + fi - elif test ! -z "${GNUTLS_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${GNUTLS_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${GNUTLS_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${GNUTLS_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${GNUTLS_OPTION}" >&6;} - exit 1 fi fi @@ -17761,18 +17740,6 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi - elif test ! -z "${IMAP_TK_MANDATORY}"; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The UW IMAP Toolkit installation on this system appears to be broken." >&5 -echo "$as_me: *** The UW IMAP Toolkit installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** including --without-imap." >&5 -echo "$as_me: *** including --without-imap." >&6;} - exit 1 else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } @@ -17878,18 +17845,6 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_LIBKDE 1 _ACEOF - elif test ! -z "${KDE_MANDATORY}"; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The KDE installation on this system appears to be broken." >&5 -echo "$as_me: *** The KDE installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** including --without-kde." >&5 -echo "$as_me: *** including --without-kde." >&6;} - exit 1 else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } @@ -18013,7 +17968,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test "${USE_MISDN}" != "no"; then +if test "x${PBX_MISDN}" != "x1" -a "${USE_MISDN}" != "no"; then pbxlibdir="" if test "x${MISDN_DIR}" != "x"; then if test -d ${MISDN_DIR}/lib; then @@ -18022,9 +17977,14 @@ if test "${USE_MISDN}" != "no"; then pbxlibdir="-L${MISDN_DIR}" fi fi - { echo "$as_me:$LINENO: checking for mISDN_open in -lmISDN" >&5 -echo $ECHO_N "checking for mISDN_open in -lmISDN... $ECHO_C" >&6; } -if test "${ac_cv_lib_mISDN_mISDN_open+set}" = set; then + pbxfuncname="mISDN_open" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_MISDN_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_mISDN_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lmISDN" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lmISDN... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18042,11 +18002,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char mISDN_open (); +char ${pbxfuncname} (); int main () { -return mISDN_open (); +return ${pbxfuncname} (); ; return 0; } @@ -18085,26 +18045,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_mISDN_mISDN_open=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_mISDN_mISDN_open=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_mISDN_mISDN_open" >&5 -echo "${ECHO_T}$ac_cv_lib_mISDN_mISDN_open" >&6; } -if test $ac_cv_lib_mISDN_mISDN_open = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_MISDN_FOUND=yes else AST_MISDN_FOUND=no fi + fi if test "${AST_MISDN_FOUND}" = "yes"; then MISDN_LIB="-lmISDN " @@ -18434,47 +18396,32 @@ fi fi fi if test "x${MISDN_HEADER_FOUND}" = "x0" ; then - if test ! -z "${MISDN_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the mISDN development package installed." >&5 -echo "$as_me: *** It appears that you do not have the mISDN development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${MISDN_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${MISDN_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${MISDN_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${MISDN_OPTION}" >&6;} - exit 1 - fi MISDN_LIB="" MISDN_INCLUDE="" - PBX_MISDN=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + MISDN_LIB="" + fi PBX_MISDN=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_MISDN 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_MISDN_VERSION +_ACEOF + fi - elif test ! -z "${MISDN_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${MISDN_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${MISDN_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${MISDN_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${MISDN_OPTION}" >&6;} - exit 1 fi fi if test "${PBX_MISDN}" = 1; then -if test "${USE_ISDNNET}" != "no"; then +if test "x${PBX_ISDNNET}" != "x1" -a "${USE_ISDNNET}" != "no"; then pbxlibdir="" if test "x${ISDNNET_DIR}" != "x"; then if test -d ${ISDNNET_DIR}/lib; then @@ -18483,9 +18430,14 @@ if test "${USE_ISDNNET}" != "no"; then pbxlibdir="-L${ISDNNET_DIR}" fi fi - { echo "$as_me:$LINENO: checking for init_manager in -lisdnnet" >&5 -echo $ECHO_N "checking for init_manager in -lisdnnet... $ECHO_C" >&6; } -if test "${ac_cv_lib_isdnnet_init_manager+set}" = set; then + pbxfuncname="init_manager" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_ISDNNET_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_isdnnet_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lisdnnet" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lisdnnet... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18503,11 +18455,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char init_manager (); +char ${pbxfuncname} (); int main () { -return init_manager (); +return ${pbxfuncname} (); ; return 0; } @@ -18546,26 +18498,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_isdnnet_init_manager=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_isdnnet_init_manager=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_isdnnet_init_manager" >&5 -echo "${ECHO_T}$ac_cv_lib_isdnnet_init_manager" >&6; } -if test $ac_cv_lib_isdnnet_init_manager = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_ISDNNET_FOUND=yes else AST_ISDNNET_FOUND=no fi + fi if test "${AST_ISDNNET_FOUND}" = "yes"; then ISDNNET_LIB="-lisdnnet -lmISDN -lpthread" @@ -18895,45 +18849,30 @@ fi fi fi if test "x${ISDNNET_HEADER_FOUND}" = "x0" ; then - if test ! -z "${ISDNNET_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the isdnnet development package installed." >&5 -echo "$as_me: *** It appears that you do not have the isdnnet development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${ISDNNET_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${ISDNNET_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${ISDNNET_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${ISDNNET_OPTION}" >&6;} - exit 1 - fi ISDNNET_LIB="" ISDNNET_INCLUDE="" - PBX_ISDNNET=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + ISDNNET_LIB="" + fi PBX_ISDNNET=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_ISDNNET 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_ISDNNET_VERSION +_ACEOF + fi - elif test ! -z "${ISDNNET_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${ISDNNET_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${ISDNNET_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${ISDNNET_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${ISDNNET_OPTION}" >&6;} - exit 1 fi fi -if test "${USE_SUPPSERV}" != "no"; then +if test "x${PBX_SUPPSERV}" != "x1" -a "${USE_SUPPSERV}" != "no"; then pbxlibdir="" if test "x${SUPPSERV_DIR}" != "x"; then if test -d ${SUPPSERV_DIR}/lib; then @@ -18942,9 +18881,14 @@ if test "${USE_SUPPSERV}" != "no"; then pbxlibdir="-L${SUPPSERV_DIR}" fi fi - { echo "$as_me:$LINENO: checking for encodeFac in -lsuppserv" >&5 -echo $ECHO_N "checking for encodeFac in -lsuppserv... $ECHO_C" >&6; } -if test "${ac_cv_lib_suppserv_encodeFac+set}" = set; then + pbxfuncname="encodeFac" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_SUPPSERV_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_suppserv_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lsuppserv" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lsuppserv... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -18962,11 +18906,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char encodeFac (); +char ${pbxfuncname} (); int main () { -return encodeFac (); +return ${pbxfuncname} (); ; return 0; } @@ -19005,26 +18949,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_suppserv_encodeFac=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_suppserv_encodeFac=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_suppserv_encodeFac" >&5 -echo "${ECHO_T}$ac_cv_lib_suppserv_encodeFac" >&6; } -if test $ac_cv_lib_suppserv_encodeFac = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_SUPPSERV_FOUND=yes else AST_SUPPSERV_FOUND=no fi + fi if test "${AST_SUPPSERV_FOUND}" = "yes"; then SUPPSERV_LIB="-lsuppserv " @@ -19354,47 +19300,32 @@ fi fi fi if test "x${SUPPSERV_HEADER_FOUND}" = "x0" ; then - if test ! -z "${SUPPSERV_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the suppserv development package installed." >&5 -echo "$as_me: *** It appears that you do not have the suppserv development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${SUPPSERV_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${SUPPSERV_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${SUPPSERV_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${SUPPSERV_OPTION}" >&6;} - exit 1 - fi SUPPSERV_LIB="" SUPPSERV_INCLUDE="" - PBX_SUPPSERV=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + SUPPSERV_LIB="" + fi PBX_SUPPSERV=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_SUPPSERV 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_SUPPSERV_VERSION +_ACEOF + fi - elif test ! -z "${SUPPSERV_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${SUPPSERV_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${SUPPSERV_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${SUPPSERV_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${SUPPSERV_OPTION}" >&6;} - exit 1 fi fi fi -if test "${USE_NBS}" != "no"; then +if test "x${PBX_NBS}" != "x1" -a "${USE_NBS}" != "no"; then pbxlibdir="" if test "x${NBS_DIR}" != "x"; then if test -d ${NBS_DIR}/lib; then @@ -19403,9 +19334,14 @@ if test "${USE_NBS}" != "no"; then pbxlibdir="-L${NBS_DIR}" fi fi - { echo "$as_me:$LINENO: checking for nbs_connect in -lnbs" >&5 -echo $ECHO_N "checking for nbs_connect in -lnbs... $ECHO_C" >&6; } -if test "${ac_cv_lib_nbs_nbs_connect+set}" = set; then + pbxfuncname="nbs_connect" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_NBS_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_nbs_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lnbs" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lnbs... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19423,11 +19359,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char nbs_connect (); +char ${pbxfuncname} (); int main () { -return nbs_connect (); +return ${pbxfuncname} (); ; return 0; } @@ -19466,26 +19402,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_nbs_nbs_connect=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_nbs_nbs_connect=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_nbs_nbs_connect" >&5 -echo "${ECHO_T}$ac_cv_lib_nbs_nbs_connect" >&6; } -if test $ac_cv_lib_nbs_nbs_connect = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_NBS_FOUND=yes else AST_NBS_FOUND=no fi + fi if test "${AST_NBS_FOUND}" = "yes"; then NBS_LIB="-lnbs " @@ -19815,46 +19753,31 @@ fi fi fi if test "x${NBS_HEADER_FOUND}" = "x0" ; then - if test ! -z "${NBS_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the nbs development package installed." >&5 -echo "$as_me: *** It appears that you do not have the nbs development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${NBS_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${NBS_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${NBS_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${NBS_OPTION}" >&6;} - exit 1 - fi NBS_LIB="" NBS_INCLUDE="" - PBX_NBS=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + NBS_LIB="" + fi PBX_NBS=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_NBS 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_NBS_VERSION +_ACEOF + fi - elif test ! -z "${NBS_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${NBS_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${NBS_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${NBS_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${NBS_OPTION}" >&6;} - exit 1 fi fi -if test "${USE_NCURSES}" != "no"; then +if test "x${PBX_NCURSES}" != "x1" -a "${USE_NCURSES}" != "no"; then pbxlibdir="" if test "x${NCURSES_DIR}" != "x"; then if test -d ${NCURSES_DIR}/lib; then @@ -19863,9 +19786,14 @@ if test "${USE_NCURSES}" != "no"; then pbxlibdir="-L${NCURSES_DIR}" fi fi - { echo "$as_me:$LINENO: checking for initscr in -lncurses" >&5 -echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6; } -if test "${ac_cv_lib_ncurses_initscr+set}" = set; then + pbxfuncname="initscr" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_NCURSES_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_ncurses_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lncurses" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lncurses... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -19883,11 +19811,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char initscr (); +char ${pbxfuncname} (); int main () { -return initscr (); +return ${pbxfuncname} (); ; return 0; } @@ -19926,26 +19854,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_ncurses_initscr=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ncurses_initscr=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_initscr" >&5 -echo "${ECHO_T}$ac_cv_lib_ncurses_initscr" >&6; } -if test $ac_cv_lib_ncurses_initscr = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_NCURSES_FOUND=yes else AST_NCURSES_FOUND=no fi + fi if test "${AST_NCURSES_FOUND}" = "yes"; then NCURSES_LIB="-lncurses " @@ -20275,40 +20205,25 @@ fi fi fi if test "x${NCURSES_HEADER_FOUND}" = "x0" ; then - if test ! -z "${NCURSES_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the ncurses development package installed." >&5 -echo "$as_me: *** It appears that you do not have the ncurses development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${NCURSES_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${NCURSES_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${NCURSES_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${NCURSES_OPTION}" >&6;} - exit 1 - fi NCURSES_LIB="" NCURSES_INCLUDE="" - PBX_NCURSES=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + NCURSES_LIB="" + fi PBX_NCURSES=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_NCURSES 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_NCURSES_VERSION +_ACEOF + fi - elif test ! -z "${NCURSES_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${NCURSES_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${NCURSES_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${NCURSES_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${NCURSES_OPTION}" >&6;} - exit 1 fi fi @@ -20628,33 +20543,11 @@ fi if test "${ac_cv_lib_netsnmp_snmp_register_callback}" = "yes"; then NETSNMP_LIB="${NETSNMP_libs}" PBX_NETSNMP=1 - elif test ! -z "${NETSNMP_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The Net-SNMP installation on this system appears to be broken." >&5 -echo "$as_me: *** The Net-SNMP installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** including --without-netsnmp" >&5 -echo "$as_me: *** including --without-netsnmp" >&6;} - exit 1 fi -elif test ! -z "${NETSNMP_MANDATORY}"; -then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The Net-SNMP installation on this system appears to be broken." >&5 -echo "$as_me: *** The Net-SNMP installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** including --without-netsnmp" >&5 -echo "$as_me: *** including --without-netsnmp" >&6;} - exit 1 fi -if test "${USE_NEWT}" != "no"; then +if test "x${PBX_NEWT}" != "x1" -a "${USE_NEWT}" != "no"; then pbxlibdir="" if test "x${NEWT_DIR}" != "x"; then if test -d ${NEWT_DIR}/lib; then @@ -20663,9 +20556,14 @@ if test "${USE_NEWT}" != "no"; then pbxlibdir="-L${NEWT_DIR}" fi fi - { echo "$as_me:$LINENO: checking for newtBell in -lnewt" >&5 -echo $ECHO_N "checking for newtBell in -lnewt... $ECHO_C" >&6; } -if test "${ac_cv_lib_newt_newtBell+set}" = set; then + pbxfuncname="newtBell" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_NEWT_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_newt_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lnewt" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lnewt... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -20683,11 +20581,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char newtBell (); +char ${pbxfuncname} (); int main () { -return newtBell (); +return ${pbxfuncname} (); ; return 0; } @@ -20726,26 +20624,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_newt_newtBell=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_newt_newtBell=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_newt_newtBell" >&5 -echo "${ECHO_T}$ac_cv_lib_newt_newtBell" >&6; } -if test $ac_cv_lib_newt_newtBell = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_NEWT_FOUND=yes else AST_NEWT_FOUND=no fi + fi if test "${AST_NEWT_FOUND}" = "yes"; then NEWT_LIB="-lnewt " @@ -21075,46 +20975,31 @@ fi fi fi if test "x${NEWT_HEADER_FOUND}" = "x0" ; then - if test ! -z "${NEWT_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the newt development package installed." >&5 -echo "$as_me: *** It appears that you do not have the newt development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${NEWT_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${NEWT_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${NEWT_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${NEWT_OPTION}" >&6;} - exit 1 - fi NEWT_LIB="" NEWT_INCLUDE="" - PBX_NEWT=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + NEWT_LIB="" + fi PBX_NEWT=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_NEWT 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_NEWT_VERSION +_ACEOF + fi - elif test ! -z "${NEWT_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${NEWT_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${NEWT_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${NEWT_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${NEWT_OPTION}" >&6;} - exit 1 fi fi -if test "${USE_UNIXODBC}" != "no"; then +if test "x${PBX_UNIXODBC}" != "x1" -a "${USE_UNIXODBC}" != "no"; then pbxlibdir="" if test "x${UNIXODBC_DIR}" != "x"; then if test -d ${UNIXODBC_DIR}/lib; then @@ -21123,9 +21008,14 @@ if test "${USE_UNIXODBC}" != "no"; then pbxlibdir="-L${UNIXODBC_DIR}" fi fi - { echo "$as_me:$LINENO: checking for SQLConnect in -lodbc" >&5 -echo $ECHO_N "checking for SQLConnect in -lodbc... $ECHO_C" >&6; } -if test "${ac_cv_lib_odbc_SQLConnect+set}" = set; then + pbxfuncname="SQLConnect" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_UNIXODBC_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_odbc_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lodbc" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lodbc... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21143,11 +21033,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char SQLConnect (); +char ${pbxfuncname} (); int main () { -return SQLConnect (); +return ${pbxfuncname} (); ; return 0; } @@ -21186,26 +21076,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_odbc_SQLConnect=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_odbc_SQLConnect=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_odbc_SQLConnect" >&5 -echo "${ECHO_T}$ac_cv_lib_odbc_SQLConnect" >&6; } -if test $ac_cv_lib_odbc_SQLConnect = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_UNIXODBC_FOUND=yes else AST_UNIXODBC_FOUND=no fi + fi if test "${AST_UNIXODBC_FOUND}" = "yes"; then UNIXODBC_LIB="-lodbc -lltdl" @@ -21535,46 +21427,31 @@ fi fi fi if test "x${UNIXODBC_HEADER_FOUND}" = "x0" ; then - if test ! -z "${UNIXODBC_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the odbc development package installed." >&5 -echo "$as_me: *** It appears that you do not have the odbc development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${UNIXODBC_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${UNIXODBC_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${UNIXODBC_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${UNIXODBC_OPTION}" >&6;} - exit 1 - fi UNIXODBC_LIB="" UNIXODBC_INCLUDE="" - PBX_UNIXODBC=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + UNIXODBC_LIB="" + fi PBX_UNIXODBC=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_UNIXODBC 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_UNIXODBC_VERSION +_ACEOF + fi - elif test ! -z "${UNIXODBC_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${UNIXODBC_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${UNIXODBC_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${UNIXODBC_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${UNIXODBC_OPTION}" >&6;} - exit 1 fi fi -if test "${USE_OGG}" != "no"; then +if test "x${PBX_OGG}" != "x1" -a "${USE_OGG}" != "no"; then pbxlibdir="" if test "x${OGG_DIR}" != "x"; then if test -d ${OGG_DIR}/lib; then @@ -21583,9 +21460,14 @@ if test "${USE_OGG}" != "no"; then pbxlibdir="-L${OGG_DIR}" fi fi - { echo "$as_me:$LINENO: checking for ogg_sync_init in -logg" >&5 -echo $ECHO_N "checking for ogg_sync_init in -logg... $ECHO_C" >&6; } -if test "${ac_cv_lib_ogg_ogg_sync_init+set}" = set; then + pbxfuncname="ogg_sync_init" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_OGG_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_ogg_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -logg" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -logg... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -21603,11 +21485,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char ogg_sync_init (); +char ${pbxfuncname} (); int main () { -return ogg_sync_init (); +return ${pbxfuncname} (); ; return 0; } @@ -21646,26 +21528,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_ogg_ogg_sync_init=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ogg_ogg_sync_init=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ogg_ogg_sync_init" >&5 -echo "${ECHO_T}$ac_cv_lib_ogg_ogg_sync_init" >&6; } -if test $ac_cv_lib_ogg_ogg_sync_init = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_OGG_FOUND=yes else AST_OGG_FOUND=no fi + fi if test "${AST_OGG_FOUND}" = "yes"; then OGG_LIB="-logg " @@ -21995,46 +21879,31 @@ fi fi fi if test "x${OGG_HEADER_FOUND}" = "x0" ; then - if test ! -z "${OGG_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the ogg development package installed." >&5 -echo "$as_me: *** It appears that you do not have the ogg development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${OGG_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${OGG_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${OGG_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${OGG_OPTION}" >&6;} - exit 1 - fi OGG_LIB="" OGG_INCLUDE="" - PBX_OGG=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + OGG_LIB="" + fi PBX_OGG=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_OGG 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_OGG_VERSION +_ACEOF + fi - elif test ! -z "${OGG_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${OGG_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${OGG_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${OGG_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${OGG_OPTION}" >&6;} - exit 1 fi fi -if test "${USE_OSPTK}" != "no"; then +if test "x${PBX_OSPTK}" != "x1" -a "${USE_OSPTK}" != "no"; then pbxlibdir="" if test "x${OSPTK_DIR}" != "x"; then if test -d ${OSPTK_DIR}/lib; then @@ -22043,9 +21912,14 @@ if test "${USE_OSPTK}" != "no"; then pbxlibdir="-L${OSPTK_DIR}" fi fi - { echo "$as_me:$LINENO: checking for OSPPCryptoDecrypt in -losptk" >&5 -echo $ECHO_N "checking for OSPPCryptoDecrypt in -losptk... $ECHO_C" >&6; } -if test "${ac_cv_lib_osptk_OSPPCryptoDecrypt+set}" = set; then + pbxfuncname="OSPPCryptoDecrypt" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_OSPTK_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_osptk_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -losptk" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -losptk... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -22063,11 +21937,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char OSPPCryptoDecrypt (); +char ${pbxfuncname} (); int main () { -return OSPPCryptoDecrypt (); +return ${pbxfuncname} (); ; return 0; } @@ -22106,26 +21980,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_osptk_OSPPCryptoDecrypt=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_osptk_OSPPCryptoDecrypt=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_osptk_OSPPCryptoDecrypt" >&5 -echo "${ECHO_T}$ac_cv_lib_osptk_OSPPCryptoDecrypt" >&6; } -if test $ac_cv_lib_osptk_OSPPCryptoDecrypt = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_OSPTK_FOUND=yes else AST_OSPTK_FOUND=no fi + fi if test "${AST_OSPTK_FOUND}" = "yes"; then OSPTK_LIB="-losptk -lcrypto -lssl" @@ -22455,74 +22331,82 @@ fi fi fi if test "x${OSPTK_HEADER_FOUND}" = "x0" ; then - if test ! -z "${OSPTK_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the osptk development package installed." >&5 -echo "$as_me: *** It appears that you do not have the osptk development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${OSPTK_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${OSPTK_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${OSPTK_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${OSPTK_OPTION}" >&6;} - exit 1 - fi OSPTK_LIB="" OSPTK_INCLUDE="" - PBX_OSPTK=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + OSPTK_LIB="" + fi PBX_OSPTK=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_OSPTK 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_OSPTK_VERSION +_ACEOF + fi - elif test ! -z "${OSPTK_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${OSPTK_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${OSPTK_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${OSPTK_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${OSPTK_OPTION}" >&6;} - exit 1 fi fi -PBX_OSS=0 -if test "${ac_cv_header_linux_soundcard_h+set}" = set; then - { echo "$as_me:$LINENO: checking for linux/soundcard.h" >&5 -echo $ECHO_N "checking for linux/soundcard.h... $ECHO_C" >&6; } -if test "${ac_cv_header_linux_soundcard_h+set}" = set; then +# possible places for oss definitions + +if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then + pbxlibdir="" + if test "x${OSS_DIR}" != "x"; then + if test -d ${OSS_DIR}/lib; then + pbxlibdir="-L${OSS_DIR}/lib" + else + pbxlibdir="-L${OSS_DIR}" + fi + fi + pbxfuncname="" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_OSS_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lossaudio" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lossaudio... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_soundcard_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_soundcard_h" >&6; } else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking linux/soundcard.h usability" >&5 -echo $ECHO_N "checking linux/soundcard.h usability... $ECHO_C" >&6; } + ac_check_lib_save_LIBS=$LIBS +LIBS="-lossaudio ${pbxlibdir} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ${pbxfuncname} (); +int +main () +{ +return ${pbxfuncname} (); + ; + return 0; +} _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -22539,7 +22423,94 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Lib=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_OSS_FOUND=yes +else + AST_OSS_FOUND=no +fi + + fi + + if test "${AST_OSS_FOUND}" = "yes"; then + OSS_LIB="-lossaudio " + OSS_HEADER_FOUND="1" + if test "x${OSS_DIR}" != "x"; then + OSS_LIB="${pbxlibdir} ${OSS_LIB}" + OSS_INCLUDE="-I${OSS_DIR}/include" + if test "xlinux/soundcard.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${OSS_DIR}/include/linux/soundcard.h" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for ${OSS_DIR}/include/linux/soundcard.h" >&5 +echo $ECHO_N "checking for ${OSS_DIR}/include/linux/soundcard.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ${OSS_DIR}/include/linux/soundcard.h usability" >&5 +echo $ECHO_N "checking ${OSS_DIR}/include/linux/soundcard.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <${OSS_DIR}/include/linux/soundcard.h> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -22562,15 +22533,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking linux/soundcard.h presence" >&5 -echo $ECHO_N "checking linux/soundcard.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${OSS_DIR}/include/linux/soundcard.h presence" >&5 +echo $ECHO_N "checking ${OSS_DIR}/include/linux/soundcard.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include <${OSS_DIR}/include/linux/soundcard.h> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -22610,64 +22581,62 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: linux/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: linux/soundcard.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/linux/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/linux/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/linux/soundcard.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/linux/soundcard.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: linux/soundcard.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: linux/soundcard.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: linux/soundcard.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: linux/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: linux/soundcard.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: linux/soundcard.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/linux/soundcard.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/linux/soundcard.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/linux/soundcard.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/linux/soundcard.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/linux/soundcard.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/linux/soundcard.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/linux/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/linux/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/linux/soundcard.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/linux/soundcard.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/linux/soundcard.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/linux/soundcard.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for linux/soundcard.h" >&5 -echo $ECHO_N "checking for linux/soundcard.h... $ECHO_C" >&6; } -if test "${ac_cv_header_linux_soundcard_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for ${OSS_DIR}/include/linux/soundcard.h" >&5 +echo $ECHO_N "checking for ${OSS_DIR}/include/linux/soundcard.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_linux_soundcard_h=$ac_header_preproc + eval "$as_ac_Header=\$ac_header_preproc" fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_soundcard_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_soundcard_h" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } fi -if test $ac_cv_header_linux_soundcard_h = yes; then - - PBX_OSS=1 - -cat >>confdefs.h <<_ACEOF -#define HAVE_OSS 1 -_ACEOF - - +if test `eval echo '${'$as_ac_Header'}'` = yes; then + OSS_HEADER_FOUND=1 +else + OSS_HEADER_FOUND=0 fi -if test "$PBX_OSS" = "0"; then - if test "${ac_cv_header_sys_soundcard_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5 -echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_soundcard_h+set}" = set; then + fi + else + if test "xlinux/soundcard.h" != "x" ; then + if test "${ac_cv_header_linux_soundcard_h+set}" = set; then + { echo "$as_me:$LINENO: checking for linux/soundcard.h" >&5 +echo $ECHO_N "checking for linux/soundcard.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_soundcard_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_soundcard_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_soundcard_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_soundcard_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/soundcard.h usability" >&5 -echo $ECHO_N "checking sys/soundcard.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking linux/soundcard.h usability" >&5 +echo $ECHO_N "checking linux/soundcard.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22675,7 +22644,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -22724,15 +22693,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking sys/soundcard.h presence" >&5 -echo $ECHO_N "checking sys/soundcard.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking linux/soundcard.h presence" >&5 +echo $ECHO_N "checking linux/soundcard.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -22772,55 +22741,73 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: linux/soundcard.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/soundcard.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/soundcard.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/soundcard.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/soundcard.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/soundcard.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: linux/soundcard.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: linux/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/soundcard.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/soundcard.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: linux/soundcard.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5 -echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_soundcard_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for linux/soundcard.h" >&5 +echo $ECHO_N "checking for linux/soundcard.h... $ECHO_C" >&6; } +if test "${ac_cv_header_linux_soundcard_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_sys_soundcard_h=$ac_header_preproc + ac_cv_header_linux_soundcard_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_soundcard_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_linux_soundcard_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_soundcard_h" >&6; } fi -if test $ac_cv_header_sys_soundcard_h = yes; then +if test $ac_cv_header_linux_soundcard_h = yes; then + OSS_HEADER_FOUND=1 +else + OSS_HEADER_FOUND=0 +fi - PBX_OSS=1 + + fi + fi + if test "x${OSS_HEADER_FOUND}" = "x0" ; then + OSS_LIB="" + OSS_INCLUDE="" + else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + OSS_LIB="" + fi + PBX_OSS=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_OSS 1 _ACEOF -fi - +cat >>confdefs.h <<_ACEOF +#define HAVE_OSS_VERSION +_ACEOF + fi + fi fi -if test "$PBX_OSS" = "0"; then -if test "${USE_OSS}" != "no"; then + +if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then pbxlibdir="" if test "x${OSS_DIR}" != "x"; then if test -d ${OSS_DIR}/lib; then @@ -22829,9 +22816,14 @@ if test "${USE_OSS}" != "no"; then pbxlibdir="-L${OSS_DIR}" fi fi - { echo "$as_me:$LINENO: checking for oss_ioctl_mixer in -lossaudio" >&5 -echo $ECHO_N "checking for oss_ioctl_mixer in -lossaudio... $ECHO_C" >&6; } -if test "${ac_cv_lib_ossaudio_oss_ioctl_mixer+set}" = set; then + pbxfuncname="" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_OSS_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lossaudio" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lossaudio... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -22849,11 +22841,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char oss_ioctl_mixer (); +char ${pbxfuncname} (); int main () { -return oss_ioctl_mixer (); +return ${pbxfuncname} (); ; return 0; } @@ -22892,26 +22884,28 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_ossaudio_oss_ioctl_mixer=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ossaudio_oss_ioctl_mixer=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio_oss_ioctl_mixer" >&5 -echo "${ECHO_T}$ac_cv_lib_ossaudio_oss_ioctl_mixer" >&6; } -if test $ac_cv_lib_ossaudio_oss_ioctl_mixer = yes; then +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then AST_OSS_FOUND=yes else AST_OSS_FOUND=no fi + fi if test "${AST_OSS_FOUND}" = "yes"; then OSS_LIB="-lossaudio " @@ -22919,11 +22913,11 @@ fi if test "x${OSS_DIR}" != "x"; then OSS_LIB="${pbxlibdir} ${OSS_LIB}" OSS_INCLUDE="-I${OSS_DIR}/include" - if test "xsoundcard.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${OSS_DIR}/include/soundcard.h" | $as_tr_sh` + if test "xsys/soundcard.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${OSS_DIR}/include/sys/soundcard.h" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${OSS_DIR}/include/soundcard.h" >&5 -echo $ECHO_N "checking for ${OSS_DIR}/include/soundcard.h... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for ${OSS_DIR}/include/sys/soundcard.h" >&5 +echo $ECHO_N "checking for ${OSS_DIR}/include/sys/soundcard.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi @@ -22932,8 +22926,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'` echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${OSS_DIR}/include/soundcard.h usability" >&5 -echo $ECHO_N "checking ${OSS_DIR}/include/soundcard.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${OSS_DIR}/include/sys/soundcard.h usability" >&5 +echo $ECHO_N "checking ${OSS_DIR}/include/sys/soundcard.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22941,7 +22935,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <${OSS_DIR}/include/soundcard.h> +#include <${OSS_DIR}/include/sys/soundcard.h> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -22990,15 +22984,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking ${OSS_DIR}/include/soundcard.h presence" >&5 -echo $ECHO_N "checking ${OSS_DIR}/include/soundcard.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${OSS_DIR}/include/sys/soundcard.h presence" >&5 +echo $ECHO_N "checking ${OSS_DIR}/include/sys/soundcard.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <${OSS_DIR}/include/soundcard.h> +#include <${OSS_DIR}/include/sys/soundcard.h> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -23038,30 +23032,30 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/sys/soundcard.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/sys/soundcard.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/sys/soundcard.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/sys/soundcard.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/sys/soundcard.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/sys/soundcard.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/sys/soundcard.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/sys/soundcard.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/sys/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/sys/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/sys/soundcard.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/sys/soundcard.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/sys/soundcard.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/sys/soundcard.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for ${OSS_DIR}/include/soundcard.h" >&5 -echo $ECHO_N "checking for ${OSS_DIR}/include/soundcard.h... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for ${OSS_DIR}/include/sys/soundcard.h" >&5 +echo $ECHO_N "checking for ${OSS_DIR}/include/sys/soundcard.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -23081,19 +23075,19 @@ fi fi else - if test "xsoundcard.h" != "x" ; then - if test "${ac_cv_header_soundcard_h+set}" = set; then - { echo "$as_me:$LINENO: checking for soundcard.h" >&5 -echo $ECHO_N "checking for soundcard.h... $ECHO_C" >&6; } -if test "${ac_cv_header_soundcard_h+set}" = set; then + if test "xsys/soundcard.h" != "x" ; then + if test "${ac_cv_header_sys_soundcard_h+set}" = set; then + { echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5 +echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_soundcard_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_soundcard_h" >&5 -echo "${ECHO_T}$ac_cv_header_soundcard_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_soundcard_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking soundcard.h usability" >&5 -echo $ECHO_N "checking soundcard.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking sys/soundcard.h usability" >&5 +echo $ECHO_N "checking sys/soundcard.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23101,7 +23095,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -23150,15 +23144,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking soundcard.h presence" >&5 -echo $ECHO_N "checking soundcard.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking sys/soundcard.h presence" >&5 +echo $ECHO_N "checking sys/soundcard.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -23198,40 +23192,40 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: soundcard.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: soundcard.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sys/soundcard.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: soundcard.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: soundcard.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: soundcard.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: soundcard.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: soundcard.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: soundcard.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: soundcard.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: soundcard.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: soundcard.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: soundcard.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/soundcard.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/soundcard.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sys/soundcard.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sys/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/soundcard.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sys/soundcard.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for soundcard.h" >&5 -echo $ECHO_N "checking for soundcard.h... $ECHO_C" >&6; } -if test "${ac_cv_header_soundcard_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for sys/soundcard.h" >&5 +echo $ECHO_N "checking for sys/soundcard.h... $ECHO_C" >&6; } +if test "${ac_cv_header_sys_soundcard_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_soundcard_h=$ac_header_preproc + ac_cv_header_sys_soundcard_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_soundcard_h" >&5 -echo "${ECHO_T}$ac_cv_header_soundcard_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_soundcard_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_soundcard_h" >&6; } fi -if test $ac_cv_header_soundcard_h = yes; then +if test $ac_cv_header_sys_soundcard_h = yes; then OSS_HEADER_FOUND=1 else OSS_HEADER_FOUND=0 @@ -23241,309 +23235,167 @@ fi fi fi if test "x${OSS_HEADER_FOUND}" = "x0" ; then - if test ! -z "${OSS_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the ossaudio development package installed." >&5 -echo "$as_me: *** It appears that you do not have the ossaudio development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${OSS_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${OSS_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${OSS_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${OSS_OPTION}" >&6;} - exit 1 - fi OSS_LIB="" OSS_INCLUDE="" - PBX_OSS=0 else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + OSS_LIB="" + fi PBX_OSS=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF #define HAVE_OSS 1 _ACEOF + +cat >>confdefs.h <<_ACEOF +#define HAVE_OSS_VERSION +_ACEOF + fi - elif test ! -z "${OSS_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${OSS_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${OSS_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${OSS_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${OSS_OPTION}" >&6;} - exit 1 fi fi -fi -PG_CONFIG=No -if test "${USE_PGSQL}" != "no"; then - if test "x${PGSQL_DIR}" != "x"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pg_config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pg_config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_PG_CONFIG+set}" = set; then +if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then + pbxlibdir="" + if test "x${OSS_DIR}" != "x"; then + if test -d ${OSS_DIR}/lib; then + pbxlibdir="-L${OSS_DIR}/lib" + else + pbxlibdir="-L${OSS_DIR}" + fi + fi + pbxfuncname="oss_ioctl_mixer" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_OSS_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lossaudio" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lossaudio... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $PG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in ${PGSQL_DIR}/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + ac_check_lib_save_LIBS=$LIBS +LIBS="-lossaudio ${pbxlibdir} $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - ;; +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ${pbxfuncname} (); +int +main () +{ +return ${pbxfuncname} (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac -fi -PG_CONFIG=$ac_cv_path_PG_CONFIG -if test -n "$PG_CONFIG"; then - { echo "$as_me:$LINENO: result: $PG_CONFIG" >&5 -echo "${ECHO_T}$PG_CONFIG" >&6; } +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Lib=yes" else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_Lib=no" fi -if test -z "$ac_cv_path_PG_CONFIG"; then - ac_pt_PG_CONFIG=$PG_CONFIG - # Extract the first word of "pg_config", so it can be a program name with args. -set dummy pg_config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_pt_PG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_pt_PG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PG_CONFIG="$ac_pt_PG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in ${PGSQL_DIR}/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - ;; -esac +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -ac_pt_PG_CONFIG=$ac_cv_path_ac_pt_PG_CONFIG -if test -n "$ac_pt_PG_CONFIG"; then - { echo "$as_me:$LINENO: result: $ac_pt_PG_CONFIG" >&5 -echo "${ECHO_T}$ac_pt_PG_CONFIG" >&6; } +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_OSS_FOUND=yes else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + AST_OSS_FOUND=no fi - if test "x$ac_pt_PG_CONFIG" = x; then - PG_CONFIG="No" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - PG_CONFIG=$ac_pt_PG_CONFIG - fi -else - PG_CONFIG="$ac_cv_path_PG_CONFIG" -fi + fi - if test x"${PG_CONFIG}" = xNo; then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** pg_config was not found in the path you specified:" >&5 -echo "$as_me: *** pg_config was not found in the path you specified:" >&6;} - { echo "$as_me:$LINENO: *** ${PGSQL_DIR}/bin" >&5 -echo "$as_me: *** ${PGSQL_DIR}/bin" >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** including --without-postgres" >&5 -echo "$as_me: *** including --without-postgres" >&6;} - exit 1 - fi - else - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pg_config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pg_config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_PG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -PG_CONFIG=$ac_cv_path_PG_CONFIG -if test -n "$PG_CONFIG"; then - { echo "$as_me:$LINENO: result: $PG_CONFIG" >&5 -echo "${ECHO_T}$PG_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PG_CONFIG"; then - ac_pt_PG_CONFIG=$PG_CONFIG - # Extract the first word of "pg_config", so it can be a program name with args. -set dummy pg_config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_pt_PG_CONFIG+set}" = set; then + if test "${AST_OSS_FOUND}" = "yes"; then + OSS_LIB="-lossaudio " + OSS_HEADER_FOUND="1" + if test "x${OSS_DIR}" != "x"; then + OSS_LIB="${pbxlibdir} ${OSS_LIB}" + OSS_INCLUDE="-I${OSS_DIR}/include" + if test "xsoundcard.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${OSS_DIR}/include/soundcard.h" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for ${OSS_DIR}/include/soundcard.h" >&5 +echo $ECHO_N "checking for ${OSS_DIR}/include/soundcard.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_pt_PG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PG_CONFIG="$ac_pt_PG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PG_CONFIG=$ac_cv_path_ac_pt_PG_CONFIG -if test -n "$ac_pt_PG_CONFIG"; then - { echo "$as_me:$LINENO: result: $ac_pt_PG_CONFIG" >&5 -echo "${ECHO_T}$ac_pt_PG_CONFIG" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_pt_PG_CONFIG" = x; then - PG_CONFIG="No" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - PG_CONFIG=$ac_pt_PG_CONFIG - fi -else - PG_CONFIG="$ac_cv_path_PG_CONFIG" -fi - - fi fi -if test "${PG_CONFIG}" != No; then - PGSQL_libdir=`pg_config --libdir` - PGSQL_includedir=`pg_config --includedir` - - { echo "$as_me:$LINENO: checking for PQexec in -lpq" >&5 -echo $ECHO_N "checking for PQexec in -lpq... $ECHO_C" >&6; } -if test "${ac_cv_lib_pq_PQexec+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpq -L${PGSQL_libdir} -lz $LIBS" + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ${OSS_DIR}/include/soundcard.h usability" >&5 +echo $ECHO_N "checking ${OSS_DIR}/include/soundcard.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char PQexec (); -int -main () -{ -return PQexec (); - ; - return 0; -} +$ac_includes_default +#include <${OSS_DIR}/include/soundcard.h> _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 @@ -23560,7 +23412,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -23570,268 +23422,58 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_pq_PQexec=yes + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pq_PQexec=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pq_PQexec" >&5 -echo "${ECHO_T}$ac_cv_lib_pq_PQexec" >&6; } -if test $ac_cv_lib_pq_PQexec = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_PGSQL 1 -_ACEOF - -fi - - - if test "${ac_cv_lib_pq_PQexec}" = "yes"; then - PGSQL_LIB="-L${PGSQL_libdir} -lpq -lz -lcrypt" - PGSQL_INCLUDE="-I${PGSQL_includedir}" - PBX_PGSQL=1 - elif test ! -z "${PGSQL_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The PostgreSQL installation on this system appears to be broken." >&5 -echo "$as_me: *** The PostgreSQL installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** including --without-postgres" >&5 -echo "$as_me: *** including --without-postgres" >&6;} - exit 1 - fi -elif test ! -z "${PGSQL_MANDATORY}"; -then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The PostgreSQL installation on this system appears to be broken." >&5 -echo "$as_me: *** The PostgreSQL installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** including --without-postgres" >&5 -echo "$as_me: *** including --without-postgres" >&6;} - exit 1 + ac_header_compiler=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } -if test "${USE_POPT}" != "no"; then - pbxlibdir="" - if test "x${POPT_DIR}" != "x"; then - if test -d ${POPT_DIR}/lib; then - pbxlibdir="-L${POPT_DIR}/lib" - else - pbxlibdir="-L${POPT_DIR}" - fi - fi - { echo "$as_me:$LINENO: checking for poptStrerror in -lpopt" >&5 -echo $ECHO_N "checking for poptStrerror in -lpopt... $ECHO_C" >&6; } -if test "${ac_cv_lib_popt_poptStrerror+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpopt ${pbxlibdir} $LIBS" +# Is the header present? +{ echo "$as_me:$LINENO: checking ${OSS_DIR}/include/soundcard.h presence" >&5 +echo $ECHO_N "checking ${OSS_DIR}/include/soundcard.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char poptStrerror (); -int -main () -{ -return poptStrerror (); - ; - return 0; -} +#include <${OSS_DIR}/include/soundcard.h> _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_popt_poptStrerror=yes + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_popt_poptStrerror=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_popt_poptStrerror" >&5 -echo "${ECHO_T}$ac_cv_lib_popt_poptStrerror" >&6; } -if test $ac_cv_lib_popt_poptStrerror = yes; then - AST_POPT_FOUND=yes -else - AST_POPT_FOUND=no -fi - - - if test "${AST_POPT_FOUND}" = "yes"; then - POPT_LIB="-lpopt " - POPT_HEADER_FOUND="1" - if test "x${POPT_DIR}" != "x"; then - POPT_LIB="${pbxlibdir} ${POPT_LIB}" - POPT_INCLUDE="-I${POPT_DIR}/include" - if test "xpopt.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${POPT_DIR}/include/popt.h" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${POPT_DIR}/include/popt.h" >&5 -echo $ECHO_N "checking for ${POPT_DIR}/include/popt.h... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${POPT_DIR}/include/popt.h usability" >&5 -echo $ECHO_N "checking ${POPT_DIR}/include/popt.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <${POPT_DIR}/include/popt.h> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking ${POPT_DIR}/include/popt.h presence" >&5 -echo $ECHO_N "checking ${POPT_DIR}/include/popt.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <${POPT_DIR}/include/popt.h> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no + ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext @@ -23841,30 +23483,30 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OSS_DIR}/include/soundcard.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${OSS_DIR}/include/soundcard.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for ${POPT_DIR}/include/popt.h" >&5 -echo $ECHO_N "checking for ${POPT_DIR}/include/popt.h... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for ${OSS_DIR}/include/soundcard.h" >&5 +echo $ECHO_N "checking for ${OSS_DIR}/include/soundcard.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -23876,27 +23518,27 @@ echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - POPT_HEADER_FOUND=1 + OSS_HEADER_FOUND=1 else - POPT_HEADER_FOUND=0 + OSS_HEADER_FOUND=0 fi fi else - if test "xpopt.h" != "x" ; then - if test "${ac_cv_header_popt_h+set}" = set; then - { echo "$as_me:$LINENO: checking for popt.h" >&5 -echo $ECHO_N "checking for popt.h... $ECHO_C" >&6; } -if test "${ac_cv_header_popt_h+set}" = set; then + if test "xsoundcard.h" != "x" ; then + if test "${ac_cv_header_soundcard_h+set}" = set; then + { echo "$as_me:$LINENO: checking for soundcard.h" >&5 +echo $ECHO_N "checking for soundcard.h... $ECHO_C" >&6; } +if test "${ac_cv_header_soundcard_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_popt_h" >&5 -echo "${ECHO_T}$ac_cv_header_popt_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_soundcard_h" >&5 +echo "${ECHO_T}$ac_cv_header_soundcard_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking popt.h usability" >&5 -echo $ECHO_N "checking popt.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking soundcard.h usability" >&5 +echo $ECHO_N "checking soundcard.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23904,7 +23546,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -23953,15 +23595,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking popt.h presence" >&5 -echo $ECHO_N "checking popt.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking soundcard.h presence" >&5 +echo $ECHO_N "checking soundcard.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -24001,104 +23643,306 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: popt.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: popt.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: popt.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: popt.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: soundcard.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: soundcard.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: soundcard.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: popt.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: popt.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: popt.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: popt.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: popt.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: popt.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: popt.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: popt.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: popt.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: popt.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: popt.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: popt.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: soundcard.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: soundcard.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: soundcard.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: soundcard.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: soundcard.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: soundcard.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: soundcard.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: soundcard.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: soundcard.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: soundcard.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: soundcard.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: soundcard.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for popt.h" >&5 -echo $ECHO_N "checking for popt.h... $ECHO_C" >&6; } -if test "${ac_cv_header_popt_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for soundcard.h" >&5 +echo $ECHO_N "checking for soundcard.h... $ECHO_C" >&6; } +if test "${ac_cv_header_soundcard_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_popt_h=$ac_header_preproc + ac_cv_header_soundcard_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_popt_h" >&5 -echo "${ECHO_T}$ac_cv_header_popt_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_soundcard_h" >&5 +echo "${ECHO_T}$ac_cv_header_soundcard_h" >&6; } fi -if test $ac_cv_header_popt_h = yes; then - POPT_HEADER_FOUND=1 +if test $ac_cv_header_soundcard_h = yes; then + OSS_HEADER_FOUND=1 else - POPT_HEADER_FOUND=0 + OSS_HEADER_FOUND=0 fi fi fi - if test "x${POPT_HEADER_FOUND}" = "x0" ; then - if test ! -z "${POPT_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the popt development package installed." >&5 -echo "$as_me: *** It appears that you do not have the popt development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${POPT_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${POPT_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${POPT_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${POPT_OPTION}" >&6;} - exit 1 - fi - POPT_LIB="" - POPT_INCLUDE="" - PBX_POPT=0 + if test "x${OSS_HEADER_FOUND}" = "x0" ; then + OSS_LIB="" + OSS_INCLUDE="" else - PBX_POPT=1 + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + OSS_LIB="" + fi + PBX_OSS=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF -#define HAVE_POPT 1 +#define HAVE_OSS 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_OSS_VERSION _ACEOF fi - elif test ! -z "${POPT_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${POPT_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${POPT_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${POPT_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${POPT_OPTION}" >&6;} - exit 1 fi fi - -if test "${USE_PRI}" != "no"; then - pbxlibdir="" - if test "x${PRI_DIR}" != "x"; then - if test -d ${PRI_DIR}/lib; then - pbxlibdir="-L${PRI_DIR}/lib" - else - pbxlibdir="-L${PRI_DIR}" +PG_CONFIG=No +if test "${USE_PGSQL}" != "no"; then + if test "x${PGSQL_DIR}" != "x"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pg_config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pg_config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in ${PGSQL_DIR}/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PG_CONFIG=$ac_cv_path_PG_CONFIG +if test -n "$PG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PG_CONFIG" >&5 +echo "${ECHO_T}$PG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PG_CONFIG"; then + ac_pt_PG_CONFIG=$PG_CONFIG + # Extract the first word of "pg_config", so it can be a program name with args. +set dummy pg_config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ac_pt_PG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_PG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PG_CONFIG="$ac_pt_PG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in ${PGSQL_DIR}/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PG_CONFIG=$ac_cv_path_ac_pt_PG_CONFIG +if test -n "$ac_pt_PG_CONFIG"; then + { echo "$as_me:$LINENO: result: $ac_pt_PG_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_PG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_PG_CONFIG" = x; then + PG_CONFIG="No" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + PG_CONFIG=$ac_pt_PG_CONFIG + fi +else + PG_CONFIG="$ac_cv_path_PG_CONFIG" +fi + + if test x"${PG_CONFIG}" = xNo; then + { echo "$as_me:$LINENO: ***" >&5 +echo "$as_me: ***" >&6;} + { echo "$as_me:$LINENO: *** pg_config was not found in the path you specified:" >&5 +echo "$as_me: *** pg_config was not found in the path you specified:" >&6;} + { echo "$as_me:$LINENO: *** ${PGSQL_DIR}/bin" >&5 +echo "$as_me: *** ${PGSQL_DIR}/bin" >&6;} + { echo "$as_me:$LINENO: *** Either correct the installation" >&5 +echo "$as_me: *** Either correct the installation" >&or run configure;} + { echo "$as_me:$LINENO: *** including --without-postgres" >&5 +echo "$as_me: *** including --without-postgres" >&6;} + exit 1 fi + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pg_config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pg_config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PG_CONFIG=$ac_cv_path_PG_CONFIG +if test -n "$PG_CONFIG"; then + { echo "$as_me:$LINENO: result: $PG_CONFIG" >&5 +echo "${ECHO_T}$PG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_PG_CONFIG"; then + ac_pt_PG_CONFIG=$PG_CONFIG + # Extract the first word of "pg_config", so it can be a program name with args. +set dummy pg_config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ac_pt_PG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_PG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PG_CONFIG="$ac_pt_PG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_PG_CONFIG=$ac_cv_path_ac_pt_PG_CONFIG +if test -n "$ac_pt_PG_CONFIG"; then + { echo "$as_me:$LINENO: result: $ac_pt_PG_CONFIG" >&5 +echo "${ECHO_T}$ac_pt_PG_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_PG_CONFIG" = x; then + PG_CONFIG="No" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + PG_CONFIG=$ac_pt_PG_CONFIG + fi +else + PG_CONFIG="$ac_cv_path_PG_CONFIG" +fi + fi - { echo "$as_me:$LINENO: checking for pri_call in -lpri" >&5 -echo $ECHO_N "checking for pri_call in -lpri... $ECHO_C" >&6; } -if test "${ac_cv_lib_pri_pri_call+set}" = set; then +fi +if test "${PG_CONFIG}" != No; then + PGSQL_libdir=`pg_config --libdir` + PGSQL_includedir=`pg_config --includedir` + + { echo "$as_me:$LINENO: checking for PQexec in -lpq" >&5 +echo $ECHO_N "checking for PQexec in -lpq... $ECHO_C" >&6; } +if test "${ac_cv_lib_pq_PQexec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lpri ${pbxlibdir} $LIBS" +LIBS="-lpq -L${PGSQL_libdir} -lz $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24112,11 +23956,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char pri_call (); +char PQexec (); int main () { -return pri_call (); +return PQexec (); ; return 0; } @@ -24155,38 +23999,148 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_pri_pri_call=yes + ac_cv_lib_pq_PQexec=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_pri_pri_call=no + ac_cv_lib_pq_PQexec=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_pri_pri_call" >&5 -echo "${ECHO_T}$ac_cv_lib_pri_pri_call" >&6; } -if test $ac_cv_lib_pri_pri_call = yes; then - AST_PRI_FOUND=yes -else - AST_PRI_FOUND=no +{ echo "$as_me:$LINENO: result: $ac_cv_lib_pq_PQexec" >&5 +echo "${ECHO_T}$ac_cv_lib_pq_PQexec" >&6; } +if test $ac_cv_lib_pq_PQexec = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_PGSQL 1 +_ACEOF + fi - if test "${AST_PRI_FOUND}" = "yes"; then - PRI_LIB="-lpri " - PRI_HEADER_FOUND="1" - if test "x${PRI_DIR}" != "x"; then - PRI_LIB="${pbxlibdir} ${PRI_LIB}" - PRI_INCLUDE="-I${PRI_DIR}/include" - if test "xlibpri.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${PRI_DIR}/include/libpri.h" | $as_tr_sh` + if test "${ac_cv_lib_pq_PQexec}" = "yes"; then + PGSQL_LIB="-L${PGSQL_libdir} -lpq -lz -lcrypt" + PGSQL_INCLUDE="-I${PGSQL_includedir}" + PBX_PGSQL=1 + fi +fi + + +if test "x${PBX_POPT}" != "x1" -a "${USE_POPT}" != "no"; then + pbxlibdir="" + if test "x${POPT_DIR}" != "x"; then + if test -d ${POPT_DIR}/lib; then + pbxlibdir="-L${POPT_DIR}/lib" + else + pbxlibdir="-L${POPT_DIR}" + fi + fi + pbxfuncname="poptStrerror" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_POPT_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_popt_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lpopt" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lpopt... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpopt ${pbxlibdir} $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ${pbxfuncname} (); +int +main () +{ +return ${pbxfuncname} (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Lib=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_POPT_FOUND=yes +else + AST_POPT_FOUND=no +fi + + fi + + if test "${AST_POPT_FOUND}" = "yes"; then + POPT_LIB="-lpopt " + POPT_HEADER_FOUND="1" + if test "x${POPT_DIR}" != "x"; then + POPT_LIB="${pbxlibdir} ${POPT_LIB}" + POPT_INCLUDE="-I${POPT_DIR}/include" + if test "xpopt.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${POPT_DIR}/include/popt.h" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${PRI_DIR}/include/libpri.h" >&5 -echo $ECHO_N "checking for ${PRI_DIR}/include/libpri.h... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for ${POPT_DIR}/include/popt.h" >&5 +echo $ECHO_N "checking for ${POPT_DIR}/include/popt.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi @@ -24195,8 +24149,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'` echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${PRI_DIR}/include/libpri.h usability" >&5 -echo $ECHO_N "checking ${PRI_DIR}/include/libpri.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${POPT_DIR}/include/popt.h usability" >&5 +echo $ECHO_N "checking ${POPT_DIR}/include/popt.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24204,7 +24158,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <${PRI_DIR}/include/libpri.h> +#include <${POPT_DIR}/include/popt.h> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -24253,15 +24207,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking ${PRI_DIR}/include/libpri.h presence" >&5 -echo $ECHO_N "checking ${PRI_DIR}/include/libpri.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${POPT_DIR}/include/popt.h presence" >&5 +echo $ECHO_N "checking ${POPT_DIR}/include/popt.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <${PRI_DIR}/include/libpri.h> +#include <${POPT_DIR}/include/popt.h> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -24301,30 +24255,30 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${POPT_DIR}/include/popt.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${POPT_DIR}/include/popt.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for ${PRI_DIR}/include/libpri.h" >&5 -echo $ECHO_N "checking for ${PRI_DIR}/include/libpri.h... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for ${POPT_DIR}/include/popt.h" >&5 +echo $ECHO_N "checking for ${POPT_DIR}/include/popt.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -24336,27 +24290,27 @@ echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - PRI_HEADER_FOUND=1 + POPT_HEADER_FOUND=1 else - PRI_HEADER_FOUND=0 + POPT_HEADER_FOUND=0 fi fi else - if test "xlibpri.h" != "x" ; then - if test "${ac_cv_header_libpri_h+set}" = set; then - { echo "$as_me:$LINENO: checking for libpri.h" >&5 -echo $ECHO_N "checking for libpri.h... $ECHO_C" >&6; } -if test "${ac_cv_header_libpri_h+set}" = set; then + if test "xpopt.h" != "x" ; then + if test "${ac_cv_header_popt_h+set}" = set; then + { echo "$as_me:$LINENO: checking for popt.h" >&5 +echo $ECHO_N "checking for popt.h... $ECHO_C" >&6; } +if test "${ac_cv_header_popt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_libpri_h" >&5 -echo "${ECHO_T}$ac_cv_header_libpri_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_popt_h" >&5 +echo "${ECHO_T}$ac_cv_header_popt_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking libpri.h usability" >&5 -echo $ECHO_N "checking libpri.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking popt.h usability" >&5 +echo $ECHO_N "checking popt.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24364,7 +24318,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -24413,15 +24367,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking libpri.h presence" >&5 -echo $ECHO_N "checking libpri.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking popt.h presence" >&5 +echo $ECHO_N "checking popt.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -24461,104 +24415,94 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: libpri.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: libpri.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: libpri.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: libpri.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: popt.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: popt.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: popt.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: popt.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: libpri.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: libpri.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: libpri.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: libpri.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: libpri.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: libpri.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: libpri.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: libpri.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: libpri.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: libpri.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: libpri.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: libpri.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: popt.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: popt.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: popt.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: popt.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: popt.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: popt.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: popt.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: popt.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: popt.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: popt.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: popt.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: popt.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for libpri.h" >&5 -echo $ECHO_N "checking for libpri.h... $ECHO_C" >&6; } -if test "${ac_cv_header_libpri_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for popt.h" >&5 +echo $ECHO_N "checking for popt.h... $ECHO_C" >&6; } +if test "${ac_cv_header_popt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_libpri_h=$ac_header_preproc + ac_cv_header_popt_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_libpri_h" >&5 -echo "${ECHO_T}$ac_cv_header_libpri_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_popt_h" >&5 +echo "${ECHO_T}$ac_cv_header_popt_h" >&6; } fi -if test $ac_cv_header_libpri_h = yes; then - PRI_HEADER_FOUND=1 +if test $ac_cv_header_popt_h = yes; then + POPT_HEADER_FOUND=1 else - PRI_HEADER_FOUND=0 + POPT_HEADER_FOUND=0 fi fi fi - if test "x${PRI_HEADER_FOUND}" = "x0" ; then - if test ! -z "${PRI_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the pri development package installed." >&5 -echo "$as_me: *** It appears that you do not have the pri development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${PRI_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${PRI_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${PRI_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${PRI_OPTION}" >&6;} - exit 1 - fi - PRI_LIB="" - PRI_INCLUDE="" - PBX_PRI=0 + if test "x${POPT_HEADER_FOUND}" = "x0" ; then + POPT_LIB="" + POPT_INCLUDE="" else - PBX_PRI=1 + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + POPT_LIB="" + fi + PBX_POPT=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF -#define HAVE_PRI 1 +#define HAVE_POPT 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_POPT_VERSION _ACEOF fi - elif test ! -z "${PRI_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${PRI_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${PRI_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${PRI_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${PRI_OPTION}" >&6;} - exit 1 fi fi -if test "${USE_SS7}" != "no"; then +if test "x${PBX_PRI}" != "x1" -a "${USE_PRI}" != "no"; then pbxlibdir="" - if test "x${SS7_DIR}" != "x"; then - if test -d ${SS7_DIR}/lib; then - pbxlibdir="-L${SS7_DIR}/lib" - else - pbxlibdir="-L${SS7_DIR}" + if test "x${PRI_DIR}" != "x"; then + if test -d ${PRI_DIR}/lib; then + pbxlibdir="-L${PRI_DIR}/lib" + else + pbxlibdir="-L${PRI_DIR}" fi fi - { echo "$as_me:$LINENO: checking for ss7_new in -lss7" >&5 -echo $ECHO_N "checking for ss7_new in -lss7... $ECHO_C" >&6; } -if test "${ac_cv_lib_ss7_ss7_new+set}" = set; then + pbxfuncname="pri_call" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_PRI_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lpri" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lpri... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lss7 ${pbxlibdir} $LIBS" +LIBS="-lpri ${pbxlibdir} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24572,11 +24516,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char ss7_new (); +char ${pbxfuncname} (); int main () { -return ss7_new (); +return ${pbxfuncname} (); ; return 0; } @@ -24615,38 +24559,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_ss7_ss7_new=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ss7_ss7_new=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ss7_ss7_new" >&5 -echo "${ECHO_T}$ac_cv_lib_ss7_ss7_new" >&6; } -if test $ac_cv_lib_ss7_ss7_new = yes; then - AST_SS7_FOUND=yes +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_PRI_FOUND=yes else - AST_SS7_FOUND=no + AST_PRI_FOUND=no fi + fi - if test "${AST_SS7_FOUND}" = "yes"; then - SS7_LIB="-lss7 " - SS7_HEADER_FOUND="1" - if test "x${SS7_DIR}" != "x"; then - SS7_LIB="${pbxlibdir} ${SS7_LIB}" - SS7_INCLUDE="-I${SS7_DIR}/include" - if test "xlibss7.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${SS7_DIR}/include/libss7.h" | $as_tr_sh` + if test "${AST_PRI_FOUND}" = "yes"; then + PRI_LIB="-lpri " + PRI_HEADER_FOUND="1" + if test "x${PRI_DIR}" != "x"; then + PRI_LIB="${pbxlibdir} ${PRI_LIB}" + PRI_INCLUDE="-I${PRI_DIR}/include" + if test "xlibpri.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${PRI_DIR}/include/libpri.h" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${SS7_DIR}/include/libss7.h" >&5 -echo $ECHO_N "checking for ${SS7_DIR}/include/libss7.h... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for ${PRI_DIR}/include/libpri.h" >&5 +echo $ECHO_N "checking for ${PRI_DIR}/include/libpri.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi @@ -24655,8 +24601,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'` echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${SS7_DIR}/include/libss7.h usability" >&5 -echo $ECHO_N "checking ${SS7_DIR}/include/libss7.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${PRI_DIR}/include/libpri.h usability" >&5 +echo $ECHO_N "checking ${PRI_DIR}/include/libpri.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24664,7 +24610,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <${SS7_DIR}/include/libss7.h> +#include <${PRI_DIR}/include/libpri.h> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -24713,15 +24659,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking ${SS7_DIR}/include/libss7.h presence" >&5 -echo $ECHO_N "checking ${SS7_DIR}/include/libss7.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${PRI_DIR}/include/libpri.h presence" >&5 +echo $ECHO_N "checking ${PRI_DIR}/include/libpri.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <${SS7_DIR}/include/libss7.h> +#include <${PRI_DIR}/include/libpri.h> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -24761,30 +24707,30 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${PRI_DIR}/include/libpri.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${PRI_DIR}/include/libpri.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for ${SS7_DIR}/include/libss7.h" >&5 -echo $ECHO_N "checking for ${SS7_DIR}/include/libss7.h... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for ${PRI_DIR}/include/libpri.h" >&5 +echo $ECHO_N "checking for ${PRI_DIR}/include/libpri.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -24796,27 +24742,27 @@ echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - SS7_HEADER_FOUND=1 + PRI_HEADER_FOUND=1 else - SS7_HEADER_FOUND=0 + PRI_HEADER_FOUND=0 fi fi else - if test "xlibss7.h" != "x" ; then - if test "${ac_cv_header_libss7_h+set}" = set; then - { echo "$as_me:$LINENO: checking for libss7.h" >&5 -echo $ECHO_N "checking for libss7.h... $ECHO_C" >&6; } -if test "${ac_cv_header_libss7_h+set}" = set; then + if test "xlibpri.h" != "x" ; then + if test "${ac_cv_header_libpri_h+set}" = set; then + { echo "$as_me:$LINENO: checking for libpri.h" >&5 +echo $ECHO_N "checking for libpri.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libpri_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_libss7_h" >&5 -echo "${ECHO_T}$ac_cv_header_libss7_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_libpri_h" >&5 +echo "${ECHO_T}$ac_cv_header_libpri_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking libss7.h usability" >&5 -echo $ECHO_N "checking libss7.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking libpri.h usability" >&5 +echo $ECHO_N "checking libpri.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24824,7 +24770,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -24873,15 +24819,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking libss7.h presence" >&5 -echo $ECHO_N "checking libss7.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking libpri.h presence" >&5 +echo $ECHO_N "checking libpri.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -24921,472 +24867,909 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: libss7.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: libss7.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: libss7.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: libss7.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libpri.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libpri.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libpri.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libpri.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: libss7.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: libss7.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: libss7.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: libss7.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: libss7.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: libss7.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: libss7.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: libss7.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: libss7.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: libss7.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: libss7.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: libss7.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: libpri.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libpri.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libpri.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libpri.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libpri.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libpri.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libpri.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libpri.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libpri.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libpri.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libpri.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libpri.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for libss7.h" >&5 -echo $ECHO_N "checking for libss7.h... $ECHO_C" >&6; } -if test "${ac_cv_header_libss7_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for libpri.h" >&5 +echo $ECHO_N "checking for libpri.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libpri_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_libss7_h=$ac_header_preproc + ac_cv_header_libpri_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_libss7_h" >&5 -echo "${ECHO_T}$ac_cv_header_libss7_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_libpri_h" >&5 +echo "${ECHO_T}$ac_cv_header_libpri_h" >&6; } fi -if test $ac_cv_header_libss7_h = yes; then - SS7_HEADER_FOUND=1 +if test $ac_cv_header_libpri_h = yes; then + PRI_HEADER_FOUND=1 else - SS7_HEADER_FOUND=0 + PRI_HEADER_FOUND=0 fi fi fi - if test "x${SS7_HEADER_FOUND}" = "x0" ; then - if test ! -z "${SS7_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the ss7 development package installed." >&5 -echo "$as_me: *** It appears that you do not have the ss7 development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${SS7_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${SS7_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${SS7_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${SS7_OPTION}" >&6;} - exit 1 - fi - SS7_LIB="" - SS7_INCLUDE="" - PBX_SS7=0 + if test "x${PRI_HEADER_FOUND}" = "x0" ; then + PRI_LIB="" + PRI_INCLUDE="" else - PBX_SS7=1 + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + PRI_LIB="" + fi + PBX_PRI=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF -#define HAVE_SS7 1 +#define HAVE_PRI 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_PRI_VERSION _ACEOF fi - elif test ! -z "${SS7_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${SS7_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${SS7_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${SS7_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${SS7_OPTION}" >&6;} - exit 1 fi fi -if test "${USE_PWLIB}" != "no"; then - if test ! -z "${PWLIB_DIR}"; then - PWLIBDIR="${PWLIB_DIR}" - fi - -PWLIB_INCDIR= -PWLIB_LIBDIR= -if test "${PWLIBDIR:-unset}" != "unset" ; then - as_ac_File=`echo "ac_cv_file_${PWLIBDIR}/version.h" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for ${PWLIBDIR}/version.h" >&5 -echo $ECHO_N "checking for ${PWLIBDIR}/version.h... $ECHO_C" >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "${PWLIBDIR}/version.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -ac_res=`eval echo '${'$as_ac_File'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_File'}'` = yes; then - HAS_PWLIB=1 -fi -fi -if test "${HAS_PWLIB:-unset}" = "unset" ; then - if test "${OPENH323DIR:-unset}" != "unset"; then - as_ac_File=`echo "ac_cv_file_${OPENH323DIR}/../pwlib/version.h" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for ${OPENH323DIR}/../pwlib/version.h" >&5 -echo $ECHO_N "checking for ${OPENH323DIR}/../pwlib/version.h... $ECHO_C" >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +if test "x${PBX_SS7}" != "x1" -a "${USE_SS7}" != "no"; then + pbxlibdir="" + if test "x${SS7_DIR}" != "x"; then + if test -d ${SS7_DIR}/lib; then + pbxlibdir="-L${SS7_DIR}/lib" + else + pbxlibdir="-L${SS7_DIR}" + fi + fi + pbxfuncname="ss7_new" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_SS7_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_ss7_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lss7" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lss7... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "${OPENH323DIR}/../pwlib/version.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -ac_res=`eval echo '${'$as_ac_File'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_File'}'` = yes; then - HAS_PWLIB=1 -fi + ac_check_lib_save_LIBS=$LIBS +LIBS="-lss7 ${pbxlibdir} $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - fi - if test "${HAS_PWLIB:-unset}" != "unset" ; then - PWLIBDIR="${OPENH323DIR}/../pwlib" - else - as_ac_File=`echo "ac_cv_file_${HOME}/pwlib/include/ptlib.h" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for ${HOME}/pwlib/include/ptlib.h" >&5 -echo $ECHO_N "checking for ${HOME}/pwlib/include/ptlib.h... $ECHO_C" >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "${HOME}/pwlib/include/ptlib.h"; then - eval "$as_ac_File=yes" +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ${pbxfuncname} (); +int +main () +{ +return ${pbxfuncname} (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Lib=yes" else - eval "$as_ac_File=no" + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_File'}'` +ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_File'}'` = yes; then - HAS_PWLIB=1 +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_SS7_FOUND=yes +else + AST_SS7_FOUND=no fi - if test "${HAS_PWLIB:-unset}" != "unset" ; then - PWLIBDIR="${HOME}/pwlib" - else - { echo "$as_me:$LINENO: checking for /usr/local/include/ptlib.h" >&5 -echo $ECHO_N "checking for /usr/local/include/ptlib.h... $ECHO_C" >&6; } -if test "${ac_cv_file__usr_local_include_ptlib_h+set}" = set; then + fi + + if test "${AST_SS7_FOUND}" = "yes"; then + SS7_LIB="-lss7 " + SS7_HEADER_FOUND="1" + if test "x${SS7_DIR}" != "x"; then + SS7_LIB="${pbxlibdir} ${SS7_LIB}" + SS7_INCLUDE="-I${SS7_DIR}/include" + if test "xlibss7.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${SS7_DIR}/include/libss7.h" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for ${SS7_DIR}/include/libss7.h" >&5 +echo $ECHO_N "checking for ${SS7_DIR}/include/libss7.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } else - test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "/usr/local/include/ptlib.h"; then - ac_cv_file__usr_local_include_ptlib_h=yes + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ${SS7_DIR}/include/libss7.h usability" >&5 +echo $ECHO_N "checking ${SS7_DIR}/include/libss7.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <${SS7_DIR}/include/libss7.h> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else - ac_cv_file__usr_local_include_ptlib_h=no -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_local_include_ptlib_h" >&5 -echo "${ECHO_T}$ac_cv_file__usr_local_include_ptlib_h" >&6; } -if test $ac_cv_file__usr_local_include_ptlib_h = yes; then - HAS_PWLIB=1 + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi - if test "${HAS_PWLIB:-unset}" != "unset" ; then - # Extract the first word of "ptlib-config", so it can be a program name with args. -set dummy ptlib-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_PTLIB_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PTLIB_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /usr/local/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PTLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } - ;; +# Is the header present? +{ echo "$as_me:$LINENO: checking ${SS7_DIR}/include/libss7.h presence" >&5 +echo $ECHO_N "checking ${SS7_DIR}/include/libss7.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <${SS7_DIR}/include/libss7.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG -if test -n "$PTLIB_CONFIG"; then - { echo "$as_me:$LINENO: result: $PTLIB_CONFIG" >&5 -echo "${ECHO_T}$PTLIB_CONFIG" >&6; } +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } - if test "${PTLIB_CONFIG:-unset}" = "unset" ; then - # Extract the first word of "ptlib-config", so it can be a program name with args. -set dummy ptlib-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_PTLIB_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PTLIB_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /usr/local/share/pwlib/make -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PTLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SS7_DIR}/include/libss7.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${SS7_DIR}/include/libss7.h: in the future, the compiler will take precedence" >&2;} - ;; + ;; esac +{ echo "$as_me:$LINENO: checking for ${SS7_DIR}/include/libss7.h" >&5 +echo $ECHO_N "checking for ${SS7_DIR}/include/libss7.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" fi -PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG -if test -n "$PTLIB_CONFIG"; then - { echo "$as_me:$LINENO: result: $PTLIB_CONFIG" >&5 -echo "${ECHO_T}$PTLIB_CONFIG" >&6; } +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + SS7_HEADER_FOUND=1 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + SS7_HEADER_FOUND=0 fi - fi - PWLIB_INCDIR="/usr/local/include" - if test "x$LIB64" != "x"; then - PWLIB_LIBDIR="/usr/local/lib64" - else - PWLIB_LIBDIR="/usr/local/lib" - fi + fi else - { echo "$as_me:$LINENO: checking for /usr/include/ptlib.h" >&5 -echo $ECHO_N "checking for /usr/include/ptlib.h... $ECHO_C" >&6; } -if test "${ac_cv_file__usr_include_ptlib_h+set}" = set; then + if test "xlibss7.h" != "x" ; then + if test "${ac_cv_header_libss7_h+set}" = set; then + { echo "$as_me:$LINENO: checking for libss7.h" >&5 +echo $ECHO_N "checking for libss7.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libss7_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libss7_h" >&5 +echo "${ECHO_T}$ac_cv_header_libss7_h" >&6; } else - test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "/usr/include/ptlib.h"; then - ac_cv_file__usr_include_ptlib_h=yes + # Is the header compilable? +{ echo "$as_me:$LINENO: checking libss7.h usability" >&5 +echo $ECHO_N "checking libss7.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes else - ac_cv_file__usr_include_ptlib_h=no + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking libss7.h presence" >&5 +echo $ECHO_N "checking libss7.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_ptlib_h" >&5 -echo "${ECHO_T}$ac_cv_file__usr_include_ptlib_h" >&6; } -if test $ac_cv_file__usr_include_ptlib_h = yes; then - HAS_PWLIB=1 +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi - if test "${HAS_PWLIB:-unset}" != "unset" ; then - # Extract the first word of "ptlib-config", so it can be a program name with args. -set dummy ptlib-config; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_PTLIB_CONFIG+set}" = set; then +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: libss7.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: libss7.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: libss7.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: libss7.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: libss7.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: libss7.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: libss7.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: libss7.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: libss7.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: libss7.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: libss7.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: libss7.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: libss7.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: libss7.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: libss7.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: libss7.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for libss7.h" >&5 +echo $ECHO_N "checking for libss7.h... $ECHO_C" >&6; } +if test "${ac_cv_header_libss7_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $PTLIB_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /usr/share/pwlib/make -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PTLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS + ac_cv_header_libss7_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_libss7_h" >&5 +echo "${ECHO_T}$ac_cv_header_libss7_h" >&6; } - ;; -esac fi -PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG -if test -n "$PTLIB_CONFIG"; then - { echo "$as_me:$LINENO: result: $PTLIB_CONFIG" >&5 -echo "${ECHO_T}$PTLIB_CONFIG" >&6; } +if test $ac_cv_header_libss7_h = yes; then + SS7_HEADER_FOUND=1 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + SS7_HEADER_FOUND=0 fi - PWLIB_INCDIR="/usr/include" - if test "x$LIB64" != "x"; then - PWLIB_LIBDIR="/usr/lib64" - else - PWLIB_LIBDIR="/usr/lib" - fi - fi + fi fi - fi - fi -fi - -#if test "${HAS_PWLIB:-unset}" = "unset" ; then -# echo "Cannot find pwlib - please install or set PWLIBDIR and try again" -# exit -#fi + if test "x${SS7_HEADER_FOUND}" = "x0" ; then + SS7_LIB="" + SS7_INCLUDE="" + else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + SS7_LIB="" + fi + PBX_SS7=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED -if test "${HAS_PWLIB:-unset}" != "unset" ; then - if test "${PWLIBDIR:-unset}" = "unset" ; then - if test "${PTLIB_CONFIG:-unset}" != "unset" ; then - PWLIBDIR=`$PTLIB_CONFIG --prefix` - else - echo "Cannot find ptlib-config - please install and try again" - exit - fi - fi +cat >>confdefs.h <<_ACEOF +#define HAVE_SS7 1 +_ACEOF - if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then - PWLIBDIR="/usr/share/pwlib" - PWLIB_INCDIR="/usr/include" - if test "x$LIB64" != "x"; then - PWLIB_LIBDIR="/usr/lib64" - else - PWLIB_LIBDIR="/usr/lib" - fi - fi - if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then - PWLIBDIR="/usr/local/share/pwlib" - PWLIB_INCDIR="/usr/local/include" - if test "x$LIB64" != "x"; then - PWLIB_LIBDIR="/usr/local/lib64" - else - PWLIB_LIBDIR="/usr/local/lib" - fi - fi - if test "${PWLIB_INCDIR:-unset}" = "unset"; then - PWLIB_INCDIR="${PWLIBDIR}/include" - fi - if test "${PWLIB_LIBDIR:-unset}" = "unset"; then - PWLIB_LIBDIR="${PWLIBDIR}/lib" - fi +cat >>confdefs.h <<_ACEOF +#define HAVE_SS7_VERSION +_ACEOF + fi + fi +fi +if test "${USE_PWLIB}" != "no"; then + if test ! -z "${PWLIB_DIR}"; then + PWLIBDIR="${PWLIB_DIR}" + fi +PWLIB_INCDIR= +PWLIB_LIBDIR= +if test "${PWLIBDIR:-unset}" != "unset" ; then + as_ac_File=`echo "ac_cv_file_${PWLIBDIR}/version.h" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${PWLIBDIR}/version.h" >&5 +echo $ECHO_N "checking for ${PWLIBDIR}/version.h... $ECHO_C" >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "${PWLIBDIR}/version.h"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +ac_res=`eval echo '${'$as_ac_File'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_File'}'` = yes; then + HAS_PWLIB=1 fi +fi +if test "${HAS_PWLIB:-unset}" = "unset" ; then + if test "${OPENH323DIR:-unset}" != "unset"; then + as_ac_File=`echo "ac_cv_file_${OPENH323DIR}/../pwlib/version.h" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${OPENH323DIR}/../pwlib/version.h" >&5 +echo $ECHO_N "checking for ${OPENH323DIR}/../pwlib/version.h... $ECHO_C" >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "${OPENH323DIR}/../pwlib/version.h"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +ac_res=`eval echo '${'$as_ac_File'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_File'}'` = yes; then + HAS_PWLIB=1 +fi - if test "${HAS_PWLIB:-unset}" != "unset"; then - PWLIB_VERSION=`grep "PWLIB_VERSION" ${PWLIB_INCDIR}/ptbuildopts.h | cut -f2 -d ' ' | sed -e 's/"//g'` - PWLIB_MAJOR_VERSION=`echo ${PWLIB_VERSION} | cut -f1 -d.` - PWLIB_MINOR_VERSION=`echo ${PWLIB_VERSION} | cut -f2 -d.` - PWLIB_BUILD_NUMBER=`echo ${PWLIB_VERSION} | cut -f3 -d.` - let PWLIB_VER=${PWLIB_MAJOR_VERSION}*10000+${PWLIB_MINOR_VERSION}*100+${PWLIB_BUILD_NUMBER} - let PWLIB_REQ=1*10000+9*100+2 - - { echo "$as_me:$LINENO: checking if PWLib version ${PWLIB_VERSION} is compatible with chan_h323" >&5 -echo $ECHO_N "checking if PWLib version ${PWLIB_VERSION} is compatible with chan_h323... $ECHO_C" >&6; } - if test ${PWLIB_VER} -lt ${PWLIB_REQ}; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - unset HAS_PWLIB - else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - fi - fi + fi + if test "${HAS_PWLIB:-unset}" != "unset" ; then + PWLIBDIR="${OPENH323DIR}/../pwlib" + else + as_ac_File=`echo "ac_cv_file_${HOME}/pwlib/include/ptlib.h" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${HOME}/pwlib/include/ptlib.h" >&5 +echo $ECHO_N "checking for ${HOME}/pwlib/include/ptlib.h... $ECHO_C" >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "${HOME}/pwlib/include/ptlib.h"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +ac_res=`eval echo '${'$as_ac_File'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_File'}'` = yes; then + HAS_PWLIB=1 +fi + if test "${HAS_PWLIB:-unset}" != "unset" ; then + PWLIBDIR="${HOME}/pwlib" + else + { echo "$as_me:$LINENO: checking for /usr/local/include/ptlib.h" >&5 +echo $ECHO_N "checking for /usr/local/include/ptlib.h... $ECHO_C" >&6; } +if test "${ac_cv_file__usr_local_include_ptlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/local/include/ptlib.h"; then + ac_cv_file__usr_local_include_ptlib_h=yes +else + ac_cv_file__usr_local_include_ptlib_h=no +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_local_include_ptlib_h" >&5 +echo "${ECHO_T}$ac_cv_file__usr_local_include_ptlib_h" >&6; } +if test $ac_cv_file__usr_local_include_ptlib_h = yes; then + HAS_PWLIB=1 +fi - if test "${HAS_PWLIB:-unset}" != "unset"; then + if test "${HAS_PWLIB:-unset}" != "unset" ; then + # Extract the first word of "ptlib-config", so it can be a program name with args. +set dummy ptlib-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PTLIB_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PTLIB_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /usr/local/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PTLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS -PWLIB_OSTYPE= -case "$host_os" in - linux*) PWLIB_OSTYPE=linux ; - ;; - freebsd* ) PWLIB_OSTYPE=FreeBSD ; - ;; - openbsd* ) PWLIB_OSTYPE=OpenBSD ; - ENDLDLIBS="-lossaudio" ; - ;; - netbsd* ) PWLIB_OSTYPE=NetBSD ; - ENDLDLIBS="-lossaudio" ; - ;; - solaris* | sunos* ) PWLIB_OSTYPE=solaris ; - ;; - darwin* ) PWLIB_OSTYPE=Darwin ; - ;; - beos*) PWLIB_OSTYPE=beos ; - STDCCFLAGS="$STDCCFLAGS -D__BEOS__" - ;; - cygwin*) PWLIB_OSTYPE=cygwin ; - ;; - mingw*) PWLIB_OSTYPE=mingw ; - STDCCFLAGS="$STDCCFLAGS -mms-bitfields" ; - ENDLDLIBS="-lwinmm -lwsock32 -lsnmpapi -lmpr -lcomdlg32 -lgdi32 -lavicap32" ; - ;; - * ) PWLIB_OSTYPE="$host_os" ; - { echo "$as_me:$LINENO: WARNING: \"OS $PWLIB_OSTYPE not recognized - proceed with caution!\"" >&5 -echo "$as_me: WARNING: \"OS $PWLIB_OSTYPE not recognized - proceed with caution!\"" >&2;} ; - ;; + ;; esac +fi +PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG +if test -n "$PTLIB_CONFIG"; then + { echo "$as_me:$LINENO: result: $PTLIB_CONFIG" >&5 +echo "${ECHO_T}$PTLIB_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi -PWLIB_MACHTYPE= -case "$host_cpu" in - x86 | i686 | i586 | i486 | i386 ) PWLIB_MACHTYPE=x86 - ;; - - x86_64) PWLIB_MACHTYPE=x86_64 ; - P_64BIT=1 ; - LIB64=1 ; - ;; - alpha | alphaev56 | alphaev6 | alphaev67 | alphaev7) PWLIB_MACHTYPE=alpha ; - P_64BIT=1 ; + if test "${PTLIB_CONFIG:-unset}" = "unset" ; then + # Extract the first word of "ptlib-config", so it can be a program name with args. +set dummy ptlib-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PTLIB_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PTLIB_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /usr/local/share/pwlib/make +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PTLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG +if test -n "$PTLIB_CONFIG"; then + { echo "$as_me:$LINENO: result: $PTLIB_CONFIG" >&5 +echo "${ECHO_T}$PTLIB_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + fi + PWLIB_INCDIR="/usr/local/include" + if test "x$LIB64" != "x"; then + PWLIB_LIBDIR="/usr/local/lib64" + else + PWLIB_LIBDIR="/usr/local/lib" + fi + else + { echo "$as_me:$LINENO: checking for /usr/include/ptlib.h" >&5 +echo $ECHO_N "checking for /usr/include/ptlib.h... $ECHO_C" >&6; } +if test "${ac_cv_file__usr_include_ptlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/include/ptlib.h"; then + ac_cv_file__usr_include_ptlib_h=yes +else + ac_cv_file__usr_include_ptlib_h=no +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_ptlib_h" >&5 +echo "${ECHO_T}$ac_cv_file__usr_include_ptlib_h" >&6; } +if test $ac_cv_file__usr_include_ptlib_h = yes; then + HAS_PWLIB=1 +fi + + if test "${HAS_PWLIB:-unset}" != "unset" ; then + # Extract the first word of "ptlib-config", so it can be a program name with args. +set dummy ptlib-config; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_PTLIB_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PTLIB_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /usr/share/pwlib/make +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_PTLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG +if test -n "$PTLIB_CONFIG"; then + { echo "$as_me:$LINENO: result: $PTLIB_CONFIG" >&5 +echo "${ECHO_T}$PTLIB_CONFIG" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + PWLIB_INCDIR="/usr/include" + if test "x$LIB64" != "x"; then + PWLIB_LIBDIR="/usr/lib64" + else + PWLIB_LIBDIR="/usr/lib" + fi + fi + fi + fi + fi +fi + +#if test "${HAS_PWLIB:-unset}" = "unset" ; then +# echo "Cannot find pwlib - please install or set PWLIBDIR and try again" +# exit +#fi + +if test "${HAS_PWLIB:-unset}" != "unset" ; then + if test "${PWLIBDIR:-unset}" = "unset" ; then + if test "${PTLIB_CONFIG:-unset}" != "unset" ; then + PWLIBDIR=`$PTLIB_CONFIG --prefix` + else + echo "Cannot find ptlib-config - please install and try again" + exit + fi + fi + + if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then + PWLIBDIR="/usr/share/pwlib" + PWLIB_INCDIR="/usr/include" + if test "x$LIB64" != "x"; then + PWLIB_LIBDIR="/usr/lib64" + else + PWLIB_LIBDIR="/usr/lib" + fi + fi + if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then + PWLIBDIR="/usr/local/share/pwlib" + PWLIB_INCDIR="/usr/local/include" + if test "x$LIB64" != "x"; then + PWLIB_LIBDIR="/usr/local/lib64" + else + PWLIB_LIBDIR="/usr/local/lib" + fi + fi + + if test "${PWLIB_INCDIR:-unset}" = "unset"; then + PWLIB_INCDIR="${PWLIBDIR}/include" + fi + if test "${PWLIB_LIBDIR:-unset}" = "unset"; then + PWLIB_LIBDIR="${PWLIBDIR}/lib" + fi + + + + +fi + + + if test "${HAS_PWLIB:-unset}" != "unset"; then + PWLIB_VERSION=`grep "PWLIB_VERSION" ${PWLIB_INCDIR}/ptbuildopts.h | cut -f2 -d ' ' | sed -e 's/"//g'` + PWLIB_MAJOR_VERSION=`echo ${PWLIB_VERSION} | cut -f1 -d.` + PWLIB_MINOR_VERSION=`echo ${PWLIB_VERSION} | cut -f2 -d.` + PWLIB_BUILD_NUMBER=`echo ${PWLIB_VERSION} | cut -f3 -d.` + let PWLIB_VER=${PWLIB_MAJOR_VERSION}*10000+${PWLIB_MINOR_VERSION}*100+${PWLIB_BUILD_NUMBER} + let PWLIB_REQ=1*10000+9*100+2 + + { echo "$as_me:$LINENO: checking if PWLib version ${PWLIB_VERSION} is compatible with chan_h323" >&5 +echo $ECHO_N "checking if PWLib version ${PWLIB_VERSION} is compatible with chan_h323... $ECHO_C" >&6; } + if test ${PWLIB_VER} -lt ${PWLIB_REQ}; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + unset HAS_PWLIB + else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + fi + fi + + + if test "${HAS_PWLIB:-unset}" != "unset"; then + +PWLIB_OSTYPE= +case "$host_os" in + linux*) PWLIB_OSTYPE=linux ; + ;; + freebsd* ) PWLIB_OSTYPE=FreeBSD ; + ;; + openbsd* ) PWLIB_OSTYPE=OpenBSD ; + ENDLDLIBS="-lossaudio" ; + ;; + netbsd* ) PWLIB_OSTYPE=NetBSD ; + ENDLDLIBS="-lossaudio" ; + ;; + solaris* | sunos* ) PWLIB_OSTYPE=solaris ; + ;; + darwin* ) PWLIB_OSTYPE=Darwin ; + ;; + beos*) PWLIB_OSTYPE=beos ; + STDCCFLAGS="$STDCCFLAGS -D__BEOS__" + ;; + cygwin*) PWLIB_OSTYPE=cygwin ; + ;; + mingw*) PWLIB_OSTYPE=mingw ; + STDCCFLAGS="$STDCCFLAGS -mms-bitfields" ; + ENDLDLIBS="-lwinmm -lwsock32 -lsnmpapi -lmpr -lcomdlg32 -lgdi32 -lavicap32" ; + ;; + * ) PWLIB_OSTYPE="$host_os" ; + { echo "$as_me:$LINENO: WARNING: \"OS $PWLIB_OSTYPE not recognized - proceed with caution!\"" >&5 +echo "$as_me: WARNING: \"OS $PWLIB_OSTYPE not recognized - proceed with caution!\"" >&2;} ; + ;; +esac + +PWLIB_MACHTYPE= +case "$host_cpu" in + x86 | i686 | i586 | i486 | i386 ) PWLIB_MACHTYPE=x86 + ;; + + x86_64) PWLIB_MACHTYPE=x86_64 ; + P_64BIT=1 ; + LIB64=1 ; + ;; + + alpha | alphaev56 | alphaev6 | alphaev67 | alphaev7) PWLIB_MACHTYPE=alpha ; + P_64BIT=1 ; ;; sparc ) PWLIB_MACHTYPE=sparc ; @@ -25430,55 +25813,1078 @@ PWLIB_PLATFORM="${PWLIB_OSTYPE}_${PWLIB_MACHTYPE}" - PLATFORM_PWLIB="pt_${PWLIB_PLATFORM}_r" + PLATFORM_PWLIB="pt_${PWLIB_PLATFORM}_r" + + + if test "${HAS_PWLIB:-unset}" != "unset"; then + { echo "$as_me:$LINENO: checking PWLib installation validity" >&5 +echo $ECHO_N "checking PWLib installation validity... $ECHO_C" >&6; } + + saved_cppflags="${CPPFLAGS}" + saved_libs="${LIBS}" + LIBS="${LIBS} -L${PWLIB_LIBDIR} -l${PLATFORM_PWLIB} " + CPPFLAGS="${CPPFLAGS} -I${PWLIB_INCDIR} " + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include "ptlib.h" +int +main () +{ +BOOL q = PTime::IsDaylightSavings(); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + ac_cv_lib_PWLIB="yes" + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ac_cv_lib_PWLIB="no" + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + LIBS="${saved_libs}" + CPPFLAGS="${saved_cppflags}" + + if test "${ac_cv_lib_PWLIB}" = "yes"; then + if test "${PWLIB_LIBDIR}" != "" -a "${PWLIB_LIBDIR}" != "/usr/lib"; then + PWLIB_LIB="-L${PWLIB_LIBDIR} -l${PLATFORM_PWLIB}" + else + PWLIB_LIB="-l${PLATFORM_PWLIB}" + fi + if test "${PWLIB_INCDIR}" != "" -a "${PWLIB_INCDIR}" != "/usr/include"; then + PWLIB_INCLUDE="-I${PWLIB_INCDIR}" + fi + PBX_PWLIB=1 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_PWLIB 1 +_ACEOF + + fi + fi + + fi +fi + +if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then + if test ! -z "${OPENH323_DIR}"; then + OPENH323DIR="${OPENH323_DIR}" + fi + +OPENH323_INCDIR= +OPENH323_LIBDIR= +if test "${OPENH323DIR:-unset}" != "unset" ; then + as_ac_File=`echo "ac_cv_file_${OPENH323DIR}/version.h" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${OPENH323DIR}/version.h" >&5 +echo $ECHO_N "checking for ${OPENH323DIR}/version.h... $ECHO_C" >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "${OPENH323DIR}/version.h"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +ac_res=`eval echo '${'$as_ac_File'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_File'}'` = yes; then + HAS_OPENH323=1 +fi + +fi +if test "${HAS_OPENH323:-unset}" = "unset" ; then + as_ac_File=`echo "ac_cv_file_${PWLIBDIR}/../openh323/version.h" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${PWLIBDIR}/../openh323/version.h" >&5 +echo $ECHO_N "checking for ${PWLIBDIR}/../openh323/version.h... $ECHO_C" >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "${PWLIBDIR}/../openh323/version.h"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +ac_res=`eval echo '${'$as_ac_File'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_File'}'` = yes; then + OPENH323DIR="${PWLIBDIR}/../openh323"; HAS_OPENH323=1 +fi + + if test "${HAS_OPENH323:-unset}" != "unset" ; then + OPENH323DIR="${PWLIBDIR}/../openh323" + as_ac_File=`echo "ac_cv_file_${OPENH323DIR}/include/h323.h" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${OPENH323DIR}/include/h323.h" >&5 +echo $ECHO_N "checking for ${OPENH323DIR}/include/h323.h... $ECHO_C" >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "${OPENH323DIR}/include/h323.h"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +ac_res=`eval echo '${'$as_ac_File'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_File'}'` = yes; then + : +else + OPENH323_INCDIR="${PWLIB_INCDIR}/openh323"; OPENH323_LIBDIR="${PWLIB_LIBDIR}" +fi + + else + as_ac_File=`echo "ac_cv_file_${HOME}/openh323/include/h323.h" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${HOME}/openh323/include/h323.h" >&5 +echo $ECHO_N "checking for ${HOME}/openh323/include/h323.h... $ECHO_C" >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "${HOME}/openh323/include/h323.h"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +ac_res=`eval echo '${'$as_ac_File'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_File'}'` = yes; then + HAS_OPENH323=1 +fi + + if test "${HAS_OPENH323:-unset}" != "unset" ; then + OPENH323DIR="${HOME}/openh323" + else + { echo "$as_me:$LINENO: checking for /usr/local/include/openh323/h323.h" >&5 +echo $ECHO_N "checking for /usr/local/include/openh323/h323.h... $ECHO_C" >&6; } +if test "${ac_cv_file__usr_local_include_openh323_h323_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/local/include/openh323/h323.h"; then + ac_cv_file__usr_local_include_openh323_h323_h=yes +else + ac_cv_file__usr_local_include_openh323_h323_h=no +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_local_include_openh323_h323_h" >&5 +echo "${ECHO_T}$ac_cv_file__usr_local_include_openh323_h323_h" >&6; } +if test $ac_cv_file__usr_local_include_openh323_h323_h = yes; then + HAS_OPENH323=1 +fi + + if test "${HAS_OPENH323:-unset}" != "unset" ; then + OPENH323DIR="/usr/local/share/openh323" + OPENH323_INCDIR="/usr/local/include/openh323" + if test "x$LIB64" != "x"; then + OPENH323_LIBDIR="/usr/local/lib64" + else + OPENH323_LIBDIR="/usr/local/lib" + fi + else + { echo "$as_me:$LINENO: checking for /usr/include/openh323/h323.h" >&5 +echo $ECHO_N "checking for /usr/include/openh323/h323.h... $ECHO_C" >&6; } +if test "${ac_cv_file__usr_include_openh323_h323_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/usr/include/openh323/h323.h"; then + ac_cv_file__usr_include_openh323_h323_h=yes +else + ac_cv_file__usr_include_openh323_h323_h=no +fi +fi +{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_openh323_h323_h" >&5 +echo "${ECHO_T}$ac_cv_file__usr_include_openh323_h323_h" >&6; } +if test $ac_cv_file__usr_include_openh323_h323_h = yes; then + HAS_OPENH323=1 +fi + + if test "${HAS_OPENH323:-unset}" != "unset" ; then + OPENH323DIR="/usr/share/openh323" + OPENH323_INCDIR="/usr/include/openh323" + if test "x$LIB64" != "x"; then + OPENH323_LIBDIR="/usr/lib64" + else + OPENH323_LIBDIR="/usr/lib" + fi + fi + fi + fi + fi +fi + +if test "${HAS_OPENH323:-unset}" != "unset" ; then + if test "${OPENH323_INCDIR:-unset}" = "unset"; then + OPENH323_INCDIR="${OPENH323DIR}/include" + fi + if test "${OPENH323_LIBDIR:-unset}" = "unset"; then + OPENH323_LIBDIR="${OPENH323DIR}/lib" + fi + + + + +fi + + + if test "${HAS_OPENH323:-unset}" != "unset"; then + OPENH323_VERSION=`grep "OPENH323_VERSION" ${OPENH323_INCDIR}/openh323buildopts.h | cut -f2 -d ' ' | sed -e 's/"//g'` + OPENH323_MAJOR_VERSION=`echo ${OPENH323_VERSION} | cut -f1 -d.` + OPENH323_MINOR_VERSION=`echo ${OPENH323_VERSION} | cut -f2 -d.` + OPENH323_BUILD_NUMBER=`echo ${OPENH323_VERSION} | cut -f3 -d.` + let OPENH323_VER=${OPENH323_MAJOR_VERSION}*10000+${OPENH323_MINOR_VERSION}*100+${OPENH323_BUILD_NUMBER} + let OPENH323_REQ=1*10000+17*100+3 + + { echo "$as_me:$LINENO: checking if OpenH323 version ${OPENH323_VERSION} is compatible with chan_h323" >&5 +echo $ECHO_N "checking if OpenH323 version ${OPENH323_VERSION} is compatible with chan_h323... $ECHO_C" >&6; } + if test ${OPENH323_VER} -lt ${OPENH323_REQ}; then + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + unset HAS_OPENH323 + else + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + fi + fi + + + if test "${HAS_OPENH323:-unset}" != "unset"; then + { echo "$as_me:$LINENO: checking OpenH323 build option" >&5 +echo $ECHO_N "checking OpenH323 build option... $ECHO_C" >&6; } + OPENH323_SUFFIX= + files=`ls -l ${OPENH323_LIBDIR}/libh323_${PWLIB_PLATFORM}_*.so*` + libfile= + if test -n "$files"; then + for f in $files; do + if test -f $f -a ! -L $f; then + libfile=`basename $f` + break; + fi + done + fi + if test "${libfile:-unset}" != "unset"; then + OPENH323_SUFFIX=`eval "echo ${libfile} | sed -e 's/libh323_${PWLIB_PLATFORM}_\([^.]*\)\..*/\1/'"` + fi + case "${OPENH323_SUFFIX}" in + n) + OPENH323_BUILD="notrace";; + r) + OPENH323_BUILD="opt";; + d) + OPENH323_BUILD="debug";; + *) + OPENH323_BUILD="notrace";; + esac + { echo "$as_me:$LINENO: result: ${OPENH323_BUILD}" >&5 +echo "${ECHO_T}${OPENH323_BUILD}" >&6; } + + + + fi + + PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}" + + if test "${HAS_OPENH323:-unset}" != "unset"; then + { echo "$as_me:$LINENO: checking OpenH323 installation validity" >&5 +echo $ECHO_N "checking OpenH323 installation validity... $ECHO_C" >&6; } + + saved_cppflags="${CPPFLAGS}" + saved_libs="${LIBS}" + LIBS="${LIBS} -L${OPENH323_LIBDIR} -l${PLATFORM_OPENH323} ${PWLIB_LIB}" + CPPFLAGS="${CPPFLAGS} -I${OPENH323_INCDIR} ${PWLIB_INCLUDE}" + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include "ptlib.h" + #include "h323.h" + #include "h323ep.h" +int +main () +{ +H323EndPoint ep = H323EndPoint(); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + ac_cv_lib_OPENH323="yes" + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ac_cv_lib_OPENH323="no" + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + LIBS="${saved_libs}" + CPPFLAGS="${saved_cppflags}" + + if test "${ac_cv_lib_OPENH323}" = "yes"; then + if test "${OPENH323_LIBDIR}" != "" -a "${OPENH323_LIBDIR}" != "/usr/lib"; then + OPENH323_LIB="-L${OPENH323_LIBDIR} -l${PLATFORM_OPENH323}" + else + OPENH323_LIB="-l${PLATFORM_OPENH323}" + fi + if test "${OPENH323_INCDIR}" != "" -a "${OPENH323_INCDIR}" != "/usr/include"; then + OPENH323_INCLUDE="-I${OPENH323_INCDIR}" + fi + PBX_OPENH323=1 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_OPENH323 1 +_ACEOF + + fi + fi + +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +if test "${USE_QT}" != "no"; then + { echo "$as_me:$LINENO: checking for QDate in -lqt" >&5 +echo $ECHO_N "checking for QDate in -lqt... $ECHO_C" >&6; } + saved_libs="${LIBS}" + saved_cppflags="${CPPFLAGS}" + if test "x${QT_DIR}" != "x"; then + LIBS="${LIBS} -L${QT_DIR}/lib" + CPPFLAGS="${CPPFLAGS} -I${QT_DIR}/include" + fi + LIBS="${LIBS} -lqt" + qtlib="qt" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +QDate date(); + ; + return 0; +} + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_qt_qt_date="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_qt_qt_date="no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${saved_libs}" + CPPFLAGS="${saved_cppflags}" + + if test "${ac_cv_lib_qt_qt_date}" = "no"; then + saved_libs="${LIBS}" + saved_cppflags="${CPPFLAGS}" + if test "x${QT_DIR}" != "x"; then + LIBS="${LIBS} -L${QT_DIR}/lib" + CPPFLAGS="${CPPFLAGS} -I${QT_DIR}/include" + fi + LIBS="${LIBS} -lqt-mt" + qtlib="qt-mt" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +QDate date(); + ; + return 0; +} + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_qt_qt_date="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_qt_qt_date="no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${saved_libs}" + CPPFLAGS="${saved_cppflags}" + fi + + if test "${ac_cv_lib_qt_qt_date}" = "yes"; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + fi + + if test "${ac_cv_lib_qt_qt_date}" = "yes"; then + QT_LIB="-l${qtlib}" + if test "${QT_DIR}" != ""; then + QT_LIB="-L${QT_DIR}/lib ${QT_LIB}" + QT_INCLUDE="-I${QT_DIR}/include" + fi + PBX_QT=1 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_QT 1 +_ACEOF + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}moc", so it can be a program name with args. +set dummy ${ac_tool_prefix}moc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_QTMOC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $QTMOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_QTMOC="$QTMOC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_QTMOC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +QTMOC=$ac_cv_path_QTMOC +if test -n "$QTMOC"; then + { echo "$as_me:$LINENO: result: $QTMOC" >&5 +echo "${ECHO_T}$QTMOC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_path_QTMOC"; then + ac_pt_QTMOC=$QTMOC + # Extract the first word of "moc", so it can be a program name with args. +set dummy moc; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_path_ac_pt_QTMOC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $ac_pt_QTMOC in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_QTMOC="$ac_pt_QTMOC" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_ac_pt_QTMOC="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +ac_pt_QTMOC=$ac_cv_path_ac_pt_QTMOC +if test -n "$ac_pt_QTMOC"; then + { echo "$as_me:$LINENO: result: $ac_pt_QTMOC" >&5 +echo "${ECHO_T}$ac_pt_QTMOC" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_pt_QTMOC" = x; then + QTMOC="No" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + QTMOC=$ac_pt_QTMOC + fi +else + QTMOC="$ac_cv_path_QTMOC" +fi + + fi +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +if test "x${PBX_RADIUS}" != "x1" -a "${USE_RADIUS}" != "no"; then + pbxlibdir="" + if test "x${RADIUS_DIR}" != "x"; then + if test -d ${RADIUS_DIR}/lib; then + pbxlibdir="-L${RADIUS_DIR}/lib" + else + pbxlibdir="-L${RADIUS_DIR}" + fi + fi + pbxfuncname="rc_read_config" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_RADIUS_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_radiusclient-ng_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lradiusclient-ng" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lradiusclient-ng... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lradiusclient-ng ${pbxlibdir} $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ${pbxfuncname} (); +int +main () +{ +return ${pbxfuncname} (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Lib=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_Lib=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_RADIUS_FOUND=yes +else + AST_RADIUS_FOUND=no +fi + + fi + + if test "${AST_RADIUS_FOUND}" = "yes"; then + RADIUS_LIB="-lradiusclient-ng " + RADIUS_HEADER_FOUND="1" + if test "x${RADIUS_DIR}" != "x"; then + RADIUS_LIB="${pbxlibdir} ${RADIUS_LIB}" + RADIUS_INCLUDE="-I${RADIUS_DIR}/include" + if test "xradiusclient-ng.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${RADIUS_DIR}/include/radiusclient-ng.h" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for ${RADIUS_DIR}/include/radiusclient-ng.h" >&5 +echo $ECHO_N "checking for ${RADIUS_DIR}/include/radiusclient-ng.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ${RADIUS_DIR}/include/radiusclient-ng.h usability" >&5 +echo $ECHO_N "checking ${RADIUS_DIR}/include/radiusclient-ng.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <${RADIUS_DIR}/include/radiusclient-ng.h> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking ${RADIUS_DIR}/include/radiusclient-ng.h presence" >&5 +echo $ECHO_N "checking ${RADIUS_DIR}/include/radiusclient-ng.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <${RADIUS_DIR}/include/radiusclient-ng.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } - if test "${HAS_PWLIB:-unset}" != "unset"; then - { echo "$as_me:$LINENO: checking PWLib installation validity" >&5 -echo $ECHO_N "checking PWLib installation validity... $ECHO_C" >&6; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: in the future, the compiler will take precedence" >&2;} - saved_cppflags="${CPPFLAGS}" - saved_libs="${LIBS}" - LIBS="${LIBS} -L${PWLIB_LIBDIR} -l${PLATFORM_PWLIB} " - CPPFLAGS="${CPPFLAGS} -I${PWLIB_INCDIR} " + ;; +esac +{ echo "$as_me:$LINENO: checking for ${RADIUS_DIR}/include/radiusclient-ng.h" >&5 +echo $ECHO_N "checking for ${RADIUS_DIR}/include/radiusclient-ng.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + RADIUS_HEADER_FOUND=1 +else + RADIUS_HEADER_FOUND=0 +fi - cat >conftest.$ac_ext <<_ACEOF + fi + else + if test "xradiusclient-ng.h" != "x" ; then + if test "${ac_cv_header_radiusclient_ng_h+set}" = set; then + { echo "$as_me:$LINENO: checking for radiusclient-ng.h" >&5 +echo $ECHO_N "checking for radiusclient-ng.h... $ECHO_C" >&6; } +if test "${ac_cv_header_radiusclient_ng_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_radiusclient_ng_h" >&5 +echo "${ECHO_T}$ac_cv_header_radiusclient_ng_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking radiusclient-ng.h usability" >&5 +echo $ECHO_N "checking radiusclient-ng.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include "ptlib.h" -int -main () -{ -BOOL q = PTime::IsDaylightSavings(); - ; - return 0; -} +$ac_includes_default +#include _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -25488,7 +26894,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -25498,342 +26904,173 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - ac_cv_lib_PWLIB="yes" - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ac_cv_lib_PWLIB="no" - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - LIBS="${saved_libs}" - CPPFLAGS="${saved_cppflags}" - - if test "${ac_cv_lib_PWLIB}" = "yes"; then - if test "${PWLIB_LIBDIR}" != "" -a "${PWLIB_LIBDIR}" != "/usr/lib"; then - PWLIB_LIB="-L${PWLIB_LIBDIR} -l${PLATFORM_PWLIB}" - else - PWLIB_LIB="-l${PLATFORM_PWLIB}" - fi - if test "${PWLIB_INCDIR}" != "" -a "${PWLIB_INCDIR}" != "/usr/include"; then - PWLIB_INCLUDE="-I${PWLIB_INCDIR}" - fi - PBX_PWLIB=1 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_PWLIB 1 -_ACEOF - - fi - fi - - fi -fi - -if test "${USE_PWLIB}" != "no" -a "x${ac_cv_lib_PWLIB}" != "xyes" -a ! -z "${PWLIB_MANDATORY}"; then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The PWLIB installation on this system appears to be broken." >&5 -echo "$as_me: *** The PWLIB installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** including --without-pwlib" >&5 -echo "$as_me: *** including --without-pwlib" >&6;} - exit 1 -fi - -if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then - if test ! -z "${OPENH323_DIR}"; then - OPENH323DIR="${OPENH323_DIR}" - fi - -OPENH323_INCDIR= -OPENH323_LIBDIR= -if test "${OPENH323DIR:-unset}" != "unset" ; then - as_ac_File=`echo "ac_cv_file_${OPENH323DIR}/version.h" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for ${OPENH323DIR}/version.h" >&5 -echo $ECHO_N "checking for ${OPENH323DIR}/version.h... $ECHO_C" >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "${OPENH323DIR}/version.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -ac_res=`eval echo '${'$as_ac_File'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_File'}'` = yes; then - HAS_OPENH323=1 -fi - -fi -if test "${HAS_OPENH323:-unset}" = "unset" ; then - as_ac_File=`echo "ac_cv_file_${PWLIBDIR}/../openh323/version.h" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for ${PWLIBDIR}/../openh323/version.h" >&5 -echo $ECHO_N "checking for ${PWLIBDIR}/../openh323/version.h... $ECHO_C" >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "${PWLIBDIR}/../openh323/version.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -ac_res=`eval echo '${'$as_ac_File'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_File'}'` = yes; then - OPENH323DIR="${PWLIBDIR}/../openh323"; HAS_OPENH323=1 -fi - - if test "${HAS_OPENH323:-unset}" != "unset" ; then - OPENH323DIR="${PWLIBDIR}/../openh323" - as_ac_File=`echo "ac_cv_file_${OPENH323DIR}/include/h323.h" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for ${OPENH323DIR}/include/h323.h" >&5 -echo $ECHO_N "checking for ${OPENH323DIR}/include/h323.h... $ECHO_C" >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "${OPENH323DIR}/include/h323.h"; then - eval "$as_ac_File=yes" -else - eval "$as_ac_File=no" -fi -fi -ac_res=`eval echo '${'$as_ac_File'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_File'}'` = yes; then - : -else - OPENH323_INCDIR="${PWLIB_INCDIR}/openh323"; OPENH323_LIBDIR="${PWLIB_LIBDIR}" -fi - - else - as_ac_File=`echo "ac_cv_file_${HOME}/openh323/include/h323.h" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for ${HOME}/openh323/include/h323.h" >&5 -echo $ECHO_N "checking for ${HOME}/openh323/include/h323.h... $ECHO_C" >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "${HOME}/openh323/include/h323.h"; then - eval "$as_ac_File=yes" + ac_header_compiler=yes else - eval "$as_ac_File=no" -fi -fi -ac_res=`eval echo '${'$as_ac_File'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_File'}'` = yes; then - HAS_OPENH323=1 -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - if test "${HAS_OPENH323:-unset}" != "unset" ; then - OPENH323DIR="${HOME}/openh323" - else - { echo "$as_me:$LINENO: checking for /usr/local/include/openh323/h323.h" >&5 -echo $ECHO_N "checking for /usr/local/include/openh323/h323.h... $ECHO_C" >&6; } -if test "${ac_cv_file__usr_local_include_openh323_h323_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "/usr/local/include/openh323/h323.h"; then - ac_cv_file__usr_local_include_openh323_h323_h=yes -else - ac_cv_file__usr_local_include_openh323_h323_h=no -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_local_include_openh323_h323_h" >&5 -echo "${ECHO_T}$ac_cv_file__usr_local_include_openh323_h323_h" >&6; } -if test $ac_cv_file__usr_local_include_openh323_h323_h = yes; then - HAS_OPENH323=1 + ac_header_compiler=no fi - if test "${HAS_OPENH323:-unset}" != "unset" ; then - OPENH323DIR="/usr/local/share/openh323" - OPENH323_INCDIR="/usr/local/include/openh323" - if test "x$LIB64" != "x"; then - OPENH323_LIBDIR="/usr/local/lib64" - else - OPENH323_LIBDIR="/usr/local/lib" - fi - else - { echo "$as_me:$LINENO: checking for /usr/include/openh323/h323.h" >&5 -echo $ECHO_N "checking for /usr/include/openh323/h323.h... $ECHO_C" >&6; } -if test "${ac_cv_file__usr_include_openh323_h323_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - test "$cross_compiling" = yes && - { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "/usr/include/openh323/h323.h"; then - ac_cv_file__usr_include_openh323_h323_h=yes -else - ac_cv_file__usr_include_openh323_h323_h=no -fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_openh323_h323_h" >&5 -echo "${ECHO_T}$ac_cv_file__usr_include_openh323_h323_h" >&6; } -if test $ac_cv_file__usr_include_openh323_h323_h = yes; then - HAS_OPENH323=1 -fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } - if test "${HAS_OPENH323:-unset}" != "unset" ; then - OPENH323DIR="/usr/share/openh323" - OPENH323_INCDIR="/usr/include/openh323" - if test "x$LIB64" != "x"; then - OPENH323_LIBDIR="/usr/lib64" - else - OPENH323_LIBDIR="/usr/lib" - fi - fi - fi - fi +# Is the header present? +{ echo "$as_me:$LINENO: checking radiusclient-ng.h presence" >&5 +echo $ECHO_N "checking radiusclient-ng.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= fi +else + ac_cpp_err=yes fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test "${HAS_OPENH323:-unset}" != "unset" ; then - if test "${OPENH323_INCDIR:-unset}" = "unset"; then - OPENH323_INCDIR="${OPENH323DIR}/include" - fi - if test "${OPENH323_LIBDIR:-unset}" = "unset"; then - OPENH323_LIBDIR="${OPENH323DIR}/lib" - fi - - - - + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } - if test "${HAS_OPENH323:-unset}" != "unset"; then - OPENH323_VERSION=`grep "OPENH323_VERSION" ${OPENH323_INCDIR}/openh323buildopts.h | cut -f2 -d ' ' | sed -e 's/"//g'` - OPENH323_MAJOR_VERSION=`echo ${OPENH323_VERSION} | cut -f1 -d.` - OPENH323_MINOR_VERSION=`echo ${OPENH323_VERSION} | cut -f2 -d.` - OPENH323_BUILD_NUMBER=`echo ${OPENH323_VERSION} | cut -f3 -d.` - let OPENH323_VER=${OPENH323_MAJOR_VERSION}*10000+${OPENH323_MINOR_VERSION}*100+${OPENH323_BUILD_NUMBER} - let OPENH323_REQ=1*10000+17*100+3 - - { echo "$as_me:$LINENO: checking if OpenH323 version ${OPENH323_VERSION} is compatible with chan_h323" >&5 -echo $ECHO_N "checking if OpenH323 version ${OPENH323_VERSION} is compatible with chan_h323... $ECHO_C" >&6; } - if test ${OPENH323_VER} -lt ${OPENH323_REQ}; then - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - unset HAS_OPENH323 - else - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - fi - fi +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: radiusclient-ng.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: radiusclient-ng.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: radiusclient-ng.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: radiusclient-ng.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: radiusclient-ng.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: radiusclient-ng.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: radiusclient-ng.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: radiusclient-ng.h: in the future, the compiler will take precedence" >&2;} + ;; +esac +{ echo "$as_me:$LINENO: checking for radiusclient-ng.h" >&5 +echo $ECHO_N "checking for radiusclient-ng.h... $ECHO_C" >&6; } +if test "${ac_cv_header_radiusclient_ng_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_radiusclient_ng_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_radiusclient_ng_h" >&5 +echo "${ECHO_T}$ac_cv_header_radiusclient_ng_h" >&6; } - if test "${HAS_OPENH323:-unset}" != "unset"; then - { echo "$as_me:$LINENO: checking OpenH323 build option" >&5 -echo $ECHO_N "checking OpenH323 build option... $ECHO_C" >&6; } - OPENH323_SUFFIX= - files=`ls -l ${OPENH323_LIBDIR}/libh323_${PWLIB_PLATFORM}_*.so*` - libfile= - if test -n "$files"; then - for f in $files; do - if test -f $f -a ! -L $f; then - libfile=`basename $f` - break; - fi - done - fi - if test "${libfile:-unset}" != "unset"; then - OPENH323_SUFFIX=`eval "echo ${libfile} | sed -e 's/libh323_${PWLIB_PLATFORM}_\([^.]*\)\..*/\1/'"` - fi - case "${OPENH323_SUFFIX}" in - n) - OPENH323_BUILD="notrace";; - r) - OPENH323_BUILD="opt";; - d) - OPENH323_BUILD="debug";; - *) - OPENH323_BUILD="notrace";; - esac - { echo "$as_me:$LINENO: result: ${OPENH323_BUILD}" >&5 -echo "${ECHO_T}${OPENH323_BUILD}" >&6; } +fi +if test $ac_cv_header_radiusclient_ng_h = yes; then + RADIUS_HEADER_FOUND=1 +else + RADIUS_HEADER_FOUND=0 +fi + fi + fi + if test "x${RADIUS_HEADER_FOUND}" = "x0" ; then + RADIUS_LIB="" + RADIUS_INCLUDE="" + else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + RADIUS_LIB="" + fi + PBX_RADIUS=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED - fi +cat >>confdefs.h <<_ACEOF +#define HAVE_RADIUS 1 +_ACEOF - PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}" - if test "${HAS_OPENH323:-unset}" != "unset"; then - { echo "$as_me:$LINENO: checking OpenH323 installation validity" >&5 -echo $ECHO_N "checking OpenH323 installation validity... $ECHO_C" >&6; } +cat >>confdefs.h <<_ACEOF +#define HAVE_RADIUS_VERSION +_ACEOF - saved_cppflags="${CPPFLAGS}" - saved_libs="${LIBS}" - LIBS="${LIBS} -L${OPENH323_LIBDIR} -l${PLATFORM_OPENH323} ${PWLIB_LIB}" - CPPFLAGS="${CPPFLAGS} -I${OPENH323_INCDIR} ${PWLIB_INCLUDE}" + fi + fi +fi - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF +if test "x${PBX_SPEEX}" != "x1" -a "${USE_SPEEX}" != "no"; then + pbxlibdir="" + if test "x${SPEEX_DIR}" != "x"; then + if test -d ${SPEEX_DIR}/lib; then + pbxlibdir="-L${SPEEX_DIR}/lib" + else + pbxlibdir="-L${SPEEX_DIR}" + fi + fi + pbxfuncname="speex_encode" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_SPEEX_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_speex_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lspeex" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lspeex... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lspeex ${pbxlibdir} -lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include "ptlib.h" - #include "h323.h" - #include "h323ep.h" + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char ${pbxfuncname} (); int main () { -H323EndPoint ep = H323EndPoint(); +return ${pbxfuncname} (); ; return 0; } @@ -25852,7 +27089,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -25872,116 +27109,74 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - ac_cv_lib_OPENH323="yes" - + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ac_cv_lib_OPENH323="no" - - + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - LIBS="${saved_libs}" - CPPFLAGS="${saved_cppflags}" - - if test "${ac_cv_lib_OPENH323}" = "yes"; then - if test "${OPENH323_LIBDIR}" != "" -a "${OPENH323_LIBDIR}" != "/usr/lib"; then - OPENH323_LIB="-L${OPENH323_LIBDIR} -l${PLATFORM_OPENH323}" - else - OPENH323_LIB="-l${PLATFORM_OPENH323}" - fi - if test "${OPENH323_INCDIR}" != "" -a "${OPENH323_INCDIR}" != "/usr/include"; then - OPENH323_INCLUDE="-I${OPENH323_INCDIR}" - fi - PBX_OPENH323=1 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_OPENH323 1 -_ACEOF - - fi - fi - +LIBS=$ac_check_lib_save_LIBS fi -if test "${USE_OPENH323}" != "no" -a "x${ac_cv_lib_OPENH323}" != "xyes" -a ! -z "${OPENH323_MANDATORY}"; then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The PWLIB installation on this system appears to be broken." >&5 -echo "$as_me: *** The PWLIB installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** including --without-pwlib" >&5 -echo "$as_me: *** including --without-pwlib" >&6;} - exit 1 +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_SPEEX_FOUND=yes +else + AST_SPEEX_FOUND=no fi - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -if test "${USE_QT}" != "no"; then - { echo "$as_me:$LINENO: checking for QDate in -lqt" >&5 -echo $ECHO_N "checking for QDate in -lqt... $ECHO_C" >&6; } - saved_libs="${LIBS}" - saved_cppflags="${CPPFLAGS}" - if test "x${QT_DIR}" != "x"; then - LIBS="${LIBS} -L${QT_DIR}/lib" - CPPFLAGS="${CPPFLAGS} -I${QT_DIR}/include" fi - LIBS="${LIBS} -lqt" - qtlib="qt" - cat >conftest.$ac_ext <<_ACEOF - /* confdefs.h. */ + if test "${AST_SPEEX_FOUND}" = "yes"; then + SPEEX_LIB="-lspeex -lm" + SPEEX_HEADER_FOUND="1" + if test "x${SPEEX_DIR}" != "x"; then + SPEEX_LIB="${pbxlibdir} ${SPEEX_LIB}" + SPEEX_INCLUDE="-I${SPEEX_DIR}/include" + if test "xspeex/speex.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${SPEEX_DIR}/include/speex/speex.h" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { echo "$as_me:$LINENO: checking for ${SPEEX_DIR}/include/speex/speex.h" >&5 +echo $ECHO_N "checking for ${SPEEX_DIR}/include/speex/speex.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking ${SPEEX_DIR}/include/speex/speex.h usability" >&5 +echo $ECHO_N "checking ${SPEEX_DIR}/include/speex/speex.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -int -main () -{ -QDate date(); - ; - return 0; -} - +$ac_includes_default +#include <${SPEEX_DIR}/include/speex/speex.h> _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -25991,7 +27186,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -26001,60 +27196,147 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_qt_qt_date="yes" + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_qt_qt_date="no" + ac_header_compiler=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="${saved_libs}" - CPPFLAGS="${saved_cppflags}" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } - if test "${ac_cv_lib_qt_qt_date}" = "no"; then - saved_libs="${LIBS}" - saved_cppflags="${CPPFLAGS}" - if test "x${QT_DIR}" != "x"; then - LIBS="${LIBS} -L${QT_DIR}/lib" - CPPFLAGS="${CPPFLAGS} -I${QT_DIR}/include" - fi - LIBS="${LIBS} -lqt-mt" - qtlib="qt-mt" - cat >conftest.$ac_ext <<_ACEOF +# Is the header present? +{ echo "$as_me:$LINENO: checking ${SPEEX_DIR}/include/speex/speex.h presence" >&5 +echo $ECHO_N "checking ${SPEEX_DIR}/include/speex/speex.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <${SPEEX_DIR}/include/speex/speex.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - /* confdefs.h. */ + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ echo "$as_me:$LINENO: checking for ${SPEEX_DIR}/include/speex/speex.h" >&5 +echo $ECHO_N "checking for ${SPEEX_DIR}/include/speex/speex.h... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + SPEEX_HEADER_FOUND=1 +else + SPEEX_HEADER_FOUND=0 +fi + + + fi + else + if test "xspeex/speex.h" != "x" ; then + if test "${ac_cv_header_speex_speex_h+set}" = set; then + { echo "$as_me:$LINENO: checking for speex/speex.h" >&5 +echo $ECHO_N "checking for speex/speex.h... $ECHO_C" >&6; } +if test "${ac_cv_header_speex_speex_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_speex_speex_h" >&5 +echo "${ECHO_T}$ac_cv_header_speex_speex_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking speex/speex.h usability" >&5 +echo $ECHO_N "checking speex/speex.h usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -int -main () -{ -QDate date(); - ; - return 0; -} - +$ac_includes_default +#include _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -26064,7 +27346,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -26074,180 +27356,155 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_qt_qt_date="yes" + ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_qt_qt_date="no" + ac_header_compiler=no fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="${saved_libs}" - CPPFLAGS="${saved_cppflags}" - fi - - if test "${ac_cv_lib_qt_qt_date}" = "yes"; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - fi - - if test "${ac_cv_lib_qt_qt_date}" = "yes"; then - QT_LIB="-l${qtlib}" - if test "${QT_DIR}" != ""; then - QT_LIB="-L${QT_DIR}/lib ${QT_LIB}" - QT_INCLUDE="-I${QT_DIR}/include" - fi - PBX_QT=1 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } -cat >>confdefs.h <<\_ACEOF -#define HAVE_QT 1 +# Is the header present? +{ echo "$as_me:$LINENO: checking speex/speex.h presence" >&5 +echo $ECHO_N "checking speex/speex.h presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}moc", so it can be a program name with args. -set dummy ${ac_tool_prefix}moc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_QTMOC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $QTMOC in - [\\/]* | ?:[\\/]*) - ac_cv_path_QTMOC="$QTMOC" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_QTMOC="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi -QTMOC=$ac_cv_path_QTMOC -if test -n "$QTMOC"; then - { echo "$as_me:$LINENO: result: $QTMOC" >&5 -echo "${ECHO_T}$QTMOC" >&6; } +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } -fi -if test -z "$ac_cv_path_QTMOC"; then - ac_pt_QTMOC=$QTMOC - # Extract the first word of "moc", so it can be a program name with args. -set dummy moc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_path_ac_pt_QTMOC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_pt_QTMOC in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_QTMOC="$ac_pt_QTMOC" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_QTMOC="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: speex/speex.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: speex/speex.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: speex/speex.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: speex/speex.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: speex/speex.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: speex/speex.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: speex/speex.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: speex/speex.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: speex/speex.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: speex/speex.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: speex/speex.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: speex/speex.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: speex/speex.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: speex/speex.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: speex/speex.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: speex/speex.h: in the future, the compiler will take precedence" >&2;} - ;; + ;; esac -fi -ac_pt_QTMOC=$ac_cv_path_ac_pt_QTMOC -if test -n "$ac_pt_QTMOC"; then - { echo "$as_me:$LINENO: result: $ac_pt_QTMOC" >&5 -echo "${ECHO_T}$ac_pt_QTMOC" >&6; } +{ echo "$as_me:$LINENO: checking for speex/speex.h" >&5 +echo $ECHO_N "checking for speex/speex.h... $ECHO_C" >&6; } +if test "${ac_cv_header_speex_speex_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + ac_cv_header_speex_speex_h=$ac_header_preproc fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_speex_speex_h" >&5 +echo "${ECHO_T}$ac_cv_header_speex_speex_h" >&6; } - if test "x$ac_pt_QTMOC" = x; then - QTMOC="No" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - QTMOC=$ac_pt_QTMOC - fi +fi +if test $ac_cv_header_speex_speex_h = yes; then + SPEEX_HEADER_FOUND=1 else - QTMOC="$ac_cv_path_QTMOC" + SPEEX_HEADER_FOUND=0 fi - elif test ! -z "${QT_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The Qt installation on this system appears to be broken." >&5 -echo "$as_me: *** The Qt installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** including --without-qt." >&5 -echo "$as_me: *** including --without-qt." >&6;} - exit 1 + + fi + fi + if test "x${SPEEX_HEADER_FOUND}" = "x0" ; then + SPEEX_LIB="" + SPEEX_INCLUDE="" + else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + SPEEX_LIB="" + fi + PBX_SPEEX=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED + +cat >>confdefs.h <<_ACEOF +#define HAVE_SPEEX 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_SPEEX_VERSION +_ACEOF + + fi fi fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -if test "${USE_RADIUS}" != "no"; then +if test "x${PBX_SQLITE}" != "x1" -a "${USE_SQLITE}" != "no"; then pbxlibdir="" - if test "x${RADIUS_DIR}" != "x"; then - if test -d ${RADIUS_DIR}/lib; then - pbxlibdir="-L${RADIUS_DIR}/lib" + if test "x${SQLITE_DIR}" != "x"; then + if test -d ${SQLITE_DIR}/lib; then + pbxlibdir="-L${SQLITE_DIR}/lib" else - pbxlibdir="-L${RADIUS_DIR}" + pbxlibdir="-L${SQLITE_DIR}" fi fi - { echo "$as_me:$LINENO: checking for rc_read_config in -lradiusclient-ng" >&5 -echo $ECHO_N "checking for rc_read_config in -lradiusclient-ng... $ECHO_C" >&6; } -if test "${ac_cv_lib_radiusclient_ng_rc_read_config+set}" = set; then + pbxfuncname="sqlite_exec" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_SQLITE_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_sqlite_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lsqlite" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lsqlite... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lradiusclient-ng ${pbxlibdir} $LIBS" +LIBS="-lsqlite ${pbxlibdir} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -26261,11 +27518,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char rc_read_config (); +char ${pbxfuncname} (); int main () { -return rc_read_config (); +return ${pbxfuncname} (); ; return 0; } @@ -26304,38 +27561,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_radiusclient_ng_rc_read_config=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_radiusclient_ng_rc_read_config=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_radiusclient_ng_rc_read_config" >&5 -echo "${ECHO_T}$ac_cv_lib_radiusclient_ng_rc_read_config" >&6; } -if test $ac_cv_lib_radiusclient_ng_rc_read_config = yes; then - AST_RADIUS_FOUND=yes +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_SQLITE_FOUND=yes else - AST_RADIUS_FOUND=no + AST_SQLITE_FOUND=no fi + fi - if test "${AST_RADIUS_FOUND}" = "yes"; then - RADIUS_LIB="-lradiusclient-ng " - RADIUS_HEADER_FOUND="1" - if test "x${RADIUS_DIR}" != "x"; then - RADIUS_LIB="${pbxlibdir} ${RADIUS_LIB}" - RADIUS_INCLUDE="-I${RADIUS_DIR}/include" - if test "xradiusclient-ng.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${RADIUS_DIR}/include/radiusclient-ng.h" | $as_tr_sh` + if test "${AST_SQLITE_FOUND}" = "yes"; then + SQLITE_LIB="-lsqlite " + SQLITE_HEADER_FOUND="1" + if test "x${SQLITE_DIR}" != "x"; then + SQLITE_LIB="${pbxlibdir} ${SQLITE_LIB}" + SQLITE_INCLUDE="-I${SQLITE_DIR}/include" + if test "xsqlite.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${SQLITE_DIR}/include/sqlite.h" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${RADIUS_DIR}/include/radiusclient-ng.h" >&5 -echo $ECHO_N "checking for ${RADIUS_DIR}/include/radiusclient-ng.h... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for ${SQLITE_DIR}/include/sqlite.h" >&5 +echo $ECHO_N "checking for ${SQLITE_DIR}/include/sqlite.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi @@ -26344,8 +27603,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'` echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${RADIUS_DIR}/include/radiusclient-ng.h usability" >&5 -echo $ECHO_N "checking ${RADIUS_DIR}/include/radiusclient-ng.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${SQLITE_DIR}/include/sqlite.h usability" >&5 +echo $ECHO_N "checking ${SQLITE_DIR}/include/sqlite.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -26353,7 +27612,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <${RADIUS_DIR}/include/radiusclient-ng.h> +#include <${SQLITE_DIR}/include/sqlite.h> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -26402,15 +27661,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking ${RADIUS_DIR}/include/radiusclient-ng.h presence" >&5 -echo $ECHO_N "checking ${RADIUS_DIR}/include/radiusclient-ng.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${SQLITE_DIR}/include/sqlite.h presence" >&5 +echo $ECHO_N "checking ${SQLITE_DIR}/include/sqlite.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <${RADIUS_DIR}/include/radiusclient-ng.h> +#include <${SQLITE_DIR}/include/sqlite.h> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -26450,30 +27709,30 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${RADIUS_DIR}/include/radiusclient-ng.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for ${RADIUS_DIR}/include/radiusclient-ng.h" >&5 -echo $ECHO_N "checking for ${RADIUS_DIR}/include/radiusclient-ng.h... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for ${SQLITE_DIR}/include/sqlite.h" >&5 +echo $ECHO_N "checking for ${SQLITE_DIR}/include/sqlite.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -26485,27 +27744,27 @@ echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - RADIUS_HEADER_FOUND=1 + SQLITE_HEADER_FOUND=1 else - RADIUS_HEADER_FOUND=0 + SQLITE_HEADER_FOUND=0 fi fi else - if test "xradiusclient-ng.h" != "x" ; then - if test "${ac_cv_header_radiusclient_ng_h+set}" = set; then - { echo "$as_me:$LINENO: checking for radiusclient-ng.h" >&5 -echo $ECHO_N "checking for radiusclient-ng.h... $ECHO_C" >&6; } -if test "${ac_cv_header_radiusclient_ng_h+set}" = set; then + if test "xsqlite.h" != "x" ; then + if test "${ac_cv_header_sqlite_h+set}" = set; then + { echo "$as_me:$LINENO: checking for sqlite.h" >&5 +echo $ECHO_N "checking for sqlite.h... $ECHO_C" >&6; } +if test "${ac_cv_header_sqlite_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_radiusclient_ng_h" >&5 -echo "${ECHO_T}$ac_cv_header_radiusclient_ng_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_sqlite_h" >&5 +echo "${ECHO_T}$ac_cv_header_sqlite_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking radiusclient-ng.h usability" >&5 -echo $ECHO_N "checking radiusclient-ng.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking sqlite.h usability" >&5 +echo $ECHO_N "checking sqlite.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -26513,7 +27772,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -26562,15 +27821,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking radiusclient-ng.h presence" >&5 -echo $ECHO_N "checking radiusclient-ng.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking sqlite.h presence" >&5 +echo $ECHO_N "checking sqlite.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -26610,104 +27869,94 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: radiusclient-ng.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: radiusclient-ng.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlite.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sqlite.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlite.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sqlite.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: radiusclient-ng.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: radiusclient-ng.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: radiusclient-ng.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: radiusclient-ng.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: radiusclient-ng.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: radiusclient-ng.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: radiusclient-ng.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlite.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sqlite.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlite.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sqlite.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlite.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sqlite.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlite.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sqlite.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlite.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sqlite.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sqlite.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sqlite.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for radiusclient-ng.h" >&5 -echo $ECHO_N "checking for radiusclient-ng.h... $ECHO_C" >&6; } -if test "${ac_cv_header_radiusclient_ng_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for sqlite.h" >&5 +echo $ECHO_N "checking for sqlite.h... $ECHO_C" >&6; } +if test "${ac_cv_header_sqlite_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_radiusclient_ng_h=$ac_header_preproc + ac_cv_header_sqlite_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_radiusclient_ng_h" >&5 -echo "${ECHO_T}$ac_cv_header_radiusclient_ng_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_sqlite_h" >&5 +echo "${ECHO_T}$ac_cv_header_sqlite_h" >&6; } fi -if test $ac_cv_header_radiusclient_ng_h = yes; then - RADIUS_HEADER_FOUND=1 +if test $ac_cv_header_sqlite_h = yes; then + SQLITE_HEADER_FOUND=1 else - RADIUS_HEADER_FOUND=0 + SQLITE_HEADER_FOUND=0 fi fi fi - if test "x${RADIUS_HEADER_FOUND}" = "x0" ; then - if test ! -z "${RADIUS_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the radiusclient-ng development package installed." >&5 -echo "$as_me: *** It appears that you do not have the radiusclient-ng development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${RADIUS_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${RADIUS_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${RADIUS_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${RADIUS_OPTION}" >&6;} - exit 1 - fi - RADIUS_LIB="" - RADIUS_INCLUDE="" - PBX_RADIUS=0 + if test "x${SQLITE_HEADER_FOUND}" = "x0" ; then + SQLITE_LIB="" + SQLITE_INCLUDE="" else - PBX_RADIUS=1 + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + SQLITE_LIB="" + fi + PBX_SQLITE=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF -#define HAVE_RADIUS 1 +#define HAVE_SQLITE 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_SQLITE_VERSION _ACEOF fi - elif test ! -z "${RADIUS_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${RADIUS_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${RADIUS_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${RADIUS_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${RADIUS_OPTION}" >&6;} - exit 1 fi fi -if test "${USE_SPEEX}" != "no"; then +if test "x${PBX_OPENSSL}" != "x1" -a "${USE_OPENSSL}" != "no"; then pbxlibdir="" - if test "x${SPEEX_DIR}" != "x"; then - if test -d ${SPEEX_DIR}/lib; then - pbxlibdir="-L${SPEEX_DIR}/lib" + if test "x${OPENSSL_DIR}" != "x"; then + if test -d ${OPENSSL_DIR}/lib; then + pbxlibdir="-L${OPENSSL_DIR}/lib" else - pbxlibdir="-L${SPEEX_DIR}" + pbxlibdir="-L${OPENSSL_DIR}" fi fi - { echo "$as_me:$LINENO: checking for speex_encode in -lspeex" >&5 -echo $ECHO_N "checking for speex_encode in -lspeex... $ECHO_C" >&6; } -if test "${ac_cv_lib_speex_speex_encode+set}" = set; then + pbxfuncname="ssl2_connect" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_OPENSSL_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_ssl_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lssl" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lssl... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lspeex ${pbxlibdir} -lm $LIBS" +LIBS="-lssl ${pbxlibdir} -lcrypto $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -26721,11 +27970,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char speex_encode (); +char ${pbxfuncname} (); int main () { -return speex_encode (); +return ${pbxfuncname} (); ; return 0; } @@ -26764,38 +28013,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_speex_speex_encode=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_speex_speex_encode=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_speex_speex_encode" >&5 -echo "${ECHO_T}$ac_cv_lib_speex_speex_encode" >&6; } -if test $ac_cv_lib_speex_speex_encode = yes; then - AST_SPEEX_FOUND=yes +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_OPENSSL_FOUND=yes else - AST_SPEEX_FOUND=no + AST_OPENSSL_FOUND=no fi + fi - if test "${AST_SPEEX_FOUND}" = "yes"; then - SPEEX_LIB="-lspeex -lm" - SPEEX_HEADER_FOUND="1" - if test "x${SPEEX_DIR}" != "x"; then - SPEEX_LIB="${pbxlibdir} ${SPEEX_LIB}" - SPEEX_INCLUDE="-I${SPEEX_DIR}/include" - if test "xspeex/speex.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${SPEEX_DIR}/include/speex/speex.h" | $as_tr_sh` + if test "${AST_OPENSSL_FOUND}" = "yes"; then + OPENSSL_LIB="-lssl -lcrypto" + OPENSSL_HEADER_FOUND="1" + if test "x${OPENSSL_DIR}" != "x"; then + OPENSSL_LIB="${pbxlibdir} ${OPENSSL_LIB}" + OPENSSL_INCLUDE="-I${OPENSSL_DIR}/include" + if test "xopenssl/ssl.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${OPENSSL_DIR}/include/openssl/ssl.h" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${SPEEX_DIR}/include/speex/speex.h" >&5 -echo $ECHO_N "checking for ${SPEEX_DIR}/include/speex/speex.h... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for ${OPENSSL_DIR}/include/openssl/ssl.h" >&5 +echo $ECHO_N "checking for ${OPENSSL_DIR}/include/openssl/ssl.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi @@ -26804,8 +28055,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'` echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${SPEEX_DIR}/include/speex/speex.h usability" >&5 -echo $ECHO_N "checking ${SPEEX_DIR}/include/speex/speex.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${OPENSSL_DIR}/include/openssl/ssl.h usability" >&5 +echo $ECHO_N "checking ${OPENSSL_DIR}/include/openssl/ssl.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -26813,7 +28064,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <${SPEEX_DIR}/include/speex/speex.h> +#include <${OPENSSL_DIR}/include/openssl/ssl.h> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -26862,15 +28113,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking ${SPEEX_DIR}/include/speex/speex.h presence" >&5 -echo $ECHO_N "checking ${SPEEX_DIR}/include/speex/speex.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${OPENSSL_DIR}/include/openssl/ssl.h presence" >&5 +echo $ECHO_N "checking ${OPENSSL_DIR}/include/openssl/ssl.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <${SPEEX_DIR}/include/speex/speex.h> +#include <${OPENSSL_DIR}/include/openssl/ssl.h> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -26910,30 +28161,30 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SPEEX_DIR}/include/speex/speex.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${SPEEX_DIR}/include/speex/speex.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for ${SPEEX_DIR}/include/speex/speex.h" >&5 -echo $ECHO_N "checking for ${SPEEX_DIR}/include/speex/speex.h... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for ${OPENSSL_DIR}/include/openssl/ssl.h" >&5 +echo $ECHO_N "checking for ${OPENSSL_DIR}/include/openssl/ssl.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -26945,27 +28196,27 @@ echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - SPEEX_HEADER_FOUND=1 + OPENSSL_HEADER_FOUND=1 else - SPEEX_HEADER_FOUND=0 + OPENSSL_HEADER_FOUND=0 fi fi else - if test "xspeex/speex.h" != "x" ; then - if test "${ac_cv_header_speex_speex_h+set}" = set; then - { echo "$as_me:$LINENO: checking for speex/speex.h" >&5 -echo $ECHO_N "checking for speex/speex.h... $ECHO_C" >&6; } -if test "${ac_cv_header_speex_speex_h+set}" = set; then + if test "xopenssl/ssl.h" != "x" ; then + if test "${ac_cv_header_openssl_ssl_h+set}" = set; then + { echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5 +echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6; } +if test "${ac_cv_header_openssl_ssl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_speex_speex_h" >&5 -echo "${ECHO_T}$ac_cv_header_speex_speex_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5 +echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking speex/speex.h usability" >&5 -echo $ECHO_N "checking speex/speex.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5 +echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -26973,7 +28224,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -27022,15 +28273,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking speex/speex.h presence" >&5 -echo $ECHO_N "checking speex/speex.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5 +echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -27070,104 +28321,94 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: speex/speex.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: speex/speex.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: speex/speex.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: speex/speex.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: speex/speex.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: speex/speex.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: speex/speex.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: speex/speex.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: speex/speex.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: speex/speex.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: speex/speex.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: speex/speex.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: speex/speex.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: speex/speex.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: speex/speex.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: speex/speex.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: openssl/ssl.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for speex/speex.h" >&5 -echo $ECHO_N "checking for speex/speex.h... $ECHO_C" >&6; } -if test "${ac_cv_header_speex_speex_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5 +echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6; } +if test "${ac_cv_header_openssl_ssl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_speex_speex_h=$ac_header_preproc + ac_cv_header_openssl_ssl_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_speex_speex_h" >&5 -echo "${ECHO_T}$ac_cv_header_speex_speex_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5 +echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6; } fi -if test $ac_cv_header_speex_speex_h = yes; then - SPEEX_HEADER_FOUND=1 +if test $ac_cv_header_openssl_ssl_h = yes; then + OPENSSL_HEADER_FOUND=1 else - SPEEX_HEADER_FOUND=0 + OPENSSL_HEADER_FOUND=0 fi fi fi - if test "x${SPEEX_HEADER_FOUND}" = "x0" ; then - if test ! -z "${SPEEX_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the speex development package installed." >&5 -echo "$as_me: *** It appears that you do not have the speex development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${SPEEX_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${SPEEX_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${SPEEX_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${SPEEX_OPTION}" >&6;} - exit 1 - fi - SPEEX_LIB="" - SPEEX_INCLUDE="" - PBX_SPEEX=0 + if test "x${OPENSSL_HEADER_FOUND}" = "x0" ; then + OPENSSL_LIB="" + OPENSSL_INCLUDE="" else - PBX_SPEEX=1 + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + OPENSSL_LIB="" + fi + PBX_OPENSSL=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF -#define HAVE_SPEEX 1 +#define HAVE_OPENSSL 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL_VERSION _ACEOF fi - elif test ! -z "${SPEEX_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${SPEEX_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${SPEEX_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${SPEEX_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${SPEEX_OPTION}" >&6;} - exit 1 fi fi -if test "${USE_SQLITE}" != "no"; then +if test "x${PBX_FREETDS}" != "x1" -a "${USE_FREETDS}" != "no"; then pbxlibdir="" - if test "x${SQLITE_DIR}" != "x"; then - if test -d ${SQLITE_DIR}/lib; then - pbxlibdir="-L${SQLITE_DIR}/lib" + if test "x${FREETDS_DIR}" != "x"; then + if test -d ${FREETDS_DIR}/lib; then + pbxlibdir="-L${FREETDS_DIR}/lib" else - pbxlibdir="-L${SQLITE_DIR}" + pbxlibdir="-L${FREETDS_DIR}" fi fi - { echo "$as_me:$LINENO: checking for sqlite_exec in -lsqlite" >&5 -echo $ECHO_N "checking for sqlite_exec in -lsqlite... $ECHO_C" >&6; } -if test "${ac_cv_lib_sqlite_sqlite_exec+set}" = set; then + pbxfuncname="tds_version" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_FREETDS_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_tds_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -ltds" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -ltds... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lsqlite ${pbxlibdir} $LIBS" +LIBS="-ltds ${pbxlibdir} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27181,11 +28422,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char sqlite_exec (); +char ${pbxfuncname} (); int main () { -return sqlite_exec (); +return ${pbxfuncname} (); ; return 0; } @@ -27224,38 +28465,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_sqlite_sqlite_exec=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_sqlite_sqlite_exec=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_sqlite_sqlite_exec" >&5 -echo "${ECHO_T}$ac_cv_lib_sqlite_sqlite_exec" >&6; } -if test $ac_cv_lib_sqlite_sqlite_exec = yes; then - AST_SQLITE_FOUND=yes +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_FREETDS_FOUND=yes else - AST_SQLITE_FOUND=no + AST_FREETDS_FOUND=no fi + fi - if test "${AST_SQLITE_FOUND}" = "yes"; then - SQLITE_LIB="-lsqlite " - SQLITE_HEADER_FOUND="1" - if test "x${SQLITE_DIR}" != "x"; then - SQLITE_LIB="${pbxlibdir} ${SQLITE_LIB}" - SQLITE_INCLUDE="-I${SQLITE_DIR}/include" - if test "xsqlite.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${SQLITE_DIR}/include/sqlite.h" | $as_tr_sh` + if test "${AST_FREETDS_FOUND}" = "yes"; then + FREETDS_LIB="-ltds " + FREETDS_HEADER_FOUND="1" + if test "x${FREETDS_DIR}" != "x"; then + FREETDS_LIB="${pbxlibdir} ${FREETDS_LIB}" + FREETDS_INCLUDE="-I${FREETDS_DIR}/include" + if test "xtds.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${FREETDS_DIR}/include/tds.h" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${SQLITE_DIR}/include/sqlite.h" >&5 -echo $ECHO_N "checking for ${SQLITE_DIR}/include/sqlite.h... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for ${FREETDS_DIR}/include/tds.h" >&5 +echo $ECHO_N "checking for ${FREETDS_DIR}/include/tds.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi @@ -27264,8 +28507,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'` echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${SQLITE_DIR}/include/sqlite.h usability" >&5 -echo $ECHO_N "checking ${SQLITE_DIR}/include/sqlite.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${FREETDS_DIR}/include/tds.h usability" >&5 +echo $ECHO_N "checking ${FREETDS_DIR}/include/tds.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27273,7 +28516,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <${SQLITE_DIR}/include/sqlite.h> +#include <${FREETDS_DIR}/include/tds.h> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -27322,15 +28565,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking ${SQLITE_DIR}/include/sqlite.h presence" >&5 -echo $ECHO_N "checking ${SQLITE_DIR}/include/sqlite.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${FREETDS_DIR}/include/tds.h presence" >&5 +echo $ECHO_N "checking ${FREETDS_DIR}/include/tds.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <${SQLITE_DIR}/include/sqlite.h> +#include <${FREETDS_DIR}/include/tds.h> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -27370,30 +28613,30 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${SQLITE_DIR}/include/sqlite.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${SQLITE_DIR}/include/sqlite.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for ${SQLITE_DIR}/include/sqlite.h" >&5 -echo $ECHO_N "checking for ${SQLITE_DIR}/include/sqlite.h... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for ${FREETDS_DIR}/include/tds.h" >&5 +echo $ECHO_N "checking for ${FREETDS_DIR}/include/tds.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -27405,27 +28648,27 @@ echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - SQLITE_HEADER_FOUND=1 + FREETDS_HEADER_FOUND=1 else - SQLITE_HEADER_FOUND=0 + FREETDS_HEADER_FOUND=0 fi fi else - if test "xsqlite.h" != "x" ; then - if test "${ac_cv_header_sqlite_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sqlite.h" >&5 -echo $ECHO_N "checking for sqlite.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sqlite_h+set}" = set; then + if test "xtds.h" != "x" ; then + if test "${ac_cv_header_tds_h+set}" = set; then + { echo "$as_me:$LINENO: checking for tds.h" >&5 +echo $ECHO_N "checking for tds.h... $ECHO_C" >&6; } +if test "${ac_cv_header_tds_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sqlite_h" >&5 -echo "${ECHO_T}$ac_cv_header_sqlite_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_tds_h" >&5 +echo "${ECHO_T}$ac_cv_header_tds_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking sqlite.h usability" >&5 -echo $ECHO_N "checking sqlite.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking tds.h usability" >&5 +echo $ECHO_N "checking tds.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27433,7 +28676,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -27482,15 +28725,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking sqlite.h presence" >&5 -echo $ECHO_N "checking sqlite.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking tds.h presence" >&5 +echo $ECHO_N "checking tds.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -27530,104 +28773,111 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: sqlite.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sqlite.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sqlite.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sqlite.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: tds.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: tds.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: tds.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: tds.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sqlite.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sqlite.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sqlite.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sqlite.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sqlite.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sqlite.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sqlite.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sqlite.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sqlite.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sqlite.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sqlite.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sqlite.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: tds.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: tds.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: tds.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: tds.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: tds.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: tds.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: tds.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: tds.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: tds.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: tds.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: tds.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: tds.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for sqlite.h" >&5 -echo $ECHO_N "checking for sqlite.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sqlite_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for tds.h" >&5 +echo $ECHO_N "checking for tds.h... $ECHO_C" >&6; } +if test "${ac_cv_header_tds_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_sqlite_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sqlite_h" >&5 -echo "${ECHO_T}$ac_cv_header_sqlite_h" >&6; } + ac_cv_header_tds_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_tds_h" >&5 +echo "${ECHO_T}$ac_cv_header_tds_h" >&6; } fi -if test $ac_cv_header_sqlite_h = yes; then - SQLITE_HEADER_FOUND=1 +if test $ac_cv_header_tds_h = yes; then + FREETDS_HEADER_FOUND=1 else - SQLITE_HEADER_FOUND=0 + FREETDS_HEADER_FOUND=0 fi fi fi - if test "x${SQLITE_HEADER_FOUND}" = "x0" ; then - if test ! -z "${SQLITE_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the sqlite development package installed." >&5 -echo "$as_me: *** It appears that you do not have the sqlite development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${SQLITE_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${SQLITE_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${SQLITE_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${SQLITE_OPTION}" >&6;} - exit 1 - fi - SQLITE_LIB="" - SQLITE_INCLUDE="" - PBX_SQLITE=0 + if test "x${FREETDS_HEADER_FOUND}" = "x0" ; then + FREETDS_LIB="" + FREETDS_INCLUDE="" else - PBX_SQLITE=1 + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + FREETDS_LIB="" + fi + PBX_FREETDS=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF -#define HAVE_SQLITE 1 +#define HAVE_FREETDS 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_FREETDS_VERSION _ACEOF fi - elif test ! -z "${SQLITE_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${SQLITE_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${SQLITE_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${SQLITE_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${SQLITE_OPTION}" >&6;} - exit 1 fi fi +if test "${PBX_FREETDS}" != "0"; +then + case `grep TDS_VERSION_NO ${FREETDS_DIR:-/usr/include}/tdsver.h` in + *0.64*) + FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_64" + ;; + *0.63*) + FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_63" + ;; + *0.62*) + FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_62" + ;; + *) + FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_PRE_0_62" + ;; + esac +fi -if test "${USE_OPENSSL}" != "no"; then +if test "x${PBX_TERMCAP}" != "x1" -a "${USE_TERMCAP}" != "no"; then pbxlibdir="" - if test "x${OPENSSL_DIR}" != "x"; then - if test -d ${OPENSSL_DIR}/lib; then - pbxlibdir="-L${OPENSSL_DIR}/lib" + if test "x${TERMCAP_DIR}" != "x"; then + if test -d ${TERMCAP_DIR}/lib; then + pbxlibdir="-L${TERMCAP_DIR}/lib" else - pbxlibdir="-L${OPENSSL_DIR}" + pbxlibdir="-L${TERMCAP_DIR}" fi fi - { echo "$as_me:$LINENO: checking for ssl2_connect in -lssl" >&5 -echo $ECHO_N "checking for ssl2_connect in -lssl... $ECHO_C" >&6; } -if test "${ac_cv_lib_ssl_ssl2_connect+set}" = set; then + pbxfuncname="tgetent" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_TERMCAP_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_termcap_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -ltermcap" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -ltermcap... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lssl ${pbxlibdir} -lcrypto $LIBS" +LIBS="-ltermcap ${pbxlibdir} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27641,11 +28891,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char ssl2_connect (); +char ${pbxfuncname} (); int main () { -return ssl2_connect (); +return ${pbxfuncname} (); ; return 0; } @@ -27684,38 +28934,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_ssl_ssl2_connect=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ssl_ssl2_connect=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_ssl2_connect" >&5 -echo "${ECHO_T}$ac_cv_lib_ssl_ssl2_connect" >&6; } -if test $ac_cv_lib_ssl_ssl2_connect = yes; then - AST_OPENSSL_FOUND=yes +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_TERMCAP_FOUND=yes else - AST_OPENSSL_FOUND=no + AST_TERMCAP_FOUND=no fi + fi - if test "${AST_OPENSSL_FOUND}" = "yes"; then - OPENSSL_LIB="-lssl -lcrypto" - OPENSSL_HEADER_FOUND="1" - if test "x${OPENSSL_DIR}" != "x"; then - OPENSSL_LIB="${pbxlibdir} ${OPENSSL_LIB}" - OPENSSL_INCLUDE="-I${OPENSSL_DIR}/include" - if test "xopenssl/ssl.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${OPENSSL_DIR}/include/openssl/ssl.h" | $as_tr_sh` + if test "${AST_TERMCAP_FOUND}" = "yes"; then + TERMCAP_LIB="-ltermcap " + TERMCAP_HEADER_FOUND="1" + if test "x${TERMCAP_DIR}" != "x"; then + TERMCAP_LIB="${pbxlibdir} ${TERMCAP_LIB}" + TERMCAP_INCLUDE="-I${TERMCAP_DIR}/include" + if test "x" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${TERMCAP_DIR}/include/" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${OPENSSL_DIR}/include/openssl/ssl.h" >&5 -echo $ECHO_N "checking for ${OPENSSL_DIR}/include/openssl/ssl.h... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for ${TERMCAP_DIR}/include/" >&5 +echo $ECHO_N "checking for ${TERMCAP_DIR}/include/... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi @@ -27724,8 +28976,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'` echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${OPENSSL_DIR}/include/openssl/ssl.h usability" >&5 -echo $ECHO_N "checking ${OPENSSL_DIR}/include/openssl/ssl.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${TERMCAP_DIR}/include/ usability" >&5 +echo $ECHO_N "checking ${TERMCAP_DIR}/include/ usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27733,7 +28985,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <${OPENSSL_DIR}/include/openssl/ssl.h> +#include <${TERMCAP_DIR}/include/> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -27782,15 +29034,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking ${OPENSSL_DIR}/include/openssl/ssl.h presence" >&5 -echo $ECHO_N "checking ${OPENSSL_DIR}/include/openssl/ssl.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${TERMCAP_DIR}/include/ presence" >&5 +echo $ECHO_N "checking ${TERMCAP_DIR}/include/ presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <${OPENSSL_DIR}/include/openssl/ssl.h> +#include <${TERMCAP_DIR}/include/> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -27830,30 +29082,30 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${OPENSSL_DIR}/include/openssl/ssl.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for ${OPENSSL_DIR}/include/openssl/ssl.h" >&5 -echo $ECHO_N "checking for ${OPENSSL_DIR}/include/openssl/ssl.h... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for ${TERMCAP_DIR}/include/" >&5 +echo $ECHO_N "checking for ${TERMCAP_DIR}/include/... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -27865,27 +29117,27 @@ echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - OPENSSL_HEADER_FOUND=1 + TERMCAP_HEADER_FOUND=1 else - OPENSSL_HEADER_FOUND=0 + TERMCAP_HEADER_FOUND=0 fi fi else - if test "xopenssl/ssl.h" != "x" ; then - if test "${ac_cv_header_openssl_ssl_h+set}" = set; then - { echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5 -echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_openssl_ssl_h+set}" = set; then + if test "x" != "x" ; then + if test "${ac_cv_header_+set}" = set; then + { echo "$as_me:$LINENO: checking for " >&5 +echo $ECHO_N "checking for ... $ECHO_C" >&6; } +if test "${ac_cv_header_+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5 -echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 +echo "${ECHO_T}$ac_cv_header_" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5 -echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking usability" >&5 +echo $ECHO_N "checking usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -27893,7 +29145,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include <> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -27942,15 +29194,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5 -echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking presence" >&5 +echo $ECHO_N "checking presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include <> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -27990,104 +29242,94 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: openssl/ssl.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: openssl/ssl.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 +echo "$as_me: WARNING: : present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 +echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5 -echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6; } -if test "${ac_cv_header_openssl_ssl_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for " >&5 +echo $ECHO_N "checking for ... $ECHO_C" >&6; } +if test "${ac_cv_header_+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_openssl_ssl_h=$ac_header_preproc + ac_cv_header_=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5 -echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 +echo "${ECHO_T}$ac_cv_header_" >&6; } fi -if test $ac_cv_header_openssl_ssl_h = yes; then - OPENSSL_HEADER_FOUND=1 +if test $ac_cv_header_ = yes; then + TERMCAP_HEADER_FOUND=1 else - OPENSSL_HEADER_FOUND=0 + TERMCAP_HEADER_FOUND=0 fi fi fi - if test "x${OPENSSL_HEADER_FOUND}" = "x0" ; then - if test ! -z "${OPENSSL_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the ssl development package installed." >&5 -echo "$as_me: *** It appears that you do not have the ssl development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${OPENSSL_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${OPENSSL_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${OPENSSL_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${OPENSSL_OPTION}" >&6;} - exit 1 - fi - OPENSSL_LIB="" - OPENSSL_INCLUDE="" - PBX_OPENSSL=0 + if test "x${TERMCAP_HEADER_FOUND}" = "x0" ; then + TERMCAP_LIB="" + TERMCAP_INCLUDE="" else - PBX_OPENSSL=1 + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + TERMCAP_LIB="" + fi + PBX_TERMCAP=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF -#define HAVE_OPENSSL 1 +#define HAVE_TERMCAP 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_TERMCAP_VERSION _ACEOF fi - elif test ! -z "${OPENSSL_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${OPENSSL_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${OPENSSL_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${OPENSSL_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${OPENSSL_OPTION}" >&6;} - exit 1 fi fi -if test "${USE_FREETDS}" != "no"; then +if test "x${PBX_TINFO}" != "x1" -a "${USE_TINFO}" != "no"; then pbxlibdir="" - if test "x${FREETDS_DIR}" != "x"; then - if test -d ${FREETDS_DIR}/lib; then - pbxlibdir="-L${FREETDS_DIR}/lib" + if test "x${TINFO_DIR}" != "x"; then + if test -d ${TINFO_DIR}/lib; then + pbxlibdir="-L${TINFO_DIR}/lib" else - pbxlibdir="-L${FREETDS_DIR}" + pbxlibdir="-L${TINFO_DIR}" fi fi - { echo "$as_me:$LINENO: checking for tds_version in -ltds" >&5 -echo $ECHO_N "checking for tds_version in -ltds... $ECHO_C" >&6; } -if test "${ac_cv_lib_tds_tds_version+set}" = set; then + pbxfuncname="tgetent" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_TINFO_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_tinfo_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -ltinfo" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -ltinfo... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ltds ${pbxlibdir} $LIBS" +LIBS="-ltinfo ${pbxlibdir} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -28101,11 +29343,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char tds_version (); +char ${pbxfuncname} (); int main () { -return tds_version (); +return ${pbxfuncname} (); ; return 0; } @@ -28144,38 +29386,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_tds_tds_version=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_tds_tds_version=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_tds_tds_version" >&5 -echo "${ECHO_T}$ac_cv_lib_tds_tds_version" >&6; } -if test $ac_cv_lib_tds_tds_version = yes; then - AST_FREETDS_FOUND=yes -else - AST_FREETDS_FOUND=no -fi - - - if test "${AST_FREETDS_FOUND}" = "yes"; then - FREETDS_LIB="-ltds " - FREETDS_HEADER_FOUND="1" - if test "x${FREETDS_DIR}" != "x"; then - FREETDS_LIB="${pbxlibdir} ${FREETDS_LIB}" - FREETDS_INCLUDE="-I${FREETDS_DIR}/include" - if test "xtds.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${FREETDS_DIR}/include/tds.h" | $as_tr_sh` +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_TINFO_FOUND=yes +else + AST_TINFO_FOUND=no +fi + + fi + + if test "${AST_TINFO_FOUND}" = "yes"; then + TINFO_LIB="-ltinfo " + TINFO_HEADER_FOUND="1" + if test "x${TINFO_DIR}" != "x"; then + TINFO_LIB="${pbxlibdir} ${TINFO_LIB}" + TINFO_INCLUDE="-I${TINFO_DIR}/include" + if test "x" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${TINFO_DIR}/include/" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${FREETDS_DIR}/include/tds.h" >&5 -echo $ECHO_N "checking for ${FREETDS_DIR}/include/tds.h... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for ${TINFO_DIR}/include/" >&5 +echo $ECHO_N "checking for ${TINFO_DIR}/include/... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi @@ -28184,8 +29428,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'` echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${FREETDS_DIR}/include/tds.h usability" >&5 -echo $ECHO_N "checking ${FREETDS_DIR}/include/tds.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${TINFO_DIR}/include/ usability" >&5 +echo $ECHO_N "checking ${TINFO_DIR}/include/ usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -28193,7 +29437,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <${FREETDS_DIR}/include/tds.h> +#include <${TINFO_DIR}/include/> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -28242,15 +29486,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking ${FREETDS_DIR}/include/tds.h presence" >&5 -echo $ECHO_N "checking ${FREETDS_DIR}/include/tds.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${TINFO_DIR}/include/ presence" >&5 +echo $ECHO_N "checking ${TINFO_DIR}/include/ presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <${FREETDS_DIR}/include/tds.h> +#include <${TINFO_DIR}/include/> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -28290,30 +29534,30 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${TINFO_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${TINFO_DIR}/include/: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${FREETDS_DIR}/include/tds.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${FREETDS_DIR}/include/tds.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${TINFO_DIR}/include/: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${TINFO_DIR}/include/: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${TINFO_DIR}/include/: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${TINFO_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${TINFO_DIR}/include/: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${TINFO_DIR}/include/: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for ${FREETDS_DIR}/include/tds.h" >&5 -echo $ECHO_N "checking for ${FREETDS_DIR}/include/tds.h... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for ${TINFO_DIR}/include/" >&5 +echo $ECHO_N "checking for ${TINFO_DIR}/include/... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -28325,27 +29569,27 @@ echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - FREETDS_HEADER_FOUND=1 + TINFO_HEADER_FOUND=1 else - FREETDS_HEADER_FOUND=0 + TINFO_HEADER_FOUND=0 fi fi else - if test "xtds.h" != "x" ; then - if test "${ac_cv_header_tds_h+set}" = set; then - { echo "$as_me:$LINENO: checking for tds.h" >&5 -echo $ECHO_N "checking for tds.h... $ECHO_C" >&6; } -if test "${ac_cv_header_tds_h+set}" = set; then + if test "x" != "x" ; then + if test "${ac_cv_header_+set}" = set; then + { echo "$as_me:$LINENO: checking for " >&5 +echo $ECHO_N "checking for ... $ECHO_C" >&6; } +if test "${ac_cv_header_+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_tds_h" >&5 -echo "${ECHO_T}$ac_cv_header_tds_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 +echo "${ECHO_T}$ac_cv_header_" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking tds.h usability" >&5 -echo $ECHO_N "checking tds.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking usability" >&5 +echo $ECHO_N "checking usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -28353,7 +29597,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include <> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -28402,15 +29646,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking tds.h presence" >&5 -echo $ECHO_N "checking tds.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking presence" >&5 +echo $ECHO_N "checking presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include <> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -28450,121 +29694,99 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: tds.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: tds.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: tds.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: tds.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: tds.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: tds.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: tds.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: tds.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: tds.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: tds.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: tds.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: tds.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: tds.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: tds.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: tds.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: tds.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 +echo "$as_me: WARNING: : present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 +echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for tds.h" >&5 -echo $ECHO_N "checking for tds.h... $ECHO_C" >&6; } -if test "${ac_cv_header_tds_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for " >&5 +echo $ECHO_N "checking for ... $ECHO_C" >&6; } +if test "${ac_cv_header_+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_tds_h=$ac_header_preproc + ac_cv_header_=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_tds_h" >&5 -echo "${ECHO_T}$ac_cv_header_tds_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 +echo "${ECHO_T}$ac_cv_header_" >&6; } fi -if test $ac_cv_header_tds_h = yes; then - FREETDS_HEADER_FOUND=1 +if test $ac_cv_header_ = yes; then + TINFO_HEADER_FOUND=1 else - FREETDS_HEADER_FOUND=0 + TINFO_HEADER_FOUND=0 fi fi fi - if test "x${FREETDS_HEADER_FOUND}" = "x0" ; then - if test ! -z "${FREETDS_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the tds development package installed." >&5 -echo "$as_me: *** It appears that you do not have the tds development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${FREETDS_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${FREETDS_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${FREETDS_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${FREETDS_OPTION}" >&6;} - exit 1 - fi - FREETDS_LIB="" - FREETDS_INCLUDE="" - PBX_FREETDS=0 + if test "x${TINFO_HEADER_FOUND}" = "x0" ; then + TINFO_LIB="" + TINFO_INCLUDE="" else - PBX_FREETDS=1 + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + TINFO_LIB="" + fi + PBX_TINFO=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF -#define HAVE_FREETDS 1 +#define HAVE_TINFO 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_TINFO_VERSION _ACEOF fi - elif test ! -z "${FREETDS_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${FREETDS_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${FREETDS_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${FREETDS_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${FREETDS_OPTION}" >&6;} - exit 1 fi fi -if test "${PBX_FREETDS}" != "0"; -then - case `grep TDS_VERSION_NO ${FREETDS_DIR:-/usr/include}/tdsver.h` in - *0.64*) - FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_64" - ;; - *0.63*) - FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_63" - ;; - *0.62*) - FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_62" - ;; - *) - FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_PRE_0_62" - ;; - esac + +if test "${host_os}" != "linux-gnu" ; then + tonezone_extra="-lm" fi +# new tonezone, version 1.4.0 -if test "${USE_TERMCAP}" != "no"; then +if test "x${PBX_TONEZONE}" != "x1" -a "${USE_TONEZONE}" != "no"; then pbxlibdir="" - if test "x${TERMCAP_DIR}" != "x"; then - if test -d ${TERMCAP_DIR}/lib; then - pbxlibdir="-L${TERMCAP_DIR}/lib" + if test "x${TONEZONE_DIR}" != "x"; then + if test -d ${TONEZONE_DIR}/lib; then + pbxlibdir="-L${TONEZONE_DIR}/lib" else - pbxlibdir="-L${TERMCAP_DIR}" + pbxlibdir="-L${TONEZONE_DIR}" fi fi - { echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5 -echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6; } -if test "${ac_cv_lib_termcap_tgetent+set}" = set; then + pbxfuncname="tone_zone_find" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_TONEZONE_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_tonezone_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -ltonezone" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -ltonezone... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ltermcap ${pbxlibdir} $LIBS" +LIBS="-ltonezone ${pbxlibdir} ${tonezone_extra} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -28578,11 +29800,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char tgetent (); +char ${pbxfuncname} (); int main () { -return tgetent (); +return ${pbxfuncname} (); ; return 0; } @@ -28621,38 +29843,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_termcap_tgetent=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_termcap_tgetent=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5 -echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6; } -if test $ac_cv_lib_termcap_tgetent = yes; then - AST_TERMCAP_FOUND=yes +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_TONEZONE_FOUND=yes else - AST_TERMCAP_FOUND=no + AST_TONEZONE_FOUND=no fi + fi - if test "${AST_TERMCAP_FOUND}" = "yes"; then - TERMCAP_LIB="-ltermcap " - TERMCAP_HEADER_FOUND="1" - if test "x${TERMCAP_DIR}" != "x"; then - TERMCAP_LIB="${pbxlibdir} ${TERMCAP_LIB}" - TERMCAP_INCLUDE="-I${TERMCAP_DIR}/include" - if test "x" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${TERMCAP_DIR}/include/" | $as_tr_sh` + if test "${AST_TONEZONE_FOUND}" = "yes"; then + TONEZONE_LIB="-ltonezone ${tonezone_extra}" + TONEZONE_HEADER_FOUND="1" + if test "x${TONEZONE_DIR}" != "x"; then + TONEZONE_LIB="${pbxlibdir} ${TONEZONE_LIB}" + TONEZONE_INCLUDE="-I${TONEZONE_DIR}/include" + if test "xzaptel/tonezone.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${TONEZONE_DIR}/include/zaptel/tonezone.h" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${TERMCAP_DIR}/include/" >&5 -echo $ECHO_N "checking for ${TERMCAP_DIR}/include/... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for ${TONEZONE_DIR}/include/zaptel/tonezone.h" >&5 +echo $ECHO_N "checking for ${TONEZONE_DIR}/include/zaptel/tonezone.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi @@ -28661,8 +29885,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'` echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${TERMCAP_DIR}/include/ usability" >&5 -echo $ECHO_N "checking ${TERMCAP_DIR}/include/ usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${TONEZONE_DIR}/include/zaptel/tonezone.h usability" >&5 +echo $ECHO_N "checking ${TONEZONE_DIR}/include/zaptel/tonezone.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -28670,7 +29894,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <${TERMCAP_DIR}/include/> +#include <${TONEZONE_DIR}/include/zaptel/tonezone.h> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -28719,15 +29943,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking ${TERMCAP_DIR}/include/ presence" >&5 -echo $ECHO_N "checking ${TERMCAP_DIR}/include/ presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${TONEZONE_DIR}/include/zaptel/tonezone.h presence" >&5 +echo $ECHO_N "checking ${TONEZONE_DIR}/include/zaptel/tonezone.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <${TERMCAP_DIR}/include/> +#include <${TONEZONE_DIR}/include/zaptel/tonezone.h> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -28764,33 +29988,33 @@ rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TERMCAP_DIR}/include/: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${TERMCAP_DIR}/include/: in the future, the compiler will take precedence" >&2;} - +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: in the future, the compiler will take precedence" >&2;} + ;; esac -{ echo "$as_me:$LINENO: checking for ${TERMCAP_DIR}/include/" >&5 -echo $ECHO_N "checking for ${TERMCAP_DIR}/include/... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for ${TONEZONE_DIR}/include/zaptel/tonezone.h" >&5 +echo $ECHO_N "checking for ${TONEZONE_DIR}/include/zaptel/tonezone.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -28802,27 +30026,27 @@ echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - TERMCAP_HEADER_FOUND=1 + TONEZONE_HEADER_FOUND=1 else - TERMCAP_HEADER_FOUND=0 + TONEZONE_HEADER_FOUND=0 fi fi else - if test "x" != "x" ; then - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then + if test "xzaptel/tonezone.h" != "x" ; then + if test "${ac_cv_header_zaptel_tonezone_h+set}" = set; then + { echo "$as_me:$LINENO: checking for zaptel/tonezone.h" >&5 +echo $ECHO_N "checking for zaptel/tonezone.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zaptel_tonezone_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_tonezone_h" >&5 +echo "${ECHO_T}$ac_cv_header_zaptel_tonezone_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking zaptel/tonezone.h usability" >&5 +echo $ECHO_N "checking zaptel/tonezone.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -28830,7 +30054,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <> +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -28879,15 +30103,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking presence" >&5 -echo $ECHO_N "checking presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking zaptel/tonezone.h presence" >&5 +echo $ECHO_N "checking zaptel/tonezone.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <> +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -28927,104 +30151,94 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: zaptel/tonezone.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: zaptel/tonezone.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: zaptel/tonezone.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: zaptel/tonezone.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: zaptel/tonezone.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: zaptel/tonezone.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: zaptel/tonezone.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: zaptel/tonezone.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then +{ echo "$as_me:$LINENO: checking for zaptel/tonezone.h" >&5 +echo $ECHO_N "checking for zaptel/tonezone.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zaptel_tonezone_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_=$ac_header_preproc + ac_cv_header_zaptel_tonezone_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_tonezone_h" >&5 +echo "${ECHO_T}$ac_cv_header_zaptel_tonezone_h" >&6; } fi -if test $ac_cv_header_ = yes; then - TERMCAP_HEADER_FOUND=1 +if test $ac_cv_header_zaptel_tonezone_h = yes; then + TONEZONE_HEADER_FOUND=1 else - TERMCAP_HEADER_FOUND=0 + TONEZONE_HEADER_FOUND=0 fi fi fi - if test "x${TERMCAP_HEADER_FOUND}" = "x0" ; then - if test ! -z "${TERMCAP_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the termcap development package installed." >&5 -echo "$as_me: *** It appears that you do not have the termcap development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${TERMCAP_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${TERMCAP_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${TERMCAP_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${TERMCAP_OPTION}" >&6;} - exit 1 - fi - TERMCAP_LIB="" - TERMCAP_INCLUDE="" - PBX_TERMCAP=0 + if test "x${TONEZONE_HEADER_FOUND}" = "x0" ; then + TONEZONE_LIB="" + TONEZONE_INCLUDE="" else - PBX_TERMCAP=1 + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + TONEZONE_LIB="" + fi + PBX_TONEZONE=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF -#define HAVE_TERMCAP 1 +#define HAVE_TONEZONE 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_TONEZONE_VERSION 140 _ACEOF fi - elif test ! -z "${TERMCAP_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${TERMCAP_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${TERMCAP_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${TERMCAP_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${TERMCAP_OPTION}" >&6;} - exit 1 fi fi +# other case, old tonezone (0.80) - -if test "${USE_TINFO}" != "no"; then +if test "x${PBX_TONEZONE}" != "x1" -a "${USE_TONEZONE}" != "no"; then pbxlibdir="" - if test "x${TINFO_DIR}" != "x"; then - if test -d ${TINFO_DIR}/lib; then - pbxlibdir="-L${TINFO_DIR}/lib" + if test "x${TONEZONE_DIR}" != "x"; then + if test -d ${TONEZONE_DIR}/lib; then + pbxlibdir="-L${TONEZONE_DIR}/lib" else - pbxlibdir="-L${TINFO_DIR}" + pbxlibdir="-L${TONEZONE_DIR}" fi fi - { echo "$as_me:$LINENO: checking for tgetent in -ltinfo" >&5 -echo $ECHO_N "checking for tgetent in -ltinfo... $ECHO_C" >&6; } -if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then + pbxfuncname="tone_zone_find" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_TONEZONE_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_tonezone_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -ltonezone" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -ltonezone... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ltinfo ${pbxlibdir} $LIBS" +LIBS="-ltonezone ${pbxlibdir} ${tonezone_extra} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -29038,11 +30252,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char tgetent (); +char ${pbxfuncname} (); int main () { -return tgetent (); +return ${pbxfuncname} (); ; return 0; } @@ -29081,38 +30295,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_tinfo_tgetent=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_tinfo_tgetent=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_tinfo_tgetent" >&5 -echo "${ECHO_T}$ac_cv_lib_tinfo_tgetent" >&6; } -if test $ac_cv_lib_tinfo_tgetent = yes; then - AST_TINFO_FOUND=yes +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_TONEZONE_FOUND=yes else - AST_TINFO_FOUND=no + AST_TONEZONE_FOUND=no fi + fi - if test "${AST_TINFO_FOUND}" = "yes"; then - TINFO_LIB="-ltinfo " - TINFO_HEADER_FOUND="1" - if test "x${TINFO_DIR}" != "x"; then - TINFO_LIB="${pbxlibdir} ${TINFO_LIB}" - TINFO_INCLUDE="-I${TINFO_DIR}/include" - if test "x" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${TINFO_DIR}/include/" | $as_tr_sh` + if test "${AST_TONEZONE_FOUND}" = "yes"; then + TONEZONE_LIB="-ltonezone ${tonezone_extra}" + TONEZONE_HEADER_FOUND="1" + if test "x${TONEZONE_DIR}" != "x"; then + TONEZONE_LIB="${pbxlibdir} ${TONEZONE_LIB}" + TONEZONE_INCLUDE="-I${TONEZONE_DIR}/include" + if test "xzaptel/zaptel.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${TONEZONE_DIR}/include/zaptel/zaptel.h" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${TINFO_DIR}/include/" >&5 -echo $ECHO_N "checking for ${TINFO_DIR}/include/... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for ${TONEZONE_DIR}/include/zaptel/zaptel.h" >&5 +echo $ECHO_N "checking for ${TONEZONE_DIR}/include/zaptel/zaptel.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi @@ -29121,8 +30337,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'` echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${TINFO_DIR}/include/ usability" >&5 -echo $ECHO_N "checking ${TINFO_DIR}/include/ usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${TONEZONE_DIR}/include/zaptel/zaptel.h usability" >&5 +echo $ECHO_N "checking ${TONEZONE_DIR}/include/zaptel/zaptel.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -29130,7 +30346,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <${TINFO_DIR}/include/> +#include <${TONEZONE_DIR}/include/zaptel/zaptel.h> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -29179,15 +30395,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking ${TINFO_DIR}/include/ presence" >&5 -echo $ECHO_N "checking ${TINFO_DIR}/include/ presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${TONEZONE_DIR}/include/zaptel/zaptel.h presence" >&5 +echo $ECHO_N "checking ${TONEZONE_DIR}/include/zaptel/zaptel.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <${TINFO_DIR}/include/> +#include <${TONEZONE_DIR}/include/zaptel/zaptel.h> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -29227,30 +30443,30 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${TINFO_DIR}/include/: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${TINFO_DIR}/include/: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${TINFO_DIR}/include/: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${TINFO_DIR}/include/: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${TINFO_DIR}/include/: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${TINFO_DIR}/include/: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${TINFO_DIR}/include/: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TINFO_DIR}/include/: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${TINFO_DIR}/include/: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/zaptel.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for ${TINFO_DIR}/include/" >&5 -echo $ECHO_N "checking for ${TINFO_DIR}/include/... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for ${TONEZONE_DIR}/include/zaptel/zaptel.h" >&5 +echo $ECHO_N "checking for ${TONEZONE_DIR}/include/zaptel/zaptel.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -29262,27 +30478,27 @@ echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - TINFO_HEADER_FOUND=1 + TONEZONE_HEADER_FOUND=1 else - TINFO_HEADER_FOUND=0 + TONEZONE_HEADER_FOUND=0 fi fi else - if test "x" != "x" ; then - if test "${ac_cv_header_+set}" = set; then - { echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then + if test "xzaptel/zaptel.h" != "x" ; then + if test "${ac_cv_header_zaptel_zaptel_h+set}" = set; then + { echo "$as_me:$LINENO: checking for zaptel/zaptel.h" >&5 +echo $ECHO_N "checking for zaptel/zaptel.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zaptel_zaptel_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_zaptel_h" >&5 +echo "${ECHO_T}$ac_cv_header_zaptel_zaptel_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking usability" >&5 -echo $ECHO_N "checking usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking zaptel/zaptel.h usability" >&5 +echo $ECHO_N "checking zaptel/zaptel.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -29290,7 +30506,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <> +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -29339,15 +30555,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking presence" >&5 -echo $ECHO_N "checking presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking zaptel/zaptel.h presence" >&5 +echo $ECHO_N "checking zaptel/zaptel.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <> +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -29387,108 +30603,94 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: : accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: : proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: zaptel/zaptel.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: zaptel/zaptel.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: : present but cannot be compiled" >&5 -echo "$as_me: WARNING: : present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: : check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: : check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: : see the Autoconf documentation" >&5 -echo "$as_me: WARNING: : see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: : section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: : section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: : proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: : proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: : in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: : in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: zaptel/zaptel.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: zaptel/zaptel.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: zaptel/zaptel.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: zaptel/zaptel.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: zaptel/zaptel.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel/zaptel.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: zaptel/zaptel.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for " >&5 -echo $ECHO_N "checking for ... $ECHO_C" >&6; } -if test "${ac_cv_header_+set}" = set; then +{ echo "$as_me:$LINENO: checking for zaptel/zaptel.h" >&5 +echo $ECHO_N "checking for zaptel/zaptel.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zaptel_zaptel_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_=$ac_header_preproc + ac_cv_header_zaptel_zaptel_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_" >&5 -echo "${ECHO_T}$ac_cv_header_" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_zaptel_h" >&5 +echo "${ECHO_T}$ac_cv_header_zaptel_zaptel_h" >&6; } fi -if test $ac_cv_header_ = yes; then - TINFO_HEADER_FOUND=1 +if test $ac_cv_header_zaptel_zaptel_h = yes; then + TONEZONE_HEADER_FOUND=1 else - TINFO_HEADER_FOUND=0 + TONEZONE_HEADER_FOUND=0 fi fi fi - if test "x${TINFO_HEADER_FOUND}" = "x0" ; then - if test ! -z "${TINFO_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the tinfo development package installed." >&5 -echo "$as_me: *** It appears that you do not have the tinfo development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${TINFO_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${TINFO_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${TINFO_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${TINFO_OPTION}" >&6;} - exit 1 - fi - TINFO_LIB="" - TINFO_INCLUDE="" - PBX_TINFO=0 + if test "x${TONEZONE_HEADER_FOUND}" = "x0" ; then + TONEZONE_LIB="" + TONEZONE_INCLUDE="" else - PBX_TINFO=1 + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + TONEZONE_LIB="" + fi + PBX_TONEZONE=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF -#define HAVE_TINFO 1 +#define HAVE_TONEZONE 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_TONEZONE_VERSION 80 _ACEOF fi - elif test ! -z "${TINFO_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${TINFO_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${TINFO_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${TINFO_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${TINFO_OPTION}" >&6;} - exit 1 fi fi -if test "${host_os}" != "linux-gnu" ; then - tonezone_extra="-lm" -fi - -if test "${USE_TONEZONE}" != "no"; then - pbxlibdir="" - if test "x${TONEZONE_DIR}" != "x"; then - if test -d ${TONEZONE_DIR}/lib; then - pbxlibdir="-L${TONEZONE_DIR}/lib" +if test "x${PBX_VORBIS}" != "x1" -a "${USE_VORBIS}" != "no"; then + pbxlibdir="" + if test "x${VORBIS_DIR}" != "x"; then + if test -d ${VORBIS_DIR}/lib; then + pbxlibdir="-L${VORBIS_DIR}/lib" else - pbxlibdir="-L${TONEZONE_DIR}" + pbxlibdir="-L${VORBIS_DIR}" fi fi - { echo "$as_me:$LINENO: checking for tone_zone_find in -ltonezone" >&5 -echo $ECHO_N "checking for tone_zone_find in -ltonezone... $ECHO_C" >&6; } -if test "${ac_cv_lib_tonezone_tone_zone_find+set}" = set; then + pbxfuncname="vorbis_info_init" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_VORBIS_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_vorbis_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lvorbis" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lvorbis... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ltonezone ${pbxlibdir} ${tonezone_extra} $LIBS" +LIBS="-lvorbis ${pbxlibdir} -lm -lvorbisenc $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -29502,11 +30704,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char tone_zone_find (); +char ${pbxfuncname} (); int main () { -return tone_zone_find (); +return ${pbxfuncname} (); ; return 0; } @@ -29545,38 +30747,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_tonezone_tone_zone_find=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_tonezone_tone_zone_find=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_tonezone_tone_zone_find" >&5 -echo "${ECHO_T}$ac_cv_lib_tonezone_tone_zone_find" >&6; } -if test $ac_cv_lib_tonezone_tone_zone_find = yes; then - AST_TONEZONE_FOUND=yes +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_VORBIS_FOUND=yes else - AST_TONEZONE_FOUND=no + AST_VORBIS_FOUND=no fi + fi - if test "${AST_TONEZONE_FOUND}" = "yes"; then - TONEZONE_LIB="-ltonezone ${tonezone_extra}" - TONEZONE_HEADER_FOUND="1" - if test "x${TONEZONE_DIR}" != "x"; then - TONEZONE_LIB="${pbxlibdir} ${TONEZONE_LIB}" - TONEZONE_INCLUDE="-I${TONEZONE_DIR}/include" - if test "xzaptel/tonezone.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${TONEZONE_DIR}/include/zaptel/tonezone.h" | $as_tr_sh` + if test "${AST_VORBIS_FOUND}" = "yes"; then + VORBIS_LIB="-lvorbis -lm -lvorbisenc" + VORBIS_HEADER_FOUND="1" + if test "x${VORBIS_DIR}" != "x"; then + VORBIS_LIB="${pbxlibdir} ${VORBIS_LIB}" + VORBIS_INCLUDE="-I${VORBIS_DIR}/include" + if test "xvorbis/codec.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${VORBIS_DIR}/include/vorbis/codec.h" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${TONEZONE_DIR}/include/zaptel/tonezone.h" >&5 -echo $ECHO_N "checking for ${TONEZONE_DIR}/include/zaptel/tonezone.h... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for ${VORBIS_DIR}/include/vorbis/codec.h" >&5 +echo $ECHO_N "checking for ${VORBIS_DIR}/include/vorbis/codec.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi @@ -29585,8 +30789,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'` echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${TONEZONE_DIR}/include/zaptel/tonezone.h usability" >&5 -echo $ECHO_N "checking ${TONEZONE_DIR}/include/zaptel/tonezone.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${VORBIS_DIR}/include/vorbis/codec.h usability" >&5 +echo $ECHO_N "checking ${VORBIS_DIR}/include/vorbis/codec.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -29594,7 +30798,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <${TONEZONE_DIR}/include/zaptel/tonezone.h> +#include <${VORBIS_DIR}/include/vorbis/codec.h> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -29643,15 +30847,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking ${TONEZONE_DIR}/include/zaptel/tonezone.h presence" >&5 -echo $ECHO_N "checking ${TONEZONE_DIR}/include/zaptel/tonezone.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${VORBIS_DIR}/include/vorbis/codec.h presence" >&5 +echo $ECHO_N "checking ${VORBIS_DIR}/include/vorbis/codec.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <${TONEZONE_DIR}/include/zaptel/tonezone.h> +#include <${VORBIS_DIR}/include/vorbis/codec.h> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -29691,30 +30895,30 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${TONEZONE_DIR}/include/zaptel/tonezone.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for ${TONEZONE_DIR}/include/zaptel/tonezone.h" >&5 -echo $ECHO_N "checking for ${TONEZONE_DIR}/include/zaptel/tonezone.h... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for ${VORBIS_DIR}/include/vorbis/codec.h" >&5 +echo $ECHO_N "checking for ${VORBIS_DIR}/include/vorbis/codec.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -29726,27 +30930,27 @@ echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - TONEZONE_HEADER_FOUND=1 + VORBIS_HEADER_FOUND=1 else - TONEZONE_HEADER_FOUND=0 + VORBIS_HEADER_FOUND=0 fi fi else - if test "xzaptel/tonezone.h" != "x" ; then - if test "${ac_cv_header_zaptel_tonezone_h+set}" = set; then - { echo "$as_me:$LINENO: checking for zaptel/tonezone.h" >&5 -echo $ECHO_N "checking for zaptel/tonezone.h... $ECHO_C" >&6; } -if test "${ac_cv_header_zaptel_tonezone_h+set}" = set; then + if test "xvorbis/codec.h" != "x" ; then + if test "${ac_cv_header_vorbis_codec_h+set}" = set; then + { echo "$as_me:$LINENO: checking for vorbis/codec.h" >&5 +echo $ECHO_N "checking for vorbis/codec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_vorbis_codec_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_tonezone_h" >&5 -echo "${ECHO_T}$ac_cv_header_zaptel_tonezone_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_vorbis_codec_h" >&5 +echo "${ECHO_T}$ac_cv_header_vorbis_codec_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking zaptel/tonezone.h usability" >&5 -echo $ECHO_N "checking zaptel/tonezone.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking vorbis/codec.h usability" >&5 +echo $ECHO_N "checking vorbis/codec.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -29754,7 +30958,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -29803,15 +31007,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking zaptel/tonezone.h presence" >&5 -echo $ECHO_N "checking zaptel/tonezone.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking vorbis/codec.h presence" >&5 +echo $ECHO_N "checking vorbis/codec.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -29851,104 +31055,208 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: zaptel/tonezone.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: zaptel/tonezone.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: vorbis/codec.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: zaptel/tonezone.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: zaptel/tonezone.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: zaptel/tonezone.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: zaptel/tonezone.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: zaptel/tonezone.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: zaptel/tonezone.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: zaptel/tonezone.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: vorbis/codec.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: vorbis/codec.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: vorbis/codec.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: vorbis/codec.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: vorbis/codec.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for zaptel/tonezone.h" >&5 -echo $ECHO_N "checking for zaptel/tonezone.h... $ECHO_C" >&6; } -if test "${ac_cv_header_zaptel_tonezone_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for vorbis/codec.h" >&5 +echo $ECHO_N "checking for vorbis/codec.h... $ECHO_C" >&6; } +if test "${ac_cv_header_vorbis_codec_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_zaptel_tonezone_h=$ac_header_preproc + ac_cv_header_vorbis_codec_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_tonezone_h" >&5 -echo "${ECHO_T}$ac_cv_header_zaptel_tonezone_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_vorbis_codec_h" >&5 +echo "${ECHO_T}$ac_cv_header_vorbis_codec_h" >&6; } + +fi +if test $ac_cv_header_vorbis_codec_h = yes; then + VORBIS_HEADER_FOUND=1 +else + VORBIS_HEADER_FOUND=0 +fi + + + fi + fi + if test "x${VORBIS_HEADER_FOUND}" = "x0" ; then + VORBIS_LIB="" + VORBIS_INCLUDE="" + else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + VORBIS_LIB="" + fi + PBX_VORBIS=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED + +cat >>confdefs.h <<_ACEOF +#define HAVE_VORBIS 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_VORBIS_VERSION +_ACEOF + + fi + fi +fi + + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +if test "${USE_VPB}" != "no"; then + { echo "$as_me:$LINENO: checking for vpb_open in -lvpb" >&5 +echo $ECHO_N "checking for vpb_open in -lvpb... $ECHO_C" >&6; } + saved_libs="${LIBS}" + saved_cppflags="${CPPFLAGS}" + if test "x${VPB_DIR}" != "x"; then + if test -d ${VPB_DIR}/lib; then + vpblibdir=${VPB_DIR}/lib + else + vpblibdir=${VPB_DIR} + fi + LIBS="${LIBS} -L${vpblibdir}" + CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include" + fi + LIBS="${LIBS} -lvpb -lpthread" + cat >conftest.$ac_ext <<_ACEOF + + /* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +int q = vpb_open(0,0); + ; + return 0; +} + +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + ac_cv_lib_vpb_vpb_open="yes" -fi -if test $ac_cv_header_zaptel_tonezone_h = yes; then - TONEZONE_HEADER_FOUND=1 else - TONEZONE_HEADER_FOUND=0 -fi + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + ac_cv_lib_vpb_vpb_open="no" - fi - fi - if test "x${TONEZONE_HEADER_FOUND}" = "x0" ; then - if test ! -z "${TONEZONE_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the tonezone development package installed." >&5 -echo "$as_me: *** It appears that you do not have the tonezone development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${TONEZONE_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${TONEZONE_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${TONEZONE_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${TONEZONE_OPTION}" >&6;} - exit 1 - fi - TONEZONE_LIB="" - TONEZONE_INCLUDE="" - PBX_TONEZONE=0 - else - PBX_TONEZONE=1 -cat >>confdefs.h <<_ACEOF -#define HAVE_TONEZONE 1 +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS="${saved_libs}" + CPPFLAGS="${saved_cppflags}" + if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then + VPB_LIB="-lvpb" + if test "${VPB_DIR}" != ""; then + VPB_LIB="-L${vpblibdir} ${VPB_LIB}" + VPB_INCLUDE="-I${VPB_DIR}/include" + fi + PBX_VPB=1 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_VPB 1 _ACEOF - fi - elif test ! -z "${TONEZONE_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${TONEZONE_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${TONEZONE_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${TONEZONE_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${TONEZONE_OPTION}" >&6;} - exit 1 fi fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + -if test "${USE_VORBIS}" != "no"; then +if test "x${PBX_ZLIB}" != "x1" -a "${USE_ZLIB}" != "no"; then pbxlibdir="" - if test "x${VORBIS_DIR}" != "x"; then - if test -d ${VORBIS_DIR}/lib; then - pbxlibdir="-L${VORBIS_DIR}/lib" + if test "x${ZLIB_DIR}" != "x"; then + if test -d ${ZLIB_DIR}/lib; then + pbxlibdir="-L${ZLIB_DIR}/lib" else - pbxlibdir="-L${VORBIS_DIR}" + pbxlibdir="-L${ZLIB_DIR}" fi fi - { echo "$as_me:$LINENO: checking for vorbis_info_init in -lvorbis" >&5 -echo $ECHO_N "checking for vorbis_info_init in -lvorbis... $ECHO_C" >&6; } -if test "${ac_cv_lib_vorbis_vorbis_info_init+set}" = set; then + pbxfuncname="compress" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_ZLIB_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_z_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lz" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lz... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lvorbis ${pbxlibdir} -lm -lvorbisenc $LIBS" +LIBS="-lz ${pbxlibdir} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -29962,11 +31270,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char vorbis_info_init (); +char ${pbxfuncname} (); int main () { -return vorbis_info_init (); +return ${pbxfuncname} (); ; return 0; } @@ -30005,38 +31313,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_vorbis_vorbis_info_init=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_vorbis_vorbis_info_init=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_vorbis_vorbis_info_init" >&5 -echo "${ECHO_T}$ac_cv_lib_vorbis_vorbis_info_init" >&6; } -if test $ac_cv_lib_vorbis_vorbis_info_init = yes; then - AST_VORBIS_FOUND=yes +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_ZLIB_FOUND=yes else - AST_VORBIS_FOUND=no + AST_ZLIB_FOUND=no fi + fi - if test "${AST_VORBIS_FOUND}" = "yes"; then - VORBIS_LIB="-lvorbis -lm -lvorbisenc" - VORBIS_HEADER_FOUND="1" - if test "x${VORBIS_DIR}" != "x"; then - VORBIS_LIB="${pbxlibdir} ${VORBIS_LIB}" - VORBIS_INCLUDE="-I${VORBIS_DIR}/include" - if test "xvorbis/codec.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${VORBIS_DIR}/include/vorbis/codec.h" | $as_tr_sh` + if test "${AST_ZLIB_FOUND}" = "yes"; then + ZLIB_LIB="-lz " + ZLIB_HEADER_FOUND="1" + if test "x${ZLIB_DIR}" != "x"; then + ZLIB_LIB="${pbxlibdir} ${ZLIB_LIB}" + ZLIB_INCLUDE="-I${ZLIB_DIR}/include" + if test "xzlib.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${ZLIB_DIR}/include/zlib.h" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${VORBIS_DIR}/include/vorbis/codec.h" >&5 -echo $ECHO_N "checking for ${VORBIS_DIR}/include/vorbis/codec.h... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for ${ZLIB_DIR}/include/zlib.h" >&5 +echo $ECHO_N "checking for ${ZLIB_DIR}/include/zlib.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi @@ -30045,8 +31355,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'` echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${VORBIS_DIR}/include/vorbis/codec.h usability" >&5 -echo $ECHO_N "checking ${VORBIS_DIR}/include/vorbis/codec.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${ZLIB_DIR}/include/zlib.h usability" >&5 +echo $ECHO_N "checking ${ZLIB_DIR}/include/zlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -30054,7 +31364,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <${VORBIS_DIR}/include/vorbis/codec.h> +#include <${ZLIB_DIR}/include/zlib.h> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -30103,15 +31413,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking ${VORBIS_DIR}/include/vorbis/codec.h presence" >&5 -echo $ECHO_N "checking ${VORBIS_DIR}/include/vorbis/codec.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${ZLIB_DIR}/include/zlib.h presence" >&5 +echo $ECHO_N "checking ${ZLIB_DIR}/include/zlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <${VORBIS_DIR}/include/vorbis/codec.h> +#include <${ZLIB_DIR}/include/zlib.h> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -30151,30 +31461,30 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${VORBIS_DIR}/include/vorbis/codec.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for ${VORBIS_DIR}/include/vorbis/codec.h" >&5 -echo $ECHO_N "checking for ${VORBIS_DIR}/include/vorbis/codec.h... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for ${ZLIB_DIR}/include/zlib.h" >&5 +echo $ECHO_N "checking for ${ZLIB_DIR}/include/zlib.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -30186,27 +31496,27 @@ echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - VORBIS_HEADER_FOUND=1 + ZLIB_HEADER_FOUND=1 else - VORBIS_HEADER_FOUND=0 + ZLIB_HEADER_FOUND=0 fi fi else - if test "xvorbis/codec.h" != "x" ; then - if test "${ac_cv_header_vorbis_codec_h+set}" = set; then - { echo "$as_me:$LINENO: checking for vorbis/codec.h" >&5 -echo $ECHO_N "checking for vorbis/codec.h... $ECHO_C" >&6; } -if test "${ac_cv_header_vorbis_codec_h+set}" = set; then + if test "xzlib.h" != "x" ; then + if test "${ac_cv_header_zlib_h+set}" = set; then + { echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_vorbis_codec_h" >&5 -echo "${ECHO_T}$ac_cv_header_vorbis_codec_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking vorbis/codec.h usability" >&5 -echo $ECHO_N "checking vorbis/codec.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -30214,7 +31524,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -30263,15 +31573,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking vorbis/codec.h presence" >&5 -echo $ECHO_N "checking vorbis/codec.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -30311,141 +31621,113 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: vorbis/codec.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: vorbis/codec.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: vorbis/codec.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: vorbis/codec.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: vorbis/codec.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: vorbis/codec.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: vorbis/codec.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: vorbis/codec.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: vorbis/codec.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for vorbis/codec.h" >&5 -echo $ECHO_N "checking for vorbis/codec.h... $ECHO_C" >&6; } -if test "${ac_cv_header_vorbis_codec_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zlib_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_vorbis_codec_h=$ac_header_preproc + ac_cv_header_zlib_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_vorbis_codec_h" >&5 -echo "${ECHO_T}$ac_cv_header_vorbis_codec_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } fi -if test $ac_cv_header_vorbis_codec_h = yes; then - VORBIS_HEADER_FOUND=1 +if test $ac_cv_header_zlib_h = yes; then + ZLIB_HEADER_FOUND=1 else - VORBIS_HEADER_FOUND=0 + ZLIB_HEADER_FOUND=0 fi fi fi - if test "x${VORBIS_HEADER_FOUND}" = "x0" ; then - if test ! -z "${VORBIS_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the vorbis development package installed." >&5 -echo "$as_me: *** It appears that you do not have the vorbis development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${VORBIS_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${VORBIS_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${VORBIS_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${VORBIS_OPTION}" >&6;} - exit 1 - fi - VORBIS_LIB="" - VORBIS_INCLUDE="" - PBX_VORBIS=0 + if test "x${ZLIB_HEADER_FOUND}" = "x0" ; then + ZLIB_LIB="" + ZLIB_INCLUDE="" else - PBX_VORBIS=1 + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + ZLIB_LIB="" + fi + PBX_ZLIB=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF -#define HAVE_VORBIS 1 +#define HAVE_ZLIB 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_ZLIB_VERSION _ACEOF fi - elif test ! -z "${VORBIS_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${VORBIS_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${VORBIS_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${VORBIS_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${VORBIS_OPTION}" >&6;} - exit 1 - fi -fi - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - -if test "${USE_VPB}" != "no"; then - { echo "$as_me:$LINENO: checking for vpb_open in -lvpb" >&5 -echo $ECHO_N "checking for vpb_open in -lvpb... $ECHO_C" >&6; } - saved_libs="${LIBS}" - saved_cppflags="${CPPFLAGS}" - if test "x${VPB_DIR}" != "x"; then - if test -d ${VPB_DIR}/lib; then - vpblibdir=${VPB_DIR}/lib - else - vpblibdir=${VPB_DIR} - fi - LIBS="${LIBS} -L${vpblibdir}" - CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include" fi - LIBS="${LIBS} -lvpb -lpthread" - cat >conftest.$ac_ext <<_ACEOF +fi - /* confdefs.h. */ + +# check for zaptel 1.4.0 + + if test "x${PBX_ZAPTEL}" != "x1" -a "${USE_ZAPTEL}" != "no"; then + { echo "$as_me:$LINENO: checking for ZT_TONE_DTMF_BASE in zaptel/zaptel.h" >&5 +echo $ECHO_N "checking for ZT_TONE_DTMF_BASE in zaptel/zaptel.h... $ECHO_C" >&6; } + saved_cppflags="${CPPFLAGS}" + if test "x${ZAPTEL_DIR}" != "x"; then + ZAPTEL_INCLUDE= "-I${ZAPTEL_DIR}/include" + fi + CPPFLAGS="${CPPFLAGS} ${ZAPTEL_INCLUDE}" + + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { -int q = vpb_open(0,0); +int foo = ZT_TONE_DTMF_BASE; ; return 0; } - _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -30455,7 +31737,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -s conftest.$ac_objext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; @@ -30465,74 +31747,56 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: yes" >&5 + { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } - ac_cv_lib_vpb_vpb_open="yes" + PBX_ZAPTEL=1 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZAPTEL 1 +_ACEOF - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ac_cv_lib_vpb_vpb_open="no" +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZAPTEL_VERSION 140 +_ACEOF -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="${saved_libs}" - CPPFLAGS="${saved_cppflags}" - if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then - VPB_LIB="-lvpb" - if test "${VPB_DIR}" != ""; then - VPB_LIB="-L${vpblibdir} ${VPB_LIB}" - VPB_INCLUDE="-I${VPB_DIR}/include" - fi - PBX_VPB=1 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<\_ACEOF -#define HAVE_VPB 1 -_ACEOF + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } - elif test ! -z "${VPB_MANDATORY}"; then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The VoiceTronix (vpb) installation on this system appears to be broken." >&5 -echo "$as_me: *** The VoiceTronix (vpb) installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** including --without-vpb." >&5 -echo "$as_me: *** including --without-vpb." >&6;} - exit 1 - fi fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CPPFLAGS="${saved_cppflags}" + fi +# or, try old zaptel (0.80 or so) -if test "${USE_ZLIB}" != "no"; then +if test "x${PBX_ZAPTEL}" != "x1" -a "${USE_ZAPTEL}" != "no"; then pbxlibdir="" - if test "x${ZLIB_DIR}" != "x"; then - if test -d ${ZLIB_DIR}/lib; then - pbxlibdir="-L${ZLIB_DIR}/lib" + if test "x${ZAPTEL_DIR}" != "x"; then + if test -d ${ZAPTEL_DIR}/lib; then + pbxlibdir="-L${ZAPTEL_DIR}/lib" else - pbxlibdir="-L${ZLIB_DIR}" + pbxlibdir="-L${ZAPTEL_DIR}" fi fi - { echo "$as_me:$LINENO: checking for compress in -lz" >&5 -echo $ECHO_N "checking for compress in -lz... $ECHO_C" >&6; } -if test "${ac_cv_lib_z_compress+set}" = set; then + pbxfuncname="" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_ZAPTEL_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_zaptel_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lzaptel" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -lzaptel... $ECHO_C" >&6; } +if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lz ${pbxlibdir} $LIBS" +LIBS="-lzaptel ${pbxlibdir} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -30546,11 +31810,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char compress (); +char ${pbxfuncname} (); int main () { -return compress (); +return ${pbxfuncname} (); ; return 0; } @@ -30589,38 +31853,40 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_z_compress=yes + eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_z_compress=no + eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress" >&5 -echo "${ECHO_T}$ac_cv_lib_z_compress" >&6; } -if test $ac_cv_lib_z_compress = yes; then - AST_ZLIB_FOUND=yes +ac_res=`eval echo '${'$as_ac_Lib'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +if test `eval echo '${'$as_ac_Lib'}'` = yes; then + AST_ZAPTEL_FOUND=yes else - AST_ZLIB_FOUND=no + AST_ZAPTEL_FOUND=no fi + fi - if test "${AST_ZLIB_FOUND}" = "yes"; then - ZLIB_LIB="-lz " - ZLIB_HEADER_FOUND="1" - if test "x${ZLIB_DIR}" != "x"; then - ZLIB_LIB="${pbxlibdir} ${ZLIB_LIB}" - ZLIB_INCLUDE="-I${ZLIB_DIR}/include" - if test "xzlib.h" != "x" ; then - as_ac_Header=`echo "ac_cv_header_${ZLIB_DIR}/include/zlib.h" | $as_tr_sh` + if test "${AST_ZAPTEL_FOUND}" = "yes"; then + ZAPTEL_LIB="-lzaptel " + ZAPTEL_HEADER_FOUND="1" + if test "x${ZAPTEL_DIR}" != "x"; then + ZAPTEL_LIB="${pbxlibdir} ${ZAPTEL_LIB}" + ZAPTEL_INCLUDE="-I${ZAPTEL_DIR}/include" + if test "xzaptel.h" != "x" ; then + as_ac_Header=`echo "ac_cv_header_${ZAPTEL_DIR}/include/zaptel.h" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for ${ZLIB_DIR}/include/zlib.h" >&5 -echo $ECHO_N "checking for ${ZLIB_DIR}/include/zlib.h... $ECHO_C" >&6; } + { echo "$as_me:$LINENO: checking for ${ZAPTEL_DIR}/include/zaptel.h" >&5 +echo $ECHO_N "checking for ${ZAPTEL_DIR}/include/zaptel.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi @@ -30629,8 +31895,8 @@ ac_res=`eval echo '${'$as_ac_Header'}'` echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking ${ZLIB_DIR}/include/zlib.h usability" >&5 -echo $ECHO_N "checking ${ZLIB_DIR}/include/zlib.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${ZAPTEL_DIR}/include/zaptel.h usability" >&5 +echo $ECHO_N "checking ${ZAPTEL_DIR}/include/zaptel.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -30638,7 +31904,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <${ZLIB_DIR}/include/zlib.h> +#include <${ZAPTEL_DIR}/include/zaptel.h> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -30687,15 +31953,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking ${ZLIB_DIR}/include/zlib.h presence" >&5 -echo $ECHO_N "checking ${ZLIB_DIR}/include/zlib.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking ${ZAPTEL_DIR}/include/zaptel.h presence" >&5 +echo $ECHO_N "checking ${ZAPTEL_DIR}/include/zaptel.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <${ZLIB_DIR}/include/zlib.h> +#include <${ZAPTEL_DIR}/include/zaptel.h> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -30735,30 +32001,30 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: ${ZLIB_DIR}/include/zlib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: ${ZLIB_DIR}/include/zlib.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: ${ZAPTEL_DIR}/include/zaptel.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for ${ZLIB_DIR}/include/zlib.h" >&5 -echo $ECHO_N "checking for ${ZLIB_DIR}/include/zlib.h... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for ${ZAPTEL_DIR}/include/zaptel.h" >&5 +echo $ECHO_N "checking for ${ZAPTEL_DIR}/include/zaptel.h... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else @@ -30770,27 +32036,27 @@ echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then - ZLIB_HEADER_FOUND=1 + ZAPTEL_HEADER_FOUND=1 else - ZLIB_HEADER_FOUND=0 + ZAPTEL_HEADER_FOUND=0 fi fi else - if test "xzlib.h" != "x" ; then - if test "${ac_cv_header_zlib_h+set}" = set; then - { echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_zlib_h+set}" = set; then + if test "xzaptel.h" != "x" ; then + if test "${ac_cv_header_zaptel_h+set}" = set; then + { echo "$as_me:$LINENO: checking for zaptel.h" >&5 +echo $ECHO_N "checking for zaptel.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zaptel_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_h" >&5 +echo "${ECHO_T}$ac_cv_header_zaptel_h" >&6; } else # Is the header compilable? -{ echo "$as_me:$LINENO: checking zlib.h usability" >&5 -echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking zaptel.h usability" >&5 +echo $ECHO_N "checking zaptel.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -30798,7 +32064,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" @@ -30847,15 +32113,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? -{ echo "$as_me:$LINENO: checking zlib.h presence" >&5 -echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking zaptel.h presence" >&5 +echo $ECHO_N "checking zaptel.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in @@ -30895,186 +32161,72 @@ echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: zaptel.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: zaptel.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: zaptel.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: zaptel.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: zaptel.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: zaptel.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: zaptel.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zaptel.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: zaptel.h: in the future, the compiler will take precedence" >&2;} ;; esac -{ echo "$as_me:$LINENO: checking for zlib.h" >&5 -echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; } -if test "${ac_cv_header_zlib_h+set}" = set; then +{ echo "$as_me:$LINENO: checking for zaptel.h" >&5 +echo $ECHO_N "checking for zaptel.h... $ECHO_C" >&6; } +if test "${ac_cv_header_zaptel_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_cv_header_zlib_h=$ac_header_preproc + ac_cv_header_zaptel_h=$ac_header_preproc fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; } +{ echo "$as_me:$LINENO: result: $ac_cv_header_zaptel_h" >&5 +echo "${ECHO_T}$ac_cv_header_zaptel_h" >&6; } fi -if test $ac_cv_header_zlib_h = yes; then - ZLIB_HEADER_FOUND=1 +if test $ac_cv_header_zaptel_h = yes; then + ZAPTEL_HEADER_FOUND=1 else - ZLIB_HEADER_FOUND=0 + ZAPTEL_HEADER_FOUND=0 fi fi fi - if test "x${ZLIB_HEADER_FOUND}" = "x0" ; then - if test ! -z "${ZLIB_MANDATORY}" ; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** It appears that you do not have the z development package installed." >&5 -echo "$as_me: *** It appears that you do not have the z development package installed." >&6;} - { echo "$as_me:$LINENO: *** Please install it to include ${ZLIB_DESCRIP} support" >&5 -echo "$as_me: *** Please install it to include ${ZLIB_DESCRIP} support" >&or re-run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${ZLIB_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${ZLIB_OPTION}" >&6;} - exit 1 - fi - ZLIB_LIB="" - ZLIB_INCLUDE="" - PBX_ZLIB=0 + if test "x${ZAPTEL_HEADER_FOUND}" = "x0" ; then + ZAPTEL_LIB="" + ZAPTEL_INCLUDE="" else - PBX_ZLIB=1 + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + ZAPTEL_LIB="" + fi + PBX_ZAPTEL=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED cat >>confdefs.h <<_ACEOF -#define HAVE_ZLIB 1 -_ACEOF - - fi - elif test ! -z "${ZLIB_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The ${ZLIB_DESCRIP} installation on this system appears to be broken." >&5 -echo "$as_me: *** The ${ZLIB_DESCRIP} installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** without explicitly specifying --with-${ZLIB_OPTION}" >&5 -echo "$as_me: *** without explicitly specifying --with-${ZLIB_OPTION}" >&6;} - exit 1 - fi -fi - - -if test "${USE_ZAPTEL}" != "no"; then - { echo "$as_me:$LINENO: checking for ZT_TONE_DTMF_BASE in zaptel.h" >&5 -echo $ECHO_N "checking for ZT_TONE_DTMF_BASE in zaptel.h... $ECHO_C" >&6; } - saved_cppflags="${CPPFLAGS}" - if test "x${ZAPTEL_DIR}" != "x"; then - CPPFLAGS="${CPPFLAGS} -I${ZAPTEL_DIR}/include" - fi - cat >conftest.$ac_ext <<_ACEOF - - /* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -int foo = ZT_TONE_DTMF_BASE; - ; - return 0; -} - +#define HAVE_ZAPTEL 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - ac_cv_zaptel_h="yes" - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } - ac_cv_zaptel_h="no" - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS="${saved_cppflags}" - if test "${ac_cv_zaptel_h}" = "yes"; then - if test "${ZAPTEL_DIR}" != ""; then - ZAPTEL_INCLUDE="-I${ZAPTEL_DIR}/include" - fi - PBX_ZAPTEL=1 -cat >>confdefs.h <<\_ACEOF -#define HAVE_ZAPTEL 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_ZAPTEL_VERSION 80 _ACEOF - elif test ! -z "${ZAPTEL_MANDATORY}"; - then - { echo "$as_me:$LINENO: ***" >&5 -echo "$as_me: ***" >&6;} - { echo "$as_me:$LINENO: *** The Zaptel installation on this system appears to be broken." >&5 -echo "$as_me: *** The Zaptel installation on this system appears to be broken." >&6;} - { echo "$as_me:$LINENO: *** Either correct the installation" >&5 -echo "$as_me: *** Either correct the installation" >&or run configure;} - { echo "$as_me:$LINENO: *** including --without-zaptel." >&5 -echo "$as_me: *** including --without-zaptel." >&6;} - exit 1 + fi fi fi + EDITLINE_LIB="" if test "x$TERMCAP_LIB" != "x" ; then EDITLINE_LIB="$TERMCAP_LIB" @@ -31568,6 +32720,33 @@ fi ac_config_files="$ac_config_files build_tools/menuselect-deps makeopts channels/h323/Makefile" + + { echo "$as_me:$LINENO: checking for mandatory modules: ${ac_mandatory_list}" >&5 +echo $ECHO_N "checking for mandatory modules: ${ac_mandatory_list}... $ECHO_C" >&6; } + err=0; + for i in ${ac_mandatory_list}; do + eval "a=\${PBX_$i}" + if test "x${a}" = "x1" ; then continue; fi + if test ${err} = "0" ; then { echo "$as_me:$LINENO: result: fail" >&5 +echo "${ECHO_T}fail" >&6; } ; fi + { echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6; } + eval "a=\${${i}_OPTION}" + { echo "$as_me:$LINENO: ***" >&5 +echo "$as_me: ***" >&6;} + { echo "$as_me:$LINENO: *** The $i installation appears to be missing or broken." >&5 +echo "$as_me: *** The $i installation appears to be missing or broken." >&6;} + { echo "$as_me:$LINENO: *** Either correct the installation" >&5 +echo "$as_me: *** Either correct the installation" >&or run configure;} + { echo "$as_me:$LINENO: *** including --without-${a}." >&5 +echo "$as_me: *** including --without-${a}." >&6;} + err=1 + done + if test $err = 1 ; then exit 1; fi + { echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6; } + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in index d57315da69..0e84394b9f 100644 --- a/include/asterisk/autoconfig.h.in +++ b/include/asterisk/autoconfig.h.in @@ -31,9 +31,12 @@ */ #undef HAVE_ALLOCA_H -/* Define to indicate the ${ALSA_DESCRIP} library */ +/* Define this to indicate the ${ALSA_DESCRIP} library */ #undef HAVE_ALSA +/* Define to indicate the ${ALSA_DESCRIP} library version */ +#undef HAVE_ALSA_VERSION + /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H @@ -62,18 +65,24 @@ /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO -/* Define to indicate the ${CAP_DESCRIP} library */ +/* Define this to indicate the ${CAP_DESCRIP} library */ #undef HAVE_CAP +/* Define to indicate the ${CAP_DESCRIP} library version */ +#undef HAVE_CAP_VERSION + /* Define to 1 if your system has a working `chown' function. */ #undef HAVE_CHOWN /* Define if your system has the curl libraries. */ #undef HAVE_CURL -/* Define to indicate the ${CURSES_DESCRIP} library */ +/* Define this to indicate the ${CURSES_DESCRIP} library */ #undef HAVE_CURSES +/* Define to indicate the ${CURSES_DESCRIP} library version */ +#undef HAVE_CURSES_VERSION + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H @@ -96,9 +105,12 @@ /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK -/* Define to indicate the ${FREETDS_DESCRIP} library */ +/* Define this to indicate the ${FREETDS_DESCRIP} library */ #undef HAVE_FREETDS +/* Define to indicate the ${FREETDS_DESCRIP} library version */ +#undef HAVE_FREETDS_VERSION + /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #undef HAVE_FSEEKO @@ -126,18 +138,24 @@ /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY -/* Define to indicate the ${GNUTLS_DESCRIP} library */ +/* Define this to indicate the ${GNUTLS_DESCRIP} library */ #undef HAVE_GNUTLS +/* Define to indicate the ${GNUTLS_DESCRIP} library version */ +#undef HAVE_GNUTLS_VERSION + /* Define to indicate the GSM library */ #undef HAVE_GSM /* Define if your system has the GTK libraries. */ #undef HAVE_GTK -/* Define to indicate the ${IKSEMEL_DESCRIP} library */ +/* Define this to indicate the ${IKSEMEL_DESCRIP} library */ #undef HAVE_IKSEMEL +/* Define to indicate the ${IKSEMEL_DESCRIP} library version */ +#undef HAVE_IKSEMEL_VERSION + /* Define if your system has the UW IMAP Toolkit c-client library. */ #undef HAVE_IMAP_TK @@ -154,9 +172,12 @@ /* Define to 1 if you have the `isascii' function. */ #undef HAVE_ISASCII -/* Define to indicate the ${ISDNNET_DESCRIP} library */ +/* Define this to indicate the ${ISDNNET_DESCRIP} library */ #undef HAVE_ISDNNET +/* Define to indicate the ${ISDNNET_DESCRIP} library version */ +#undef HAVE_ISDNNET_VERSION + /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H @@ -187,9 +208,12 @@ /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET -/* Define to indicate the ${MISDN_DESCRIP} library */ +/* Define this to indicate the ${MISDN_DESCRIP} library */ #undef HAVE_MISDN +/* Define to indicate the ${MISDN_DESCRIP} library version */ +#undef HAVE_MISDN_VERSION + /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR @@ -199,12 +223,18 @@ /* Define to 1 if you have the `munmap' function. */ #undef HAVE_MUNMAP -/* Define to indicate the ${NBS_DESCRIP} library */ +/* Define this to indicate the ${NBS_DESCRIP} library */ #undef HAVE_NBS -/* Define to indicate the ${NCURSES_DESCRIP} library */ +/* Define to indicate the ${NBS_DESCRIP} library version */ +#undef HAVE_NBS_VERSION + +/* Define this to indicate the ${NCURSES_DESCRIP} library */ #undef HAVE_NCURSES +/* Define to indicate the ${NCURSES_DESCRIP} library version */ +#undef HAVE_NCURSES_VERSION + /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H @@ -217,39 +247,60 @@ /* Define to indicate the Net-SNMP library */ #undef HAVE_NETSNMP -/* Define to indicate the ${NEWT_DESCRIP} library */ +/* Define this to indicate the ${NEWT_DESCRIP} library */ #undef HAVE_NEWT -/* Define to indicate the ${OGG_DESCRIP} library */ +/* Define to indicate the ${NEWT_DESCRIP} library version */ +#undef HAVE_NEWT_VERSION + +/* Define this to indicate the ${OGG_DESCRIP} library */ #undef HAVE_OGG +/* Define to indicate the ${OGG_DESCRIP} library version */ +#undef HAVE_OGG_VERSION + /* Define if your system has the OpenH323 libraries. */ #undef HAVE_OPENH323 -/* Define to indicate the ${OPENSSL_DESCRIP} library */ +/* Define this to indicate the ${OPENSSL_DESCRIP} library */ #undef HAVE_OPENSSL -/* Define to indicate the ${OSPTK_DESCRIP} library */ +/* Define to indicate the ${OPENSSL_DESCRIP} library version */ +#undef HAVE_OPENSSL_VERSION + +/* Define this to indicate the ${OSPTK_DESCRIP} library */ #undef HAVE_OSPTK -/* Define to indicate the ${OSS_DESCRIP} library */ +/* Define to indicate the ${OSPTK_DESCRIP} library version */ +#undef HAVE_OSPTK_VERSION + +/* Define this to indicate the ${OSS_DESCRIP} library */ #undef HAVE_OSS +/* Define to indicate the ${OSS_DESCRIP} library version */ +#undef HAVE_OSS_VERSION + /* Define to 1 if OSX atomic operations are supported. */ #undef HAVE_OSX_ATOMICS /* Define to indicate the PostgreSQL library */ #undef HAVE_PGSQL -/* Define to indicate the ${POPT_DESCRIP} library */ +/* Define this to indicate the ${POPT_DESCRIP} library */ #undef HAVE_POPT +/* Define to indicate the ${POPT_DESCRIP} library version */ +#undef HAVE_POPT_VERSION + /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW -/* Define to indicate the ${PRI_DESCRIP} library */ +/* Define this to indicate the ${PRI_DESCRIP} library */ #undef HAVE_PRI +/* Define to indicate the ${PRI_DESCRIP} library version */ +#undef HAVE_PRI_VERSION + /* Define to 1 if the system has the type `ptrdiff_t'. */ #undef HAVE_PTRDIFF_T @@ -262,9 +313,12 @@ /* Define if your system has the Qt library */ #undef HAVE_QT -/* Define to indicate the ${RADIUS_DESCRIP} library */ +/* Define this to indicate the ${RADIUS_DESCRIP} library */ #undef HAVE_RADIUS +/* Define to indicate the ${RADIUS_DESCRIP} library version */ +#undef HAVE_RADIUS_VERSION + /* Define to 1 if you have the `regcomp' function. */ #undef HAVE_REGCOMP @@ -277,10 +331,12 @@ /* Define to 1 if you have the `rint' function. */ #undef HAVE_RINT -/* Define to 1 if your system has a dynamic linker that supports RTLD_NOLOAD. - */ +/* Define if your system has the RTLD_NOLOAD headers. */ #undef HAVE_RTLD_NOLOAD +/* Define RTLD_NOLOAD headers version */ +#undef HAVE_RTLD_NOLOAD_VERSION + /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT @@ -290,18 +346,27 @@ /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET -/* Define to indicate the ${SPEEX_DESCRIP} library */ +/* Define this to indicate the ${SPEEX_DESCRIP} library */ #undef HAVE_SPEEX -/* Define to indicate the ${SQLITE_DESCRIP} library */ +/* Define to indicate the ${SPEEX_DESCRIP} library version */ +#undef HAVE_SPEEX_VERSION + +/* Define this to indicate the ${SQLITE_DESCRIP} library */ #undef HAVE_SQLITE +/* Define to indicate the ${SQLITE_DESCRIP} library version */ +#undef HAVE_SQLITE_VERSION + /* Define to 1 if you have the `sqrt' function. */ #undef HAVE_SQRT -/* Define to indicate the ${SS7_DESCRIP} library */ +/* Define this to indicate the ${SS7_DESCRIP} library */ #undef HAVE_SS7 +/* Define to indicate the ${SS7_DESCRIP} library version */ +#undef HAVE_SS7_VERSION + /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG @@ -379,9 +444,12 @@ /* Define to 1 if `st_blksize' is member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE -/* Define to indicate the ${SUPPSERV_DESCRIP} library */ +/* Define this to indicate the ${SUPPSERV_DESCRIP} library */ #undef HAVE_SUPPSERV +/* Define to indicate the ${SUPPSERV_DESCRIP} library version */ +#undef HAVE_SUPPSERV_VERSION + /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H @@ -420,24 +488,36 @@ /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H -/* Define to indicate the ${TERMCAP_DESCRIP} library */ +/* Define this to indicate the ${TERMCAP_DESCRIP} library */ #undef HAVE_TERMCAP +/* Define to indicate the ${TERMCAP_DESCRIP} library version */ +#undef HAVE_TERMCAP_VERSION + /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H -/* Define to indicate the ${TINFO_DESCRIP} library */ +/* Define this to indicate the ${TINFO_DESCRIP} library */ #undef HAVE_TINFO -/* Define to indicate the ${TONEZONE_DESCRIP} library */ +/* Define to indicate the ${TINFO_DESCRIP} library version */ +#undef HAVE_TINFO_VERSION + +/* Define this to indicate the ${TONEZONE_DESCRIP} library */ #undef HAVE_TONEZONE +/* Define to indicate the ${TONEZONE_DESCRIP} library version */ +#undef HAVE_TONEZONE_VERSION + /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to indicate the ${UNIXODBC_DESCRIP} library */ +/* Define this to indicate the ${UNIXODBC_DESCRIP} library */ #undef HAVE_UNIXODBC +/* Define to indicate the ${UNIXODBC_DESCRIP} library version */ +#undef HAVE_UNIXODBC_VERSION + /* Define to 1 if you have the `unsetenv' function. */ #undef HAVE_UNSETENV @@ -459,9 +539,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H -/* Define to indicate the ${VORBIS_DESCRIP} library */ +/* Define this to indicate the ${VORBIS_DESCRIP} library */ #undef HAVE_VORBIS +/* Define to indicate the ${VORBIS_DESCRIP} library version */ +#undef HAVE_VORBIS_VERSION + /* Define if your system has the VoiceTronix API libraries. */ #undef HAVE_VPB @@ -474,12 +557,18 @@ /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK -/* Define if your system has the Zaptel headers. */ +/* Define this to indicate the ${ZAPTEL_DESCRIP} library */ #undef HAVE_ZAPTEL -/* Define to indicate the ${ZLIB_DESCRIP} library */ +/* Define to indicate the ${ZAPTEL_DESCRIP} library version */ +#undef HAVE_ZAPTEL_VERSION + +/* Define this to indicate the ${ZLIB_DESCRIP} library */ #undef HAVE_ZLIB +/* Define to indicate the ${ZLIB_DESCRIP} library version */ +#undef HAVE_ZLIB_VERSION + /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL