Allow user specify openssl and curl used by env
@@ -106,6 +106,7 @@ if test "${SWOW}" != "no"; then
swow_check_git()
{
# prove git found
+ test x"$SWOW_GIT" != x"no" || return 1
test x"$SWOW_GIT" != x"" || return 1
# prove git dir exists
test -d ${ext_srcdir}/../.git || return 1
@@ -464,16 +465,19 @@ EOF
fi
dnl SWOW_PKG_CHECK_MODULES($varname, $libname, $ver, $search_path, $if_found, $if_not_found)
AC_DEFUN([SWOW_PKG_CHECK_MODULES],[
+ AC_MSG_CHECKING(for $2 $3 or greater)
+ if test "x${$1_LIBS+set}" = "xset" || test "x${$1_INCLUDES+set}" = "xset"; then
+ AC_MSG_RESULT([using $1_CFLAGS and $1_LIBS])
+ $1_LIBS=${$1_CFLAGS}
+ $1_INCL=${$1_LIBS}
+ $5
+ elif test -x "$PKG_CONFIG" ; then
dnl find pkg using pkg-config cli tool
- if test ! -x "$PKG_CONFIG" ; then
- AC_MSG_WARN([Cannot find package $2: pkg-config not found])
- fi
SWOW_PKG_FIND_PATH=${$4}
if test "xyes" = "x${$4}" ; then
SWOW_PKG_FIND_PATH=
fi
- AC_MSG_CHECKING(for $2 $3 or greater)
- dnl shall we find env first?
+
dnl echo env PKG_CONFIG_PATH=${SWOW_PKG_FIND_PATH}/lib/pkgconfig $PKG_CONFIG --atleast-version $3 $2
dnl env PKG_CONFIG_PATH=${SWOW_PKG_FIND_PATH}/lib/pkgconfig $PKG_CONFIG --atleast-version $3 $2; echo $?
dnl env PKG_CONFIG_PATH=${SWOW_PKG_FIND_PATH}/lib/pkgconfig $PKG_CONFIG --modversion $2
@@ -487,6 +491,11 @@ EOF
AC_MSG_RESULT(no)
$6
fi
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_WARN([Cannot find pkg-config, please set $1_CFLAGS and $1_LIBS to use $2])
+ $6
+ fi
])
dnl add ssl sources
if test "x${PHP_SWOW_SSL}" != "xno" ; then
