tweak odbc detection
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11666 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
608807c44c
commit
1953ac5c5d
|
@ -119,7 +119,9 @@ AC_ARG_WITH(odbc-include,
|
||||||
ac_cv_odbc_where_lib=$with_odbc_lib
|
ac_cv_odbc_where_lib=$with_odbc_lib
|
||||||
fi
|
fi
|
||||||
if test "X$ac_cv_odbc_where_lib" = "X"; then
|
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)
|
ODBC_LIB_WHERE(/usr/$LIB_SUBDIR /usr/local/$LIB_SUBDIR)
|
||||||
|
])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "X$with_odbc_include" != "X"; then
|
if test "X$with_odbc_include" != "X"; then
|
||||||
|
@ -138,15 +140,16 @@ AC_ARG_WITH(odbc-include,
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
ODBC_INC_DIR=$ac_cv_pcap_where_inc
|
ODBC_INC_DIR=$ac_cv_pcap_where_inc
|
||||||
ODBC_LIB_DIR=$ac_cv_pcap_where_lib
|
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
|
case "$host" in
|
||||||
*darwin*)
|
*darwin*)
|
||||||
ODBC_LIB_FLAGS="-L${ODBC_LIB_DIR} -lodbc -framework CoreFoundation"
|
ODBC_LIB_FLAGS="$ODBC_LIB_FLAGS -framework CoreFoundation"
|
||||||
;;
|
|
||||||
*)
|
|
||||||
ODBC_LIB_FLAGS="-L${ODBC_LIB_DIR} -lodbc"
|
|
||||||
;;
|
;;
|
||||||
esac
|
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_INC_DIR)
|
||||||
AC_SUBST(ODBC_LIB_DIR)
|
AC_SUBST(ODBC_LIB_DIR)
|
||||||
AC_SUBST(ODBC_INC_FLAGS)
|
AC_SUBST(ODBC_INC_FLAGS)
|
||||||
|
|
|
@ -112,7 +112,7 @@ AM_CONDITIONAL([USE_INTREE_RESAMPLE],[test "${enable_resample}" = "yes"])
|
||||||
# set defaults for use on all platforms
|
# set defaults for use on all platforms
|
||||||
SWITCH_AM_CFLAGS="-I${switch_srcdir}/src/include -I${switch_srcdir}/libs/libteletone/src"
|
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_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
|
#set SOLINK variable based on compiler and host
|
||||||
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
|
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_CFLAGS, -m64)
|
||||||
APR_ADDTO(SWITCH_AM_CXXFLAGS, -m64)
|
APR_ADDTO(SWITCH_AM_CXXFLAGS, -m64)
|
||||||
APR_ADDTO(SWITCH_AM_LDFLAGS, -m64)
|
APR_ADDTO(SWITCH_AM_LDFLAGS, -m64)
|
||||||
|
LIBS="$LIBS -m64"
|
||||||
fi
|
fi
|
||||||
elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
|
elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
|
||||||
APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC)
|
APR_ADDTO(SWITCH_AM_CFLAGS, -fPIC)
|
||||||
APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC)
|
APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC)
|
||||||
APR_ADDTO(SWITCH_AM_CFLAGS, -Werror)
|
APR_ADDTO(SWITCH_AM_CFLAGS, -Werror)
|
||||||
|
if test "${enable_64}" = "yes"; then
|
||||||
|
LIBS="$LIBS -m64"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Enable debugging (default: on)
|
# Enable debugging (default: on)
|
||||||
|
|
Loading…
Reference in New Issue