[asterisk-commits] seanbright: branch 1.4 r114695 - in /branches/1.4: configure configure.ac

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Apr 26 20:26:15 CDT 2008


Author: seanbright
Date: Sat Apr 26 20:26:15 2008
New Revision: 114695

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114695
Log:
When we don't explicitly pass a path to the --with-tds configure option, we
may end up finding tds.h in /usr/local/include instead of /usr/include.  If
this happens, the grep that looks for the version (from tdsver.h) will fail
and we'll have some problems during the build.

Modified:
    branches/1.4/configure
    branches/1.4/configure.ac

Modified: branches/1.4/configure.ac
URL: http://svn.digium.com/view/asterisk/branches/1.4/configure.ac?view=diff&rev=114695&r1=114694&r2=114695
==============================================================================
--- branches/1.4/configure.ac (original)
+++ branches/1.4/configure.ac Sat Apr 26 20:26:15 2008
@@ -1280,9 +1280,19 @@
 AST_EXT_LIB_CHECK([FREETDS], [tds], [tds_version], [tds.h])
 if test "${PBX_FREETDS}" != "0";
 then
-    case `grep TDS_VERSION_NO ${FREETDS_DIR:-/usr}/include/tdsver.h` in
-	*0.64*)
-		FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_64"
+    if test "${FREETDS_DIR}x" = "x";
+    then
+        for tds_dir in /usr /usr/local;
+        do
+            if test -f "${tds_dir}/include/tdsver.h";
+            then
+                FREETDS_DIR="${tds_dir}"
+            fi
+        done
+    fi
+    case `${GREP} TDS_VERSION_NO ${FREETDS_DIR:-/usr}/include/tdsver.h` in
+    *0.64*)
+        FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_64"
 	;;
     *0.63*)
         FREETDS_INCLUDE="${FREETDS_INCLUDE} -DFREETDS_0_63"




More information about the asterisk-commits mailing list