diff options
author | mvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-06 23:14:33 +0000 |
---|---|---|
committer | mvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-06 23:14:33 +0000 |
commit | 7c30763fbebea919470b9348ab9d665dc7197ad7 (patch) | |
tree | d501a880f6e900346f7e2c9a221913c855db439c /configure | |
parent | 99e4818e3c6e8bfc2f6c407ff388e68c117afa20 (diff) |
All ODBC parts can now use either unixodbc or iodbc.
This allows for the ODBC parts to work on OpenBSD as well.
99.99% of the work is done by seanbright (bow, bow) and I actually
did nothing but test and yell at him that it still didn't work :)
Thanks for helping out !
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146925 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 401 |
1 files changed, 354 insertions, 47 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 145771 . +# From configure.ac Revision: 146738 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for asterisk 1.6. # @@ -205,7 +205,7 @@ if as_func_ret_failure; then echo as_func_ret_failure succeeded. fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then +if (set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 @@ -409,7 +409,7 @@ if as_func_ret_failure; then echo as_func_ret_failure succeeded. fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then +if (set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 @@ -784,6 +784,10 @@ IMAP_TK_LIB IMAP_TK_INCLUDE IMAP_TK_DIR PBX_IMAP_TK +IODBC_LIB +IODBC_INCLUDE +IODBC_DIR +PBX_IODBC ISDNNET_LIB ISDNNET_INCLUDE ISDNNET_DIR @@ -824,10 +828,6 @@ NEWT_LIB NEWT_INCLUDE NEWT_DIR PBX_NEWT -UNIXODBC_LIB -UNIXODBC_INCLUDE -UNIXODBC_DIR -PBX_UNIXODBC OGG_LIB OGG_INCLUDE OGG_DIR @@ -932,6 +932,10 @@ TONEZONE_LIB TONEZONE_INCLUDE TONEZONE_DIR PBX_TONEZONE +UNIXODBC_LIB +UNIXODBC_INCLUDE +UNIXODBC_DIR +PBX_UNIXODBC USB_LIB USB_INCLUDE USB_DIR @@ -969,6 +973,7 @@ GSM_INTERNAL PBX_MISDN_FAC_RESULT PBX_MISDN_FAC_ERROR CONFIG_NETSNMP +PBX_ODBC PG_CONFIG PTLIB_CONFIG PWLIBDIR @@ -1606,6 +1611,7 @@ Optional Packages: --with-iconv=PATH use Iconv Library files in PATH --with-iksemel=PATH use Iksemel Jabber Library files in PATH --with-imap=PATH use UW IMAP Toolkit files in PATH + --with-iodbc=PATH use iODBC files in PATH --with-isdnnet=PATH use ISDN4Linux Library files in PATH --with-jack=PATH use Jack Audio Connection Kit files in PATH --with-ldap=PATH use OpenLDAP files in PATH @@ -1616,7 +1622,6 @@ Optional Packages: --with-ncurses=PATH use ncurses files in PATH --with-netsnmp=PATH use Net-SNMP files in PATH --with-newt=PATH use newt files in PATH - --with-odbc=PATH use unixODBC files in PATH --with-ogg=PATH use OGG files in PATH --with-osptk=PATH use OSP Toolkit files in PATH --with-oss=PATH use Open Sound System files in PATH @@ -1644,6 +1649,7 @@ Optional Packages: --with-termcap=PATH use Termcap files in PATH --with-tinfo=PATH use Term Info files in PATH --with-tonezone=PATH use tonezone files in PATH + --with-unixodbc=PATH use unixODBC files in PATH --with-usb=PATH use usb files in PATH --with-vorbis=PATH use Vorbis files in PATH --with-vpb=PATH use Voicetronix API files in PATH @@ -4047,7 +4053,7 @@ _ACEOF # note- does not work on FreeBSD case "${host_os}" in - freebsd*) + freebsd*|openbsd*) ac_default_prefix=/usr/local CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib @@ -6568,7 +6574,7 @@ else GNU_MAKE_VERSION_MINOR=0 ; for a in make gmake gnumake ; do if test -z "$a" ; then continue ; fi ; - if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then + if (sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then GNU_MAKE=$a ; GNU_MAKE_VERSION_MAJOR=`$GNU_MAKE --version | grep "GNU Make" | cut -f3 -d' ' | cut -f1 -d'.'` GNU_MAKE_VERSION_MINOR=`$GNU_MAKE --version | grep "GNU Make" | cut -f2 -d'.' | cut -c1-2` @@ -8355,6 +8361,34 @@ fi + IODBC_DESCRIP="iODBC" + IODBC_OPTION="iodbc" + +# Check whether --with-iodbc was given. +if test "${with_iodbc+set}" = set; then + withval=$with_iodbc; + case ${withval} in + n|no) + USE_IODBC=no + ;; + y|ye|yes) + ac_mandatory_list="${ac_mandatory_list} IODBC" + ;; + *) + IODBC_DIR="${withval}" + ac_mandatory_list="${ac_mandatory_list} IODBC" + ;; + esac + +fi + + PBX_IODBC=0 + + + + + + ISDNNET_DESCRIP="ISDN4Linux Library" ISDNNET_OPTION="isdnnet" @@ -8635,34 +8669,6 @@ fi - UNIXODBC_DESCRIP="unixODBC" - UNIXODBC_OPTION="odbc" - -# Check whether --with-odbc was given. -if test "${with_odbc+set}" = set; then - withval=$with_odbc; - case ${withval} in - n|no) - USE_UNIXODBC=no - ;; - y|ye|yes) - ac_mandatory_list="${ac_mandatory_list} UNIXODBC" - ;; - *) - UNIXODBC_DIR="${withval}" - ac_mandatory_list="${ac_mandatory_list} UNIXODBC" - ;; - esac - -fi - - PBX_UNIXODBC=0 - - - - - - OGG_DESCRIP="OGG" OGG_OPTION="ogg" @@ -9391,6 +9397,34 @@ fi + UNIXODBC_DESCRIP="unixODBC" + UNIXODBC_OPTION="unixodbc" + +# Check whether --with-unixodbc was given. +if test "${with_unixodbc+set}" = set; then + withval=$with_unixodbc; + case ${withval} in + n|no) + USE_UNIXODBC=no + ;; + y|ye|yes) + ac_mandatory_list="${ac_mandatory_list} UNIXODBC" + ;; + *) + UNIXODBC_DIR="${withval}" + ac_mandatory_list="${ac_mandatory_list} UNIXODBC" + ;; + esac + +fi + + PBX_UNIXODBC=0 + + + + + + USB_DESCRIP="usb" USB_OPTION="usb" @@ -33347,6 +33381,268 @@ echo "${ECHO_T}no" >&6; } fi +if test "x${PBX_IODBC}" != "x1" -a "${USE_IODBC}" != "no"; then + pbxlibdir="" + # if --with-IODBC=DIR has been specified, use it. + if test "x${IODBC_DIR}" != "x"; then + if test -d ${IODBC_DIR}/lib; then + pbxlibdir="-L${IODBC_DIR}/lib" + else + pbxlibdir="-L${IODBC_DIR}" + fi + fi + pbxfuncname="SQLConnect" + if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers + AST_IODBC_FOUND=yes + else + as_ac_Lib=`echo "ac_cv_lib_iodbc_${pbxfuncname}" | $as_tr_sh` +{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -liodbc" >&5 +echo $ECHO_N "checking for ${pbxfuncname} in -liodbc... $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="-liodbc ${pbxlibdir} -lpthread $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); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; 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_IODBC_FOUND=yes +else + AST_IODBC_FOUND=no +fi + + fi + + # now check for the header. + if test "${AST_IODBC_FOUND}" = "yes"; then + IODBC_LIB="${pbxlibdir} -liodbc -lpthread" + # if --with-IODBC=DIR has been specified, use it. + if test "x${IODBC_DIR}" != "x"; then + IODBC_INCLUDE="-I${IODBC_DIR}/include" + fi + IODBC_INCLUDE="${IODBC_INCLUDE} " + if test "xsql.h" = "x" ; then # no header, assume found + IODBC_HEADER_FOUND="1" + else # check for the header + saved_cppflags="${CPPFLAGS}" + CPPFLAGS="${CPPFLAGS} ${IODBC_INCLUDE}" + if test "${ac_cv_header_sql_h+set}" = set; then + { echo "$as_me:$LINENO: checking for sql.h" >&5 +echo $ECHO_N "checking for sql.h... $ECHO_C" >&6; } +if test "${ac_cv_header_sql_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_sql_h" >&5 +echo "${ECHO_T}$ac_cv_header_sql_h" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking sql.h usability" >&5 +echo $ECHO_N "checking sql.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 <sql.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); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; 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 sql.h presence" >&5 +echo $ECHO_N "checking sql.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 <sql.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 && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.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; } + +# 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: sql.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sql.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sql.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: sql.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: sql.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sql.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sql.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sql.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sql.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: sql.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: sql.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: sql.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: sql.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sql.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: sql.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: sql.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ------------------------------- ## +## Report this to www.asterisk.org ## +## ------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for sql.h" >&5 +echo $ECHO_N "checking for sql.h... $ECHO_C" >&6; } +if test "${ac_cv_header_sql_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sql_h=$ac_header_preproc +fi +{ echo "$as_me:$LINENO: result: $ac_cv_header_sql_h" >&5 +echo "${ECHO_T}$ac_cv_header_sql_h" >&6; } + +fi +if test $ac_cv_header_sql_h = yes; then + IODBC_HEADER_FOUND=1 +else + IODBC_HEADER_FOUND=0 +fi + + + CPPFLAGS="${saved_cppflags}" + fi + if test "x${IODBC_HEADER_FOUND}" = "x0" ; then + IODBC_LIB="" + IODBC_INCLUDE="" + else + if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library + IODBC_LIB="" + fi + PBX_IODBC=1 + # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED + +cat >>confdefs.h <<_ACEOF +#define HAVE_IODBC 1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HAVE_IODBC_VERSION +_ACEOF + + fi + fi +fi + + + if test "x${PBX_JACK}" != "x1" -a "${USE_JACK}" != "no"; then pbxlibdir="" # if --with-JACK=DIR has been specified, use it. @@ -36442,6 +36738,12 @@ _ACEOF fi +PBX_ODBC=0 +if test "$PBX_IODBC" = "1" -o "$PBX_UNIXODBC" = "1"; then + PBX_ODBC=1 +fi + + if test "x${PBX_OGG}" != "x1" -a "${USE_OGG}" != "no"; then pbxlibdir="" @@ -50683,6 +50985,10 @@ IMAP_TK_LIB!$IMAP_TK_LIB$ac_delim IMAP_TK_INCLUDE!$IMAP_TK_INCLUDE$ac_delim IMAP_TK_DIR!$IMAP_TK_DIR$ac_delim PBX_IMAP_TK!$PBX_IMAP_TK$ac_delim +IODBC_LIB!$IODBC_LIB$ac_delim +IODBC_INCLUDE!$IODBC_INCLUDE$ac_delim +IODBC_DIR!$IODBC_DIR$ac_delim +PBX_IODBC!$PBX_IODBC$ac_delim ISDNNET_LIB!$ISDNNET_LIB$ac_delim ISDNNET_INCLUDE!$ISDNNET_INCLUDE$ac_delim ISDNNET_DIR!$ISDNNET_DIR$ac_delim @@ -50708,10 +51014,6 @@ MISDN_INCLUDE!$MISDN_INCLUDE$ac_delim MISDN_DIR!$MISDN_DIR$ac_delim PBX_MISDN!$PBX_MISDN$ac_delim NBS_LIB!$NBS_LIB$ac_delim -NBS_INCLUDE!$NBS_INCLUDE$ac_delim -NBS_DIR!$NBS_DIR$ac_delim -PBX_NBS!$PBX_NBS$ac_delim -NCURSES_LIB!$NCURSES_LIB$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -50753,6 +51055,10 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +NBS_INCLUDE!$NBS_INCLUDE$ac_delim +NBS_DIR!$NBS_DIR$ac_delim +PBX_NBS!$PBX_NBS$ac_delim +NCURSES_LIB!$NCURSES_LIB$ac_delim NCURSES_INCLUDE!$NCURSES_INCLUDE$ac_delim NCURSES_DIR!$NCURSES_DIR$ac_delim PBX_NCURSES!$PBX_NCURSES$ac_delim @@ -50764,10 +51070,6 @@ NEWT_LIB!$NEWT_LIB$ac_delim NEWT_INCLUDE!$NEWT_INCLUDE$ac_delim NEWT_DIR!$NEWT_DIR$ac_delim PBX_NEWT!$PBX_NEWT$ac_delim -UNIXODBC_LIB!$UNIXODBC_LIB$ac_delim -UNIXODBC_INCLUDE!$UNIXODBC_INCLUDE$ac_delim -UNIXODBC_DIR!$UNIXODBC_DIR$ac_delim -PBX_UNIXODBC!$PBX_UNIXODBC$ac_delim OGG_LIB!$OGG_LIB$ac_delim OGG_INCLUDE!$OGG_INCLUDE$ac_delim OGG_DIR!$OGG_DIR$ac_delim @@ -50913,6 +51215,10 @@ TONEZONE_LIB!$TONEZONE_LIB$ac_delim TONEZONE_INCLUDE!$TONEZONE_INCLUDE$ac_delim TONEZONE_DIR!$TONEZONE_DIR$ac_delim PBX_TONEZONE!$PBX_TONEZONE$ac_delim +UNIXODBC_LIB!$UNIXODBC_LIB$ac_delim +UNIXODBC_INCLUDE!$UNIXODBC_INCLUDE$ac_delim +UNIXODBC_DIR!$UNIXODBC_DIR$ac_delim +PBX_UNIXODBC!$PBX_UNIXODBC$ac_delim USB_LIB!$USB_LIB$ac_delim USB_INCLUDE!$USB_INCLUDE$ac_delim USB_DIR!$USB_DIR$ac_delim @@ -50950,6 +51256,7 @@ GSM_INTERNAL!$GSM_INTERNAL$ac_delim PBX_MISDN_FAC_RESULT!$PBX_MISDN_FAC_RESULT$ac_delim PBX_MISDN_FAC_ERROR!$PBX_MISDN_FAC_ERROR$ac_delim CONFIG_NETSNMP!$CONFIG_NETSNMP$ac_delim +PBX_ODBC!$PBX_ODBC$ac_delim PG_CONFIG!$PG_CONFIG$ac_delim PTLIB_CONFIG!$PTLIB_CONFIG$ac_delim PWLIBDIR!$PWLIBDIR$ac_delim @@ -50976,7 +51283,7 @@ CURL_CONFIG!$CURL_CONFIG$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 83; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 88; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 |