apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject svn commit: r578028 - /apr/apr-util/trunk/build/dbd.m4
Date Fri, 21 Sep 2007 09:19:38 GMT
Author: jfclere
Date: Fri Sep 21 02:19:37 2007
New Revision: 578028

URL: http://svn.apache.org/viewvc?rev=578028&view=rev
Log:
Rollback r577654 and replace it by a better logic.

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=578028&r1=578027&r2=578028&view=diff
==============================================================================
--- apr/apr-util/trunk/build/dbd.m4 (original)
+++ apr/apr-util/trunk/build/dbd.m4 Fri Sep 21 02:19:37 2007
@@ -134,12 +134,6 @@
           APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include/mysql])
         fi
       fi
-      if test -f "$withval/lib/mysql/libmysqlclient_r.la"; then
-        mysql_LDFLAGS=$withval/lib/mysql/libmysqlclient_r.la
-      fi
-      if test -f "$withval/lib/libmysqlclient_r.la"; then
-        mysql_LDFLAGS=$withval/lib/libmysqlclient_r.la
-      fi
 
       CPPFLAGS="$old_cppflags"
       LDFLAGS="$old_ldflags"
@@ -164,12 +158,6 @@
     if test "$apu_have_mysql" != "0"; then
       if test "x$MYSQL_CONFIG" != 'x'; then
         APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
-        if test -f "$withval/lib/mysql/libmysqlclient_r.la"; then
-          mysql_LDFLAGS=$withval/lib/mysql/libmysqlclient_r.la
-        fi
-        if test -f "$withval/lib/libmysqlclient_r.la"; then
-          mysql_LDFLAGS=$withval/lib/libmysqlclient_r.la
-        fi
       fi
     fi
 
@@ -454,6 +442,20 @@
      test $apu_have_sqlite3 = 1 && objs="$objs dbd/apr_dbd_sqlite3.lo"
      test $apu_have_freetds = 1 && objs="$objs dbd/apr_dbd_freetds.lo"
      EXTRA_OBJECTS="$EXTRA_OBJECTS $objs"
+
+     # Use libtool *.la for mysql if available
+     if test $apu_have_mysql = 1; then
+       for flag in $mysql_LDFLAGS
+       do
+         dir=`echo $flag | grep "^-L" | sed s:-L::`
+         if test "x$dir" != 'x'; then
+           if test -f "$dir/libmysqlclient_r.la"; then
+             mysql_LDFLAGS=$dir/libmysqlclient_r.la
+             break
+           fi
+         fi
+       done
+     fi
 
      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"



Mime
View raw message