configure.ac | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-)
New commits: commit cc380501c2ca569ed64e42d488e9fb4084f7cdaf Author: Tomas Chvatal <tomas.chva...@gmail.com> Date: Sat Jan 25 11:44:27 2014 +0100 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 <khaledho...@eglug.org> Tested-by: Khaled Hosny <khaledho...@eglug.org> diff --git a/configure.ac b/configure.ac index 93c39d3..fb51308 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]) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits