mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Cleanup build to be more portable at searching for libs.
This commit is contained in:
@@ -30,7 +30,7 @@ fi
|
||||
|
||||
AC_MSG_CHECKING([for libapr config script])
|
||||
for x in ${test_paths}; do
|
||||
for APR_CONFIG in apr-config apr-1-config; do
|
||||
for APR_CONFIG in apr-1-config apr-config; do
|
||||
if test -e "${x}/bin/${APR_CONFIG}"; then
|
||||
with_apr="${x}/bin"
|
||||
break
|
||||
@@ -41,9 +41,9 @@ for x in ${test_paths}; do
|
||||
with_apr=""
|
||||
fi
|
||||
done
|
||||
if test -n "$with_apr"; then
|
||||
break
|
||||
fi
|
||||
if test -n "$with_apr"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -n "${with_apr}"; then
|
||||
APR_CONFIG="${with_apr}/${APR_CONFIG}"
|
||||
|
@@ -6,7 +6,7 @@ dnl APU_LDFLAGS
|
||||
dnl APU_LIBS
|
||||
dnl APU_LINK_LD
|
||||
|
||||
APU_CONFIG="apu-1-config"
|
||||
APU_CONFIG=""
|
||||
APU_CFLAGS=""
|
||||
APU_LDFLAGS=""
|
||||
APU_LIBS=""
|
||||
@@ -30,14 +30,19 @@ fi
|
||||
|
||||
AC_MSG_CHECKING([for libapr-util config script])
|
||||
for x in ${test_paths}; do
|
||||
if test -e "${x}/bin/${APU_CONFIG}"; then
|
||||
with_apu="${x}/bin"
|
||||
for APU_CONFIG in apu-1-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
|
||||
|
@@ -5,7 +5,7 @@ dnl LUA_CFLAGS
|
||||
dnl LUA_LIBS
|
||||
|
||||
LUA_CONFIG="pkg-config"
|
||||
LUA_PKGNAME="lua5.1"
|
||||
LUA_PKGNAMES="lua5.1 lua5 lua"
|
||||
LUA_CFLAGS=""
|
||||
LUA_LIBS=""
|
||||
|
||||
@@ -25,7 +25,7 @@ else
|
||||
test_paths="${lua_path}"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for pkg-config script for liblua])
|
||||
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"
|
||||
@@ -36,11 +36,21 @@ for x in ${test_paths}; do
|
||||
done
|
||||
if test -n "${with_lua}"; then
|
||||
LUA_CONFIG="${with_lua}/${LUA_CONFIG}"
|
||||
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
|
||||
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])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
@@ -49,23 +59,23 @@ else
|
||||
for x in ${test_paths}; do
|
||||
if test -e "${x}/liblua5.1.a"; then
|
||||
with_lua_lib="${x}"
|
||||
lua_lib_name="lua5.1"
|
||||
lua_lib_name="lua5.1"
|
||||
break
|
||||
elif test -e "${x}/lib/liblua5.1.a"; then
|
||||
with_lua_lib="${x}/lib"
|
||||
lua_lib_name="lua5.1"
|
||||
lua_lib_name="lua5.1"
|
||||
break
|
||||
elif test -e "${x}/liblua.a"; then
|
||||
with_lua_lib="${x}"
|
||||
lua_lib_name="lua"
|
||||
lua_lib_name="lua"
|
||||
break
|
||||
elif test -e "${x}/lib/liblua.a"; then
|
||||
with_lua_lib="${x}/lib"
|
||||
lua_lib_name="lua"
|
||||
lua_lib_name="lua"
|
||||
break
|
||||
else
|
||||
with_lua_lib=""
|
||||
lua_lib_name=""
|
||||
lua_lib_name=""
|
||||
fi
|
||||
done
|
||||
for x in ${test_paths}; do
|
||||
|
Reference in New Issue
Block a user