Added ability to specify the config script directly using --with-apr and --with-apu.

This commit is contained in:
b1v1r
2009-03-06 05:43:03 +00:00
parent 2370606d70
commit 97836ef503
4 changed files with 156 additions and 89 deletions

View File

@@ -1,6 +1,9 @@
05 Mar 2009 - 2.5.9 05 Mar 2009 - 2.5.9
------------------- -------------------
* Added ability to specify the config script directly using --with-apr
and --with-apu.
* Updated copyright year to 2009. * Updated copyright year to 2009.
* Added macro expansion for append/prepend action. * Added macro expansion for append/prepend action.

View File

@@ -17,41 +17,56 @@ AC_DEFUN([CHECK_APR],
AC_ARG_WITH( AC_ARG_WITH(
apr, apr,
[AC_HELP_STRING([--with-apr=PATH],[Path to the apr prefix])], [AC_HELP_STRING([--with-apr=PATH],[Path to apr prefix or config script])],
apr_path="$withval", apr_path="${withval}",
:) :)
dnl # Determine apr lib directory AC_MSG_CHECKING([for libapr config script])
if test -z "${apr_path}"; then
test_paths="/usr/local/apr /usr/local /usr" dnl # Determine if the script was specified and use it directly
else if test ! -d "${withval}" -a -e "${withval}"; then
test_paths="${apr_path}" APR_CONFIG="`basename $withval`"
with_apr=`echo ${withval} | sed "s/\/\?${APR_CONFIG}\$//"`
fi fi
AC_MSG_CHECKING([for libapr config script]) dnl # Look for the config script
for x in ${test_paths}; do if test -z "${with_apr}"; then
for APR_CONFIG in apr-1-config apr-config; do dnl # Determine apr lib directory
if test -e "${x}/bin/${APR_CONFIG}"; then if test -z "${apr_path}"; then
with_apr="${x}/bin" 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 break
elif test -e "${x}/${APR_CONFIG}"; then
with_apr="${x}"
break
else
with_apr=""
fi fi
done done
if test -n "$with_apr"; then fi
break
fi
done
if test -n "${with_apr}"; then if test -n "${with_apr}"; then
APR_CONFIG="${with_apr}/${APR_CONFIG}" APR_CONFIG="${with_apr}/${APR_CONFIG}"
AC_MSG_RESULT([${APR_CONFIG}]) AC_MSG_RESULT([${APR_CONFIG}])
APR_CFLAGS="`${APR_CONFIG} --includes --cppflags --cflags`" 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`" 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`" 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`" 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 CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS LDFLAGS=$save_LDFLAGS
else else
@@ -64,10 +79,10 @@ AC_SUBST(APR_LDFLAGS)
AC_SUBST(APR_LINK_LD) AC_SUBST(APR_LINK_LD)
if test -z "${APR_LIBS}"; then if test -z "${APR_LIBS}"; then
AC_MSG_NOTICE([*** apr library not found.]) AC_MSG_NOTICE([*** apr library not found.])
ifelse([$2], , AC_MSG_ERROR([apr library is required]), $2) ifelse([$2], , AC_MSG_ERROR([apr library is required]), $2)
else else
AC_MSG_NOTICE([using '${APR_LIBS}' for apr Library]) AC_MSG_NOTICE([using '${APR_LIBS}' for apr Library])
ifelse([$1], , , $1) ifelse([$1], , , $1)
fi fi
]) ])

View File

