Commit b8940e13 authored by Joe Orton's avatar Joe Orton
Browse files

Merge r1825147 from trunk:

* modules/lua/config.m4: Use liblua paths from pkg-config if
  available.

Reviewed by: wrowe, ylavic, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1825631 13f79535-47bb-0310-9956-ffa450edef68
parent aa4f41ba
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -55,6 +55,13 @@ else
    test_paths="${lua_path}"
fi

if test -n "$PKGCONFIG" -a -z "$lua_path" \
   && $PKGCONFIG --atleast-version=5.1 lua; then
  LUA_LIBS="`$PKGCONFIG --libs lua`"
  LUA_CFLAGS="`$PKGCONFIG --cflags lua`"
  LUA_VERSION="`$PKGCONFIG --modversion lua`"
  AC_MSG_NOTICE([using Lua $LUA_VERSION configuration from pkg-config])
else
  AC_CHECK_LIB(m, pow, lib_m="-lm")
  AC_CHECK_LIB(m, sqrt, lib_m="-lm")
  for x in $test_paths ; do
@@ -72,6 +79,7 @@ for x in $test_paths ; do
    CHECK_LUA_PATH([${x}], [include/lua5.1], [lib], [lua5.1])
    CHECK_LUA_PATH([${x}], [include/lua51], [lib/lua51], [lua])
  done
fi

AC_SUBST(LUA_LIBS)
AC_SUBST(LUA_CFLAGS)