From: Steve Brokenshire Date: Wed, 22 Feb 2017 20:05:08 +0000 (+0000) Subject: configure: cURL 7.52.0 required X-Git-Tag: release-0.18~21 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=cdba54633f5c27c7771f9c9ca57cbfa9c59722d8;p=xestiaab%2F.git configure: cURL 7.52.0 required --- diff --git a/source/configure b/source/configure index 3b51dcf..12f4636 100755 --- a/source/configure +++ b/source/configure @@ -642,6 +642,8 @@ FOUND_FILE FOUND_CURLCONFIG_RES_FALSE FOUND_CURLCONFIG_RES_TRUE FOUND_CURLCONFIG +cURL_LIBS +cURL_CFLAGS SFML_LIBS SFML_CFLAGS PKG_CONFIG_LIBDIR @@ -741,7 +743,9 @@ PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR SFML_CFLAGS -SFML_LIBS' +SFML_LIBS +cURL_CFLAGS +cURL_LIBS' # Initialize some variables set by options. @@ -1382,6 +1386,8 @@ Some influential environment variables: path overriding pkg-config's built-in search path SFML_CFLAGS C compiler flags for SFML, overriding pkg-config SFML_LIBS linker flags for SFML, overriding pkg-config + cURL_CFLAGS C compiler flags for cURL, overriding pkg-config + cURL_LIBS linker flags for cURL, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -4616,6 +4622,98 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # curl Library +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cURL" >&5 +$as_echo_n "checking for cURL... " >&6; } + +if test -n "$cURL_CFLAGS"; then + pkg_cv_cURL_CFLAGS="$cURL_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl >= 7.52.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcurl >= 7.52.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_cURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl >= 7.52.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$cURL_LIBS"; then + pkg_cv_cURL_LIBS="$cURL_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl >= 7.52.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libcurl >= 7.52.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_cURL_LIBS=`$PKG_CONFIG --libs "libcurl >= 7.52.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + cURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcurl >= 7.52.0" 2>&1` + else + cURL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcurl >= 7.52.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$cURL_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (libcurl >= 7.52.0) were not met: + +$cURL_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables cURL_CFLAGS +and cURL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables cURL_CFLAGS +and cURL_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + cURL_CFLAGS=$pkg_cv_cURL_CFLAGS + cURL_LIBS=$pkg_cv_cURL_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcurl" >&5 $as_echo_n "checking for main in -lcurl... " >&6; } if ${ac_cv_lib_curl_main+:} false; then : diff --git a/source/configure.ac b/source/configure.ac index 563d562..f35d2ed 100644 --- a/source/configure.ac +++ b/source/configure.ac @@ -97,6 +97,8 @@ AC_LANG_POP([C++]) # curl Library +PKG_CHECK_MODULES([cURL], [libcurl >= 7.52.0]) + AC_CHECK_LIB([curl], [main], [], [echo "The cURL library must be installed on your system. Please check that this library is installed properly before running configure again."