match the change made to AST_EXT_LIB in asterisk-addons
[asterisk/asterisk.git] / configure.ac
index 9839a85..237a137 100644 (file)
@@ -224,7 +224,7 @@ if test "${USE_GSM}" != "no"; then
    if test "${GSM_SYSTEM}" = "yes"; then
       gsmlibdir=""
       if test "x${GSM_DIR}" != "x"; then
    if test "${GSM_SYSTEM}" = "yes"; then
       gsmlibdir=""
       if test "x${GSM_DIR}" != "x"; then
-         gsmlibdir="-L${GSM_DIR}/lib"
+         gsmlibdir="-L${GSM_DIR} -L${GSM_DIR}/lib"
       fi
       AC_CHECK_LIB([gsm], [gsm_create], AC_DEFINE_UNQUOTED([HAVE_GSM], 1,
       [Define to indicate the GSM library]), [], ${gsmlibdir})
       fi
       AC_CHECK_LIB([gsm], [gsm_create], AC_DEFINE_UNQUOTED([HAVE_GSM], 1,
       [Define to indicate the GSM library]), [], ${gsmlibdir})
@@ -276,7 +276,7 @@ PBX_KDE=0
 if test "${USE_KDE}" != "no"; then
    echo -n "checking for crashHandler in -lkdecore... "
    saved_ldflags="${LDFLAGS}"
 if test "${USE_KDE}" != "no"; then
    echo -n "checking for crashHandler in -lkdecore... "
    saved_ldflags="${LDFLAGS}"
-   LDFLAGS="-I${KDE_DIR}/include ${LDFLAGS} -L${KDE_DIR}/lib -lkdecore"
+   LDFLAGS="-I${KDE_DIR}/include ${LDFLAGS} -L${KDE_DIR} -L${KDE_DIR}/lib -lkdecore"
        AC_LINK_IFELSE(
        [
                AC_LANG_PROGRAM(
        AC_LINK_IFELSE(
        [
                AC_LANG_PROGRAM(
@@ -297,7 +297,7 @@ if test "${USE_KDE}" != "no"; then
        if test "${ac_cv_lib_kde_crash}" = "yes"; then
                KDE_LIB="-lkdecore -lkdeui"
                if test "${KDE_DIR}" != ""; then
        if test "${ac_cv_lib_kde_crash}" = "yes"; then
                KDE_LIB="-lkdecore -lkdeui"
                if test "${KDE_DIR}" != ""; then
-                       KDE_LIB="-L${KDE_DIR}/lib ${KDE_LIB}"
+                       KDE_LIB="-L${KDE_DIR} -L${KDE_DIR}/lib ${KDE_LIB}"
                        KDE_INCLUDE="-I${KDE_DIR}/include"
                        AC_SUBST([KDE_INCLUDE])
                fi
                        KDE_INCLUDE="-I${KDE_DIR}/include"
                        AC_SUBST([KDE_INCLUDE])
                fi
@@ -635,6 +635,22 @@ AST_EXT_LIB([speex], [speex_encode], [speex/speex.h], [SPEEX], [Speex], [-lm])
 AST_EXT_LIB([sqlite], [sqlite_exec], [sqlite.h], [SQLITE], [SQLite])
 AST_EXT_LIB([ssl], [ssl2_connect], [openssl/ssl.h], [OPENSSL], [OpenSSL], [-lcrypto])
 AST_EXT_LIB([tds], [tds_version], [tds.h], [FREETDS], [FreeTDS])
 AST_EXT_LIB([sqlite], [sqlite_exec], [sqlite.h], [SQLITE], [SQLite])
 AST_EXT_LIB([ssl], [ssl2_connect], [openssl/ssl.h], [OPENSSL], [OpenSSL], [-lcrypto])
 AST_EXT_LIB([tds], [tds_version], [tds.h], [FREETDS], [FreeTDS])
+
+if test "${PBX_LIBFREETDS}" != "0";
+then
+    case `grep TDS_VERSION_NO ${FREETDS_DIR:-/usr/include}/tdsver.h` in
+    *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
+
 AST_EXT_LIB([termcap], [tgetent], [], [TERMCAP], [Termcap])
 AST_EXT_LIB([tinfo], [tgetent], [], [TINFO], [Term Info])
 
 AST_EXT_LIB([termcap], [tgetent], [], [TERMCAP], [Termcap])
 AST_EXT_LIB([tinfo], [tgetent], [], [TINFO], [Term Info])
 
@@ -667,7 +683,7 @@ if test "${USE_VPB}" != "no"; then
    saved_libs="${LIBS}"
    saved_cppflags="${CPPFLAGS}"
    if test "x${VPB_DIR}" != "x"; then
    saved_libs="${LIBS}"
    saved_cppflags="${CPPFLAGS}"
    if test "x${VPB_DIR}" != "x"; then
-      LIBS="${LIBS} -L${VPB_DIR}/lib"
+      LIBS="${LIBS} -L${VPB_DIR} -L${VPB_DIR}/lib"
       CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include"
    fi
    LIBS="${LIBS} -lvpb -lpthread"
       CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include"
    fi
    LIBS="${LIBS} -lvpb -lpthread"
@@ -690,7 +706,7 @@ if test "${USE_VPB}" != "no"; then
    if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
        VPB_LIB="-lvpb"
        if test "${VPB_DIR}" != ""; then
    if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
        VPB_LIB="-lvpb"
        if test "${VPB_DIR}" != ""; then
-          VPB_LIB="-L${VPB_DIR}/lib ${VPB_LIB}"
+          VPB_LIB="-L${VPB_DIR} -L${VPB_DIR}/lib ${VPB_LIB}"
           VPB_INCLUDE="-I${VPB_DIR}/include"
           AC_SUBST([VPB_INCLUDE])
        fi
           VPB_INCLUDE="-I${VPB_DIR}/include"
           AC_SUBST([VPB_INCLUDE])
        fi
@@ -871,6 +887,11 @@ AC_DEFINE([HAVE_GCC_ATOMICS], 1, [Define to 1 if your GCC C compiler provides at
 AC_MSG_RESULT(no)
 )
 
 AC_MSG_RESULT(no)
 )
 
+AC_CHECK_HEADER([libkern/OSAtomic.h],
+                [AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
+
+AC_CHECK_SIZEOF(int)
+
 AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])
 AC_OUTPUT
 
 AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])
 AC_OUTPUT