apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r655404 - /apr/apr-util/branches/1.3.x/build/dbd.m4
Date Mon, 12 May 2008 03:08:04 GMT
Author: bojan
Date: Sun May 11 20:08:04 2008
New Revision: 655404

URL: http://svn.apache.org/viewvc?rev=655404&view=rev
Log:
Backport r655174 and r655403
MySQL MUST NOT be linked in by default!  Remove check for mysql
when --with-mysql is not given.
Disable Oracle DBD driver by default
Enable DSO build of DBD drivers by default

Modified:
    apr/apr-util/branches/1.3.x/build/dbd.m4

Modified: apr/apr-util/branches/1.3.x/build/dbd.m4
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/build/dbd.m4?rev=655404&r1=655403&r2=655404&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/build/dbd.m4 (original)
+++ apr/apr-util/branches/1.3.x/build/dbd.m4 Sun May 11 20:08:04 2008
@@ -77,7 +77,7 @@
 AC_DEFUN([APU_CHECK_DBD_MYSQL], [
   apu_have_mysql=0
 
-  AC_ARG_WITH([mysql], APR_HELP_STRING([--with-mysql=DIR], [specify MySQL location]),
+  AC_ARG_WITH([mysql], APR_HELP_STRING([--with-mysql=DIR], [enable MySQL DBD driver]),
   [
     apu_have_mysql=0
     if test "$withval" = "yes"; then
@@ -138,31 +138,6 @@
       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)
@@ -330,27 +305,6 @@
       CPPFLAGS="$old_cppflags"
       LDFLAGS="$old_ldflags"
     fi
-  ], [
-    apu_have_oracle=0
-
-    old_cppflags="$CPPFLAGS"
-
-    if test -n "$with_oracle_include"; then
-      oracle_CPPFLAGS="$CPPFLAGS -I$with_oracle_include"
-      APR_ADDTO(APRUTIL_INCLUDES, [-I$with_oracle_include])
-    fi
-
-    APR_ADDTO(CPPFLAGS, [$oracle_CPPFLAGS])
-
-    AC_CHECK_HEADERS(oci.h, AC_CHECK_LIB(clntsh, OCIEnvCreate, [apu_have_oracle=1],[
-      unset ac_cv_lib_clntsh_OCIEnvCreate
-      AC_CHECK_LIB(clntsh, OCIEnvCreate, [
-        apu_have_oracle=1
-        LDADD_dbd_oracle=-lnnz10
-      ],,[-lnnz10])
-    ]))
-
-    CPPFLAGS="$old_cppflags"
   ])
 
   AC_SUBST(apu_have_oracle)
@@ -417,21 +371,9 @@
 AC_DEFUN([APU_CHECK_DBD_DSO], [
 
   AC_ARG_ENABLE([dbd-dso], 
-     APR_HELP_STRING([--enable-dbd-dso], [build DBD drivers as DSOs]))
+     APR_HELP_STRING([--disable-dbd-dso], [disable DSO build of DBD drivers]))
 
-  if test "$enable_dbd_dso" = "yes"; then
-     AC_DEFINE([APU_DSO_BUILD], 1, [Define if DBD drivers are built as DSOs])
-     
-     dsos=
-     test $apu_have_oracle = 1 && dsos="$dsos dbd/apr_dbd_oracle.la"
-     test $apu_have_pgsql = 1 && dsos="$dsos dbd/apr_dbd_pgsql.la"
-     test $apu_have_mysql = 1 && dsos="$dsos dbd/apr_dbd_mysql.la"
-     test $apu_have_sqlite2 = 1 && dsos="$dsos dbd/apr_dbd_sqlite2.la"
-     test $apu_have_sqlite3 = 1 && dsos="$dsos dbd/apr_dbd_sqlite3.la"
-     test $apu_have_freetds = 1 && dsos="$dsos dbd/apr_dbd_freetds.la"
-
-     APU_MODULES="$APU_MODULES $dsos"
-  else
+  if test "$enable_dbd_dso" = "no"; then
      # Statically link the DBD drivers:
 
      objs=
@@ -459,5 +401,17 @@
 
      APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle
$LDADD_dbd_mysql $LDADD_dbd_freetds"
      APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3
$LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds"
+  else
+     AC_DEFINE([APU_DSO_BUILD], 1, [Define if DBD drivers are built as DSOs])
+     
+     dsos=
+     test $apu_have_oracle = 1 && dsos="$dsos dbd/apr_dbd_oracle.la"
+     test $apu_have_pgsql = 1 && dsos="$dsos dbd/apr_dbd_pgsql.la"
+     test $apu_have_mysql = 1 && dsos="$dsos dbd/apr_dbd_mysql.la"
+     test $apu_have_sqlite2 = 1 && dsos="$dsos dbd/apr_dbd_sqlite2.la"
+     test $apu_have_sqlite3 = 1 && dsos="$dsos dbd/apr_dbd_sqlite3.la"
+     test $apu_have_freetds = 1 && dsos="$dsos dbd/apr_dbd_freetds.la"
+
+     APU_MODULES="$APU_MODULES $dsos"
   fi
 ])



Mime
View raw message