diff --git a/apache2/Makefile.am b/apache2/Makefile.am index df5af555..f79f5077 100644 --- a/apache2/Makefile.am +++ b/apache2/Makefile.am @@ -43,7 +43,7 @@ mod_security2_la_LDFLAGS = -module -avoid-version \ endif if LINUX -mod_security2_la_LDFLAGS = -no-undefined -module -avoid-version \ +mod_security2_la_LDFLAGS = -no-undefined -module -avoid-version -R @PCRE_LD_PATH@ \ @APR_LDFLAGS@ @APU_LDFLAGS@ @APXS_LDFLAGS@ \ @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@ endif diff --git a/build/find_pcre.m4 b/build/find_pcre.m4 index 45e13ea5..3d6985c5 100644 --- a/build/find_pcre.m4 +++ b/build/find_pcre.m4 @@ -10,6 +10,7 @@ PCRE_CPPFLAGS="" PCRE_CFLAGS="" PCRE_LDFLAGS="" PCRE_LDADD="" +PCRE_LD_PATH="" AC_DEFUN([CHECK_PCRE], [dnl @@ -65,6 +66,8 @@ if test -n "${pcre_path}"; then if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(pcre CFLAGS: $PCRE_CFLAGS); fi PCRE_LDADD="`${PCRE_CONFIG} --libs`" if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(pcre LDADD: $PCRE_LDADD); fi + PCRE_LD_PATH="/`${PCRE_CONFIG} --libs | cut -d"/" -f2,3,4,5,6 | cut -d " " -f1`" + if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(pcre PCRE_LD_PATH: $PCRE_LD_PATH); fi else AC_MSG_RESULT([no]) fi @@ -75,6 +78,7 @@ AC_SUBST(PCRE_CPPFLAGS) AC_SUBST(PCRE_CFLAGS) AC_SUBST(PCRE_LDFLAGS) AC_SUBST(PCRE_LDADD) +AC_SUBST(PCRE_LD_PATH) if test -z "${PCRE_VERSION}"; then AC_MSG_NOTICE([*** pcre library not found.])