@@ -17,41 +17,56 @@ AC_DEFUN([CHECK_APU],
AC_ARG_WITH( AC_ARG_WITH(
apu, 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", apu_path="$withval",
:) :)
dnl # Determine apu lib directory AC_MSG_CHECKING([for libapr-util config script])
if test -z "${apu_path}"; then
test_paths="/usr/local/apr /usr/local /usr" dnl # Determine if the script was specified and use it directly
else if test ! -d "${withval}" -a -e "${withval}"; then
test_paths="${apu_path}" APU_CONFIG="`basename $withval`"
with_apu=`echo ${withval} | sed "s/\/\?${APU_CONFIG}\$//"`
fi fi
AC_MSG_CHECKING([for libapr-util config script]) dnl # Look for the config script
for x in ${test_paths}; do if test -z "${with_apr}"; then
for APU_CONFIG in apu-1-config apu-config; do dnl # Determine apu lib directory
if test -e "${x}/bin/${APU_CONFIG}"; then if test -z "${apu_path}"; then
with_apu="${x}/bin" test_paths="/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 break
elif test -e "${x}/${APU_CONFIG}"; then
with_apu="${x}"
break
else
with_apu=""
fi fi
done done
if test -n "$with_apu"; then fi
break
fi
done
if test -n "${with_apu}"; then if test -n "${with_apu}"; then
APU_CONFIG="${with_apu}/${APU_CONFIG}" APU_CONFIG="${with_apu}/${APU_CONFIG}"
AC_MSG_RESULT([${APU_CONFIG}]) AC_MSG_RESULT([${APU_CONFIG}])
APU_CFLAGS="`${APU_CONFIG} --includes`" 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`" 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`" 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`" 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 CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS LDFLAGS=$save_LDFLAGS
else else

122
apache2/configure vendored
View File

@@ -1315,8 +1315,8 @@ Optional Packages:
will be used as a base for pcre, apr and apu config will be used as a base for pcre, apr and apu config
scripts. scripts.
--with-pcre=PATH Path to the pcre prefix --with-pcre=PATH Path to the pcre prefix
--with-apr=PATH Path to the apr prefix --with-apr=PATH Path to apr prefix or config script
--with-apu=PATH Path to the apu prefix --with-apu=PATH Path to apu prefix or config script
--with-libxml=PATH Path to the libxml2 prefix --with-libxml=PATH Path to the libxml2 prefix
--with-lua=PATH Path to the lua prefix --with-lua=PATH Path to the lua prefix
--with-curl=PATH Path to the curl prefix --with-curl=PATH Path to the curl prefix
@@ -5463,44 +5463,61 @@ fi
# Check whether --with-apr was given. # Check whether --with-apr was given.
if test "${with_apr+set}" = set; then if test "${with_apr+set}" = set; then
withval=$with_apr; apr_path="$withval" withval=$with_apr; apr_path="${withval}"
else else
: :
fi fi
if test -z "${apr_path}"; then
test_paths="/usr/local/apr /usr/local /usr"
else
test_paths="${apr_path}"
fi
{ echo "$as_me:$LINENO: checking for libapr config script" >&5 { echo "$as_me:$LINENO: checking for libapr config script" >&5
echo $ECHO_N "checking for libapr config script... $ECHO_C" >&6; } echo $ECHO_N "checking for libapr config script... $ECHO_C" >&6; }
for x in ${test_paths}; do
for APR_CONFIG in apr-1-config apr-config; do if test ! -d "${withval}" -a -e "${withval}"; then
if test -e "${x}/bin/${APR_CONFIG}"; then APR_CONFIG="`basename $withval`"
with_apr="${x}/bin" with_apr=`echo ${withval} | sed "s/\/\?${APR_CONFIG}\$//"`
fi
if test -z "${with_apr}"; then
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 break
elif test -e "${x}/${APR_CONFIG}"; then
with_apr="${x}"
break
else
with_apr=""
fi fi
done done
if test -n "$with_apr"; then fi
break
fi
done
if test -n "${with_apr}"; then if test -n "${with_apr}"; then
APR_CONFIG="${with_apr}/${APR_CONFIG}" APR_CONFIG="${with_apr}/${APR_CONFIG}"
{ echo "$as_me:$LINENO: result: ${APR_CONFIG}" >&5 { echo "$as_me:$LINENO: result: ${APR_CONFIG}" >&5
echo "${ECHO_T}${APR_CONFIG}" >&6; } echo "${ECHO_T}${APR_CONFIG}" >&6; }
APR_CFLAGS="`${APR_CONFIG} --includes --cppflags --cflags`" APR_CFLAGS="`${APR_CONFIG} --includes --cppflags --cflags`"
if test "$verbose_output" -eq 1; then { echo "$as_me:$LINENO: apr CFLAGS: $APR_CFLAGS" >&5
echo "$as_me: apr CFLAGS: $APR_CFLAGS" >&6;}; fi
APR_LDFLAGS="`${APR_CONFIG} --ldflags`" APR_LDFLAGS="`${APR_CONFIG} --ldflags`"
if test "$verbose_output" -eq 1; then { echo "$as_me:$LINENO: apr LDFLAGS: $APR_LDFLAGS" >&5
echo "$as_me: apr LDFLAGS: $APR_LDFLAGS" >&6;}; fi
APR_LIBS="`${APR_CONFIG} --libs`" APR_LIBS="`${APR_CONFIG} --libs`"
if test "$verbose_output" -eq 1; then { echo "$as_me:$LINENO: apr LIBS: $APR_LIBS" >&5
echo "$as_me: apr LIBS: $APR_LIBS" >&6;}; fi
APR_LINK_LD="`${APR_CONFIG} --link-ld`" APR_LINK_LD="`${APR_CONFIG} --link-ld`"
if test "$verbose_output" -eq 1; then { echo "$as_me:$LINENO: apr LINK_LD: $APR_LINK_LD" >&5
echo "$as_me: apr LINK_LD: $APR_LINK_LD" >&6;}; fi
CFLAGS=$save_CFLAGS CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS LDFLAGS=$save_LDFLAGS
else else
@@ -5514,13 +5531,13 @@ fi
if test -z "${APR_LIBS}"; then if test -z "${APR_LIBS}"; then
{ echo "$as_me:$LINENO: *** apr library not found." >&5 { echo "$as_me:$LINENO: *** apr library not found." >&5
echo "$as_me: *** apr library not found." >&6;} echo "$as_me: *** apr library not found." >&6;}
{ { echo "$as_me:$LINENO: error: apr library is required" >&5 { { echo "$as_me:$LINENO: error: apr library is required" >&5
echo "$as_me: error: apr library is required" >&2;} echo "$as_me: error: apr library is required" >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
else else
{ echo "$as_me:$LINENO: using '${APR_LIBS}' for apr Library" >&5 { echo "$as_me:$LINENO: using '${APR_LIBS}' for apr Library" >&5
echo "$as_me: using '${APR_LIBS}' for apr Library" >&6;} echo "$as_me: using '${APR_LIBS}' for apr Library" >&6;}
fi fi
@@ -5535,38 +5552,55 @@ else
fi fi
if test -z "${apu_path}"; then
test_paths="/usr/local/apr /usr/local /usr"
else
test_paths="${apu_path}"
fi
{ echo "$as_me:$LINENO: checking for libapr-util config script" >&5 { echo "$as_me:$LINENO: checking for libapr-util config script" >&5
echo $ECHO_N "checking for libapr-util config script... $ECHO_C" >&6; } echo $ECHO_N "checking for libapr-util config script... $ECHO_C" >&6; }
for x in ${test_paths}; do
for APU_CONFIG in apu-1-config apu-config; do if test ! -d "${withval}" -a -e "${withval}"; then
if test -e "${x}/bin/${APU_CONFIG}"; then APU_CONFIG="`basename $withval`"
with_apu="${x}/bin" with_apu=`echo ${withval} | sed "s/\/\?${APU_CONFIG}\$//"`
fi
if test -z "${with_apr}"; then
if test -z "${apu_path}"; then
test_paths="/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 break
elif test -e "${x}/${APU_CONFIG}"; then
with_apu="${x}"
break
else
with_apu=""
fi fi
done done
if test -n "$with_apu"; then fi
break
fi
done
if test -n "${with_apu}"; then if test -n "${with_apu}"; then
APU_CONFIG="${with_apu}/${APU_CONFIG}" APU_CONFIG="${with_apu}/${APU_CONFIG}"
{ echo "$as_me:$LINENO: result: ${APU_CONFIG}" >&5 { echo "$as_me:$LINENO: result: ${APU_CONFIG}" >&5
echo "${ECHO_T}${APU_CONFIG}" >&6; } echo "${ECHO_T}${APU_CONFIG}" >&6; }
APU_CFLAGS="`${APU_CONFIG} --includes`" APU_CFLAGS="`${APU_CONFIG} --includes`"
if test "$verbose_output" -eq 1; then { echo "$as_me:$LINENO: apu CFLAGS: $APU_CFLAGS" >&5
echo "$as_me: apu CFLAGS: $APU_CFLAGS" >&6;}; fi
APU_LDFLAGS="`${APU_CONFIG} --ldflags`" APU_LDFLAGS="`${APU_CONFIG} --ldflags`"
if test "$verbose_output" -eq 1; then { echo "$as_me:$LINENO: apu LDFLAGS: $APU_LDFLAGS" >&5
echo "$as_me: apu LDFLAGS: $APU_LDFLAGS" >&6;}; fi
APU_LIBS="`${APU_CONFIG} --libs`" APU_LIBS="`${APU_CONFIG} --libs`"
if test "$verbose_output" -eq 1; then { echo "$as_me:$LINENO: apu LIBS: $APU_LIBS" >&5
echo "$as_me: apu LIBS: $APU_LIBS" >&6;}; fi
APU_LINK_LD="`${APU_CONFIG} --link-ld`" APU_LINK_LD="`${APU_CONFIG} --link-ld`"
if test "$verbose_output" -eq 1; then { echo "$as_me:$LINENO: apu LINK_LD: $APU_LINK_LD" >&5
echo "$as_me: apu LINK_LD: $APU_LINK_LD" >&6;}; fi
CFLAGS=$save_CFLAGS CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS LDFLAGS=$save_LDFLAGS
else else