Kaydet (Commit) cc380501 authored tarafından Tomas Chvatal's avatar Tomas Chvatal Kaydeden (comit) Khaled Hosny

Use pkgconfig to detect curl first, then fallback to curl-config.

Change-Id: I3666c4d0298a76062a24ad8ae1c319f3480a9290
Reviewed-on: https://gerrit.libreoffice.org/7643Reviewed-by: 's avatarKhaled Hosny <khaledhosny@eglug.org>
Tested-by: 's avatarKhaled Hosny <khaledhosny@eglug.org>
üst df5503af
...@@ -8661,39 +8661,31 @@ if test "$with_system_curl" = "yes"; then ...@@ -8661,39 +8661,31 @@ if test "$with_system_curl" = "yes"; then
AC_MSG_RESULT([external]) AC_MSG_RESULT([external])
SYSTEM_CURL=YES SYSTEM_CURL=YES
curl_version="" AC_MSG_CHECKING([whether libcurl is >= 7.19.4])
if test "$cross_compiling" = "yes"; then
dnl At least the OBS mingw32-libcurl-devel package # First try PKGCONFIG and then fall back
dnl comes with a proper .pc file PKG_CHECK_MODULES(CURL, libcurl >= 7.19.4,, [:])
PKG_CHECK_MODULES(CURL, libcurl,, [:])
if test -n "$CURL_PKG_ERRORS"; then if test -n "$CURL_PKG_ERRORS"; then
AC_MSG_RESULT([no])
else
curl_version=`$PKG_CONFIG --modversion libcurl`
fi
fi
if test -z "$curl_version"; then
AC_PATH_PROG(CURLCONFIG, curl-config) AC_PATH_PROG(CURLCONFIG, curl-config)
if test -z "$CURLCONFIG"; then if test -z "$CURLCONFIG"; then
AC_MSG_ERROR([install the libcurl development package]) AC_MSG_ERROR([curl developement files not found])
fi fi
CURL_LIBS=`$CURLCONFIG --libs` CURL_LIBS=`$CURLCONFIG --libs`
CURL_CFLAGS=$("$CURLCONFIG" --cflags | sed -e "s/-I/${ISYSTEM?}/g") CURL_CFLAGS=$("$CURLCONFIG" --cflags | sed -e "s/-I/${ISYSTEM?}/g")
curl_version=`$CURLCONFIG --version | $SED -e 's/^libcurl //'` curl_version=`$CURLCONFIG --version | $SED -e 's/^libcurl //'`
fi
AC_MSG_CHECKING([whether libcurl is >= 7.19.4])
case $curl_version in case $curl_version in
dnl brackets doubled below because Autoconf uses them as m4 quote characters, dnl brackets doubled below because Autoconf uses them as m4 quote characters,
dnl so they need to be doubled to end up in the configure script dnl so they need to be doubled to end up in the configure script
7.19.4|7.19.[[5-9]]|7.[[2-9]]?.*|7.???.*|[[8-9]].*|[[1-9]][[0-9]].*) 7.19.4|7.19.[[5-9]]|7.[[2-9]]?.*|7.???.*|[[8-9]].*|[[1-9]][[0-9]].*)
AC_MSG_RESULT([yes, you have $curl_version]) ;;
;; *)
*) AC_MSG_ERROR([no, you have $curl_version])
AC_MSG_ERROR([no, you have $curl_version]) ;;
;; esac
esac fi
AC_MSG_RESULT([yes])
libo_MINGW_CHECK_DLL([libcurl]) libo_MINGW_CHECK_DLL([libcurl])
libo_MINGW_TRY_DLL([libintl]) libo_MINGW_TRY_DLL([libintl])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment