mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Makes libCurl optional during configure
This commit is contained in:
parent
d8793e444f
commit
cf4377df70
@ -12,8 +12,8 @@ CURL_LDFLAGS=""
|
||||
CURL_LDADD=""
|
||||
CURL_MIN_VERSION="7.15.1"
|
||||
|
||||
AC_DEFUN([CHECK_CURL],
|
||||
[dnl
|
||||
AC_DEFUN([CHECK_CURL], [
|
||||
|
||||
|
||||
AC_ARG_WITH(
|
||||
curl,
|
||||
@ -100,11 +100,32 @@ AC_SUBST(CURL_LDFLAGS)
|
||||
AC_SUBST(CURL_LDADD)
|
||||
AC_SUBST(CURL_USES_GNUTLS)
|
||||
|
||||
if test -z "${CURL_VERSION}"; then
|
||||
AC_MSG_NOTICE([*** curl library not found.])
|
||||
ifelse([$2], , AC_MSG_ERROR([curl library is required]), $2)
|
||||
if test "x${with_curl}" == "xno"; then
|
||||
CURL_DISABLED=yes
|
||||
else
|
||||
AC_MSG_NOTICE([using curl v${CURL_VERSION}])
|
||||
ifelse([$1], , , $1)
|
||||
fi
|
||||
if test "x${with_curl}" != "x"; then
|
||||
CURL_MANDATORY=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "${CURL_VERSION}"; then
|
||||
AC_MSG_NOTICE([*** curl library not found.])
|
||||
if test -z "${CURL_MANDATORY}"; then
|
||||
if test -z "${CURL_DISABLED}"; then
|
||||
CURL_FOUND=0
|
||||
else
|
||||
CURL_FOUND=2
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([Curl was explicitly referenced but it was not found])
|
||||
CURL_FOUND=-1
|
||||
fi
|
||||
else
|
||||
CURL_FOUND=1
|
||||
AC_MSG_NOTICE([using curl v${CURL_VERSION}])
|
||||
CURL_DISPLAY="${CURL_LDADD}, ${CURL_CFLAGS}"
|
||||
fi
|
||||
|
||||
AC_SUBST(CURL_FOUND)
|
||||
AC_SUBST(CURL_DISPLAY)
|
||||
])
|
||||
|
23
configure.ac
23
configure.ac
@ -232,6 +232,8 @@ echo SECLANG_TEST_VERSION
|
||||
|
||||
echo " "
|
||||
echo " Optional dependencies"
|
||||
|
||||
## GeoIP
|
||||
if test "x$GEOIP_FOUND" = "x0"; then
|
||||
echo " + GeoIP ....not found"
|
||||
fi
|
||||
@ -247,4 +249,23 @@ fi
|
||||
if test "x$GEOIP_FOUND" = "x2"; then
|
||||
echo " + GeoIP ....disabled"
|
||||
fi
|
||||
echo " "
|
||||
|
||||
|
||||
## LibCurl
|
||||
if test "x$CURL_FOUND" = "x0"; then
|
||||
echo " + LibCURL ....not found"
|
||||
fi
|
||||
if test "x$CURL_FOUND" = "x1"; then
|
||||
echo -n " + LibCURL ....found "
|
||||
if ! test "x$CURL_VERSION" = "x"; then
|
||||
echo "v${CURL_VERSION}"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
echo " ${CURL_DISPLAY}"
|
||||
fi
|
||||
if test "x$CURL_FOUND" = "x2"; then
|
||||
echo " + LibCURL ....disabled"
|
||||
fi
|
||||
|
||||
echo " "
|
||||
|
Loading…
x
Reference in New Issue
Block a user