]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* modules/lua/config.m4 (CHECK_LUA): Support Debian-style
authorJoe Orton <jorton@apache.org>
Thu, 8 Mar 2018 11:27:48 +0000 (11:27 +0000)
committerJoe Orton <jorton@apache.org>
Thu, 8 Mar 2018 11:27:48 +0000 (11:27 +0000)
  pkg-config naming for lua.

Reviewed by: ylavic

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1826206 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/config.m4

index 29fd563af4d5c816275643633241e5a8c0398e2a..76f33e06e40bcbd76c41f06df68dd52bec9e2205 100644 (file)
@@ -55,13 +55,18 @@ 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
+for pklua in lua lua5.3 lua5.2 lua5.1; do
+  if test -n "$PKGCONFIG" -a -z "$lua_path" \
+     && $PKGCONFIG --atleast-version=5.1 $pklua; then
+    LUA_LIBS="`$PKGCONFIG --libs $pklua`"
+    LUA_CFLAGS="`$PKGCONFIG --cflags $pklua`"
+    LUA_VERSION="`$PKGCONFIG --modversion $pklua`"
+    AC_MSG_NOTICE([using Lua $LUA_VERSION configuration from pkg-config])
+    break
+  fi
+done
+
+if test -z "$LUA_VERSION"; then
   AC_CHECK_LIB(m, pow, lib_m="-lm")
   AC_CHECK_LIB(m, sqrt, lib_m="-lm")
   for x in $test_paths ; do