# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by scripts/Create-CopyPatch. # # T2 SDE: package/*/lighttpd/pcre.patch.cross # Copyright (C) 2021 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- --- lighttpd-1.4.59/configure.ac 2021-02-02 15:11:28.000000000 +0200 +++ configure.ac 2021-08-28 21:48:53.960207523 +0300 @@ -911,23 +911,15 @@ AC_MSG_RESULT([$WITH_PCRE]) if test "$WITH_PCRE" != no; then - if test "$WITH_PCRE" != yes; then - PCRE_LIB="-L$WITH_PCRE/lib -lpcre" - CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include" - else - AC_PATH_PROG([PCRECONFIG], [pcre-config]) - if test -n "$PCRECONFIG"; then - PCRE_LIB=`"$PCRECONFIG" --libs` - CPPFLAGS="$CPPFLAGS `"$PCRECONFIG" --cflags`" - fi - fi - - if test -z "$PCRE_LIB"; then - AC_MSG_ERROR([pcre-config not found, install the pcre-devel package or build with --without-pcre]) - fi - + + PKG_CHECK_MODULES(PCRE, libpcre >= 6.7,[ AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre]) AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h]) + ]) + AC_SUBST(PCRE_CFLAGS) + AC_SUBST(PCRE_LIBS) + PCRE_LIB="$PCRE_LIBS" + AC_SUBST([PCRE_LIB]) fi