You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2008/04/23 00:16:02 UTC

svn commit: r650676 - /apr/apr-util/branches/1.3.x/build/dbm.m4

Author: wrowe
Date: Tue Apr 22 15:15:40 2008
New Revision: 650676

URL: http://svn.apache.org/viewvc?rev=650676&view=rev
Log:
* build/dbm.m4 (APU_CHECK_DBM): Fix gdbm detection to use LDFLAGS 
rather than LIBS, and to save/restore both that and CPPFLAGS correctly.

Submitted by: Philip M. Gollucci, jorton
Backports: r649458

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

Modified: apr/apr-util/branches/1.3.x/build/dbm.m4
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/build/dbm.m4?rev=650676&r1=650675&r2=650676&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/build/dbm.m4 (original)
+++ apr/apr-util/branches/1.3.x/build/dbm.m4 Tue Apr 22 15:15:40 2008
@@ -671,8 +671,10 @@
     elif test "$withval" = "no"; then
       apu_have_gdbm=0
     else
-      CPPFLAGS="-I$withval/include"
-      LIBS="-L$withval/lib "
+      saved_cppflags="$CPPFLAGS"
+      saved_ldflags="$LDFLAGS"
+      CPPFLAGS="$CPPFLAGS -I$withval/include"
+      LDFLAGS="$LDFLAGS -L$withval/lib "
 
       AC_MSG_CHECKING(checking for gdbm in $withval)
       AC_CHECK_HEADER(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, [apu_have_gdbm=1]))
@@ -680,6 +682,8 @@
         APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
         APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include])
       fi
+      CPPFLAGS="$saved_cppflags"
+      LDFLAGS="$saved_ldflags"
     fi
   ])