mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +03:00
Wrap the apxs command so we can fix -R option not working on solaris.
This commit is contained in:
parent
d350c5f5d9
commit
764fe94ab0
@ -19,6 +19,7 @@ APXS_EXTRA_CFLAGS = @APXS_EXTRA_CFLAGS@
|
|||||||
MODSEC_APXS_EXTRA_CFLAGS = @MODSEC_APXS_EXTRA_CFLAGS@
|
MODSEC_APXS_EXTRA_CFLAGS = @MODSEC_APXS_EXTRA_CFLAGS@
|
||||||
|
|
||||||
APXS = @APXS@
|
APXS = @APXS@
|
||||||
|
APXS_WRAPPER = @APXS_WRAPPER@
|
||||||
APXS_INCLUDES = @APXS_INCLUDES@
|
APXS_INCLUDES = @APXS_INCLUDES@
|
||||||
APXS_CFLAGS = @APXS_CFLAGS@
|
APXS_CFLAGS = @APXS_CFLAGS@
|
||||||
APXS_LDFLAGS = @APXS_LDFLAGS@
|
APXS_LDFLAGS = @APXS_LDFLAGS@
|
||||||
@ -47,9 +48,9 @@ CPPFLAGS=$(PCRE_CFLAGS) $(LIBXML_CFLAGS) $(LUA_CFLAGS)
|
|||||||
LIBS=$(PCRE_LIBS) $(LIBXML_LIBS) $(LUA_LIBS)
|
LIBS=$(PCRE_LIBS) $(LIBXML_LIBS) $(LUA_LIBS)
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
|
|
||||||
COMPILE_APACHE_MOD = $(APXS) -c $(CPPFLAGS) $(LDFLAGS) $(LIBS)
|
COMPILE_APACHE_MOD = $(APXS_WRAPPER) -c $(CPPFLAGS) $(LDFLAGS) $(LIBS)
|
||||||
|
|
||||||
INSTALL_MOD_SHARED = $(APXS) -i
|
INSTALL_MOD_SHARED = $(APXS_WRAPPER) -i
|
||||||
|
|
||||||
all: mod_security2.la
|
all: mod_security2.la
|
||||||
|
|
||||||
|
12
apache2/build/apxs-wrapper.in
Executable file
12
apache2/build/apxs-wrapper.in
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
#!@SHELL@
|
||||||
|
|
||||||
|
WRAPPED_OPTS=""
|
||||||
|
for opt in "$@"; do
|
||||||
|
case "$opt" in
|
||||||
|
# Fix for -R not working w/apxs
|
||||||
|
-R*) WRAPPED_OPTS="$WRAPPED_OPTS -Wl,$opt" ;;
|
||||||
|
*) WRAPPED_OPTS="$WRAPPED_OPTS $opt" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
exec @APXS@ $WRAPPED_OPTS
|
@ -202,6 +202,7 @@ AC_ARG_ENABLE(modsec-api,
|
|||||||
EXTRA_CFLAGS="-O2 -g -Wall -Werror"
|
EXTRA_CFLAGS="-O2 -g -Wall -Werror"
|
||||||
MODSEC_EXTRA_CFLAGS="$debug_conf $debug_cache $debug_acmp $perf_meas $modsec_api"
|
MODSEC_EXTRA_CFLAGS="$debug_conf $debug_cache $debug_acmp $perf_meas $modsec_api"
|
||||||
|
|
||||||
|
APXS_WRAPPER=build/apxs-wrapper
|
||||||
APXS_EXTRA_CFLAGS=""
|
APXS_EXTRA_CFLAGS=""
|
||||||
for f in $EXTRA_CFLAGS; do
|
for f in $EXTRA_CFLAGS; do
|
||||||
APXS_EXTRA_CFLAGS="$APXS_EXTRA_CFLAGS -Wc,$f"
|
APXS_EXTRA_CFLAGS="$APXS_EXTRA_CFLAGS -Wc,$f"
|
||||||
@ -220,6 +221,7 @@ CPPFLAGS=$save_CPPFLAGS
|
|||||||
AC_SUBST(EXTRA_CFLAGS)
|
AC_SUBST(EXTRA_CFLAGS)
|
||||||
AC_SUBST(MODSEC_EXTRA_CFLAGS)
|
AC_SUBST(MODSEC_EXTRA_CFLAGS)
|
||||||
AC_SUBST(APXS)
|
AC_SUBST(APXS)
|
||||||
|
AC_SUBST(APXS_WRAPPER)
|
||||||
AC_SUBST(APXS_INCLUDES)
|
AC_SUBST(APXS_INCLUDES)
|
||||||
AC_SUBST(APXS_EXTRA_CFLAGS)
|
AC_SUBST(APXS_EXTRA_CFLAGS)
|
||||||
AC_SUBST(MODSEC_APXS_EXTRA_CFLAGS)
|
AC_SUBST(MODSEC_APXS_EXTRA_CFLAGS)
|
||||||
@ -235,6 +237,7 @@ CHECK_LUA()
|
|||||||
CHECK_CURL()
|
CHECK_CURL()
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile])
|
AC_CONFIG_FILES([Makefile])
|
||||||
|
AC_CONFIG_FILES([build/apxs-wrapper], [chmod +x build/apxs-wrapper])
|
||||||
if test -e "$PERL"; then
|
if test -e "$PERL"; then
|
||||||
AC_CONFIG_FILES([t/run-tests.pl], [chmod +x t/run-tests.pl])
|
AC_CONFIG_FILES([t/run-tests.pl], [chmod +x t/run-tests.pl])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user