simplify liblua detection in configure

This commit is contained in:
Joe Orton 2018-02-26 12:28:41 +00:00
parent 2919621fa4
commit 4af7d39caf
2 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,35 @@
# ./pullrev.sh 1825147
http://svn.apache.org/viewvc?view=revision&revision=1825147
--- httpd-2.4.27/modules/lua/config.m4
+++ httpd-2.4.27/modules/lua/config.m4
@@ -55,9 +55,16 @@
test_paths="${lua_path}"
fi
-AC_CHECK_LIB(m, pow, lib_m="-lm")
-AC_CHECK_LIB(m, sqrt, lib_m="-lm")
-for x in $test_paths ; do
+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
CHECK_LUA_PATH([${x}], [include/lua-5.3], [lib/lua-5.3], [lua-5.3])
CHECK_LUA_PATH([${x}], [include/lua5.3], [lib], [lua5.3])
CHECK_LUA_PATH([${x}], [include/lua53], [lib/lua53], [lua])
@@ -71,7 +78,8 @@
CHECK_LUA_PATH([${x}], [include/lua-5.1], [lib/lua-5.1], [lua-5.1])
CHECK_LUA_PATH([${x}], [include/lua5.1], [lib], [lua5.1])
CHECK_LUA_PATH([${x}], [include/lua51], [lib/lua51], [lua])
-done
+ done
+fi
AC_SUBST(LUA_LIBS)
AC_SUBST(LUA_CFLAGS)

View File

@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.29
Release: 6%{?dist}
Release: 7%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@ -57,6 +57,7 @@ Patch3: httpd-2.4.1-deplibs.patch
Patch5: httpd-2.4.3-layout.patch
Patch6: httpd-2.4.3-apctl-systemd.patch
Patch7: httpd-2.4.27-r1822305.patch
Patch8: httpd-2.4.27-r1825147.patch
# Needed for socket activation and mod_systemd patch
Patch19: httpd-2.4.25-detect-systemd.patch
# Features/functional changes
@ -201,6 +202,7 @@ interface for storing and accessing per-user session data.
%patch5 -p1 -b .layout
%patch6 -p1 -b .apctlsystemd
%patch7 -p1 -b .r1822305
%patch8 -p1 -b .r1825147
%patch19 -p1 -b .detectsystemd
@ -680,6 +682,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
* Mon Feb 26 2018 Joe Orton <jorton@redhat.com> - 2.4.29-7
- simplify liblua detection in configure
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.29-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild