break
])
else
+ AC_MSG_CHECKING([for lua.h in ${x}/include/lua-5.1])
+ if test -f ${x}/include/lua-5.1/lua.h; then
+ AC_MSG_RESULT([yes])
+ save_CFLAGS=$CFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CFLAGS="$CFLAGS"
+ LDFLAGS="-L$x/lib/lua-5.1 $LDFLAGS $lib_m"
+ AC_CHECK_LIB(lua-5.1, luaL_newstate, [
+ LUA_LIBS="-L$x/lib/lua-5.1 -llua-5.1 $lib_m"
+ if test "x$ap_platform_runtime_link_flag" != "x"; then
+ APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$x/lib/lua-5.1])
+ fi
+ LUA_CFLAGS="-I$x/include/lua-5.1"
+ ])
+ CFLAGS=$save_CFLAGS
+ LDFLAGS=$save_LDFLAGS
+ break
+ else
+ AC_MSG_RESULT([no])
+ fi
AC_MSG_CHECKING([for lua.h in ${x}/include/lua5.1])
if test -f ${x}/include/lua5.1/lua.h; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
+#
+# Why are we bothering looking for lua 5.2?
+#
+ AC_MSG_CHECKING([for lua.h in ${x}/include/lua-5.2])
+ if test -f ${x}/include/lua-5.2/lua.h; then
+ AC_MSG_RESULT([yes])
+ save_CFLAGS=$CFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CFLAGS="$CFLAGS"
+ LDFLAGS="-L$x/lib/lua-5.2 $LDFLAGS $lib_m"
+ AC_CHECK_LIB(lua-5.2, luaL_newstate, [
+ LUA_LIBS="-L$x/lib/lua-5.2 -llua-5.2 $lib_m"
+ if test "x$ap_platform_runtime_link_flag" != "x"; then
+ APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$x/lib/lua-5.2])
+ fi
+ LUA_CFLAGS="-I$x/include/lua-5.2"
+ ])
+ CFLAGS=$save_CFLAGS
+ LDFLAGS=$save_LDFLAGS
+ break
+ else
+ AC_MSG_RESULT([no])
+ fi
AC_MSG_CHECKING([for lua.h in ${x}/include/lua5.2])
if test -f ${x}/include/lua5.2/lua.h; then
AC_MSG_RESULT([yes])