[Freeswitch-svn] [commit] r11666 - in freeswitch/trunk: . build/config

FreeSWITCH SVN mikej at freeswitch.org
Fri Feb 6 10:23:14 PST 2009


Author: mikej
Date: Fri Feb  6 12:23:14 2009
New Revision: 11666

Log:
tweak odbc detection

Modified:
   freeswitch/trunk/build/config/odbc.m4
   freeswitch/trunk/configure.in

Modified: freeswitch/trunk/build/config/odbc.m4
==============================================================================
--- freeswitch/trunk/build/config/odbc.m4	(original)
+++ freeswitch/trunk/build/config/odbc.m4	Fri Feb  6 12:23:14 2009
@@ -119,7 +119,9 @@
 	  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_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)

Modified: freeswitch/trunk/configure.in
==============================================================================
--- freeswitch/trunk/configure.in	(original)
+++ freeswitch/trunk/configure.in	Fri Feb  6 12:23:14 2009
@@ -112,7 +112,7 @@
 # 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 @@
         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)



More information about the Freeswitch-svn mailing list