summaryrefslogtreecommitdiff
path: root/app-office/libreoffice/files/libreoffice-4.2.0.4-curl-config.patch
blob: e07f5ad92f1b46ee2db2488f4b1fe72183442bbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
--- a/configure.ac	2014-01-27 22:35:34.000000000 +0100
+++ b/configure.ac	2014-02-02 23:27:50.911033565 +0100
@@ -8606,39 +8606,31 @@
     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.13.1])
+
+    # First try PKGCONFIG and then fall back
+    PKG_CHECK_MODULES(CURL, libcurl >= 7.13.1,, [:])
+
+    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 development 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.13.1])
 
-    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.13.1|7.1[[4-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.13.1|7.1[[4-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])