apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r783046 - /apr/apr-util/branches/1.3.x/build/dso.m4
Date Tue, 09 Jun 2009 15:37:15 GMT
Author: jorton
Date: Tue Jun  9 15:37:15 2009
New Revision: 783046

URL: http://svn.apache.org/viewvc?rev=783046&view=rev
Log:
* build/dso.m4 (APU_CHECK_UTIL_DSO): Use AC_EGREP_CPP to test the macros
  in a header file, rather than awking it directly.

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

Modified: apr/apr-util/branches/1.3.x/build/dso.m4
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/build/dso.m4?rev=783046&r1=783045&r2=783046&view=diff
==============================================================================
--- apr/apr-util/branches/1.3.x/build/dso.m4 (original)
+++ apr/apr-util/branches/1.3.x/build/dso.m4 Tue Jun  9 15:37:15 2009
@@ -27,8 +27,21 @@
   if test "$enable_util_dso" = "no"; then
      apu_dso_build="0"
   else
-     apr_h="`$apr_config --includedir`/apr.h"
-     apu_dso_build="`awk '/^#define APR_HAS_DSO/ { print @S|@3; }' $apr_h`"
+     AC_CACHE_CHECK([whether APR has DSO support], [apu_cv_aprdso],
+       [apu_save_CPPFLAGS=$CPPFLAGS
+        CPPFLAGS="$CPPFLAGS $APR_INCLUDES"
+        AC_EGREP_CPP([yes], [#include "apr.h"
+#if APR_HAS_DSO
+yes
+#endif
+], [apu_cv_aprdso=yes], [apu_cv_aprdso=no])
+        CPPFLAGS=$apu_save_CPPFLAGS])
+
+     if test $apu_cv_aprdso = yes; then
+        apu_dso_build=1
+     else
+        apu_dso_build=0
+     fi
   fi
 
   if test "$apu_dso_build" = "0"; then



Mime
View raw message