Cleanup build to be more portable at searching for libs.

This commit is contained in:
brectanus
2008-02-06 20:02:01 +00:00
parent fd8f4e319f
commit 46cb2beeba
3 changed files with 39 additions and 24 deletions

View File

@@ -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

View File

@@ -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,6 +30,7 @@ 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"
break
@@ -39,6 +40,10 @@ for x in ${test_paths}; do
else
with_apu=""
fi
done
if test -n "$with_apu"; then
break
fi
done
if test -n "${with_apu}"; then
APU_CONFIG="${with_apu}/${APU_CONFIG}"

View File

@@ -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}"
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])