$NetBSD: patch-aa,v 1.4 2013/07/04 15:21:51 wiz Exp $
--- configure.orig	2013-03-30 20:30:11.000000000 +0000
+++ configure
@@ -11219,7 +11219,7 @@ fi
       fi
 
       test ${apu_has_ldap} != "1" && as_fn_error $? "could not find an LDAP library" "$LINENO" 5
-      test ${apu_has_ldap} == "1" &&
+      test ${apu_has_ldap} = "1" &&
   if test "x$LDADD_ldap" = "x"; then
     test "x$silent" != "xyes" && echo "  setting LDADD_ldap to \"$LDADD_ldap_found\""
     LDADD_ldap="$LDADD_ldap_found"
@@ -24304,7 +24304,7 @@ case $host in
             < $APR_BUILD_DIR/apr_rules.mk > $abs_builddir/build/rules.mk
         ;;
     *)
-        cp $APR_BUILD_DIR/apr_rules.mk $abs_builddir/build/rules.mk
+        sed -e 's:^LIBTOOL=.*:LIBTOOL=$(WRAPPER_DIR)/bin/libtool:' -e "s:^LDFLAGS=.*:LDFLAGS=${LDFLAGS}:" $APR_BUILD_DIR/apr_rules.mk > $abs_builddir/build/rules.mk
         ;;
 esac
 
