apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r572852 - /apr/apr-util/trunk/build/dbd.m4
Date Wed, 05 Sep 2007 01:41:35 GMT
Author: bojan
Date: Tue Sep  4 18:41:35 2007
New Revision: 572852

URL: http://svn.apache.org/viewvc?rev=572852&view=rev
Log:
No point checking for dbd/apr_dbd_mysql.c any more - we have it :-)

Modified:
    apr/apr-util/trunk/build/dbd.m4

Modified: apr/apr-util/trunk/build/dbd.m4
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/build/dbd.m4?rev=572852&r1=572851&r2=572852&view=diff
==============================================================================
--- apr/apr-util/trunk/build/dbd.m4 (original)
+++ apr/apr-util/trunk/build/dbd.m4 Tue Sep  4 18:41:35 2007
@@ -77,94 +77,92 @@
 AC_DEFUN([APU_CHECK_DBD_MYSQL], [
   apu_have_mysql=0
 
-  AC_CHECK_FILES([dbd/apr_dbd_mysql.c],[
-    AC_ARG_WITH([mysql], APR_HELP_STRING([--with-mysql=DIR], [specify MySQL location]),
-    [
-      apu_have_mysql=0
-      if test "$withval" = "yes"; then
-        old_cppflags="$CPPFLAGS"
-        old_ldflags="$LDFLAGS"
-
-        AC_PATH_PROG([MYSQL_CONFIG],[mysql_config])
-        if test "x$MYSQL_CONFIG" != 'x'; then
-          mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
-          mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
-
-          APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
-          APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
-        fi
-
-        AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
-        if test "$apu_have_mysql" = "0"; then
-          AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
-        else
-          if test "x$MYSQL_CONFIG" != 'x'; then
-            APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
-          fi
-        fi
-
-        CPPFLAGS="$old_cppflags"
-        LDFLAGS="$old_ldflags"
-      elif test "$withval" = "no"; then
-        apu_have_mysql=0
-      else
-        old_cppflags="$CPPFLAGS"
-        old_ldflags="$LDFLAGS"
+  AC_ARG_WITH([mysql], APR_HELP_STRING([--with-mysql=DIR], [specify MySQL location]),
+  [
+    apu_have_mysql=0
+    if test "$withval" = "yes"; then
+      old_cppflags="$CPPFLAGS"
+      old_ldflags="$LDFLAGS"
 
-        AC_PATH_PROG([MYSQL_CONFIG],[mysql_config],,[$withval/bin])
-        if test "x$MYSQL_CONFIG" != 'x'; then
-          mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
-          mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
-        else
-          mysql_CPPFLAGS="-I$withval/include"
-          mysql_LDFLAGS="-L$withval/lib "
-        fi
+      AC_PATH_PROG([MYSQL_CONFIG],[mysql_config])
+      if test "x$MYSQL_CONFIG" != 'x'; then
+        mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
+        mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
 
         APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
         APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
+      fi
 
-        AC_MSG_NOTICE(checking for mysql in $withval)
-        AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
-        if test "$apu_have_mysql" != "0"; then
+      AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
+      if test "$apu_have_mysql" = "0"; then
+        AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
+      else
+        if test "x$MYSQL_CONFIG" != 'x'; then
           APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
         fi
-
-        if test "$apu_have_mysql" != "1"; then
-          AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
-          if test "$apu_have_mysql" != "0"; then
-            APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include/mysql])
-          fi
-        fi
-
-        CPPFLAGS="$old_cppflags"
-        LDFLAGS="$old_ldflags"
       fi
-    ], [
-      apu_have_mysql=0
 
+      CPPFLAGS="$old_cppflags"
+      LDFLAGS="$old_ldflags"
+    elif test "$withval" = "no"; then
+      apu_have_mysql=0
+    else
       old_cppflags="$CPPFLAGS"
       old_ldflags="$LDFLAGS"
 
-      AC_PATH_PROG([MYSQL_CONFIG],[mysql_config])
+      AC_PATH_PROG([MYSQL_CONFIG],[mysql_config],,[$withval/bin])
       if test "x$MYSQL_CONFIG" != 'x'; then
         mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
         mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
-
-        APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
-        APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
+      else
+        mysql_CPPFLAGS="-I$withval/include"
+        mysql_LDFLAGS="-L$withval/lib "
       fi
 
-      AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
+      APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
+      APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
 
+      AC_MSG_NOTICE(checking for mysql in $withval)
+      AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
       if test "$apu_have_mysql" != "0"; then
-        if test "x$MYSQL_CONFIG" != 'x'; then
-          APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
+        APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
+      fi
+
+      if test "$apu_have_mysql" != "1"; then
+        AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
+        if test "$apu_have_mysql" != "0"; then
+          APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include/mysql])
         fi
       fi
 
       CPPFLAGS="$old_cppflags"
       LDFLAGS="$old_ldflags"
-    ])
+    fi
+  ], [
+    apu_have_mysql=0
+
+    old_cppflags="$CPPFLAGS"
+    old_ldflags="$LDFLAGS"
+
+    AC_PATH_PROG([MYSQL_CONFIG],[mysql_config])
+    if test "x$MYSQL_CONFIG" != 'x'; then
+      mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
+      mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
+
+      APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
+      APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
+    fi
+
+    AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
+
+    if test "$apu_have_mysql" != "0"; then
+      if test "x$MYSQL_CONFIG" != 'x'; then
+        APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
+      fi
+    fi
+
+    CPPFLAGS="$old_cppflags"
+    LDFLAGS="$old_ldflags"
   ])
 
   AC_SUBST(apu_have_mysql)



Mime
View raw message