comparison src/of-octcdf-1-cross-fixes.patch @ 3904:3d16df45776b

of-octcdf: add to mxe * src/of-octcdf.mk: new file * src/of-octcdf-1-cross-fixes.patch: new file * dist-files.mk: add of-octcdf.mk, of-octcdf-1-cross-fixes.patch * Makefile.in: add octcdf to forge packages * index.html: add of-octcdf
author John Donoghue
date Tue, 14 Apr 2015 13:16:40 -0400
parents
children b5a28d770997
comparison
equal deleted inserted replaced
3903:385f5f4412b7 3904:3d16df45776b
1 diff -ur octcdf.orig/src/configure octcdf/src/configure
2 --- octcdf.orig/src/configure 2015-04-14 11:21:17.161247377 -0400
3 +++ octcdf/src/configure 2015-04-14 11:22:49.289084238 -0400
4 @@ -195,8 +195,7 @@
5 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
6 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
7 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
8 - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
9 -test \$(( 1 + 1 )) = 2 || exit 1"
10 + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
11 if (eval "$as_required") 2>/dev/null; then :
12 as_have_required=yes
13 else
14 @@ -583,50 +582,12 @@
15 PACKAGE_URL=
16
17 ac_unique_file="configure.base"
18 -# Factoring default headers for most tests.
19 -ac_includes_default="\
20 -#include <stdio.h>
21 -#ifdef HAVE_SYS_TYPES_H
22 -# include <sys/types.h>
23 -#endif
24 -#ifdef HAVE_SYS_STAT_H
25 -# include <sys/stat.h>
26 -#endif
27 -#ifdef STDC_HEADERS
28 -# include <stdlib.h>
29 -# include <stddef.h>
30 -#else
31 -# ifdef HAVE_STDLIB_H
32 -# include <stdlib.h>
33 -# endif
34 -#endif
35 -#ifdef HAVE_STRING_H
36 -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
37 -# include <memory.h>
38 -# endif
39 -# include <string.h>
40 -#endif
41 -#ifdef HAVE_STRINGS_H
42 -# include <strings.h>
43 -#endif
44 -#ifdef HAVE_INTTYPES_H
45 -# include <inttypes.h>
46 -#endif
47 -#ifdef HAVE_STDINT_H
48 -# include <stdint.h>
49 -#endif
50 -#ifdef HAVE_UNISTD_H
51 -# include <unistd.h>
52 -#endif"
53 -
54 ac_subst_vars='LTLIBOBJS
55 LIBOBJS
56 OCTCDF_CFLAGS
57 OCTCDF_LIBS
58 HAVE_NETCDF
59 -EGREP
60 -GREP
61 -CPP
62 +NC_CONFIG
63 STRIP
64 COPY_FLAGS
65 RANLIB
66 @@ -643,6 +604,7 @@
67 mpath
68 subver
69 ver
70 +OCTAVE_CONFIG
71 MKOCTFILE
72 OBJEXT
73 EXEEXT
74 @@ -710,8 +672,7 @@
75 CFLAGS
76 LDFLAGS
77 LIBS
78 -CPPFLAGS
79 -CPP'
80 +CPPFLAGS'
81
82
83 # Initialize some variables set by options.
84 @@ -1334,7 +1295,6 @@
85 LIBS libraries to pass to the linker, e.g. -l<library>
86 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
87 you have headers in a nonstandard directory <include dir>
88 - CPP C preprocessor
89
90 Use these variables to override the choices made by `configure' or to help
91 it to find libraries and programs with nonstandard names/locations.
92 @@ -1453,249 +1413,6 @@
93 as_fn_set_status $ac_retval
94
95 } # ac_fn_c_try_compile
96 -
97 -# ac_fn_c_try_link LINENO
98 -# -----------------------
99 -# Try to link conftest.$ac_ext, and return whether this succeeded.
100 -ac_fn_c_try_link ()
101 -{
102 - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
103 - rm -f conftest.$ac_objext conftest$ac_exeext
104 - if { { ac_try="$ac_link"
105 -case "(($ac_try" in
106 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
107 - *) ac_try_echo=$ac_try;;
108 -esac
109 -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
110 -$as_echo "$ac_try_echo"; } >&5
111 - (eval "$ac_link") 2>conftest.err
112 - ac_status=$?
113 - if test -s conftest.err; then
114 - grep -v '^ *+' conftest.err >conftest.er1
115 - cat conftest.er1 >&5
116 - mv -f conftest.er1 conftest.err
117 - fi
118 - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
119 - test $ac_status = 0; } && {
120 - test -z "$ac_c_werror_flag" ||
121 - test ! -s conftest.err
122 - } && test -s conftest$ac_exeext && {
123 - test "$cross_compiling" = yes ||
124 - test -x conftest$ac_exeext
125 - }; then :
126 - ac_retval=0
127 -else
128 - $as_echo "$as_me: failed program was:" >&5
129 -sed 's/^/| /' conftest.$ac_ext >&5
130 -
131 - ac_retval=1
132 -fi
133 - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
134 - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
135 - # interfere with the next link command; also delete a directory that is
136 - # left behind by Apple's compiler. We do this before executing the actions.
137 - rm -rf conftest.dSYM conftest_ipa8_conftest.oo
138 - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
139 - as_fn_set_status $ac_retval
140 -
141 -} # ac_fn_c_try_link
142 -
143 -# ac_fn_c_try_cpp LINENO
144 -# ----------------------
145 -# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
146 -ac_fn_c_try_cpp ()
147 -{
148 - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
149 - if { { ac_try="$ac_cpp conftest.$ac_ext"
150 -case "(($ac_try" in
151 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
152 - *) ac_try_echo=$ac_try;;
153 -esac
154 -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
155 -$as_echo "$ac_try_echo"; } >&5
156 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
157 - ac_status=$?
158 - if test -s conftest.err; then
159 - grep -v '^ *+' conftest.err >conftest.er1
160 - cat conftest.er1 >&5
161 - mv -f conftest.er1 conftest.err
162 - fi
163 - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
164 - test $ac_status = 0; } > conftest.i && {
165 - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
166 - test ! -s conftest.err
167 - }; then :
168 - ac_retval=0
169 -else
170 - $as_echo "$as_me: failed program was:" >&5
171 -sed 's/^/| /' conftest.$ac_ext >&5
172 -
173 - ac_retval=1
174 -fi
175 - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
176 - as_fn_set_status $ac_retval
177 -
178 -} # ac_fn_c_try_cpp
179 -
180 -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
181 -# -------------------------------------------------------
182 -# Tests whether HEADER exists, giving a warning if it cannot be compiled using
183 -# the include files in INCLUDES and setting the cache variable VAR
184 -# accordingly.
185 -ac_fn_c_check_header_mongrel ()
186 -{
187 - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
188 - if eval \${$3+:} false; then :
189 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
190 -$as_echo_n "checking for $2... " >&6; }
191 -if eval \${$3+:} false; then :
192 - $as_echo_n "(cached) " >&6
193 -fi
194 -eval ac_res=\$$3
195 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
196 -$as_echo "$ac_res" >&6; }
197 -else
198 - # Is the header compilable?
199 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
200 -$as_echo_n "checking $2 usability... " >&6; }
201 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
202 -/* end confdefs.h. */
203 -$4
204 -#include <$2>
205 -_ACEOF
206 -if ac_fn_c_try_compile "$LINENO"; then :
207 - ac_header_compiler=yes
208 -else
209 - ac_header_compiler=no
210 -fi
211 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
212 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
213 -$as_echo "$ac_header_compiler" >&6; }
214 -
215 -# Is the header present?
216 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
217 -$as_echo_n "checking $2 presence... " >&6; }
218 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
219 -/* end confdefs.h. */
220 -#include <$2>
221 -_ACEOF
222 -if ac_fn_c_try_cpp "$LINENO"; then :
223 - ac_header_preproc=yes
224 -else
225 - ac_header_preproc=no
226 -fi
227 -rm -f conftest.err conftest.i conftest.$ac_ext
228 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
229 -$as_echo "$ac_header_preproc" >&6; }
230 -
231 -# So? What about this header?
232 -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
233 - yes:no: )
234 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
235 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
236 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
237 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
238 - ;;
239 - no:yes:* )
240 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
241 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
242 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
243 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
244 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
245 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
246 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
247 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
248 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
249 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
250 - ;;
251 -esac
252 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
253 -$as_echo_n "checking for $2... " >&6; }
254 -if eval \${$3+:} false; then :
255 - $as_echo_n "(cached) " >&6
256 -else
257 - eval "$3=\$ac_header_compiler"
258 -fi
259 -eval ac_res=\$$3
260 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
261 -$as_echo "$ac_res" >&6; }
262 -fi
263 - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
264 -
265 -} # ac_fn_c_check_header_mongrel
266 -
267 -# ac_fn_c_try_run LINENO
268 -# ----------------------
269 -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
270 -# that executables *can* be run.
271 -ac_fn_c_try_run ()
272 -{
273 - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
274 - if { { ac_try="$ac_link"
275 -case "(($ac_try" in
276 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
277 - *) ac_try_echo=$ac_try;;
278 -esac
279 -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
280 -$as_echo "$ac_try_echo"; } >&5
281 - (eval "$ac_link") 2>&5
282 - ac_status=$?
283 - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
284 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
285 - { { case "(($ac_try" in
286 - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
287 - *) ac_try_echo=$ac_try;;
288 -esac
289 -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
290 -$as_echo "$ac_try_echo"; } >&5
291 - (eval "$ac_try") 2>&5
292 - ac_status=$?
293 - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
294 - test $ac_status = 0; }; }; then :
295 - ac_retval=0
296 -else
297 - $as_echo "$as_me: program exited with status $ac_status" >&5
298 - $as_echo "$as_me: failed program was:" >&5
299 -sed 's/^/| /' conftest.$ac_ext >&5
300 -
301 - ac_retval=$ac_status
302 -fi
303 - rm -rf conftest.dSYM conftest_ipa8_conftest.oo
304 - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
305 - as_fn_set_status $ac_retval
306 -
307 -} # ac_fn_c_try_run
308 -
309 -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
310 -# -------------------------------------------------------
311 -# Tests whether HEADER exists and can be compiled using the include files in
312 -# INCLUDES, setting the cache variable VAR accordingly.
313 -ac_fn_c_check_header_compile ()
314 -{
315 - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
316 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
317 -$as_echo_n "checking for $2... " >&6; }
318 -if eval \${$3+:} false; then :
319 - $as_echo_n "(cached) " >&6
320 -else
321 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
322 -/* end confdefs.h. */
323 -$4
324 -#include <$2>
325 -_ACEOF
326 -if ac_fn_c_try_compile "$LINENO"; then :
327 - eval "$3=yes"
328 -else
329 - eval "$3=no"
330 -fi
331 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
332 -fi
333 -eval ac_res=\$$3
334 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
335 -$as_echo "$ac_res" >&6; }
336 - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
337 -
338 -} # ac_fn_c_check_header_compile
339 cat >config.log <<_ACEOF
340 This file contains any messages produced by compilers while
341 running configure, to aid debugging if configure makes a mistake.
342 @@ -2897,6 +2614,46 @@
343 test -z "$MKOCTFILE" && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no mkoctfile found on path" >&5
344 $as_echo "$as_me: WARNING: no mkoctfile found on path" >&2;}
345
346 +# Extract the first word of "octave-config", so it can be a program name with args.
347 +set dummy octave-config; ac_word=$2
348 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
349 +$as_echo_n "checking for $ac_word... " >&6; }
350 +if ${ac_cv_prog_OCTAVE_CONFIG+:} false; then :
351 + $as_echo_n "(cached) " >&6
352 +else
353 + if test -n "$OCTAVE_CONFIG"; then
354 + ac_cv_prog_OCTAVE_CONFIG="$OCTAVE_CONFIG" # Let the user override the test.
355 +else
356 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
357 +for as_dir in $PATH
358 +do
359 + IFS=$as_save_IFS
360 + test -z "$as_dir" && as_dir=.
361 + for ac_exec_ext in '' $ac_executable_extensions; do
362 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
363 + ac_cv_prog_OCTAVE_CONFIG="octave-config"
364 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
365 + break 2
366 + fi
367 +done
368 + done
369 +IFS=$as_save_IFS
370 +
371 +fi
372 +fi
373 +OCTAVE_CONFIG=$ac_cv_prog_OCTAVE_CONFIG
374 +if test -n "$OCTAVE_CONFIG"; then
375 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCTAVE_CONFIG" >&5
376 +$as_echo "$OCTAVE_CONFIG" >&6; }
377 +else
378 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
379 +$as_echo "no" >&6; }
380 +fi
381 +
382 +
383 +test -z "$OCTAVE_CONFIG" && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no octave-config found on path" >&5
384 +$as_echo "$as_me: WARNING: no octave-config found on path" >&2;}
385 +
386
387
388
389 @@ -3083,6 +2840,8 @@
390
391
392
393 +
394 +
395 # Extract the first word of "octave", so it can be a program name with args.
396 set dummy octave; ac_word=$2
397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
398 @@ -3120,25 +2879,25 @@
399 fi
400
401
402 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCTAVE_VERSION in Octave" >&5
403 -$as_echo_n "checking for OCTAVE_VERSION in Octave... " >&6; }
404 -OCTAVE_VERSION=`echo "disp(OCTAVE_VERSION)" | $OCTAVE -qf`
405 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VERSION in octave-config" >&5
406 +$as_echo_n "checking for VERSION in octave-config... " >&6; }
407 +OCTAVE_VERSION=`$OCTAVE_CONFIG -p VERSION`
408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCTAVE_VERSION" >&5
409 $as_echo "$OCTAVE_VERSION" >&6; }
410
411
412
413 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for octave_config_info('canonical_host_type') in Octave" >&5
414 -$as_echo_n "checking for octave_config_info('canonical_host_type') in Octave... " >&6; }
415 -canonical_host_type=`echo "disp(octave_config_info('canonical_host_type'))" | $OCTAVE -qf`
416 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CANONICAL_HOST_TYPE in octave-config" >&5
417 +$as_echo_n "checking for CANONICAL_HOST_TYPE in octave-config... " >&6; }
418 +canonical_host_type=`$OCTAVE_CONFIG -p CANONICAL_HOST_TYPE`
419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $canonical_host_type" >&5
420 $as_echo "$canonical_host_type" >&6; }
421
422
423
424 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for octave_config_info('SHLEXT') in Octave" >&5
425 -$as_echo_n "checking for octave_config_info('SHLEXT') in Octave... " >&6; }
426 -SHLEXT=`echo "disp(octave_config_info('SHLEXT'))" | $OCTAVE -qf`
427 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SHLEXT in octave-config" >&5
428 +$as_echo_n "checking for SHLEXT in octave-config... " >&6; }
429 +SHLEXT=`$OCTAVE_CONFIG -p SHLEXT`
430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLEXT" >&5
431 $as_echo "$SHLEXT" >&6; }
432
433 @@ -3306,489 +3065,105 @@
434 ;;
435 esac
436
437 -
438 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nc-config" >&5
439 -$as_echo_n "checking for nc-config... " >&6; }
440 -
441 -if nc-config --version > /dev/null 2>&1; then
442 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
443 -$as_echo "yes" >&6; }
444 - OCTCDF_LIBS="$OCTCDF_LIBS `nc-config --libs`"
445 - OCTCDF_CFLAGS="$OCTCDF_CFLAGS `nc-config --cflags`"
446 - HAVE_NETCDF=yes
447 -else
448 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
449 -$as_echo "no" >&6; }
450 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nc-dap" >&5
451 -$as_echo_n "checking for nc-dap... " >&6; }
452 -
453 - if ncdap-config --version > /dev/null 2>&1; then
454 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
455 -$as_echo "yes" >&6; }
456 - OCTCDF_LIBS="$OCTCDF_LIBS `ncdap-config --libs`"
457 - OCTCDF_CFLAGS="$OCTCDF_CFLAGS `ncdap-config --cflags`"
458 -
459 - HAVE_NETCDF=yes
460 - else
461 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
462 -$as_echo "no" >&6; }
463 -
464 -
465 -
466 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nc_open in -lnetcdf" >&5
467 -$as_echo_n "checking for nc_open in -lnetcdf... " >&6; }
468 -if ${ac_cv_lib_netcdf_nc_open+:} false; then :
469 +if test -n "$ac_tool_prefix"; then
470 + # Extract the first word of "${ac_tool_prefix}nc-config", so it can be a program name with args.
471 +set dummy ${ac_tool_prefix}nc-config; ac_word=$2
472 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
473 +$as_echo_n "checking for $ac_word... " >&6; }
474 +if ${ac_cv_prog_NC_CONFIG+:} false; then :
475 $as_echo_n "(cached) " >&6
476 else
477 - ac_check_lib_save_LIBS=$LIBS
478 -LIBS="-lnetcdf $LIBS"
479 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext
480 -/* end confdefs.h. */
481 -
482 -/* Override any GCC internal prototype to avoid an error.
483 - Use char because int might match the return type of a GCC
484 - builtin and then its argument prototype would still apply. */
485 -#ifdef __cplusplus
486 -extern "C"
487 -#endif
488 -char nc_open ();
489 -int
490 -main ()
491 -{
492 -return nc_open ();
493 - ;
494 - return 0;
495 -}
496 -_ACEOF
497 -if ac_fn_c_try_link "$LINENO"; then :
498 - ac_cv_lib_netcdf_nc_open=yes
499 -else
500 - ac_cv_lib_netcdf_nc_open=no
501 -fi
502 -rm -f core conftest.err conftest.$ac_objext \
503 - conftest$ac_exeext conftest.$ac_ext
504 -LIBS=$ac_check_lib_save_LIBS
505 -fi
506 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netcdf_nc_open" >&5
507 -$as_echo "$ac_cv_lib_netcdf_nc_open" >&6; }
508 -if test "x$ac_cv_lib_netcdf_nc_open" = xyes; then :
509 - HAVE_NETCDF=yes
510 + if test -n "$NC_CONFIG"; then
511 + ac_cv_prog_NC_CONFIG="$NC_CONFIG" # Let the user override the test.
512 else
513 - HAVE_NETCDF=no
514 -fi
515 -
516 -
517 - if test $HAVE_NETCDF = yes ; then
518 - OCTCDF_LIBS="$OCTCDF_LIBS -lnetcdf"
519 -
520 -
521 - ac_ext=c
522 -ac_cpp='$CPP $CPPFLAGS'
523 -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
524 -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
525 -ac_compiler_gnu=$ac_cv_c_compiler_gnu
526 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
527 -$as_echo_n "checking how to run the C preprocessor... " >&6; }
528 -# On Suns, sometimes $CPP names a directory.
529 -if test -n "$CPP" && test -d "$CPP"; then
530 - CPP=
531 -fi
532 -if test -z "$CPP"; then
533 - if ${ac_cv_prog_CPP+:} false; then :
534 - $as_echo_n "(cached) " >&6
535 -else
536 - # Double quotes because CPP needs to be expanded
537 - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
538 - do
539 - ac_preproc_ok=false
540 -for ac_c_preproc_warn_flag in '' yes
541 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
542 +for as_dir in $PATH
543 do
544 - # Use a header file that comes with gcc, so configuring glibc
545 - # with a fresh cross-compiler works.
546 - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
547 - # <limits.h> exists even on freestanding compilers.
548 - # On the NeXT, cc -E runs the code through the compiler's parser,
549 - # not just through cpp. "Syntax error" is here to catch this case.
550 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
551 -/* end confdefs.h. */
552 -#ifdef __STDC__
553 -# include <limits.h>
554 -#else
555 -# include <assert.h>
556 -#endif
557 - Syntax error
558 -_ACEOF
559 -if ac_fn_c_try_cpp "$LINENO"; then :
560 -
561 -else
562 - # Broken: fails on valid input.
563 -continue
564 -fi
565 -rm -f conftest.err conftest.i conftest.$ac_ext
566 -
567 - # OK, works on sane cases. Now check whether nonexistent headers
568 - # can be detected and how.
569 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
570 -/* end confdefs.h. */
571 -#include <ac_nonexistent.h>
572 -_ACEOF
573 -if ac_fn_c_try_cpp "$LINENO"; then :
574 - # Broken: success on invalid input.
575 -continue
576 -else
577 - # Passes both tests.
578 -ac_preproc_ok=:
579 -break
580 -fi
581 -rm -f conftest.err conftest.i conftest.$ac_ext
582 -
583 + IFS=$as_save_IFS
584 + test -z "$as_dir" && as_dir=.
585 + for ac_exec_ext in '' $ac_executable_extensions; do
586 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
587 + ac_cv_prog_NC_CONFIG="${ac_tool_prefix}nc-config"
588 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
589 + break 2
590 + fi
591 done
592 -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
593 -rm -f conftest.i conftest.err conftest.$ac_ext
594 -if $ac_preproc_ok; then :
595 - break
596 -fi
597 -
598 - done
599 - ac_cv_prog_CPP=$CPP
600 + done
601 +IFS=$as_save_IFS
602
603 fi
604 - CPP=$ac_cv_prog_CPP
605 -else
606 - ac_cv_prog_CPP=$CPP
607 -fi
608 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
609 -$as_echo "$CPP" >&6; }
610 -ac_preproc_ok=false
611 -for ac_c_preproc_warn_flag in '' yes
612 -do
613 - # Use a header file that comes with gcc, so configuring glibc
614 - # with a fresh cross-compiler works.
615 - # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
616 - # <limits.h> exists even on freestanding compilers.
617 - # On the NeXT, cc -E runs the code through the compiler's parser,
618 - # not just through cpp. "Syntax error" is here to catch this case.
619 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
620 -/* end confdefs.h. */
621 -#ifdef __STDC__
622 -# include <limits.h>
623 -#else
624 -# include <assert.h>
625 -#endif
626 - Syntax error
627 -_ACEOF
628 -if ac_fn_c_try_cpp "$LINENO"; then :
629 -
630 -else
631 - # Broken: fails on valid input.
632 -continue
633 fi
634 -rm -f conftest.err conftest.i conftest.$ac_ext
635 -
636 - # OK, works on sane cases. Now check whether nonexistent headers
637 - # can be detected and how.
638 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
639 -/* end confdefs.h. */
640 -#include <ac_nonexistent.h>
641 -_ACEOF
642 -if ac_fn_c_try_cpp "$LINENO"; then :
643 - # Broken: success on invalid input.
644 -continue
645 +NC_CONFIG=$ac_cv_prog_NC_CONFIG
646 +if test -n "$NC_CONFIG"; then
647 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NC_CONFIG" >&5
648 +$as_echo "$NC_CONFIG" >&6; }
649 else
650 - # Passes both tests.
651 -ac_preproc_ok=:
652 -break
653 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
654 +$as_echo "no" >&6; }
655 fi
656 -rm -f conftest.err conftest.i conftest.$ac_ext
657
658 -done
659 -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
660 -rm -f conftest.i conftest.err conftest.$ac_ext
661 -if $ac_preproc_ok; then :
662
663 -else
664 - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
665 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
666 -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
667 -See \`config.log' for more details" "$LINENO" 5; }
668 fi
669 -
670 -ac_ext=c
671 -ac_cpp='$CPP $CPPFLAGS'
672 -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
673 -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
674 -ac_compiler_gnu=$ac_cv_c_compiler_gnu
675 -
676 -
677 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
678 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
679 -if ${ac_cv_path_GREP+:} false; then :
680 +if test -z "$ac_cv_prog_NC_CONFIG"; then
681 + ac_ct_NC_CONFIG=$NC_CONFIG
682 + # Extract the first word of "nc-config", so it can be a program name with args.
683 +set dummy nc-config; ac_word=$2
684 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
685 +$as_echo_n "checking for $ac_word... " >&6; }
686 +if ${ac_cv_prog_ac_ct_NC_CONFIG+:} false; then :
687 $as_echo_n "(cached) " >&6
688 else
689 - if test -z "$GREP"; then
690 - ac_path_GREP_found=false
691 - # Loop through the user's path and test for each of PROGNAME-LIST
692 - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
693 -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
694 -do
695 - IFS=$as_save_IFS
696 - test -z "$as_dir" && as_dir=.
697 - for ac_prog in grep ggrep; do
698 - for ac_exec_ext in '' $ac_executable_extensions; do
699 - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
700 - as_fn_executable_p "$ac_path_GREP" || continue
701 -# Check for GNU ac_path_GREP and select it if it is found.
702 - # Check for GNU $ac_path_GREP
703 -case `"$ac_path_GREP" --version 2>&1` in
704 -*GNU*)
705 - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
706 -*)
707 - ac_count=0
708 - $as_echo_n 0123456789 >"conftest.in"
709 - while :
710 - do
711 - cat "conftest.in" "conftest.in" >"conftest.tmp"
712 - mv "conftest.tmp" "conftest.in"
713 - cp "conftest.in" "conftest.nl"
714 - $as_echo 'GREP' >> "conftest.nl"
715 - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
716 - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
717 - as_fn_arith $ac_count + 1 && ac_count=$as_val
718 - if test $ac_count -gt ${ac_path_GREP_max-0}; then
719 - # Best one so far, save it but keep looking for a better one
720 - ac_cv_path_GREP="$ac_path_GREP"
721 - ac_path_GREP_max=$ac_count
722 - fi
723 - # 10*(2^10) chars as input seems more than enough
724 - test $ac_count -gt 10 && break
725 - done
726 - rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
727 -esac
728 -
729 - $ac_path_GREP_found && break 3
730 - done
731 - done
732 - done
733 -IFS=$as_save_IFS
734 - if test -z "$ac_cv_path_GREP"; then
735 - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
736 - fi
737 -else
738 - ac_cv_path_GREP=$GREP
739 -fi
740 -
741 -fi
742 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
743 -$as_echo "$ac_cv_path_GREP" >&6; }
744 - GREP="$ac_cv_path_GREP"
745 -
746 -
747 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
748 -$as_echo_n "checking for egrep... " >&6; }
749 -if ${ac_cv_path_EGREP+:} false; then :
750 - $as_echo_n "(cached) " >&6
751 + if test -n "$ac_ct_NC_CONFIG"; then
752 + ac_cv_prog_ac_ct_NC_CONFIG="$ac_ct_NC_CONFIG" # Let the user override the test.
753 else
754 - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
755 - then ac_cv_path_EGREP="$GREP -E"
756 - else
757 - if test -z "$EGREP"; then
758 - ac_path_EGREP_found=false
759 - # Loop through the user's path and test for each of PROGNAME-LIST
760 - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
761 -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
762 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
763 +for as_dir in $PATH
764 do
765 IFS=$as_save_IFS
766 test -z "$as_dir" && as_dir=.
767 - for ac_prog in egrep; do
768 for ac_exec_ext in '' $ac_executable_extensions; do
769 - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
770 - as_fn_executable_p "$ac_path_EGREP" || continue
771 -# Check for GNU ac_path_EGREP and select it if it is found.
772 - # Check for GNU $ac_path_EGREP
773 -case `"$ac_path_EGREP" --version 2>&1` in
774 -*GNU*)
775 - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
776 -*)
777 - ac_count=0
778 - $as_echo_n 0123456789 >"conftest.in"
779 - while :
780 - do
781 - cat "conftest.in" "conftest.in" >"conftest.tmp"
782 - mv "conftest.tmp" "conftest.in"
783 - cp "conftest.in" "conftest.nl"
784 - $as_echo 'EGREP' >> "conftest.nl"
785 - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
786 - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
787 - as_fn_arith $ac_count + 1 && ac_count=$as_val
788 - if test $ac_count -gt ${ac_path_EGREP_max-0}; then
789 - # Best one so far, save it but keep looking for a better one
790 - ac_cv_path_EGREP="$ac_path_EGREP"
791 - ac_path_EGREP_max=$ac_count
792 - fi
793 - # 10*(2^10) chars as input seems more than enough
794 - test $ac_count -gt 10 && break
795 - done
796 - rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
797 -esac
798 -
799 - $ac_path_EGREP_found && break 3
800 - done
801 - done
802 + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
803 + ac_cv_prog_ac_ct_NC_CONFIG="nc-config"
804 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
805 + break 2
806 + fi
807 +done
808 done
809 IFS=$as_save_IFS
810 - if test -z "$ac_cv_path_EGREP"; then
811 - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
812 - fi
813 -else
814 - ac_cv_path_EGREP=$EGREP
815 -fi
816 -
817 - fi
818 -fi
819 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
820 -$as_echo "$ac_cv_path_EGREP" >&6; }
821 - EGREP="$ac_cv_path_EGREP"
822 -
823
824 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
825 -$as_echo_n "checking for ANSI C header files... " >&6; }
826 -if ${ac_cv_header_stdc+:} false; then :
827 - $as_echo_n "(cached) " >&6
828 -else
829 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
830 -/* end confdefs.h. */
831 -#include <stdlib.h>
832 -#include <stdarg.h>
833 -#include <string.h>
834 -#include <float.h>
835 -
836 -int
837 -main ()
838 -{
839 -
840 - ;
841 - return 0;
842 -}
843 -_ACEOF
844 -if ac_fn_c_try_compile "$LINENO"; then :
845 - ac_cv_header_stdc=yes
846 -else
847 - ac_cv_header_stdc=no
848 -fi
849 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
850 -
851 -if test $ac_cv_header_stdc = yes; then
852 - # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
853 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
854 -/* end confdefs.h. */
855 -#include <string.h>
856 -
857 -_ACEOF
858 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
859 - $EGREP "memchr" >/dev/null 2>&1; then :
860 -
861 -else
862 - ac_cv_header_stdc=no
863 fi
864 -rm -f conftest*
865 -
866 fi
867 -
868 -if test $ac_cv_header_stdc = yes; then
869 - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
870 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
871 -/* end confdefs.h. */
872 -#include <stdlib.h>
873 -
874 -_ACEOF
875 -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
876 - $EGREP "free" >/dev/null 2>&1; then :
877 -
878 +ac_ct_NC_CONFIG=$ac_cv_prog_ac_ct_NC_CONFIG
879 +if test -n "$ac_ct_NC_CONFIG"; then
880 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NC_CONFIG" >&5
881 +$as_echo "$ac_ct_NC_CONFIG" >&6; }
882 else
883 - ac_cv_header_stdc=no
884 -fi
885 -rm -f conftest*
886 -
887 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
888 +$as_echo "no" >&6; }
889 fi
890
891 -if test $ac_cv_header_stdc = yes; then
892 - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
893 - if test "$cross_compiling" = yes; then :
894 - :
895 -else
896 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
897 -/* end confdefs.h. */
898 -#include <ctype.h>
899 -#include <stdlib.h>
900 -#if ((' ' & 0x0FF) == 0x020)
901 -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
902 -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
903 -#else
904 -# define ISLOWER(c) \
905 - (('a' <= (c) && (c) <= 'i') \
906 - || ('j' <= (c) && (c) <= 'r') \
907 - || ('s' <= (c) && (c) <= 'z'))
908 -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
909 -#endif
910 -
911 -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
912 -int
913 -main ()
914 -{
915 - int i;
916 - for (i = 0; i < 256; i++)
917 - if (XOR (islower (i), ISLOWER (i))
918 - || toupper (i) != TOUPPER (i))
919 - return 2;
920 - return 0;
921 -}
922 -_ACEOF
923 -if ac_fn_c_try_run "$LINENO"; then :
924 -
925 + if test "x$ac_ct_NC_CONFIG" = x; then
926 + NC_CONFIG="nc-config"
927 + else
928 + case $cross_compiling:$ac_tool_warned in
929 +yes:)
930 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
931 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
932 +ac_tool_warned=yes ;;
933 +esac
934 + NC_CONFIG=$ac_ct_NC_CONFIG
935 + fi
936 else
937 - ac_cv_header_stdc=no
938 -fi
939 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
940 - conftest.$ac_objext conftest.beam conftest.$ac_ext
941 -fi
942 -
943 -fi
944 -fi
945 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
946 -$as_echo "$ac_cv_header_stdc" >&6; }
947 -if test $ac_cv_header_stdc = yes; then
948 -
949 -$as_echo "#define STDC_HEADERS 1" >>confdefs.h
950 -
951 -fi
952 -
953 -# On IRIX 5.3, sys/types and inttypes.h are conflicting.
954 -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
955 - inttypes.h stdint.h unistd.h
956 -do :
957 - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
958 -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
959 -"
960 -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
961 - cat >>confdefs.h <<_ACEOF
962 -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
963 -_ACEOF
964 -
965 + NC_CONFIG="$ac_cv_prog_NC_CONFIG"
966 fi
967
968 -done
969 -
970
971 -ac_fn_c_check_header_mongrel "$LINENO" "netcdf.h" "ac_cv_header_netcdf_h" "$ac_includes_default"
972 -if test "x$ac_cv_header_netcdf_h" = xyes; then :
973 - HAVE_NETCDF=yes
974 +OCTCDF_LIBS="$OCTCDF_LIBS `$NC_CONFIG --libs`"
975 +OCTCDF_CFLAGS="$OCTCDF_CFLAGS `$NC_CONFIG --cflags`"
976 +if test -z "$NC_CONFIG"; then
977 +as_fn_error 1 "nc-config not found" "$LINENO" 5;
978 else
979 - HAVE_NETCDF=no
980 -fi
981 -
982 -
983 - fi
984 - fi
985 + HAVE_NETCDF=yes
986 fi
987
988
989 @@ -3820,6 +3195,7 @@
990 octave-forge is configured with
991 octave: $OCTAVE (version $OCTAVE_VERSION)
992 mkoctfile: $MKOCTFILE for Octave $subver
993 + octave-config: $OCTAVE_CONFIG for Octave $subver
994 octcdf toolbox: $OCTCDFSTATUS
995 netCDF compiler flags: $OCTCDF_CFLAGS
996 netCDF libraries: $OCTCDF_LIBS"
997 diff -ur octcdf.orig/src/configure.base octcdf/src/configure.base
998 --- octcdf.orig/src/configure.base 2015-04-14 11:21:17.161247377 -0400
999 +++ octcdf/src/configure.base 2015-04-14 11:22:37.730853787 -0400
1000 @@ -50,6 +50,9 @@
1001 AC_CHECK_PROG(MKOCTFILE,mkoctfile,mkoctfile)
1002 test -z "$MKOCTFILE" && AC_MSG_WARN([no mkoctfile found on path])
1003
1004 +AC_CHECK_PROG(OCTAVE_CONFIG,octave-config,octave-config)
1005 +test -z "$OCTAVE_CONFIG" && AC_MSG_WARN([no octave-config found on path])
1006 +
1007 AC_SUBST(ver)
1008 AC_SUBST(subver)
1009 AC_SUBST(mpath)
1010 @@ -267,15 +270,22 @@
1011 fi
1012 ])
1013
1014 +AC_DEFUN(OCTAVE_CONFIG_EVAL,
1015 +[AC_MSG_CHECKING([for $1 in octave-config])
1016 +$2=`$OCTAVE_CONFIG -p $1`
1017 +AC_MSG_RESULT($$2)
1018 +AC_SUBST($2)
1019 +])
1020 +
1021 dnl should check that $(OCTAVE) --version matches $(MKOCTFILE) --version
1022 AC_CHECK_PROG(OCTAVE,octave,octave)
1023 -OCTAVE_EVAL(OCTAVE_VERSION,OCTAVE_VERSION)
1024 +OCTAVE_CONFIG_EVAL(VERSION,OCTAVE_VERSION)
1025
1026 dnl grab canonical host type so we can write system specific install stuff
1027 -OCTAVE_EVAL(octave_config_info('canonical_host_type'),canonical_host_type)
1028 +OCTAVE_CONFIG_EVAL(CANONICAL_HOST_TYPE,canonical_host_type)
1029
1030 dnl grab SHLEXT from octave config
1031 -OCTAVE_EVAL(octave_config_info('SHLEXT'),SHLEXT)
1032 +OCTAVE_CONFIG_EVAL(SHLEXT,SHLEXT)
1033
1034 AC_PROG_LN_S
1035
1036 @@ -308,44 +318,17 @@
1037 ;;
1038 esac
1039
1040 -dnl first checking for nc-config, then nc-dap
1041 -
1042 -AC_MSG_CHECKING([for nc-config])
1043 +dnl check for nc-config
1044 +AC_CHECK_TOOL(NC_CONFIG, nc-config, nc-config)
1045
1046 -if nc-config --version > /dev/null 2>&1; then
1047 - AC_MSG_RESULT([yes])
1048 - OCTCDF_LIBS="$OCTCDF_LIBS `nc-config --libs`"
1049 - OCTCDF_CFLAGS="$OCTCDF_CFLAGS `nc-config --cflags`"
1050 - HAVE_NETCDF=yes
1051 +OCTCDF_LIBS="$OCTCDF_LIBS `$NC_CONFIG --libs`"
1052 +OCTCDF_CFLAGS="$OCTCDF_CFLAGS `$NC_CONFIG --cflags`"
1053 +if test -z "$NC_CONFIG"; then
1054 +AC_MSG_ERROR([nc-config not found], 1);
1055 else
1056 - AC_MSG_RESULT([no])
1057 - AC_MSG_CHECKING([for nc-dap])
1058 -
1059 - if ncdap-config --version > /dev/null 2>&1; then
1060 - AC_MSG_RESULT([yes])
1061 - OCTCDF_LIBS="$OCTCDF_LIBS `ncdap-config --libs`"
1062 - OCTCDF_CFLAGS="$OCTCDF_CFLAGS `ncdap-config --cflags`"
1063 -
1064 - HAVE_NETCDF=yes
1065 - else
1066 - AC_MSG_RESULT([no])
1067 -
1068 - dnl if no opendap, checking if the NetCDF library exists.
1069 - dnl AC_CHECK_LIB takes the value of LDFLAGS into account
1070 -
1071 - AC_CHECK_LIB(netcdf,nc_open, HAVE_NETCDF=yes, HAVE_NETCDF=no,)
1072 -
1073 - if test $HAVE_NETCDF = yes ; then
1074 - OCTCDF_LIBS="$OCTCDF_LIBS -lnetcdf"
1075 -
1076 - dnl we have the libraries, no we have also the headers?
1077 - dnl AC_CHECK_HEADER takes the value of CPPFLAGS into account
1078 -
1079 - AC_CHECK_HEADER(netcdf.h, HAVE_NETCDF=yes, HAVE_NETCDF=no)
1080 - fi
1081 - fi
1082 + HAVE_NETCDF=yes
1083 fi
1084 -
1085 +
1086 AC_SUBST(HAVE_NETCDF)
1087 AC_SUBST(OCTCDF_LIBS)
1088 AC_SUBST(OCTCDF_CFLAGS)
1089 @@ -375,6 +358,7 @@
1090 octave-forge is configured with
1091 octave: $OCTAVE (version $OCTAVE_VERSION)
1092 mkoctfile: $MKOCTFILE for Octave $subver
1093 + octave-config: $OCTAVE_CONFIG for Octave $subver
1094 octcdf toolbox: $OCTCDFSTATUS
1095 netCDF compiler flags: $OCTCDF_CFLAGS
1096 netCDF libraries: $OCTCDF_LIBS"
1097 diff -ur octcdf.orig/src/Makeconf.in octcdf/src/Makeconf.in
1098 --- octcdf.orig/src/Makeconf.in 2015-04-14 11:21:17.161247377 -0400
1099 +++ octcdf/src/Makeconf.in 2015-04-14 11:21:33.423571620 -0400
1100 @@ -53,6 +53,8 @@
1101 OCTAVE_VERSION = @OCTAVE_VERSION@
1102 MKOCTFILE = @MKOCTFILE@ -DHAVE_OCTAVE_$(ver) -v
1103 SHLEXT = @SHLEXT@
1104 +NC_CONFIG = @NC_CONFIG@
1105 +OCTAVE_CONFIG = @OCTAVE_CONFIG@
1106
1107 HAVE_NETCDF=@HAVE_NETCDF@
1108 OCTCDF_LIBS=@OCTCDF_LIBS@