Make sense for post-1.5.2?

This doesn't affect non-autoconf builds, and I think the RPM build would be
broken.  Any other missing pieces?

-- 
Born in Roswell... married an alien...
http://emptyhammock.com/
Index: build/dbd.m4
===================================================================
--- build/dbd.m4        (revision 1462781)
+++ build/dbd.m4        (working copy)
@@ -417,9 +417,22 @@
   old_cppflags="$CPPFLAGS"
   old_ldflags="$LDFLAGS"
 
+  AC_ARG_ENABLE([unsupported-freetds],
+    APR_HELP_STRING([--enable-unsupported-freetds],
+      [enable unsupported FreeTDS DBD interface (in combination with 
--with-freetds).
+This driver has known issues and is not currently maintained.  The ODBC driver
+is the recommended solution.]))
+
   AC_ARG_WITH([freetds], 
-    APR_HELP_STRING([--with-freetds=DIR], [specify FreeTDS location]),
+    APR_HELP_STRING([--with-freetds=DIR], [specify FreeTDS location 
(unsupported)]),
   [
+    echo "freetds withval: $withval"
+    if test "$withval" != "no"; then
+      if test "$enable_unsupported_freetds" != "yes"; then
+        AC_MSG_ERROR(FreeTDS cannot be enabled without 
--enable-unsupported-freetds.)
+      fi
+    fi
+
     if test "$withval" = "yes"; then
       AC_CHECK_HEADERS(sybdb.h, AC_CHECK_LIB(sybdb, tdsdbopen, 
[apu_have_freetds=1]))
       if test "$apu_have_freetds" = "0"; then
@@ -444,9 +457,13 @@
       fi
     fi
   ], [
-    AC_CHECK_HEADERS(sybdb.h, AC_CHECK_LIB(sybdb, tdsdbopen, 
[apu_have_freetds=1]))
-    if test "$apu_have_freetds" = "0"; then
-      AC_CHECK_HEADERS(freetds/sybdb.h, AC_CHECK_LIB(sybdb, tdsdbopen, 
[apu_have_freetds=1]))
+    if test "$enable_unsupported_freetds" != "yes"; then
+      AC_MSG_WARN([Skipped FreeTDS detection, --enable-unsupported-freetds not 
specified])
+    else
+      AC_CHECK_HEADERS(sybdb.h, AC_CHECK_LIB(sybdb, tdsdbopen, 
[apu_have_freetds=1]))
+      if test "$apu_have_freetds" = "0"; then
+        AC_CHECK_HEADERS(freetds/sybdb.h, AC_CHECK_LIB(sybdb, tdsdbopen, 
[apu_have_freetds=1]))
+      fi
     fi
   ])
 

Reply via email to