summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTomas Chvatal <tomas.chvatal@gmail.com>2014-01-25 11:44:27 +0100
committerKhaled Hosny <khaledhosny@eglug.org>2014-01-26 09:18:08 +0000
commitcc380501c2ca569ed64e42d488e9fb4084f7cdaf (patch)
tree4a4661da3cdeaef7dc3ec7cb281555b96dbd34c5 /configure.ac
parentdf5503af6a472afc40d2f5f144c616ebb686c248 (diff)
Use pkgconfig to detect curl first, then fallback to curl-config.
Change-Id: I3666c4d0298a76062a24ad8ae1c319f3480a9290 Reviewed-on: https://gerrit.libreoffice.org/7643 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac44
1 files changed, 18 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac
index 93c39d312595..fb5130856577 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8661,39 +8661,31 @@ if test "$with_system_curl" = "yes"; then
AC_MSG_RESULT([external])
SYSTEM_CURL=YES
- curl_version=""
- if test "$cross_compiling" = "yes"; then
- dnl At least the OBS mingw32-libcurl-devel package
- dnl comes with a proper .pc file
- PKG_CHECK_MODULES(CURL, libcurl,, [:])
- 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_MSG_CHECKING([whether libcurl is >= 7.19.4])
+
+ # First try PKGCONFIG and then fall back
+ PKG_CHECK_MODULES(CURL, libcurl >= 7.19.4,, [:])
+
+ if test -n "$CURL_PKG_ERRORS"; then
AC_PATH_PROG(CURLCONFIG, curl-config)
if test -z "$CURLCONFIG"; then
- AC_MSG_ERROR([install the libcurl development package])
+ AC_MSG_ERROR([curl developement files not found])
fi
CURL_LIBS=`$CURLCONFIG --libs`
CURL_CFLAGS=$("$CURLCONFIG" --cflags | sed -e "s/-I/${ISYSTEM?}/g")
curl_version=`$CURLCONFIG --version | $SED -e 's/^libcurl //'`
- fi
-
- AC_MSG_CHECKING([whether libcurl is >= 7.19.4])
- case $curl_version in
- 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
- 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])
- ;;
- esac
+ case $curl_version in
+ 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
+ 7.19.4|7.19.[[5-9]]|7.[[2-9]]?.*|7.???.*|[[8-9]].*|[[1-9]][[0-9]].*)
+ ;;
+ *)
+ AC_MSG_ERROR([no, you have $curl_version])
+ ;;
+ esac
+ fi
+ AC_MSG_RESULT([yes])
libo_MINGW_CHECK_DLL([libcurl])
libo_MINGW_TRY_DLL([libintl])