diff --git a/build/config/odbc.m4 b/build/config/odbc.m4 index 099ba778d1..295b4bfedc 100644 --- a/build/config/odbc.m4 +++ b/build/config/odbc.m4 @@ -119,7 +119,9 @@ AC_ARG_WITH(odbc-include, ac_cv_odbc_where_lib=$with_odbc_lib fi if test "X$ac_cv_odbc_where_lib" = "X"; then + AC_CHECK_LIB([odbc],[SQLDisconnect],[ac_cv_odbc_where_lib="yes"],[ ODBC_LIB_WHERE(/usr/$LIB_SUBDIR /usr/local/$LIB_SUBDIR) + ]) fi if test "X$with_odbc_include" != "X"; then @@ -138,15 +140,16 @@ AC_ARG_WITH(odbc-include, AC_MSG_RESULT(yes) ODBC_INC_DIR=$ac_cv_pcap_where_inc ODBC_LIB_DIR=$ac_cv_pcap_where_lib - ODBC_INC_FLAGS="-I${ODBC_INC_DIR}" + ODBC_INC_FLAGS="-I$ac_cv_pcap_where_inc" + ODBC_LIB_FLAGS="-Wl,-lodbc" case "$host" in *darwin*) - ODBC_LIB_FLAGS="-L${ODBC_LIB_DIR} -lodbc -framework CoreFoundation" - ;; - *) - ODBC_LIB_FLAGS="-L${ODBC_LIB_DIR} -lodbc" + ODBC_LIB_FLAGS="$ODBC_LIB_FLAGS -framework CoreFoundation" ;; esac + if test "$ac_cv_odbc_where_lib" != "yes"; then + ODBC_LIB_FLAGS="-L$ac_cv_odbc_where_lib $ODBC_LIB_FLAGS" + fi AC_SUBST(ODBC_INC_DIR) AC_SUBST(ODBC_LIB_DIR) AC_SUBST(ODBC_INC_FLAGS) diff --git a/configure.in b/configure.in index 618e2a23b2..6076cb7131 100644 --- a/configure.in +++ b/configure.in @@ -112,7 +112,7 @@ AM_CONDITIONAL([USE_INTREE_RESAMPLE],[test "${enable_resample}" = "yes"]) # set defaults for use on all platforms SWITCH_AM_CFLAGS="-I${switch_srcdir}/src/include -I${switch_srcdir}/libs/libteletone/src" SWITCH_AM_CXXFLAGS="-I${switch_srcdir}/src/include -I${switch_srcdir}/libs/libteletone/src" -SWITCH_AM_LDFLAGS="-lm -L/usr/local/lib" +SWITCH_AM_LDFLAGS="-lm" #set SOLINK variable based on compiler and host if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then @@ -161,11 +161,15 @@ if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then APR_ADDTO(SWITCH_AM_CFLAGS, -m64) APR_ADDTO(SWITCH_AM_CXXFLAGS, -m64) APR_ADDTO(SWITCH_AM_LDFLAGS, -m64) + LIBS="$LIBS -m64" fi elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC) APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC) APR_ADDTO(SWITCH_AM_CFLAGS, -Werror) + if test "${enable_64}" = "yes"; then + LIBS="$LIBS -m64" + fi fi # Enable debugging (default: on)