mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Merge 2.5.x build changes back to trunk.
This commit is contained in:
@@ -18,46 +18,38 @@ AC_DEFUN([CHECK_APR],
|
||||
AC_ARG_WITH(
|
||||
apr,
|
||||
[AC_HELP_STRING([--with-apr=PATH],[Path to apr prefix or config script])],
|
||||
apr_path="${withval}",
|
||||
:)
|
||||
[test_paths="${with_apr}"],
|
||||
[test_paths="/usr/local/libapr /usr/local/apr /usr/local /opt/libapr /opt/apr /opt /usr"])
|
||||
|
||||
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
|
||||
|
||||
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}"
|
||||
for x in ${test_paths}; do
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "$x" -a -e "$x"; then
|
||||
APR_CONFIG="`basename $x`"
|
||||
apr_path=`echo $x | sed "s/\/\?${APR_CONFIG}\$//"`
|
||||
break
|
||||
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
|
||||
dnl # Try known config script names/locations
|
||||
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
|
||||
apr_path="${x}/bin"
|
||||
break
|
||||
elif test -e "${x}/${APR_CONFIG}"; then
|
||||
apr_path="${x}"
|
||||
break
|
||||
else
|
||||
apr_path=""
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test -n "$apr_path"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "${with_apr}"; then
|
||||
APR_CONFIG="${with_apr}/${APR_CONFIG}"
|
||||
if test -n "${apr_path}"; then
|
||||
APR_CONFIG="${apr_path}/${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
|
||||
|
@@ -18,46 +18,38 @@ AC_DEFUN([CHECK_APU],
|
||||
AC_ARG_WITH(
|
||||
apu,
|
||||
[AC_HELP_STRING([--with-apu=PATH],[Path to apu prefix or config script])],
|
||||
apu_path="$withval",
|
||||
:)
|
||||
[test_paths="${with_apu}"],
|
||||
[test_paths="/usr/local/libapr-util /usr/local/apr-util /usr/local/libapu /usr/local/apu /usr/local /opt/libapr-util /opt/apr-util /opt/libapu /opt/apu /opt /usr"])
|
||||
|
||||
AC_MSG_CHECKING([for libapr-util config script])
|
||||
AC_MSG_CHECKING([for libapu 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
|
||||
|
||||
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}"
|
||||
for x in ${test_paths}; do
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "$x" -a -e "$x"; then
|
||||
APU_CONFIG="`basename $x`"
|
||||
apu_path=`echo $x | sed "s/\/\?${APU_CONFIG}\$//"`
|
||||
break
|
||||
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
|
||||
dnl # Try known config script names/locations
|
||||
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
|
||||
apu_path="${x}/bin"
|
||||
break
|
||||
elif test -e "${x}/${APU_CONFIG}"; then
|
||||
apu_path="${x}"
|
||||
break
|
||||
else
|
||||
apu_path=""
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test -n "$apu_path"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if test -n "${with_apu}"; then
|
||||
APU_CONFIG="${with_apu}/${APU_CONFIG}"
|
||||
if test -n "${apu_path}"; then
|
||||
APU_CONFIG="${apu_path}/${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
|
||||
@@ -79,10 +71,10 @@ AC_SUBST(APU_LDFLAGS)
|
||||
AC_SUBST(APU_LINK_LD)
|
||||
|
||||
if test -z "${APU_LIBS}"; then
|
||||
AC_MSG_NOTICE([*** apu library not found.])
|
||||
ifelse([$2], , AC_MSG_ERROR([apu library is required]), $2)
|
||||
AC_MSG_NOTICE([*** apu library not found.])
|
||||
ifelse([$2], , AC_MSG_ERROR([apu library is required]), $2)
|
||||
else
|
||||
AC_MSG_NOTICE([using '${APU_LINK_LD}' for apu Library])
|
||||
ifelse([$1], , , $1)
|
||||
AC_MSG_NOTICE([using '${APU_LIBS}' for apu Library])
|
||||
ifelse([$1], , , $1)
|
||||
fi
|
||||
])
|
||||
|
@@ -4,42 +4,70 @@ dnl Sets:
|
||||
dnl CURL_CFLAGS
|
||||
dnl CURL_LIBS
|
||||
|
||||
CURL_CONFIG="curl-config"
|
||||
CURL_CONFIG=""
|
||||
CURL_CFLAGS=""
|
||||
CURL_LIBS=""
|
||||
CURL_MIN_VERSION="7.15.1"
|
||||
|
||||
AC_DEFUN([CHECK_CURL],
|
||||
[dnl
|
||||
|
||||
AC_ARG_WITH(
|
||||
curl,
|
||||
[AC_HELP_STRING([--with-curl=PATH],[Path to the curl prefix])],
|
||||
curl_path="$withval",
|
||||
:)
|
||||
|
||||
dnl # Determine curl lib directory
|
||||
if test -z "${curl_path}"; then
|
||||
test_paths="/usr/local /usr"
|
||||
else
|
||||
test_paths="${curl_path}"
|
||||
fi
|
||||
[AC_HELP_STRING([--with-curl=PATH],[Path to curl prefix or config script])],
|
||||
[test_paths="${with_curl}"],
|
||||
[test_paths="/usr/local/libcurl /usr/local/curl /usr/local /opt/libcurl /opt/curl /opt /usr"])
|
||||
|
||||
AC_MSG_CHECKING([for libcurl config script])
|
||||
|
||||
for x in ${test_paths}; do
|
||||
if test -e "${x}/bin/${CURL_CONFIG}"; then
|
||||
with_curl="${x}/bin"
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "$x" -a -e "$x"; then
|
||||
CURL_CONFIG="`basename $x`"
|
||||
curl_path=`echo $x | sed "s/\/\?${CURL_CONFIG}\$//"`
|
||||
break
|
||||
fi
|
||||
|
||||
dnl # Try known config script names/locations
|
||||
for CURL_CONFIG in curl-config; do
|
||||
if test -e "${x}/bin/${CURL_CONFIG}"; then
|
||||
curl_path="${x}/bin"
|
||||
break
|
||||
elif test -e "${x}/${CURL_CONFIG}"; then
|
||||
curl_path="${x}"
|
||||
break
|
||||
else
|
||||
curl_path=""
|
||||
fi
|
||||
done
|
||||
if test -n "$curl_path"; then
|
||||
break
|
||||
else
|
||||
with_curl=""
|
||||
fi
|
||||
done
|
||||
if test -n "${with_curl}"; then
|
||||
CURL_CONFIG="${with_curl}/${CURL_CONFIG}"
|
||||
|
||||
if test -n "${curl_path}"; then
|
||||
CURL_CONFIG="${curl_path}/${CURL_CONFIG}"
|
||||
AC_MSG_RESULT([${CURL_CONFIG}])
|
||||
CURL_CFLAGS="`${CURL_CONFIG} --cflags`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl CFLAGS: $CURL_CFLAGS); fi
|
||||
CURL_LIBS="`${CURL_CONFIG} --libs`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl LIBS: $CURL_LIBS); fi
|
||||
CURL_VERSION=`${CURL_CONFIG} --version | sed 's/^[[^0-9]][[^[:space:]]][[^[:space:]]]*[[[:space:]]]*//'`
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(curl VERSION: $CURL_VERSION); fi
|
||||
CFLAGS=$save_CFLAGS
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
|
||||
dnl # Check version is ok
|
||||
AC_MSG_CHECKING([if libcurl is at least v${CURL_MIN_VERSION}])
|
||||
curl_min_ver=`echo ${CURL_MIN_VERSION} | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'`
|
||||
curl_ver=`echo ${CURL_VERSION} | awk -F. '{print (\$ 1 * 1000000) + (\$ 2 * 1000) + \$ 3}'`
|
||||
if test "$curl_min_ver" -le "$curl_ver"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_NOTICE([NOTE: curl library may be too old: $CURL_VERSION])
|
||||
fi
|
||||
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
@@ -4,10 +4,11 @@ dnl Sets:
|
||||
dnl LUA_CFLAGS
|
||||
dnl LUA_LIBS
|
||||
|
||||
LUA_CONFIG="pkg-config"
|
||||
LUA_PKGNAMES="lua5.1 lua5 lua"
|
||||
LUA_CONFIG=""
|
||||
LUA_CFLAGS=""
|
||||
LUA_LIBS=""
|
||||
LUA_CONFIG=pkg-config
|
||||
LUA_PKGNAMES="lua5.1 lua-5.1 lua_5.1 lua-51 lua_51 lua51 lua5 lua"
|
||||
LUA_SONAMES="so la sl dll dylib"
|
||||
|
||||
AC_DEFUN([CHECK_LUA],
|
||||
@@ -15,146 +16,154 @@ AC_DEFUN([CHECK_LUA],
|
||||
|
||||
AC_ARG_WITH(
|
||||
lua,
|
||||
[AC_HELP_STRING([--with-lua=PATH],[Path to the lua prefix])],
|
||||
lua_path="$withval",
|
||||
:)
|
||||
[AC_HELP_STRING([--with-lua=PATH],[Path to lua prefix or config script])],
|
||||
[test_paths="${with_lua}"],
|
||||
[test_paths="/usr/local/liblua /usr/local/lua /usr/local /opt/liblua /opt/lua /opt /usr"; ])
|
||||
|
||||
if test "${lua_path}" != "no"; then
|
||||
dnl # Determine lua lib directory
|
||||
if test -z "${lua_path}"; then
|
||||
test_paths="/usr /usr/local /opt"
|
||||
else
|
||||
test_paths="${lua_path}"
|
||||
AC_MSG_CHECKING([for liblua config script])
|
||||
|
||||
for x in ${test_paths}; do
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "$x" -a -e "$x"; then
|
||||
LUA_CONFIG="$x"
|
||||
break
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for pkg-config script for lua library])
|
||||
for x in ${test_paths}; do
|
||||
if test -e "${x}/bin/${LUA_CONFIG}"; then
|
||||
with_lua="${x}/bin"
|
||||
dnl # Try known config script names/locations
|
||||
for y in $LUA_CONFIG; do
|
||||
if test -e "${x}/bin/${y}"; then
|
||||
LUA_CONFIG="${x}/bin/${y}"
|
||||
lua_config="${LUA_CONFIG}"
|
||||
break
|
||||
elif test -e "${x}/${y}"; then
|
||||
LUA_CONFIG="${x}/${y}"
|
||||
lua_config="${LUA_CONFIG}"
|
||||
break
|
||||
else
|
||||
with_lua=""
|
||||
fi
|
||||
done
|
||||
if test -n "${with_lua}"; then
|
||||
LUA_CONFIG="${with_lua}/${LUA_CONFIG}"
|
||||
for LUA_PKGNAME in ${LUA_PKGNAMES}; do
|
||||
if ${LUA_CONFIG} --exists ${LUA_PKGNAME}; then
|
||||
break
|
||||
fi
|
||||
LUA_PKGNAME=""
|
||||
done
|
||||
if test -n "$LUA_PKGNAME"; then
|
||||
AC_MSG_RESULT([${LUA_CONFIG} ${LUA_PKGNAME}])
|
||||
LUA_CFLAGS="`${LUA_CONFIG} ${LUA_PKGNAME} --cflags`"
|
||||
LUA_LIBS="`${LUA_CONFIG} ${LUA_PKGNAME} --libs`"
|
||||
CFLAGS=$save_CFLAGS
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
if test -n "${lua_config}"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
dnl # Try known package names
|
||||
if test -n "${LUA_CONFIG}"; then
|
||||
LUA_PKGNAME=""
|
||||
for x in ${LUA_PKGNAMES}; do
|
||||
if ${LUA_CONFIG} --exists ${x}; then
|
||||
LUA_PKGNAME="$x"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "${LUA_PKGNAME}"; then
|
||||
AC_MSG_RESULT([${LUA_CONFIG}])
|
||||
LUA_CFLAGS="`${LUA_CONFIG} ${LUA_PKGNAME} --cflags`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(lua CFLAGS: $LUA_CFLAGS); fi
|
||||
LUA_LIBS="`${LUA_CONFIG} ${LUA_PKGNAME} --libs`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(lua LIBS: $LUA_LIBS); fi
|
||||
CFLAGS=$save_CFLAGS
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
dnl Hack to just try to find the lib and include
|
||||
AC_MSG_CHECKING([for lua install])
|
||||
for x in ${test_paths}; do
|
||||
for y in ${LUA_SONAMES}; do
|
||||
if test -e "${x}/liblua5.1.${y}"; then
|
||||
lua_lib_path="${x}"
|
||||
lua_lib_name="lua5.1"
|
||||
break
|
||||
elif test -e "${x}/lib/liblua5.1.${y}"; then
|
||||
lua_lib_path="${x}/lib"
|
||||
lua_lib_name="lua5.1"
|
||||
break
|
||||
elif test -e "${x}/lib64/liblua5.1.${y}"; then
|
||||
lua_lib_path="${x}/lib64"
|
||||
lua_lib_name="lua5.1"
|
||||
break
|
||||
elif test -e "${x}/lib32/liblua5.1.${y}"; then
|
||||
lua_lib_path="${x}/lib32"
|
||||
lua_lib_name="lua5.1"
|
||||
break
|
||||
elif test -e "${x}/liblua51.${y}"; then
|
||||
lua_lib_path="${x}"
|
||||
lua_lib_name="lua51"
|
||||
break
|
||||
elif test -e "${x}/lib/liblua51.${y}"; then
|
||||
lua_lib_path="${x}/lib"
|
||||
lua_lib_name="lua51"
|
||||
break
|
||||
elif test -e "${x}/lib64/liblua51.${y}"; then
|
||||
lua_lib_path="${x}/lib64"
|
||||
lua_lib_name="lua51"
|
||||
break
|
||||
elif test -e "${x}/lib32/liblua51.${y}"; then
|
||||
lua_lib_path="${x}/lib32"
|
||||
lua_lib_name="lua51"
|
||||
break
|
||||
elif test -e "${x}/liblua.${y}"; then
|
||||
lua_lib_path="${x}"
|
||||
lua_lib_name="lua"
|
||||
break
|
||||
elif test -e "${x}/lib/liblua.${y}"; then
|
||||
lua_lib_path="${x}/lib"
|
||||
lua_lib_name="lua"
|
||||
break
|
||||
elif test -e "${x}/lib64/liblua.${y}"; then
|
||||
lua_lib_path="${x}/lib64"
|
||||
lua_lib_name="lua"
|
||||
break
|
||||
elif test -e "${x}/lib32/liblua.${y}"; then
|
||||
lua_lib_path="${x}/lib32"
|
||||
lua_lib_name="lua"
|
||||
break
|
||||
else
|
||||
lua_lib_path=""
|
||||
lua_lib_name=""
|
||||
fi
|
||||
done
|
||||
if test -n "$lua_lib_path"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
for x in ${test_paths}; do
|
||||
if test -e "${x}/include/lua.h"; then
|
||||
lua_inc_path="${x}/include"
|
||||
break
|
||||
elif test -e "${x}/lua.h"; then
|
||||
lua_inc_path="${x}"
|
||||
break
|
||||
fi
|
||||
|
||||
dnl # Check some sub-paths as well
|
||||
for lua_pkg_name in ${lua_lib_name} ${LUA_PKGNAMES}; do
|
||||
if test -e "${x}/include/${lua_pkg_name}/lua.h"; then
|
||||
lua_inc_path="${x}/include"
|
||||
break
|
||||
elif test -e "${x}/${lua_pkg_name}/lua.h"; then
|
||||
lua_inc_path="${x}"
|
||||
break
|
||||
else
|
||||
lua_inc_path=""
|
||||
fi
|
||||
done
|
||||
if test -n "$lua_inc_path"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -n "${lua_lib_path}" -a -n "${lua_inc_path}"; then
|
||||
LUA_CONFIG=""
|
||||
AC_MSG_RESULT([${lua_lib_path} ${lua_inc_path}])
|
||||
LUA_CFLAGS="-I${lua_inc_path}"
|
||||
LUA_LIBS="-L${lua_lib_path} -l${lua_lib_name}"
|
||||
CFLAGS=$save_CFLAGS
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
dnl Hack to just try to find the lib and include
|
||||
AC_MSG_CHECKING([for lua install])
|
||||
for x in ${test_paths}; do
|
||||
for y in ${LUA_SONAMES}; do
|
||||
if test -e "${x}/liblua5.1.${y}"; then
|
||||
with_lua_lib="${x}"
|
||||
lua_lib_name="lua5.1"
|
||||
break
|
||||
elif test -e "${x}/lib/liblua5.1.${y}"; then
|
||||
with_lua_lib="${x}/lib"
|
||||
lua_lib_name="lua5.1"
|
||||
break
|
||||
elif test -e "${x}/lib64/liblua5.1.${y}"; then
|
||||
with_lua_lib="${x}/lib64"
|
||||
lua_lib_name="lua5.1"
|
||||
break
|
||||
elif test -e "${x}/lib32/liblua5.1.${y}"; then
|
||||
with_lua_lib="${x}/lib32"
|
||||
lua_lib_name="lua5.1"
|
||||
break
|
||||
elif test -e "${x}/liblua51.${y}"; then
|
||||
with_lua_lib="${x}"
|
||||
lua_lib_name="lua51"
|
||||
break
|
||||
elif test -e "${x}/lib/liblua51.${y}"; then
|
||||
with_lua_lib="${x}/lib"
|
||||
lua_lib_name="lua51"
|
||||
break
|
||||
elif test -e "${x}/lib64/liblua51.${y}"; then
|
||||
with_lua_lib="${x}/lib64"
|
||||
lua_lib_name="lua51"
|
||||
break
|
||||
elif test -e "${x}/lib32/liblua51.${y}"; then
|
||||
with_lua_lib="${x}/lib32"
|
||||
lua_lib_name="lua51"
|
||||
break
|
||||
elif test -e "${x}/liblua.${y}"; then
|
||||
with_lua_lib="${x}"
|
||||
lua_lib_name="lua"
|
||||
break
|
||||
elif test -e "${x}/lib/liblua.${y}"; then
|
||||
with_lua_lib="${x}/lib"
|
||||
lua_lib_name="lua"
|
||||
break
|
||||
elif test -e "${x}/lib64/liblua.${y}"; then
|
||||
with_lua_lib="${x}/lib64"
|
||||
lua_lib_name="lua"
|
||||
break
|
||||
elif test -e "${x}/lib32/liblua.${y}"; then
|
||||
with_lua_lib="${x}/lib32"
|
||||
lua_lib_name="lua"
|
||||
break
|
||||
else
|
||||
with_lua_lib=""
|
||||
lua_lib_name=""
|
||||
fi
|
||||
done
|
||||
if test -n "$with_lua_lib"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
for x in ${test_paths}; do
|
||||
if test -e "${x}/include/lua.h"; then
|
||||
with_lua_inc="${x}/include"
|
||||
break
|
||||
elif test -e "${x}/lua.h"; then
|
||||
with_lua_inc="${x}"
|
||||
break
|
||||
fi
|
||||
|
||||
dnl # Check some sub-paths as well
|
||||
for lua_pkg_name in ${lua_lib_name} ${LUA_PKGNAMES}; do
|
||||
if test -e "${x}/include/${lua_pkg_name}/lua.h"; then
|
||||
with_lua_inc="${x}/include"
|
||||
break
|
||||
elif test -e "${x}/${lua_pkg_name}/lua.h"; then
|
||||
with_lua_inc="${x}"
|
||||
break
|
||||
else
|
||||
with_lua_inc=""
|
||||
fi
|
||||
done
|
||||
if test -n "$with_lua_inc"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -n "${with_lua_lib}" -a -n "${with_lua_inc}"; then
|
||||
LUA_CONFIG=""
|
||||
AC_MSG_RESULT([${with_lua_lib} ${with_lua_inc}])
|
||||
LUA_CFLAGS="-I${with_lua_inc}"
|
||||
LUA_LIBS="-L${with_lua_lib} -l${lua_lib_name}"
|
||||
CFLAGS=$save_CFLAGS
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
AC_MSG_NOTICE([not using optional lua library])
|
||||
fi
|
||||
|
||||
if test -n "${LUA_LIBS}"; then
|
||||
@@ -164,7 +173,7 @@ fi
|
||||
AC_SUBST(LUA_LIBS)
|
||||
AC_SUBST(LUA_CFLAGS)
|
||||
|
||||
if test "${lua_path}" != "no"; then
|
||||
if test "${with_path}" != "no"; then
|
||||
if test -z "${LUA_LIBS}"; then
|
||||
ifelse([$2], , AC_MSG_NOTICE([optional lua library not found]), $2)
|
||||
else
|
||||
|
@@ -4,7 +4,7 @@ dnl Sets:
|
||||
dnl PCRE_CFLAGS
|
||||
dnl PCRE_LIBS
|
||||
|
||||
PCRE_CONFIG="pcre-config"
|
||||
PCRE_CONFIG=""
|
||||
PCRE_CFLAGS=""
|
||||
PCRE_LIBS=""
|
||||
|
||||
@@ -13,34 +13,53 @@ AC_DEFUN([CHECK_PCRE],
|
||||
|
||||
AC_ARG_WITH(
|
||||
pcre,
|
||||
[AC_HELP_STRING([--with-pcre=PATH],[Path to the pcre prefix])],
|
||||
pcre_path="$withval",
|
||||
:)
|
||||
|
||||
dnl # Determine pcre lib directory
|
||||
if test -z "${pcre_path}"; then
|
||||
test_paths="/usr/local /usr"
|
||||
else
|
||||
test_paths="${pcre_path}"
|
||||
fi
|
||||
[AC_HELP_STRING([--with-pcre=PATH],[Path to pcre prefix or config script])],
|
||||
[test_paths="${with_pcre}"],
|
||||
[test_paths="/usr/local/libpcre /usr/local/pcre /usr/local /opt/libpcre /opt/pcre /opt /usr"])
|
||||
|
||||
AC_MSG_CHECKING([for libpcre config script])
|
||||
|
||||
dnl # Determine pcre lib directory
|
||||
if test -z "${with_pcre}"; then
|
||||
test_paths="/usr/local/pcre /usr/local /usr"
|
||||
else
|
||||
test_paths="${with_pcre}"
|
||||
fi
|
||||
|
||||
for x in ${test_paths}; do
|
||||
if test -e "${x}/bin/${PCRE_CONFIG}"; then
|
||||
with_pcre="${x}/bin"
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "$x" -a -e "$x"; then
|
||||
PCRE_CONFIG="`basename $x`"
|
||||
pcre_path=`echo $x | sed "s/\/\?${PCRE_CONFIG}\$//"`
|
||||
break
|
||||
elif test -e "${x}/${PCRE_CONFIG}"; then
|
||||
with_pcre="${x}"
|
||||
fi
|
||||
|
||||
dnl # Try known config script names/locations
|
||||
for PCRE_CONFIG in pcre-config; do
|
||||
if test -e "${x}/bin/${PCRE_CONFIG}"; then
|
||||
pcre_path="${x}/bin"
|
||||
break
|
||||
elif test -e "${x}/${PCRE_CONFIG}"; then
|
||||
pcre_path="${x}"
|
||||
break
|
||||
else
|
||||
pcre_path=""
|
||||
fi
|
||||
done
|
||||
if test -n "$pcre_path"; then
|
||||
break
|
||||
else
|
||||
with_pcre=""
|
||||
fi
|
||||
done
|
||||
if test -n "${with_pcre}"; then
|
||||
PCRE_CONFIG="${with_pcre}/${PCRE_CONFIG}"
|
||||
CFLAGS=$save_CFLAGS
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
|
||||
if test -n "${pcre_path}"; then
|
||||
PCRE_CONFIG="${pcre_path}/${PCRE_CONFIG}"
|
||||
AC_MSG_RESULT([${PCRE_CONFIG}])
|
||||
PCRE_CFLAGS="`${PCRE_CONFIG} --cflags`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(pcre CFLAGS: $PCRE_CFLAGS); fi
|
||||
PCRE_LIBS="`${PCRE_CONFIG} --libs`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(pcre LIBS: $PCRE_LIBS); fi
|
||||
CFLAGS=$save_CFLAGS
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
else
|
||||
@@ -51,10 +70,10 @@ AC_SUBST(PCRE_LIBS)
|
||||
AC_SUBST(PCRE_CFLAGS)
|
||||
|
||||
if test -z "${PCRE_LIBS}"; then
|
||||
AC_MSG_NOTICE([*** pcre library not found.])
|
||||
ifelse([$2], , AC_MSG_ERROR([pcre library is required]), $2)
|
||||
AC_MSG_NOTICE([*** pcre library not found.])
|
||||
ifelse([$2], , AC_MSG_ERROR([pcre library is required]), $2)
|
||||
else
|
||||
AC_MSG_NOTICE([using '${PCRE_LIBS}' for pcre Library])
|
||||
ifelse([$1], , , $1)
|
||||
AC_MSG_NOTICE([using '${PCRE_LIBS}' for pcre Library])
|
||||
ifelse([$1], , , $1)
|
||||
fi
|
||||
])
|
||||
|
@@ -1,57 +1,72 @@
|
||||
dnl Check for XML Libraries
|
||||
dnl CHECK_LIBXML(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
||||
dnl Check for LIBXML2 Libraries
|
||||
dnl CHECK_LIBXML2(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
||||
dnl Sets:
|
||||
dnl LIBXML_CFLAGS
|
||||
dnl LIBXML_LIBS
|
||||
dnl LIBXML2_CFLAGS
|
||||
dnl LIBXML2_LIBS
|
||||
|
||||
LIBXML_CONFIG="xml2-config"
|
||||
LIBXML_CFLAGS=""
|
||||
LIBXML_LIBS=""
|
||||
LIBXML2_CONFIG=""
|
||||
LIBXML2_CFLAGS=""
|
||||
LIBXML2_LIBS=""
|
||||
|
||||
AC_DEFUN([CHECK_LIBXML],
|
||||
AC_DEFUN([CHECK_LIBXML2],
|
||||
[dnl
|
||||
|
||||
AC_ARG_WITH(
|
||||
libxml,
|
||||
[AC_HELP_STRING([--with-libxml=PATH],[Path to the libxml2 prefix])],
|
||||
libxml_path="$withval",
|
||||
:)
|
||||
|
||||
dnl # Determine xml lib directory
|
||||
if test -z "${libxml_path}"; then
|
||||
test_paths="/usr/local /usr"
|
||||
else
|
||||
test_paths="${libxml_path}"
|
||||
fi
|
||||
xml,
|
||||
[AC_HELP_STRING([--with-xml=PATH],[Path to xml prefix or config script])],
|
||||
[test_paths="${with_xml}"],
|
||||
[test_paths="/usr/local/libxml2 /usr/local/xml2 /usr/local/xml /usr/local /opt/libxml2 /opt/libxml /opt/xml2 /opt/xml /opt /usr"])
|
||||
|
||||
AC_MSG_CHECKING([for libxml2 config script])
|
||||
|
||||
for x in ${test_paths}; do
|
||||
if test -e "${x}/bin/${LIBXML_CONFIG}"; then
|
||||
with_libxml="${x}/bin"
|
||||
dnl # Determine if the script was specified and use it directly
|
||||
if test ! -d "$x" -a -e "$x"; then
|
||||
LIBXML2_CONFIG="`basename $x`"
|
||||
xml_path=`echo $x | sed "s/\/\?${LIBXML2_CONFIG}\$//"`
|
||||
break
|
||||
fi
|
||||
|
||||
dnl # Try known config script names/locations
|
||||
for LIBXML2_CONFIG in xml2-config xml-2-config xml-config; do
|
||||
if test -e "${x}/bin/${LIBXML2_CONFIG}"; then
|
||||
xml_path="${x}/bin"
|
||||
break
|
||||
elif test -e "${x}/${LIBXML2_CONFIG}"; then
|
||||
xml_path="${x}"
|
||||
break
|
||||
else
|
||||
xml_path=""
|
||||
fi
|
||||
done
|
||||
if test -n "$xml_path"; then
|
||||
break
|
||||
else
|
||||
with_libxml=""
|
||||
fi
|
||||
done
|
||||
if test -n "${with_libxml}"; then
|
||||
LIBXML_CONFIG="${with_libxml}/${LIBXML_CONFIG}"
|
||||
AC_MSG_RESULT([${LIBXML_CONFIG}])
|
||||
LIBXML_CFLAGS="`${LIBXML_CONFIG} --cflags`"
|
||||
LIBXML_LIBS="`${LIBXML_CONFIG} --libs`"
|
||||
CFLAGS=$save_CFLAGS
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
|
||||
if test -n "${xml_path}"; then
|
||||
LIBXML2_CONFIG="${xml_path}/${LIBXML2_CONFIG}"
|
||||
AC_MSG_RESULT([${LIBXML2_CONFIG}])
|
||||
LIBXML2_CFLAGS="`${LIBXML2_CONFIG} --cflags`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(xml CFLAGS: $LIBXML2_CFLAGS); fi
|
||||
LIBXML2_LIBS="`${LIBXML2_CONFIG} --libs`"
|
||||
if test "$verbose_output" -eq 1; then AC_MSG_NOTICE(xml LIBS: $LIBXML2_LIBS); fi
|
||||
CFLAGS=$save_CFLAGS
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBXML_LIBS)
|
||||
AC_SUBST(LIBXML_CFLAGS)
|
||||
AC_SUBST(LIBXML2_LIBS)
|
||||
AC_SUBST(LIBXML2_CFLAGS)
|
||||
|
||||
if test -z "${LIBXML_LIBS}"; then
|
||||
AC_MSG_NOTICE([*** libxml2 library not found.])
|
||||
ifelse([$2], , AC_MSG_ERROR([libxml2 library is required]), $2)
|
||||
if test -z "${LIBXML2_LIBS}"; then
|
||||
AC_MSG_NOTICE([*** xml library not found.])
|
||||
ifelse([$2], , AC_MSG_ERROR([xml library is required]), $2)
|
||||
else
|
||||
AC_MSG_NOTICE([using '${LIBXML_LIBS}' for libxml Library])
|
||||
ifelse([$1], , , $1)
|
||||
AC_MSG_NOTICE([using '${LIBXML2_LIBS}' for xml Library])
|
||||
ifelse([$1], , , $1)
|
||||
fi
|
||||
])
|
||||
|
Reference in New Issue
Block a user