[Freeswitch-svn] [commit] r11634 - in freeswitch/trunk: . build/config
FreeSWITCH SVN
mikej at freeswitch.org
Wed Feb 4 10:15:16 PST 2009
Author: mikej
Date: Wed Feb 4 12:15:16 2009
New Revision: 11634
Log:
fix odbc build on osx
Modified:
freeswitch/trunk/Makefile.am
freeswitch/trunk/build/config/odbc.m4
Modified: freeswitch/trunk/Makefile.am
==============================================================================
--- freeswitch/trunk/Makefile.am (original)
+++ freeswitch/trunk/Makefile.am Wed Feb 4 12:15:16 2009
@@ -186,9 +186,9 @@
endif
if ADD_ODBC
-CORE_CFLAGS += -DSWITCH_HAVE_ODBC
+CORE_CFLAGS += -DSWITCH_HAVE_ODBC $(ODBC_INC_FLAGS)
libfreeswitch_la_SOURCES += src/switch_odbc.c
-libfreeswitch_la_LDFLAGS += -Wl,-lodbc
+libfreeswitch_la_LDFLAGS += $(ODBC_LIB_FLAGS)
endif
bin_SCRIPTS = scripts/gentls_cert scripts/fsxs
Modified: freeswitch/trunk/build/config/odbc.m4
==============================================================================
--- freeswitch/trunk/build/config/odbc.m4 (original)
+++ freeswitch/trunk/build/config/odbc.m4 Wed Feb 4 12:15:16 2009
@@ -24,9 +24,18 @@
AC_DEFUN([ODBC_LIB_WHERE1], [
saved_LIBS=$LIBS
-LIBS="$saved_LIBS -L$1 -lodbc"
-AC_TRY_LINK(,
-[SQLHDBC con;SQLDisconnect(con);],
+case "$host" in
+ *darwin*)
+ LIBS="$saved_LIBS -L$1 -lodbc -framework CoreFoundation"
+ ;;
+ *)
+ LIBS="$saved_LIBS -L$1 -lodbc"
+ ;;
+esac
+AC_TRY_LINK(
+[#include <sql.h>],
+[SQLHDBC con;
+SQLDisconnect(con);],
[ac_cv_found_odbc_lib=yes],
ac_cv_found_odbc_lib=no)
LIBS=$saved_LIBS
@@ -130,7 +139,14 @@
ODBC_INC_DIR=$ac_cv_pcap_where_inc
ODBC_LIB_DIR=$ac_cv_pcap_where_lib
ODBC_INC_FLAGS="-I${ODBC_INC_DIR}"
- ODBC_LIB_FLAGS="-L${ODBC_LIB_DIR} -lodbc"
+ case "$host" in
+ *darwin*)
+ ODBC_LIB_FLAGS="-L${ODBC_LIB_DIR} -lodbc -framework CoreFoundation"
+ ;;
+ *)
+ ODBC_LIB_FLAGS="-L${ODBC_LIB_DIR} -lodbc"
+ ;;
+ esac
AC_SUBST(ODBC_INC_DIR)
AC_SUBST(ODBC_LIB_DIR)
AC_SUBST(ODBC_INC_FLAGS)
More information about the Freeswitch-svn
mailing list