3898
|
1 diff -ur netcdf.orig/src/configure netcdf/src/configure |
|
2 --- netcdf.orig/src/configure 2015-04-12 18:55:55.602652298 -0400 |
|
3 +++ netcdf/src/configure 2015-04-12 18:56:10.946652868 -0400 |
|
4 @@ -601,6 +601,7 @@ |
|
5 mpath |
|
6 subver |
|
7 ver |
|
8 +OCTAVE_CONFIG |
|
9 MKOCTFILE |
|
10 OBJEXT |
|
11 EXEEXT |
|
12 @@ -2610,6 +2611,46 @@ |
|
13 test -z "$MKOCTFILE" && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no mkoctfile found on path" >&5 |
|
14 $as_echo "$as_me: WARNING: no mkoctfile found on path" >&2;} |
|
15 |
|
16 +# Extract the first word of "octave-config", so it can be a program name with args. |
|
17 +set dummy octave-config; ac_word=$2 |
|
18 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
|
19 +$as_echo_n "checking for $ac_word... " >&6; } |
|
20 +if ${ac_cv_prog_OCTAVE_CONFIG+:} false; then : |
|
21 + $as_echo_n "(cached) " >&6 |
|
22 +else |
|
23 + if test -n "$OCTAVE_CONFIG"; then |
|
24 + ac_cv_prog_OCTAVE_CONFIG="$OCTAVE_CONFIG" # Let the user override the test. |
|
25 +else |
|
26 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
|
27 +for as_dir in $PATH |
|
28 +do |
|
29 + IFS=$as_save_IFS |
|
30 + test -z "$as_dir" && as_dir=. |
|
31 + for ac_exec_ext in '' $ac_executable_extensions; do |
|
32 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
|
33 + ac_cv_prog_OCTAVE_CONFIG="octave-config" |
|
34 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
|
35 + break 2 |
|
36 + fi |
|
37 +done |
|
38 + done |
|
39 +IFS=$as_save_IFS |
|
40 + |
|
41 +fi |
|
42 +fi |
|
43 +OCTAVE_CONFIG=$ac_cv_prog_OCTAVE_CONFIG |
|
44 +if test -n "$OCTAVE_CONFIG"; then |
|
45 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCTAVE_CONFIG" >&5 |
|
46 +$as_echo "$OCTAVE_CONFIG" >&6; } |
|
47 +else |
|
48 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
|
49 +$as_echo "no" >&6; } |
|
50 +fi |
|
51 + |
|
52 + |
|
53 +test -z "$OCTAVE_CONFIG" && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no octave-config found on path" >&5 |
|
54 +$as_echo "$as_me: WARNING: no octave-config found on path" >&2;} |
|
55 + |
|
56 |
|
57 |
|
58 |
|
59 @@ -2796,6 +2837,8 @@ |
|
60 |
|
61 |
|
62 |
|
63 + |
|
64 + |
|
65 # Extract the first word of "octave", so it can be a program name with args. |
|
66 set dummy octave; ac_word=$2 |
|
67 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
|
68 @@ -2833,25 +2876,25 @@ |
|
69 fi |
|
70 |
|
71 |
|
72 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCTAVE_VERSION in Octave" >&5 |
|
73 -$as_echo_n "checking for OCTAVE_VERSION in Octave... " >&6; } |
|
74 -OCTAVE_VERSION=`echo "disp(OCTAVE_VERSION)" | $OCTAVE -qf` |
|
75 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VERSION in octave-config" >&5 |
|
76 +$as_echo_n "checking for VERSION in octave-config... " >&6; } |
|
77 +OCTAVE_VERSION=`$OCTAVE_CONFIG -p VERSION` |
|
78 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCTAVE_VERSION" >&5 |
|
79 $as_echo "$OCTAVE_VERSION" >&6; } |
|
80 |
|
81 |
|
82 |
|
83 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for octave_config_info('canonical_host_type') in Octave" >&5 |
|
84 -$as_echo_n "checking for octave_config_info('canonical_host_type') in Octave... " >&6; } |
|
85 -canonical_host_type=`echo "disp(octave_config_info('canonical_host_type'))" | $OCTAVE -qf` |
|
86 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CANONICAL_HOST_TYPE in octave-config" >&5 |
|
87 +$as_echo_n "checking for CANONICAL_HOST_TYPE in octave-config... " >&6; } |
|
88 +canonical_host_type=`$OCTAVE_CONFIG -p CANONICAL_HOST_TYPE` |
|
89 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $canonical_host_type" >&5 |
|
90 $as_echo "$canonical_host_type" >&6; } |
|
91 |
|
92 |
|
93 |
|
94 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for octave_config_info('SHLEXT') in Octave" >&5 |
|
95 -$as_echo_n "checking for octave_config_info('SHLEXT') in Octave... " >&6; } |
|
96 -SHLEXT=`echo "disp(octave_config_info('SHLEXT'))" | $OCTAVE -qf` |
|
97 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHLEXT in octave-config" >&5 |
|
98 +$as_echo_n "checking for SHLEXT in octave-config... " >&6; } |
|
99 +SHLEXT=`$OCTAVE_CONFIG -p SHLEXT` |
|
100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLEXT" >&5 |
|
101 $as_echo "$SHLEXT" >&6; } |
|
102 |
|
103 @@ -3058,11 +3101,105 @@ |
|
104 |
|
105 |
|
106 if test -z "$NC_CONFIG"; then |
|
107 +if test -n "$ac_tool_prefix"; then |
|
108 + # Extract the first word of "${ac_tool_prefix}nc-config", so it can be a program name with args. |
|
109 +set dummy ${ac_tool_prefix}nc-config; ac_word=$2 |
|
110 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
|
111 +$as_echo_n "checking for $ac_word... " >&6; } |
|
112 +if ${ac_cv_prog_NC_CONFIG+:} false; then : |
|
113 + $as_echo_n "(cached) " >&6 |
|
114 +else |
|
115 + if test -n "$NC_CONFIG"; then |
|
116 + ac_cv_prog_NC_CONFIG="$NC_CONFIG" # Let the user override the test. |
|
117 +else |
|
118 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
|
119 +for as_dir in $PATH |
|
120 +do |
|
121 + IFS=$as_save_IFS |
|
122 + test -z "$as_dir" && as_dir=. |
|
123 + for ac_exec_ext in '' $ac_executable_extensions; do |
|
124 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
|
125 + ac_cv_prog_NC_CONFIG="${ac_tool_prefix}nc-config" |
|
126 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
|
127 + break 2 |
|
128 + fi |
|
129 +done |
|
130 + done |
|
131 +IFS=$as_save_IFS |
|
132 + |
|
133 +fi |
|
134 +fi |
|
135 +NC_CONFIG=$ac_cv_prog_NC_CONFIG |
|
136 +if test -n "$NC_CONFIG"; then |
|
137 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NC_CONFIG" >&5 |
|
138 +$as_echo "$NC_CONFIG" >&6; } |
|
139 +else |
|
140 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
|
141 +$as_echo "no" >&6; } |
|
142 +fi |
|
143 + |
|
144 + |
|
145 +fi |
|
146 +if test -z "$ac_cv_prog_NC_CONFIG"; then |
|
147 + ac_ct_NC_CONFIG=$NC_CONFIG |
|
148 + # Extract the first word of "nc-config", so it can be a program name with args. |
|
149 +set dummy nc-config; ac_word=$2 |
|
150 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
|
151 +$as_echo_n "checking for $ac_word... " >&6; } |
|
152 +if ${ac_cv_prog_ac_ct_NC_CONFIG+:} false; then : |
|
153 + $as_echo_n "(cached) " >&6 |
|
154 +else |
|
155 + if test -n "$ac_ct_NC_CONFIG"; then |
|
156 + ac_cv_prog_ac_ct_NC_CONFIG="$ac_ct_NC_CONFIG" # Let the user override the test. |
|
157 +else |
|
158 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
|
159 +for as_dir in $PATH |
|
160 +do |
|
161 + IFS=$as_save_IFS |
|
162 + test -z "$as_dir" && as_dir=. |
|
163 + for ac_exec_ext in '' $ac_executable_extensions; do |
|
164 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
|
165 + ac_cv_prog_ac_ct_NC_CONFIG="nc-config" |
|
166 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
|
167 + break 2 |
|
168 + fi |
|
169 +done |
|
170 + done |
|
171 +IFS=$as_save_IFS |
|
172 + |
|
173 +fi |
|
174 +fi |
|
175 +ac_ct_NC_CONFIG=$ac_cv_prog_ac_ct_NC_CONFIG |
|
176 +if test -n "$ac_ct_NC_CONFIG"; then |
|
177 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NC_CONFIG" >&5 |
|
178 +$as_echo "$ac_ct_NC_CONFIG" >&6; } |
|
179 +else |
|
180 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
|
181 +$as_echo "no" >&6; } |
|
182 +fi |
|
183 + |
|
184 + if test "x$ac_ct_NC_CONFIG" = x; then |
|
185 + NC_CONFIG="nc-config" |
|
186 + else |
|
187 + case $cross_compiling:$ac_tool_warned in |
|
188 +yes:) |
|
189 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
|
190 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
|
191 +ac_tool_warned=yes ;; |
|
192 +esac |
|
193 + NC_CONFIG=$ac_ct_NC_CONFIG |
|
194 + fi |
|
195 +else |
|
196 + NC_CONFIG="$ac_cv_prog_NC_CONFIG" |
|
197 +fi |
|
198 + |
|
199 +fi |
|
200 +if test -z "$NC_CONFIG"; then |
|
201 as_fn_error 1 "nc-config not found" "$LINENO" 5; |
|
202 fi |
|
203 |
|
204 -NETCDF_LIBS="$NETCDF_LIBS `nc-config --libs`" |
|
205 -NETCDF_CFLAGS="$NETCDF_CFLAGS `nc-config --cflags`" |
|
206 +NETCDF_LIBS="$NETCDF_LIBS `$NC_CONFIG --libs`" |
|
207 +NETCDF_CFLAGS="$NETCDF_CFLAGS `$NC_CONFIG --cflags`" |
|
208 |
|
209 |
|
210 CONFIGURE_OUTPUTS="Makeconf" |
|
211 @@ -3082,8 +3219,9 @@ |
|
212 headers: $includedir |
|
213 |
|
214 octave-forge is configured with |
|
215 - octave: $OCTAVE (version $OCTAVE_VERSION) |
|
216 - mkoctfile: $MKOCTFILE for Octave $subver |
|
217 + octave: $OCTAVE (version $OCTAVE_VERSION) |
|
218 + mkoctfile: $MKOCTFILE for Octave $subver |
|
219 + octave-config: $OCTAVE_CONFIG for Octave $subver |
|
220 netCDF compiler flags: $NETCDF_CFLAGS |
|
221 netCDF libraries: $NETCDF_LIBS" |
|
222 ac_config_files="$ac_config_files $CONFIGURE_OUTPUTS" |
|
223 diff -ur netcdf.orig/src/configure.base netcdf/src/configure.base |
|
224 --- netcdf.orig/src/configure.base 2015-04-12 18:55:55.602652298 -0400 |
|
225 +++ netcdf/src/configure.base 2015-04-12 18:56:10.946652868 -0400 |
|
226 @@ -50,6 +50,9 @@ |
|
227 AC_CHECK_PROG(MKOCTFILE,mkoctfile,mkoctfile) |
|
228 test -z "$MKOCTFILE" && AC_MSG_WARN([no mkoctfile found on path]) |
|
229 |
|
230 +AC_CHECK_PROG(OCTAVE_CONFIG,octave-config,octave-config) |
|
231 +test -z "$OCTAVE_CONFIG" && AC_MSG_WARN([no octave-config found on path]) |
|
232 + |
|
233 AC_SUBST(ver) |
|
234 AC_SUBST(subver) |
|
235 AC_SUBST(mpath) |
|
236 @@ -252,6 +255,13 @@ |
|
237 AC_SUBST($2) |
|
238 ]) |
|
239 |
|
240 +AC_DEFUN(OCTAVE_CONFIG_EVAL, |
|
241 +[AC_MSG_CHECKING([for $1 in octave-config]) |
|
242 +$2=`$OCTAVE_CONFIG -p $1` |
|
243 +AC_MSG_RESULT($$2) |
|
244 +AC_SUBST($2) |
|
245 +]) |
|
246 + |
|
247 dnl Check status of an octave variable |
|
248 dnl |
|
249 dnl OCTAVE_CHECK_EXIST(variable,action_if_true,action_if_false) |
|
250 @@ -269,13 +279,13 @@ |
|
251 |
|
252 dnl should check that $(OCTAVE) --version matches $(MKOCTFILE) --version |
|
253 AC_CHECK_PROG(OCTAVE,octave,octave) |
|
254 -OCTAVE_EVAL(OCTAVE_VERSION,OCTAVE_VERSION) |
|
255 +OCTAVE_CONFIG_EVAL(VERSION,OCTAVE_VERSION) |
|
256 |
|
257 dnl grab canonical host type so we can write system specific install stuff |
|
258 -OCTAVE_EVAL(octave_config_info('canonical_host_type'),canonical_host_type) |
|
259 +OCTAVE_CONFIG_EVAL(CANONICAL_HOST_TYPE,canonical_host_type) |
|
260 |
|
261 dnl grab SHLEXT from octave config |
|
262 -OCTAVE_EVAL(octave_config_info('SHLEXT'),SHLEXT) |
|
263 +OCTAVE_CONFIG_EVAL(SHLEXT,SHLEXT) |
|
264 |
|
265 AC_PROG_LN_S |
|
266 |
|
267 @@ -312,11 +322,14 @@ |
|
268 |
|
269 AC_CHECK_PROG(NC_CONFIG, nc-config, nc-config) |
|
270 if test -z "$NC_CONFIG"; then |
|
271 +AC_CHECK_TOOL(NC_CONFIG, nc-config, nc-config) |
|
272 +fi |
|
273 +if test -z "$NC_CONFIG"; then |
|
274 AC_MSG_ERROR([nc-config not found], 1); |
|
275 fi |
|
276 |
|
277 -NETCDF_LIBS="$NETCDF_LIBS `nc-config --libs`" |
|
278 -NETCDF_CFLAGS="$NETCDF_CFLAGS `nc-config --cflags`" |
|
279 +NETCDF_LIBS="$NETCDF_LIBS `$NC_CONFIG --libs`" |
|
280 +NETCDF_CFLAGS="$NETCDF_CFLAGS `$NC_CONFIG --cflags`" |
|
281 |
|
282 |
|
283 CONFIGURE_OUTPUTS="Makeconf" |
|
284 @@ -336,7 +349,8 @@ |
|
285 headers: $includedir |
|
286 |
|
287 octave-forge is configured with |
|
288 - octave: $OCTAVE (version $OCTAVE_VERSION) |
|
289 - mkoctfile: $MKOCTFILE for Octave $subver |
|
290 + octave: $OCTAVE (version $OCTAVE_VERSION) |
|
291 + mkoctfile: $MKOCTFILE for Octave $subver |
|
292 + octave-config: $OCTAVE_CONFIG for Octave $subver |
|
293 netCDF compiler flags: $NETCDF_CFLAGS |
|
294 netCDF libraries: $NETCDF_LIBS" |
|
295 diff -ur netcdf.orig/src/Makeconf.in netcdf/src/Makeconf.in |
|
296 --- netcdf.orig/src/Makeconf.in 2015-04-12 18:55:55.602652298 -0400 |
|
297 +++ netcdf/src/Makeconf.in 2015-04-12 18:58:26.890657913 -0400 |
|
298 @@ -53,6 +53,8 @@ |
|
299 OCTAVE_VERSION = @OCTAVE_VERSION@ |
|
300 MKOCTFILE = @MKOCTFILE@ -DHAVE_OCTAVE_$(ver) -v |
|
301 SHLEXT = @SHLEXT@ |
|
302 +NC_CONFIG = @NC_CONFIG@ |
|
303 +OCTAVE_CONFIG = @OCTAVE_CONFIG@ |
|
304 |
|
305 %.o: %.c ; $(MKOCTFILE) -c $< |
|
306 %.o: %.f ; $(MKOCTFILE) -c $< |
|
307 diff -ur netcdf.orig/src/Makefile netcdf/src/Makefile |
|
308 --- netcdf.orig/src/Makefile 2015-04-12 18:55:55.602652298 -0400 |
|
309 +++ netcdf/src/Makefile 2015-04-12 18:58:31.602658088 -0400 |
|
310 @@ -1,10 +1,13 @@ |
|
311 -LIBS=$(shell nc-config --libs) |
|
312 -AWK=awk |
|
313 -MKOCTFILE=mkoctfile |
|
314 -OCTAVE=octave |
|
315 -NCHEADER=$(shell nc-config --includedir)/netcdf.h |
|
316 +sinclude Makeconf |
|
317 + |
|
318 +AWK ?= awk |
|
319 +MKOCTFILE ?= mkoctfile |
|
320 +OCTAVE ?= octave |
|
321 +NC_CONFIG ?= nc-config |
|
322 +NCHEADER=$(shell $(NC_CONFIG) --includedir)/netcdf.h |
|
323 SRC=__netcdf__.cc |
|
324 -CFLAGS=$(shell nc-config --cflags) |
|
325 +CFLAGS=$(shell $(NC_CONFIG) --cflags) |
|
326 +LIBS=$(shell $(NC_CONFIG) --libs) |
|
327 |
|
328 all: __netcdf__.oct |
|
329 |