You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2012/08/13 22:21:03 UTC

svn commit: r1372580 - /apr/apr-util/branches/1.5.x/configure.in

Author: trawick
Date: Mon Aug 13 20:21:03 2012
New Revision: 1372580

URL: http://svn.apache.org/viewvc?rev=1372580&view=rev
Log:
Follow up to r1372546:

Handle static-only apr/apr-util by adding -DAPU_DECLARE_STATIC
when necessary.

Modified:
    apr/apr-util/branches/1.5.x/configure.in

Modified: apr/apr-util/branches/1.5.x/configure.in
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/configure.in?rev=1372580&r1=1372579&r2=1372580&view=diff
==============================================================================
--- apr/apr-util/branches/1.5.x/configure.in (original)
+++ apr/apr-util/branches/1.5.x/configure.in Mon Aug 13 20:21:03 2012
@@ -225,8 +225,19 @@ fi
 dnl
 dnl MinGW: If APR is shared, APR_DECLARE_EXPORT will be defined in the
 dnl        internal CPPFLAGS, but APR-Util needs APU_DECLARE_EXPORT instead.
+dnl        If APR is static, APR_DECLARE_STATIC will be defined in the
+dnl        internal CPPFLAGS, but APR-Util needs APU_DECLARE_STATIC too.
 dnl
-sed -e 's/-DAPR_DECLARE_EXPORT/-DAPU_DECLARE_EXPORT/' < $APR_BUILD_DIR/apr_rules.mk > $abs_builddir/build/rules.mk
+case $host in
+    *-mingw*)
+        sed -e 's/-DAPR_DECLARE_EXPORT/-DAPU_DECLARE_EXPORT/' \
+            -e 's/-DAPR_DECLARE_STATIC/-DAPU_DECLARE_STATIC -DAPR_DECLARE_STATIC/' \
+            < $APR_BUILD_DIR/apr_rules.mk > $abs_builddir/build/rules.mk
+        ;;
+    *)
+        cp $APR_BUILD_DIR/apr_rules.mk $abs_builddir/build/rules.mk
+        ;;
+esac
 
 dnl
 dnl BSD/OS (BSDi) needs to use a different include syntax in the Makefiles