From: Joe Orton Date: Thu, 8 Mar 2018 11:27:48 +0000 (+0000) Subject: * modules/lua/config.m4 (CHECK_LUA): Support Debian-style X-Git-Tag: 2.5.0-alpha2-ci-test-only~2807 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=212884210c0e37280580fa95967e1e265a3e555e;p=thirdparty%2Fapache%2Fhttpd.git * modules/lua/config.m4 (CHECK_LUA): Support Debian-style 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 --- diff --git a/modules/lua/config.m4 b/modules/lua/config.m4 index 29fd563af4d..76f33e06e40 100644 --- a/modules/lua/config.m4 +++ b/modules/lua/config.m4 @@ -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