mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Merge 2.5.9 changes into trunk.
This commit is contained in:
@@ -17,41 +17,56 @@ AC_DEFUN([CHECK_APR],
|
||||
|
||||
AC_ARG_WITH(
|
||||
apr,
|
||||
[AC_HELP_STRING([--with-apr=PATH],[Path to the apr prefix])],
|
||||
apr_path="$withval",
|
||||
[AC_HELP_STRING([--with-apr=PATH],[Path to apr prefix or config script])],
|
||||
apr_path="${withval}",
|
||||
:)
|
||||
|
||||
dnl # Determine apr lib directory
|
||||
if test -z "${apr_path}"; then
|
||||
test_paths="/usr/local/apr /usr/local /usr"
|
||||
else
|
||||
test_paths="${apr_path}"
|
||||
AC_MSG_CHECKING([for libapr config script])
|
||||
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "${withval}" -a -e "${withval}"; then
|
||||
APR_CONFIG="`basename $withval`"
|
||||
with_apr=`echo ${withval} | sed "s/\/\?${APR_CONFIG}\$//"`
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for libapr config script])
|
||||
for x in ${test_paths}; do
|
||||
for APR_CONFIG in apr-1-config apr-config; do
|
||||
if test -e "${x}/bin/${APR_CONFIG}"; then
|
||||
with_apr="${x}/bin"
|
||||
dnl # Look for the config script
|
||||
if test -z "${with_apr}"; then
|
||||
dnl # Determine apr lib directory
|
||||
if test -z "${apr_path}"; then
|
||||
test_paths="/usr/local/apr /usr/local /usr"
|
||||
else
|
||||
test_paths="${apr_path}"
|
||||
fi
|
||||
|
||||
for x in ${test_paths}; do
|
||||
for APR_CONFIG in apr-1-mt-config apr-1-config apr-mt-config apr-config; do
|
||||
if test -e "${x}/bin/${APR_CONFIG}"; then
|
||||
with_apr="${x}/bin"
|
||||
break
|
||||
elif test -e "${x}/${APR_CONFIG}"; then
|
||||
with_apr="${x}"
|
||||
break
|
||||
else
|
||||
with_apr=""
|
||||
fi
|
||||
done
|
||||
if test -n "$with_apr"; then
|
||||
break
|
||||
elif test -e "${x}/${APR_CONFIG}"; then
|
||||
with_apr="${x}"
|
||||
break
|
||||
else
|
||||
with_apr=""
|
||||
fi
|
||||
done
|
||||
if test -n "$with_apr"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "${with_apr}"; then
|
||||
APR_CONFIG="${with_apr}/${APR_CONFIG}"
|
||||
AC_MSG_RESULT([${APR_CONFIG}])
|
||||
APR_CFLAGS="`${APR_CONFIG} --includes --cppflags --cflags`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apr CFLAGS: $APR_CFLAGS); fi
|
||||
APR_LDFLAGS="`${APR_CONFIG} --ldflags`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apr LDFLAGS: $APR_LDFLAGS); fi
|
||||
APR_LIBS="`${APR_CONFIG} --libs`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apr LIBS: $APR_LIBS); fi
|
||||
APR_LINK_LD="`${APR_CONFIG} --link-ld`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apr LINK_LD: $APR_LINK_LD); fi
|
||||
CFLAGS=$save_CFLAGS
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
else
|
||||
@@ -64,10 +79,10 @@ AC_SUBST(APR_LDFLAGS)
|
||||
AC_SUBST(APR_LINK_LD)
|
||||
|
||||
if test -z "${APR_LIBS}"; then
|
||||
AC_MSG_NOTICE([*** apr library not found.])
|
||||
ifelse([$2], , AC_MSG_ERROR([apr library is required]), $2)
|
||||
AC_MSG_NOTICE([*** apr library not found.])
|
||||
ifelse([$2], , AC_MSG_ERROR([apr library is required]), $2)
|
||||
else
|
||||
AC_MSG_NOTICE([using '${APR_LIBS}' for apr Library])
|
||||
ifelse([$1], , , $1)
|
||||
AC_MSG_NOTICE([using '${APR_LIBS}' for apr Library])
|
||||
ifelse([$1], , , $1)
|
||||
fi
|
||||
])
|
||||
|
@@ -17,41 +17,56 @@ AC_DEFUN([CHECK_APU],
|
||||
|
||||
AC_ARG_WITH(
|
||||
apu,
|
||||
[AC_HELP_STRING([--with-apu=PATH],[Path to the apu prefix])],
|
||||
[AC_HELP_STRING([--with-apu=PATH],[Path to apu prefix or config script])],
|
||||
apu_path="$withval",
|
||||
:)
|
||||
|
||||
dnl # Determine apu lib directory
|
||||
if test -z "${apu_path}"; then
|
||||
test_paths="/usr/local/apr /usr/local /usr"
|
||||
else
|
||||
test_paths="${apu_path}"
|
||||
AC_MSG_CHECKING([for libapr-util config script])
|
||||
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "${withval}" -a -e "${withval}"; then
|
||||
APU_CONFIG="`basename $withval`"
|
||||
with_apu=`echo ${withval} | sed "s/\/\?${APU_CONFIG}\$//"`
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for libapr-util config script])
|
||||
for x in ${test_paths}; do
|
||||
for APU_CONFIG in apu-1-config apu-config; do
|
||||
if test -e "${x}/bin/${APU_CONFIG}"; then
|
||||
with_apu="${x}/bin"
|
||||
dnl # Look for the config script
|
||||
if test -z "${with_apu}"; then
|
||||
dnl # Determine apu lib directory
|
||||
if test -z "${apu_path}"; then
|
||||
test_paths="/usr/local/apr-util /usr/local/apu /usr/local/apr /usr/local /usr"
|
||||
else
|
||||
test_paths="${apu_path}"
|
||||
fi
|
||||
|
||||
for x in ${test_paths}; do
|
||||
for APU_CONFIG in apu-1-mt-config apu-1-config apu-mt-config apu-config; do
|
||||
if test -e "${x}/bin/${APU_CONFIG}"; then
|
||||
with_apu="${x}/bin"
|
||||
break
|
||||
elif test -e "${x}/${APU_CONFIG}"; then
|
||||
with_apu="${x}"
|
||||
break
|
||||
else
|
||||
with_apu=""
|
||||
fi
|
||||
done
|
||||
if test -n "$with_apu"; then
|
||||
break
|
||||
elif test -e "${x}/${APU_CONFIG}"; then
|
||||
with_apu="${x}"
|
||||
break
|
||||
else
|
||||
with_apu=""
|
||||
fi
|
||||
done
|
||||
if test -n "$with_apu"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "${with_apu}"; then
|
||||
APU_CONFIG="${with_apu}/${APU_CONFIG}"
|
||||
AC_MSG_RESULT([${APU_CONFIG}])
|
||||
APU_CFLAGS="`${APU_CONFIG} --includes`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apu CFLAGS: $APU_CFLAGS); fi
|
||||
APU_LDFLAGS="`${APU_CONFIG} --ldflags`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apu LDFLAGS: $APU_LDFLAGS); fi
|
||||
APU_LIBS="`${APU_CONFIG} --libs`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apu LIBS: $APU_LIBS); fi
|
||||
APU_LINK_LD="`${APU_CONFIG} --link-ld`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(apu LINK_LD: $APU_LINK_LD); fi
|
||||
CFLAGS=$save_CFLAGS
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
else
|
||||
|
Reference in New Issue
Block a user