| --- curl-7.64.1.orig/configure.ac 2019-03-29 18:14:22.692813700 -0400 |
| +++ curl-7.64.1/configure.ac 2019-03-29 18:52:44.514352300 -0400 |
| @@ -2747,14 +2747,30 @@ |
| with_libpsl=$withval, |
| with_libpsl=yes) |
| if test $with_libpsl != "no"; then |
| - AC_SEARCH_LIBS(psl_builtin, psl, |
| - [curl_psl_msg="enabled"; |
| - AC_DEFINE([USE_LIBPSL], [1], [PSL support enabled]) |
| - ], |
| - [curl_psl_msg="no (libpsl not found)"; |
| - AC_MSG_WARN([libpsl was not found]) |
| - ] |
| - ) |
| + CURL_CHECK_PKGCONFIG(libpsl) |
| + if test "$PKGCONFIG" != "no" ; then |
| + LIB_PSL=`$PKGCONFIG --libs-only-l libpsl` |
| + LD_PSL=`$PKGCONFIG --libs-only-L libpsl` |
| + CPP_PSL=`$PKGCONFIG --cflags-only-I libpsl` |
| + version=`$PKGCONFIG --modversion libpsl` |
| + DIR_PSL=`echo $LD_PSL | $SED -e 's/-L//'` |
| + |
| + AC_DEFINE([USE_LIBPSL], [1], [PSL support enabled]) |
| + LDFLAGS="$LDFLAGS $LD_PSL" |
| + CPPFLAGS="$CPPFLAGS $CPP_PSL" |
| + LIBS="$LIB_PSL $LIBS" |
| + else |
| + dnl no nghttp2 pkg-config found, deal with it |
| + AC_SEARCH_LIBS(psl_builtin, psl, |
| + [curl_psl_msg="enabled"; |
| + AC_DEFINE([USE_LIBPSL], [1], [PSL support enabled]) |
| + ], |
| + [curl_psl_msg="no (libpsl not found)"; |
| + AC_MSG_WARN([libpsl was not found]) |
| + ] |
| + ) |
| + fi |
| + |
| fi |
| AM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "enabled"]) |
| |