summaryrefslogtreecommitdiffstats
path: root/src/gdal-1-fixes.patch
blob: 4544444acb41bd55ac46d2e7b433abd5ee9e36ee (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
This file is part of MXE.
See index.html for further information.

From ffcbf5c48eb8d8ae6a1c20e1496f1866d7903af8 Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Sat, 18 Oct 2014 18:25:34 -0400
Subject: [PATCH 1/2] Fix geos detection

Signed-off-by: Timothy Gu <timothygu99@gmail.com>

diff --git a/m4/geos.m4 b/m4/geos.m4
index 386a2c8..cda1510 100644
--- a/m4/geos.m4
+++ b/m4/geos.m4
@@ -121,14 +121,14 @@ AC_DEFUN([GEOS_INIT],[
       
       HAVE_GEOS="no"
 
-      GEOS_LIBS="`${GEOS_CONFIG} --ldflags` -lgeos_c"
+      GEOS_LIBS="`${GEOS_CONFIG} --clibs`"
       GEOS_CFLAGS="`${GEOS_CONFIG} --cflags`"
       GEOS_VERSION="`${GEOS_CONFIG} --version`"
 
       ax_save_LIBS="${LIBS}"
-      LIBS=${GEOS_LIBS}
+      LIBS="${LIBS} ${GEOS_LIBS}"
       ax_save_CFLAGS="${CFLAGS}"
-      CFLAGS="${GEOS_CFLAGS}"
+      CFLAGS="${CFLAGS} ${GEOS_CFLAGS}"
 
       AC_CHECK_LIB([geos_c],
         [GEOSversion],
-- 
1.9.1


From 3c60ec35bec710dc9e8fd6f0606abb7646b4f8eb Mon Sep 17 00:00:00 2001
From: Timothy Gu <timothygu99@gmail.com>
Date: Sat, 18 Oct 2014 18:33:43 -0400
Subject: [PATCH 2/2] Use AC_PATH_TOOL for config scripts

Signed-off-by: Timothy Gu <timothygu99@gmail.com>

diff --git a/configure.in b/configure.in
index a0cf595..8ab4b5a 100644
--- a/configure.in
+++ b/configure.in
@@ -640,7 +640,7 @@ AC_ARG_WITH(pg,
 	       [Include PostgreSQL GDAL/OGR Support (ARG=path to pg_config)]),,)
 
 if test "x$with_pg" = "xyes" -o "x$with_pg" = "x" ; then
-  AC_PATH_PROG(PG_CONFIG, pg_config, no)
+  AC_PATH_TOOL(PG_CONFIG, pg_config, no)
 else 
   PG_CONFIG=$with_pg
 fi
@@ -1719,10 +1719,10 @@ else
   dnl find nc-config location
   unset ac_cv_path_NETCDF_NCCONFIG
   if test "$with_netcdf" = "yes" -o "$with_netcdf" = "" ; then
-    AC_PATH_PROG(NETCDF_NCCONFIG, nc-config, no)
+    AC_PATH_TOOL(NETCDF_NCCONFIG, nc-config, no)
   else
     tmp_path="$with_netcdf/bin$PATH_SEPARATOR$with_netcdf"
-    AC_PATH_PROG(NETCDF_NCCONFIG, nc-config, no, $tmp_path)
+    AC_PATH_TOOL(NETCDF_NCCONFIG, nc-config, no, $tmp_path)
   fi
 
   dnl test nc-config
@@ -2447,7 +2447,7 @@ MYSQL_CONFIG=no
 AC_ARG_WITH(mysql,[  --with-mysql[=ARG]      Include MySQL (ARG=path to mysql_config) [[default=no]]],,)
 
 if test "$with_mysql" = "yes" ; then
-  AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no)
+  AC_PATH_TOOL(MYSQL_CONFIG, mysql_config, no)
 else
     if test "x$with_mysql" != "x" ; then
       MYSQL_CONFIG=$with_mysql
@@ -2756,7 +2756,7 @@ if test "`basename xx/$with_curl`" = "curl-config" ; then
 elif test "$with_curl" = "no" ; then
   LIBCURL_CONFIG=no
 else
-  AC_PATH_PROG(LIBCURL_CONFIG, curl-config, no)
+  AC_PATH_TOOL(LIBCURL_CONFIG, curl-config, no)
 fi
 
 if test "$LIBCURL_CONFIG" != "no" ; then
@@ -2798,7 +2798,7 @@ if test "`basename xx/$with_xml2`" = "xml2-config" ; then
 elif test "$with_xml2" = "no" ; then
   LIBXML2_CONFIG=no
 else
-  AC_PATH_PROG(LIBXML2_CONFIG, xml2-config, no)
+  AC_PATH_TOOL(LIBXML2_CONFIG, xml2-config, no)
 fi
 
 if test "$LIBXML2_CONFIG" != "no" ; then
diff --git a/m4/geos.m4 b/m4/geos.m4
index cda1510..3fb4490 100644
--- a/m4/geos.m4
+++ b/m4/geos.m4
@@ -58,7 +58,7 @@ AC_DEFUN([GEOS_INIT],[
 
   elif test x"$with_geos" = x"yes" -o x"$with_geos" = x"" ; then
 
-    AC_PATH_PROG(GEOS_CONFIG, geos-config, no)
+    AC_PATH_TOOL(GEOS_CONFIG, geos-config, no)
     ac_geos_config_auto=yes
 
   else
@@ -133,7 +133,7 @@ AC_DEFUN([GEOS_INIT],[
       AC_CHECK_LIB([geos_c],
         [GEOSversion],
         [HAVE_GEOS="yes"],
-        [HAVE_GEOS="no"],
+        [HAVE_GEOS="no" && echo "$GEOS_LIBS" && exit 1],
         []
       )
 
-- 
1.9.1