]> gcc.gnu.org Git - gcc.git/blob - libf2c/configure
configure.in: Update F2C_INTEGER and F2C_LONGINT tests for the new placement in the...
[gcc.git] / libf2c / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14
15 # Initialize some variables set by options.
16 # The variables have the same names as the options, with
17 # dashes changed to underlines.
18 build=NONE
19 cache_file=./config.cache
20 exec_prefix=NONE
21 host=NONE
22 no_create=
23 nonopt=NONE
24 no_recursion=
25 prefix=NONE
26 program_prefix=NONE
27 program_suffix=NONE
28 program_transform_name=s,x,x,
29 silent=
30 site=
31 srcdir=
32 target=NONE
33 verbose=
34 x_includes=NONE
35 x_libraries=NONE
36 bindir='${exec_prefix}/bin'
37 sbindir='${exec_prefix}/sbin'
38 libexecdir='${exec_prefix}/libexec'
39 datadir='${prefix}/share'
40 sysconfdir='${prefix}/etc'
41 sharedstatedir='${prefix}/com'
42 localstatedir='${prefix}/var'
43 libdir='${exec_prefix}/lib'
44 includedir='${prefix}/include'
45 oldincludedir='/usr/include'
46 infodir='${prefix}/info'
47 mandir='${prefix}/man'
48
49 # Initialize some other variables.
50 subdirs=
51 MFLAGS= MAKEFLAGS=
52 # Maximum number of lines to put in a shell here document.
53 ac_max_here_lines=12
54
55 ac_prev=
56 for ac_option
57 do
58
59 # If the previous option needs an argument, assign it.
60 if test -n "$ac_prev"; then
61 eval "$ac_prev=\$ac_option"
62 ac_prev=
63 continue
64 fi
65
66 case "$ac_option" in
67 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
68 *) ac_optarg= ;;
69 esac
70
71 # Accept the important Cygnus configure options, so we can diagnose typos.
72
73 case "$ac_option" in
74
75 -bindir | --bindir | --bindi | --bind | --bin | --bi)
76 ac_prev=bindir ;;
77 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
78 bindir="$ac_optarg" ;;
79
80 -build | --build | --buil | --bui | --bu)
81 ac_prev=build ;;
82 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
83 build="$ac_optarg" ;;
84
85 -cache-file | --cache-file | --cache-fil | --cache-fi \
86 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
87 ac_prev=cache_file ;;
88 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
89 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
90 cache_file="$ac_optarg" ;;
91
92 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
93 ac_prev=datadir ;;
94 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
95 | --da=*)
96 datadir="$ac_optarg" ;;
97
98 -disable-* | --disable-*)
99 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
100 # Reject names that are not valid shell variable names.
101 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
102 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
103 fi
104 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
105 eval "enable_${ac_feature}=no" ;;
106
107 -enable-* | --enable-*)
108 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
109 # Reject names that are not valid shell variable names.
110 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
111 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
112 fi
113 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
114 case "$ac_option" in
115 *=*) ;;
116 *) ac_optarg=yes ;;
117 esac
118 eval "enable_${ac_feature}='$ac_optarg'" ;;
119
120 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
121 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
122 | --exec | --exe | --ex)
123 ac_prev=exec_prefix ;;
124 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
125 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
126 | --exec=* | --exe=* | --ex=*)
127 exec_prefix="$ac_optarg" ;;
128
129 -gas | --gas | --ga | --g)
130 # Obsolete; use --with-gas.
131 with_gas=yes ;;
132
133 -help | --help | --hel | --he)
134 # Omit some internal or obsolete options to make the list less imposing.
135 # This message is too long to be a string in the A/UX 3.1 sh.
136 cat << EOF
137 Usage: configure [options] [host]
138 Options: [defaults in brackets after descriptions]
139 Configuration:
140 --cache-file=FILE cache test results in FILE
141 --help print this message
142 --no-create do not create output files
143 --quiet, --silent do not print \`checking...' messages
144 --version print the version of autoconf that created configure
145 Directory and file names:
146 --prefix=PREFIX install architecture-independent files in PREFIX
147 [$ac_default_prefix]
148 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
149 [same as prefix]
150 --bindir=DIR user executables in DIR [EPREFIX/bin]
151 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
152 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
153 --datadir=DIR read-only architecture-independent data in DIR
154 [PREFIX/share]
155 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
156 --sharedstatedir=DIR modifiable architecture-independent data in DIR
157 [PREFIX/com]
158 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
159 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
160 --includedir=DIR C header files in DIR [PREFIX/include]
161 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
162 --infodir=DIR info documentation in DIR [PREFIX/info]
163 --mandir=DIR man documentation in DIR [PREFIX/man]
164 --srcdir=DIR find the sources in DIR [configure dir or ..]
165 --program-prefix=PREFIX prepend PREFIX to installed program names
166 --program-suffix=SUFFIX append SUFFIX to installed program names
167 --program-transform-name=PROGRAM
168 run sed PROGRAM on installed program names
169 EOF
170 cat << EOF
171 Host type:
172 --build=BUILD configure for building on BUILD [BUILD=HOST]
173 --host=HOST configure for HOST [guessed]
174 --target=TARGET configure for TARGET [TARGET=HOST]
175 Features and packages:
176 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
177 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
178 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
179 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
180 --x-includes=DIR X include files are in DIR
181 --x-libraries=DIR X library files are in DIR
182 EOF
183 if test -n "$ac_help"; then
184 echo "--enable and --with options recognized:$ac_help"
185 fi
186 exit 0 ;;
187
188 -host | --host | --hos | --ho)
189 ac_prev=host ;;
190 -host=* | --host=* | --hos=* | --ho=*)
191 host="$ac_optarg" ;;
192
193 -includedir | --includedir | --includedi | --included | --include \
194 | --includ | --inclu | --incl | --inc)
195 ac_prev=includedir ;;
196 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
197 | --includ=* | --inclu=* | --incl=* | --inc=*)
198 includedir="$ac_optarg" ;;
199
200 -infodir | --infodir | --infodi | --infod | --info | --inf)
201 ac_prev=infodir ;;
202 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
203 infodir="$ac_optarg" ;;
204
205 -libdir | --libdir | --libdi | --libd)
206 ac_prev=libdir ;;
207 -libdir=* | --libdir=* | --libdi=* | --libd=*)
208 libdir="$ac_optarg" ;;
209
210 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
211 | --libexe | --libex | --libe)
212 ac_prev=libexecdir ;;
213 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
214 | --libexe=* | --libex=* | --libe=*)
215 libexecdir="$ac_optarg" ;;
216
217 -localstatedir | --localstatedir | --localstatedi | --localstated \
218 | --localstate | --localstat | --localsta | --localst \
219 | --locals | --local | --loca | --loc | --lo)
220 ac_prev=localstatedir ;;
221 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
222 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
223 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
224 localstatedir="$ac_optarg" ;;
225
226 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
227 ac_prev=mandir ;;
228 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
229 mandir="$ac_optarg" ;;
230
231 -nfp | --nfp | --nf)
232 # Obsolete; use --without-fp.
233 with_fp=no ;;
234
235 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
236 | --no-cr | --no-c)
237 no_create=yes ;;
238
239 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
240 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
241 no_recursion=yes ;;
242
243 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
244 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
245 | --oldin | --oldi | --old | --ol | --o)
246 ac_prev=oldincludedir ;;
247 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
248 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
249 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
250 oldincludedir="$ac_optarg" ;;
251
252 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
253 ac_prev=prefix ;;
254 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
255 prefix="$ac_optarg" ;;
256
257 -program-prefix | --program-prefix | --program-prefi | --program-pref \
258 | --program-pre | --program-pr | --program-p)
259 ac_prev=program_prefix ;;
260 -program-prefix=* | --program-prefix=* | --program-prefi=* \
261 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
262 program_prefix="$ac_optarg" ;;
263
264 -program-suffix | --program-suffix | --program-suffi | --program-suff \
265 | --program-suf | --program-su | --program-s)
266 ac_prev=program_suffix ;;
267 -program-suffix=* | --program-suffix=* | --program-suffi=* \
268 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
269 program_suffix="$ac_optarg" ;;
270
271 -program-transform-name | --program-transform-name \
272 | --program-transform-nam | --program-transform-na \
273 | --program-transform-n | --program-transform- \
274 | --program-transform | --program-transfor \
275 | --program-transfo | --program-transf \
276 | --program-trans | --program-tran \
277 | --progr-tra | --program-tr | --program-t)
278 ac_prev=program_transform_name ;;
279 -program-transform-name=* | --program-transform-name=* \
280 | --program-transform-nam=* | --program-transform-na=* \
281 | --program-transform-n=* | --program-transform-=* \
282 | --program-transform=* | --program-transfor=* \
283 | --program-transfo=* | --program-transf=* \
284 | --program-trans=* | --program-tran=* \
285 | --progr-tra=* | --program-tr=* | --program-t=*)
286 program_transform_name="$ac_optarg" ;;
287
288 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
289 | -silent | --silent | --silen | --sile | --sil)
290 silent=yes ;;
291
292 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
293 ac_prev=sbindir ;;
294 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
295 | --sbi=* | --sb=*)
296 sbindir="$ac_optarg" ;;
297
298 -sharedstatedir | --sharedstatedir | --sharedstatedi \
299 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
300 | --sharedst | --shareds | --shared | --share | --shar \
301 | --sha | --sh)
302 ac_prev=sharedstatedir ;;
303 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
304 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
305 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
306 | --sha=* | --sh=*)
307 sharedstatedir="$ac_optarg" ;;
308
309 -site | --site | --sit)
310 ac_prev=site ;;
311 -site=* | --site=* | --sit=*)
312 site="$ac_optarg" ;;
313
314 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
315 ac_prev=srcdir ;;
316 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
317 srcdir="$ac_optarg" ;;
318
319 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
320 | --syscon | --sysco | --sysc | --sys | --sy)
321 ac_prev=sysconfdir ;;
322 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
323 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
324 sysconfdir="$ac_optarg" ;;
325
326 -target | --target | --targe | --targ | --tar | --ta | --t)
327 ac_prev=target ;;
328 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
329 target="$ac_optarg" ;;
330
331 -v | -verbose | --verbose | --verbos | --verbo | --verb)
332 verbose=yes ;;
333
334 -version | --version | --versio | --versi | --vers)
335 echo "configure generated by autoconf version 2.12"
336 exit 0 ;;
337
338 -with-* | --with-*)
339 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
340 # Reject names that are not valid shell variable names.
341 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
342 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
343 fi
344 ac_package=`echo $ac_package| sed 's/-/_/g'`
345 case "$ac_option" in
346 *=*) ;;
347 *) ac_optarg=yes ;;
348 esac
349 eval "with_${ac_package}='$ac_optarg'" ;;
350
351 -without-* | --without-*)
352 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
353 # Reject names that are not valid shell variable names.
354 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
355 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
356 fi
357 ac_package=`echo $ac_package| sed 's/-/_/g'`
358 eval "with_${ac_package}=no" ;;
359
360 --x)
361 # Obsolete; use --with-x.
362 with_x=yes ;;
363
364 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
365 | --x-incl | --x-inc | --x-in | --x-i)
366 ac_prev=x_includes ;;
367 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
368 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
369 x_includes="$ac_optarg" ;;
370
371 -x-libraries | --x-libraries | --x-librarie | --x-librari \
372 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
373 ac_prev=x_libraries ;;
374 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
375 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
376 x_libraries="$ac_optarg" ;;
377
378 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
379 ;;
380
381 *)
382 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
383 echo "configure: warning: $ac_option: invalid host type" 1>&2
384 fi
385 if test "x$nonopt" != xNONE; then
386 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
387 fi
388 nonopt="$ac_option"
389 ;;
390
391 esac
392 done
393
394 if test -n "$ac_prev"; then
395 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
396 fi
397
398 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
399
400 # File descriptor usage:
401 # 0 standard input
402 # 1 file creation
403 # 2 errors and warnings
404 # 3 some systems may open it to /dev/tty
405 # 4 used on the Kubota Titan
406 # 6 checking for... messages and results
407 # 5 compiler messages saved in config.log
408 if test "$silent" = yes; then
409 exec 6>/dev/null
410 else
411 exec 6>&1
412 fi
413 exec 5>./config.log
414
415 echo "\
416 This file contains any messages produced by compilers while
417 running configure, to aid debugging if configure makes a mistake.
418 " 1>&5
419
420 # Strip out --no-create and --no-recursion so they do not pile up.
421 # Also quote any args containing shell metacharacters.
422 ac_configure_args=
423 for ac_arg
424 do
425 case "$ac_arg" in
426 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
427 | --no-cr | --no-c) ;;
428 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
429 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
430 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
431 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
432 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
433 esac
434 done
435
436 # NLS nuisances.
437 # Only set these to C if already set. These must not be set unconditionally
438 # because not all systems understand e.g. LANG=C (notably SCO).
439 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
440 # Non-C LC_CTYPE values break the ctype check.
441 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
442 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
443 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
444 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
445
446 # confdefs.h avoids OS command line length limits that DEFS can exceed.
447 rm -rf conftest* confdefs.h
448 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
449 echo > confdefs.h
450
451 # A filename unique to this package, relative to the directory that
452 # configure is in, which we can look for to find out if srcdir is correct.
453 ac_unique_file=libF77/Version.c
454
455 # Find the source files, if location was not specified.
456 if test -z "$srcdir"; then
457 ac_srcdir_defaulted=yes
458 # Try the directory containing this script, then its parent.
459 ac_prog=$0
460 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
461 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
462 srcdir=$ac_confdir
463 if test ! -r $srcdir/$ac_unique_file; then
464 srcdir=..
465 fi
466 else
467 ac_srcdir_defaulted=no
468 fi
469 if test ! -r $srcdir/$ac_unique_file; then
470 if test "$ac_srcdir_defaulted" = yes; then
471 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
472 else
473 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
474 fi
475 fi
476 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
477
478 # Prefer explicitly selected file to automatically selected ones.
479 if test -z "$CONFIG_SITE"; then
480 if test "x$prefix" != xNONE; then
481 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
482 else
483 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
484 fi
485 fi
486 for ac_site_file in $CONFIG_SITE; do
487 if test -r "$ac_site_file"; then
488 echo "loading site script $ac_site_file"
489 . "$ac_site_file"
490 fi
491 done
492
493 if test -r "$cache_file"; then
494 echo "loading cache $cache_file"
495 . $cache_file
496 else
497 echo "creating cache $cache_file"
498 > $cache_file
499 fi
500
501 ac_ext=c
502 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
503 ac_cpp='$CPP $CPPFLAGS'
504 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
505 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
506 cross_compiling=$ac_cv_prog_cc_cross
507
508 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
509 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
510 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
511 ac_n= ac_c='
512 ' ac_t=' '
513 else
514 ac_n=-n ac_c= ac_t=
515 fi
516 else
517 ac_n= ac_c='\c' ac_t=
518 fi
519
520
521
522 # From configure.in 1.10
523
524 # For g77 we'll set CC to point at the built gcc, but this will get it into
525 # the makefiles
526 # Extract the first word of "gcc", so it can be a program name with args.
527 set dummy gcc; ac_word=$2
528 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
529 echo "configure:530: checking for $ac_word" >&5
530 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
531 echo $ac_n "(cached) $ac_c" 1>&6
532 else
533 if test -n "$CC"; then
534 ac_cv_prog_CC="$CC" # Let the user override the test.
535 else
536 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
537 for ac_dir in $PATH; do
538 test -z "$ac_dir" && ac_dir=.
539 if test -f $ac_dir/$ac_word; then
540 ac_cv_prog_CC="gcc"
541 break
542 fi
543 done
544 IFS="$ac_save_ifs"
545 fi
546 fi
547 CC="$ac_cv_prog_CC"
548 if test -n "$CC"; then
549 echo "$ac_t""$CC" 1>&6
550 else
551 echo "$ac_t""no" 1>&6
552 fi
553
554 if test -z "$CC"; then
555 # Extract the first word of "cc", so it can be a program name with args.
556 set dummy cc; ac_word=$2
557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
558 echo "configure:559: checking for $ac_word" >&5
559 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
560 echo $ac_n "(cached) $ac_c" 1>&6
561 else
562 if test -n "$CC"; then
563 ac_cv_prog_CC="$CC" # Let the user override the test.
564 else
565 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
566 ac_prog_rejected=no
567 for ac_dir in $PATH; do
568 test -z "$ac_dir" && ac_dir=.
569 if test -f $ac_dir/$ac_word; then
570 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
571 ac_prog_rejected=yes
572 continue
573 fi
574 ac_cv_prog_CC="cc"
575 break
576 fi
577 done
578 IFS="$ac_save_ifs"
579 if test $ac_prog_rejected = yes; then
580 # We found a bogon in the path, so make sure we never use it.
581 set dummy $ac_cv_prog_CC
582 shift
583 if test $# -gt 0; then
584 # We chose a different compiler from the bogus one.
585 # However, it has the same basename, so the bogon will be chosen
586 # first if we set CC to just the basename; use the full file name.
587 shift
588 set dummy "$ac_dir/$ac_word" "$@"
589 shift
590 ac_cv_prog_CC="$@"
591 fi
592 fi
593 fi
594 fi
595 CC="$ac_cv_prog_CC"
596 if test -n "$CC"; then
597 echo "$ac_t""$CC" 1>&6
598 else
599 echo "$ac_t""no" 1>&6
600 fi
601
602 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
603 fi
604
605 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
606 echo "configure:607: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
607
608 ac_ext=c
609 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
610 ac_cpp='$CPP $CPPFLAGS'
611 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
612 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
613 cross_compiling=$ac_cv_prog_cc_cross
614
615 cat > conftest.$ac_ext <<EOF
616 #line 617 "configure"
617 #include "confdefs.h"
618 main(){return(0);}
619 EOF
620 if { (eval echo configure:621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
621 ac_cv_prog_cc_works=yes
622 # If we can't run a trivial program, we are probably using a cross compiler.
623 if (./conftest; exit) 2>/dev/null; then
624 ac_cv_prog_cc_cross=no
625 else
626 ac_cv_prog_cc_cross=yes
627 fi
628 else
629 echo "configure: failed program was:" >&5
630 cat conftest.$ac_ext >&5
631 ac_cv_prog_cc_works=no
632 fi
633 rm -fr conftest*
634
635 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
636 if test $ac_cv_prog_cc_works = no; then
637 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
638 fi
639 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
640 echo "configure:641: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
641 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
642 cross_compiling=$ac_cv_prog_cc_cross
643
644 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
645 echo "configure:646: checking whether we are using GNU C" >&5
646 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
647 echo $ac_n "(cached) $ac_c" 1>&6
648 else
649 cat > conftest.c <<EOF
650 #ifdef __GNUC__
651 yes;
652 #endif
653 EOF
654 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
655 ac_cv_prog_gcc=yes
656 else
657 ac_cv_prog_gcc=no
658 fi
659 fi
660
661 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
662
663 if test $ac_cv_prog_gcc = yes; then
664 GCC=yes
665 ac_test_CFLAGS="${CFLAGS+set}"
666 ac_save_CFLAGS="$CFLAGS"
667 CFLAGS=
668 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
669 echo "configure:670: checking whether ${CC-cc} accepts -g" >&5
670 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
671 echo $ac_n "(cached) $ac_c" 1>&6
672 else
673 echo 'void f(){}' > conftest.c
674 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
675 ac_cv_prog_cc_g=yes
676 else
677 ac_cv_prog_cc_g=no
678 fi
679 rm -f conftest*
680
681 fi
682
683 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
684 if test "$ac_test_CFLAGS" = set; then
685 CFLAGS="$ac_save_CFLAGS"
686 elif test $ac_cv_prog_cc_g = yes; then
687 CFLAGS="-g -O2"
688 else
689 CFLAGS="-O2"
690 fi
691 else
692 GCC=
693 test "${CFLAGS+set}" = set || CFLAGS="-g"
694 fi
695
696 if test "$CROSS";then
697 ac_cv_c_cross=yes
698 else
699 ac_cv_c_cross=no
700 fi
701
702 test "$AR" || AR=ar
703
704 if test "$RANLIB"; then :
705
706 if test -z "$RANLIB_TEST"; then
707 RANLIB_TEST=true
708 fi
709 else
710 RANLIB_TEST=true
711 # Extract the first word of "ranlib", so it can be a program name with args.
712 set dummy ranlib; ac_word=$2
713 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
714 echo "configure:715: checking for $ac_word" >&5
715 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
716 echo $ac_n "(cached) $ac_c" 1>&6
717 else
718 if test -n "$RANLIB"; then
719 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
720 else
721 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
722 for ac_dir in $PATH; do
723 test -z "$ac_dir" && ac_dir=.
724 if test -f $ac_dir/$ac_word; then
725 ac_cv_prog_RANLIB="ranlib"
726 break
727 fi
728 done
729 IFS="$ac_save_ifs"
730 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
731 fi
732 fi
733 RANLIB="$ac_cv_prog_RANLIB"
734 if test -n "$RANLIB"; then
735 echo "$ac_t""$RANLIB" 1>&6
736 else
737 echo "$ac_t""no" 1>&6
738 fi
739
740 fi
741
742
743
744
745 # Sanity check for the cross-compilation case:
746 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
747 echo "configure:748: checking how to run the C preprocessor" >&5
748 # On Suns, sometimes $CPP names a directory.
749 if test -n "$CPP" && test -d "$CPP"; then
750 CPP=
751 fi
752 if test -z "$CPP"; then
753 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
754 echo $ac_n "(cached) $ac_c" 1>&6
755 else
756 # This must be in double quotes, not single quotes, because CPP may get
757 # substituted into the Makefile and "${CC-cc}" will confuse make.
758 CPP="${CC-cc} -E"
759 # On the NeXT, cc -E runs the code through the compiler's parser,
760 # not just through cpp.
761 cat > conftest.$ac_ext <<EOF
762 #line 763 "configure"
763 #include "confdefs.h"
764 #include <assert.h>
765 Syntax Error
766 EOF
767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
768 { (eval echo configure:769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
769 ac_err=`grep -v '^ *+' conftest.out`
770 if test -z "$ac_err"; then
771 :
772 else
773 echo "$ac_err" >&5
774 echo "configure: failed program was:" >&5
775 cat conftest.$ac_ext >&5
776 rm -rf conftest*
777 CPP="${CC-cc} -E -traditional-cpp"
778 cat > conftest.$ac_ext <<EOF
779 #line 780 "configure"
780 #include "confdefs.h"
781 #include <assert.h>
782 Syntax Error
783 EOF
784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
785 { (eval echo configure:786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
786 ac_err=`grep -v '^ *+' conftest.out`
787 if test -z "$ac_err"; then
788 :
789 else
790 echo "$ac_err" >&5
791 echo "configure: failed program was:" >&5
792 cat conftest.$ac_ext >&5
793 rm -rf conftest*
794 CPP=/lib/cpp
795 fi
796 rm -f conftest*
797 fi
798 rm -f conftest*
799 ac_cv_prog_CPP="$CPP"
800 fi
801 CPP="$ac_cv_prog_CPP"
802 else
803 ac_cv_prog_CPP="$CPP"
804 fi
805 echo "$ac_t""$CPP" 1>&6
806
807 ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'`
808 echo $ac_n "checking for stdio.h""... $ac_c" 1>&6
809 echo "configure:810: checking for stdio.h" >&5
810 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
811 echo $ac_n "(cached) $ac_c" 1>&6
812 else
813 cat > conftest.$ac_ext <<EOF
814 #line 815 "configure"
815 #include "confdefs.h"
816 #include <stdio.h>
817 EOF
818 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
819 { (eval echo configure:820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
820 ac_err=`grep -v '^ *+' conftest.out`
821 if test -z "$ac_err"; then
822 rm -rf conftest*
823 eval "ac_cv_header_$ac_safe=yes"
824 else
825 echo "$ac_err" >&5
826 echo "configure: failed program was:" >&5
827 cat conftest.$ac_ext >&5
828 rm -rf conftest*
829 eval "ac_cv_header_$ac_safe=no"
830 fi
831 rm -f conftest*
832 fi
833 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
834 echo "$ac_t""yes" 1>&6
835 :
836 else
837 echo "$ac_t""no" 1>&6
838 { echo "configure: error: Can't find stdio.h.
839 You must have a usable C system for the target already installed, at least
840 including headers and, preferably, the library, before you can configure
841 the G77 runtime system. If necessary, install gcc now with \`LANGUAGES=c',
842 then the target library, then build with \`LANGUAGES=f77'." 1>&2; exit 1; }
843 fi
844
845
846 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
847 echo "configure:848: checking for ANSI C header files" >&5
848 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
849 echo $ac_n "(cached) $ac_c" 1>&6
850 else
851 cat > conftest.$ac_ext <<EOF
852 #line 853 "configure"
853 #include "confdefs.h"
854 #include <stdlib.h>
855 #include <stdarg.h>
856 #include <string.h>
857 #include <float.h>
858 EOF
859 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
860 { (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
861 ac_err=`grep -v '^ *+' conftest.out`
862 if test -z "$ac_err"; then
863 rm -rf conftest*
864 ac_cv_header_stdc=yes
865 else
866 echo "$ac_err" >&5
867 echo "configure: failed program was:" >&5
868 cat conftest.$ac_ext >&5
869 rm -rf conftest*
870 ac_cv_header_stdc=no
871 fi
872 rm -f conftest*
873
874 if test $ac_cv_header_stdc = yes; then
875 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
876 cat > conftest.$ac_ext <<EOF
877 #line 878 "configure"
878 #include "confdefs.h"
879 #include <string.h>
880 EOF
881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
882 egrep "memchr" >/dev/null 2>&1; then
883 :
884 else
885 rm -rf conftest*
886 ac_cv_header_stdc=no
887 fi
888 rm -f conftest*
889
890 fi
891
892 if test $ac_cv_header_stdc = yes; then
893 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
894 cat > conftest.$ac_ext <<EOF
895 #line 896 "configure"
896 #include "confdefs.h"
897 #include <stdlib.h>
898 EOF
899 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
900 egrep "free" >/dev/null 2>&1; then
901 :
902 else
903 rm -rf conftest*
904 ac_cv_header_stdc=no
905 fi
906 rm -f conftest*
907
908 fi
909
910 if test $ac_cv_header_stdc = yes; then
911 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
912 if test "$cross_compiling" = yes; then
913 :
914 else
915 cat > conftest.$ac_ext <<EOF
916 #line 917 "configure"
917 #include "confdefs.h"
918 #include <ctype.h>
919 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
920 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
921 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
922 int main () { int i; for (i = 0; i < 256; i++)
923 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
924 exit (0); }
925
926 EOF
927 if { (eval echo configure:928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
928 then
929 :
930 else
931 echo "configure: failed program was:" >&5
932 cat conftest.$ac_ext >&5
933 rm -fr conftest*
934 ac_cv_header_stdc=no
935 fi
936 rm -fr conftest*
937 fi
938
939 fi
940 fi
941
942 echo "$ac_t""$ac_cv_header_stdc" 1>&6
943 if test $ac_cv_header_stdc = yes; then
944 cat >> confdefs.h <<\EOF
945 #define STDC_HEADERS 1
946 EOF
947
948 fi
949
950
951
952 echo $ac_n "checking for posix""... $ac_c" 1>&6
953 echo "configure:954: checking for posix" >&5
954 if eval "test \"`echo '$''{'g77_cv_header_posix'+set}'`\" = set"; then
955 echo $ac_n "(cached) $ac_c" 1>&6
956 else
957 cat > conftest.$ac_ext <<EOF
958 #line 959 "configure"
959 #include "confdefs.h"
960 #include <sys/types.h>
961 #include <unistd.h>
962 #ifdef _POSIX_VERSION
963 yes
964 #endif
965
966 EOF
967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
968 egrep "yes" >/dev/null 2>&1; then
969 rm -rf conftest*
970 g77_cv_header_posix=yes
971 else
972 rm -rf conftest*
973 g77_cv_header_posix=no
974 fi
975 rm -f conftest*
976
977 fi
978
979 echo "$ac_t""$g77_cv_header_posix" 1>&6
980
981 # We can rely on the GNU library being posix-ish. I guess checking the
982 # header isn't actually like checking the functions, though...
983 echo $ac_n "checking for GNU library""... $ac_c" 1>&6
984 echo "configure:985: checking for GNU library" >&5
985 if eval "test \"`echo '$''{'g77_cv_lib_gnu'+set}'`\" = set"; then
986 echo $ac_n "(cached) $ac_c" 1>&6
987 else
988 cat > conftest.$ac_ext <<EOF
989 #line 990 "configure"
990 #include "confdefs.h"
991 #include <stdio.h>
992 #ifdef __GNU_LIBRARY__
993 yes
994 #endif
995
996 EOF
997 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
998 egrep "yes" >/dev/null 2>&1; then
999 rm -rf conftest*
1000 g77_cv_lib_gnu=yes
1001 else
1002 rm -rf conftest*
1003 g77_cv_lib_gnu=no
1004 fi
1005 rm -f conftest*
1006
1007 fi
1008
1009 echo "$ac_t""$g77_cv_lib_gnu" 1>&6
1010
1011 # Apparently cygwin needs to be special-cased.
1012 echo $ac_n "checking for cyg\`win'32""... $ac_c" 1>&6
1013 echo "configure:1014: checking for cyg\`win'32" >&5
1014 if eval "test \"`echo '$''{'g77_cv_sys_cygwin32'+set}'`\" = set"; then
1015 echo $ac_n "(cached) $ac_c" 1>&6
1016 else
1017 cat > conftest.$ac_ext <<EOF
1018 #line 1019 "configure"
1019 #include "confdefs.h"
1020 #ifdef __CYGWIN32__
1021 yes
1022 #endif
1023
1024 EOF
1025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1026 egrep "yes" >/dev/null 2>&1; then
1027 rm -rf conftest*
1028 g77_cv_sys_cygwin32=yes
1029 else
1030 rm -rf conftest*
1031 g77_cv_sys_cygwin32=no
1032 fi
1033 rm -f conftest*
1034
1035 fi
1036
1037 echo "$ac_t""$g77_cv_sys_cygwin32" 1>&6
1038
1039 # ditto for mingw32.
1040 echo $ac_n "checking for mingw32""... $ac_c" 1>&6
1041 echo "configure:1042: checking for mingw32" >&5
1042 if eval "test \"`echo '$''{'g77_cv_sys_mingw32'+set}'`\" = set"; then
1043 echo $ac_n "(cached) $ac_c" 1>&6
1044 else
1045 cat > conftest.$ac_ext <<EOF
1046 #line 1047 "configure"
1047 #include "confdefs.h"
1048 #ifdef __MINGW32__
1049 yes
1050 #endif
1051
1052 EOF
1053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1054 egrep "yes" >/dev/null 2>&1; then
1055 rm -rf conftest*
1056 g77_cv_sys_mingw32=yes
1057 else
1058 rm -rf conftest*
1059 g77_cv_sys_mingw32=no
1060 fi
1061 rm -f conftest*
1062
1063 fi
1064
1065 echo "$ac_t""$g77_cv_sys_mingw32" 1>&6
1066
1067
1068 ac_safe=`echo "fcntl.h" | sed 'y%./+-%__p_%'`
1069 echo $ac_n "checking for fcntl.h""... $ac_c" 1>&6
1070 echo "configure:1071: checking for fcntl.h" >&5
1071 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1072 echo $ac_n "(cached) $ac_c" 1>&6
1073 else
1074 cat > conftest.$ac_ext <<EOF
1075 #line 1076 "configure"
1076 #include "confdefs.h"
1077 #include <fcntl.h>
1078 EOF
1079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1080 { (eval echo configure:1081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1081 ac_err=`grep -v '^ *+' conftest.out`
1082 if test -z "$ac_err"; then
1083 rm -rf conftest*
1084 eval "ac_cv_header_$ac_safe=yes"
1085 else
1086 echo "$ac_err" >&5
1087 echo "configure: failed program was:" >&5
1088 cat conftest.$ac_ext >&5
1089 rm -rf conftest*
1090 eval "ac_cv_header_$ac_safe=no"
1091 fi
1092 rm -f conftest*
1093 fi
1094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1095 echo "$ac_t""yes" 1>&6
1096 test $g77_cv_header_posix = yes && cat >> confdefs.h <<\EOF
1097 #define _POSIX_SOURCE 1
1098 EOF
1099
1100 else
1101 echo "$ac_t""no" 1>&6
1102 cat >> confdefs.h <<\EOF
1103 #define NO_FCNTL 1
1104 EOF
1105 cat >> confdefs.h <<\EOF
1106 #define OPEN_DECL 1
1107 EOF
1108
1109 fi
1110
1111
1112 echo $ac_n "checking for working const""... $ac_c" 1>&6
1113 echo "configure:1114: checking for working const" >&5
1114 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1115 echo $ac_n "(cached) $ac_c" 1>&6
1116 else
1117 cat > conftest.$ac_ext <<EOF
1118 #line 1119 "configure"
1119 #include "confdefs.h"
1120
1121 int main() {
1122
1123 /* Ultrix mips cc rejects this. */
1124 typedef int charset[2]; const charset x;
1125 /* SunOS 4.1.1 cc rejects this. */
1126 char const *const *ccp;
1127 char **p;
1128 /* NEC SVR4.0.2 mips cc rejects this. */
1129 struct point {int x, y;};
1130 static struct point const zero = {0,0};
1131 /* AIX XL C 1.02.0.0 rejects this.
1132 It does not let you subtract one const X* pointer from another in an arm
1133 of an if-expression whose if-part is not a constant expression */
1134 const char *g = "string";
1135 ccp = &g + (g ? g-g : 0);
1136 /* HPUX 7.0 cc rejects these. */
1137 ++ccp;
1138 p = (char**) ccp;
1139 ccp = (char const *const *) p;
1140 { /* SCO 3.2v4 cc rejects this. */
1141 char *t;
1142 char const *s = 0 ? (char *) 0 : (char const *) 0;
1143
1144 *t++ = 0;
1145 }
1146 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1147 int x[] = {25, 17};
1148 const int *foo = &x[0];
1149 ++foo;
1150 }
1151 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1152 typedef const int *iptr;
1153 iptr p = 0;
1154 ++p;
1155 }
1156 { /* AIX XL C 1.02.0.0 rejects this saying
1157 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1158 struct s { int j; const int *ap[3]; };
1159 struct s *b; b->j = 5;
1160 }
1161 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1162 const int foo = 10;
1163 }
1164
1165 ; return 0; }
1166 EOF
1167 if { (eval echo configure:1168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1168 rm -rf conftest*
1169 ac_cv_c_const=yes
1170 else
1171 echo "configure: failed program was:" >&5
1172 cat conftest.$ac_ext >&5
1173 rm -rf conftest*
1174 ac_cv_c_const=no
1175 fi
1176 rm -f conftest*
1177 fi
1178
1179 echo "$ac_t""$ac_cv_c_const" 1>&6
1180 if test $ac_cv_c_const = no; then
1181 cat >> confdefs.h <<\EOF
1182 #define const
1183 EOF
1184
1185 fi
1186
1187 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1188 echo "configure:1189: checking for size_t" >&5
1189 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1190 echo $ac_n "(cached) $ac_c" 1>&6
1191 else
1192 cat > conftest.$ac_ext <<EOF
1193 #line 1194 "configure"
1194 #include "confdefs.h"
1195 #include <sys/types.h>
1196 #if STDC_HEADERS
1197 #include <stdlib.h>
1198 #include <stddef.h>
1199 #endif
1200 EOF
1201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1202 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1203 rm -rf conftest*
1204 ac_cv_type_size_t=yes
1205 else
1206 rm -rf conftest*
1207 ac_cv_type_size_t=no
1208 fi
1209 rm -f conftest*
1210
1211 fi
1212 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1213 if test $ac_cv_type_size_t = no; then
1214 cat >> confdefs.h <<\EOF
1215 #define size_t unsigned
1216 EOF
1217
1218 fi
1219
1220
1221 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1222 echo "configure:1223: checking return type of signal handlers" >&5
1223 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1224 echo $ac_n "(cached) $ac_c" 1>&6
1225 else
1226 cat > conftest.$ac_ext <<EOF
1227 #line 1228 "configure"
1228 #include "confdefs.h"
1229 #include <sys/types.h>
1230 #include <signal.h>
1231 #ifdef signal
1232 #undef signal
1233 #endif
1234 #ifdef __cplusplus
1235 extern "C" void (*signal (int, void (*)(int)))(int);
1236 #else
1237 void (*signal ()) ();
1238 #endif
1239
1240 int main() {
1241 int i;
1242 ; return 0; }
1243 EOF
1244 if { (eval echo configure:1245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1245 rm -rf conftest*
1246 ac_cv_type_signal=void
1247 else
1248 echo "configure: failed program was:" >&5
1249 cat conftest.$ac_ext >&5
1250 rm -rf conftest*
1251 ac_cv_type_signal=int
1252 fi
1253 rm -f conftest*
1254 fi
1255
1256 echo "$ac_t""$ac_cv_type_signal" 1>&6
1257 cat >> confdefs.h <<EOF
1258 #define RETSIGTYPE $ac_cv_type_signal
1259 EOF
1260
1261
1262 # we'll get atexit by default
1263 if test $ac_cv_header_stdc != yes; then
1264 echo $ac_n "checking for atexit""... $ac_c" 1>&6
1265 echo "configure:1266: checking for atexit" >&5
1266 if eval "test \"`echo '$''{'ac_cv_func_atexit'+set}'`\" = set"; then
1267 echo $ac_n "(cached) $ac_c" 1>&6
1268 else
1269 cat > conftest.$ac_ext <<EOF
1270 #line 1271 "configure"
1271 #include "confdefs.h"
1272 /* System header to define __stub macros and hopefully few prototypes,
1273 which can conflict with char atexit(); below. */
1274 #include <assert.h>
1275 /* Override any gcc2 internal prototype to avoid an error. */
1276 /* We use char because int might match the return type of a gcc2
1277 builtin and then its argument prototype would still apply. */
1278 char atexit();
1279
1280 int main() {
1281
1282 /* The GNU C library defines this for functions which it implements
1283 to always fail with ENOSYS. Some functions are actually named
1284 something starting with __ and the normal name is an alias. */
1285 #if defined (__stub_atexit) || defined (__stub___atexit)
1286 choke me
1287 #else
1288 atexit();
1289 #endif
1290
1291 ; return 0; }
1292 EOF
1293 if { (eval echo configure:1294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1294 rm -rf conftest*
1295 eval "ac_cv_func_atexit=yes"
1296 else
1297 echo "configure: failed program was:" >&5
1298 cat conftest.$ac_ext >&5
1299 rm -rf conftest*
1300 eval "ac_cv_func_atexit=no"
1301 fi
1302 rm -f conftest*
1303 fi
1304
1305 if eval "test \"`echo '$ac_cv_func_'atexit`\" = yes"; then
1306 echo "$ac_t""yes" 1>&6
1307 cat >> confdefs.h <<\EOF
1308 #define onexit atexit
1309 EOF
1310
1311 else
1312 echo "$ac_t""no" 1>&6
1313 cat >> confdefs.h <<\EOF
1314 #define NO_ONEXIT 1
1315 EOF
1316
1317 echo $ac_n "checking for onexit""... $ac_c" 1>&6
1318 echo "configure:1319: checking for onexit" >&5
1319 if eval "test \"`echo '$''{'ac_cv_func_onexit'+set}'`\" = set"; then
1320 echo $ac_n "(cached) $ac_c" 1>&6
1321 else
1322 cat > conftest.$ac_ext <<EOF
1323 #line 1324 "configure"
1324 #include "confdefs.h"
1325 /* System header to define __stub macros and hopefully few prototypes,
1326 which can conflict with char onexit(); below. */
1327 #include <assert.h>
1328 /* Override any gcc2 internal prototype to avoid an error. */
1329 /* We use char because int might match the return type of a gcc2
1330 builtin and then its argument prototype would still apply. */
1331 char onexit();
1332
1333 int main() {
1334
1335 /* The GNU C library defines this for functions which it implements
1336 to always fail with ENOSYS. Some functions are actually named
1337 something starting with __ and the normal name is an alias. */
1338 #if defined (__stub_onexit) || defined (__stub___onexit)
1339 choke me
1340 #else
1341 onexit();
1342 #endif
1343
1344 ; return 0; }
1345 EOF
1346 if { (eval echo configure:1347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1347 rm -rf conftest*
1348 eval "ac_cv_func_onexit=yes"
1349 else
1350 echo "configure: failed program was:" >&5
1351 cat conftest.$ac_ext >&5
1352 rm -rf conftest*
1353 eval "ac_cv_func_onexit=no"
1354 fi
1355 rm -f conftest*
1356 fi
1357
1358 if eval "test \"`echo '$ac_cv_func_'onexit`\" = yes"; then
1359 echo "$ac_t""yes" 1>&6
1360 :
1361 else
1362 echo "$ac_t""no" 1>&6
1363 echo $ac_n "checking for on_exit""... $ac_c" 1>&6
1364 echo "configure:1365: checking for on_exit" >&5
1365 if eval "test \"`echo '$''{'ac_cv_func_on_exit'+set}'`\" = set"; then
1366 echo $ac_n "(cached) $ac_c" 1>&6
1367 else
1368 cat > conftest.$ac_ext <<EOF
1369 #line 1370 "configure"
1370 #include "confdefs.h"
1371 /* System header to define __stub macros and hopefully few prototypes,
1372 which can conflict with char on_exit(); below. */
1373 #include <assert.h>
1374 /* Override any gcc2 internal prototype to avoid an error. */
1375 /* We use char because int might match the return type of a gcc2
1376 builtin and then its argument prototype would still apply. */
1377 char on_exit();
1378
1379 int main() {
1380
1381 /* The GNU C library defines this for functions which it implements
1382 to always fail with ENOSYS. Some functions are actually named
1383 something starting with __ and the normal name is an alias. */
1384 #if defined (__stub_on_exit) || defined (__stub___on_exit)
1385 choke me
1386 #else
1387 on_exit();
1388 #endif
1389
1390 ; return 0; }
1391 EOF
1392 if { (eval echo configure:1393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1393 rm -rf conftest*
1394 eval "ac_cv_func_on_exit=yes"
1395 else
1396 echo "configure: failed program was:" >&5
1397 cat conftest.$ac_ext >&5
1398 rm -rf conftest*
1399 eval "ac_cv_func_on_exit=no"
1400 fi
1401 rm -f conftest*
1402 fi
1403
1404 if eval "test \"`echo '$ac_cv_func_'on_exit`\" = yes"; then
1405 echo "$ac_t""yes" 1>&6
1406 cat >> confdefs.h <<\EOF
1407 #define onexit on_exit
1408 EOF
1409
1410 else
1411 echo "$ac_t""no" 1>&6
1412 fi
1413
1414 fi
1415
1416 fi
1417
1418 else true
1419 fi
1420
1421 # This should always succeed on unix.
1422 # Apparently positive result on cygwin loses re. NON_UNIX_STDIO
1423 # (as of cygwin b18). Likewise on mingw.
1424 echo $ac_n "checking for fstat""... $ac_c" 1>&6
1425 echo "configure:1426: checking for fstat" >&5
1426 if eval "test \"`echo '$''{'ac_cv_func_fstat'+set}'`\" = set"; then
1427 echo $ac_n "(cached) $ac_c" 1>&6
1428 else
1429 cat > conftest.$ac_ext <<EOF
1430 #line 1431 "configure"
1431 #include "confdefs.h"
1432 /* System header to define __stub macros and hopefully few prototypes,
1433 which can conflict with char fstat(); below. */
1434 #include <assert.h>
1435 /* Override any gcc2 internal prototype to avoid an error. */
1436 /* We use char because int might match the return type of a gcc2
1437 builtin and then its argument prototype would still apply. */
1438 char fstat();
1439
1440 int main() {
1441
1442 /* The GNU C library defines this for functions which it implements
1443 to always fail with ENOSYS. Some functions are actually named
1444 something starting with __ and the normal name is an alias. */
1445 #if defined (__stub_fstat) || defined (__stub___fstat)
1446 choke me
1447 #else
1448 fstat();
1449 #endif
1450
1451 ; return 0; }
1452 EOF
1453 if { (eval echo configure:1454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1454 rm -rf conftest*
1455 eval "ac_cv_func_fstat=yes"
1456 else
1457 echo "configure: failed program was:" >&5
1458 cat conftest.$ac_ext >&5
1459 rm -rf conftest*
1460 eval "ac_cv_func_fstat=no"
1461 fi
1462 rm -f conftest*
1463 fi
1464
1465 if eval "test \"`echo '$ac_cv_func_'fstat`\" = yes"; then
1466 echo "$ac_t""yes" 1>&6
1467 :
1468 else
1469 echo "$ac_t""no" 1>&6
1470 fi
1471
1472 echo $ac_n "checking need for NON_UNIX_STDIO""... $ac_c" 1>&6
1473 echo "configure:1474: checking need for NON_UNIX_STDIO" >&5
1474 if test $g77_cv_sys_cygwin32 = yes \
1475 || test $g77_cv_sys_mingw32 = yes \
1476 || test $ac_cv_func_fstat = no; then
1477 echo "$ac_t""yes" 1>&6
1478 cat >> confdefs.h <<\EOF
1479 #define NON_UNIX_STDIO 1
1480 EOF
1481
1482 else
1483 echo "$ac_t""no" 1>&6
1484 fi
1485
1486 # This is necessary for e.g. Linux:
1487 echo $ac_n "checking for necessary members of struct FILE""... $ac_c" 1>&6
1488 echo "configure:1489: checking for necessary members of struct FILE" >&5
1489 if eval "test \"`echo '$''{'g77_cv_struct_FILE'+set}'`\" = set"; then
1490 echo $ac_n "(cached) $ac_c" 1>&6
1491 else
1492 cat > conftest.$ac_ext <<EOF
1493 #line 1494 "configure"
1494 #include "confdefs.h"
1495 #include <stdio.h>
1496 int main() {
1497 FILE s; s._ptr; s._base; s._flag;
1498 ; return 0; }
1499 EOF
1500 if { (eval echo configure:1501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1501 rm -rf conftest*
1502 g77_cv_struct_FILE=yes
1503 else
1504 echo "configure: failed program was:" >&5
1505 cat conftest.$ac_ext >&5
1506 rm -rf conftest*
1507 g77_cv_struct_FILE=no
1508 fi
1509 rm -f conftest*
1510 fi
1511 echo "$ac_t""$g77_cv_struct_FILE" 1>&6
1512 if test $g77_cv_struct_FILE = no; then
1513 cat >> confdefs.h <<\EOF
1514 #define MISSING_FILE_ELEMS 1
1515 EOF
1516
1517 fi
1518
1519 echo $ac_n "checking for drem in -lm""... $ac_c" 1>&6
1520 echo "configure:1521: checking for drem in -lm" >&5
1521 ac_lib_var=`echo m'_'drem | sed 'y%./+-%__p_%'`
1522 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1523 echo $ac_n "(cached) $ac_c" 1>&6
1524 else
1525 ac_save_LIBS="$LIBS"
1526 LIBS="-lm $LIBS"
1527 cat > conftest.$ac_ext <<EOF
1528 #line 1529 "configure"
1529 #include "confdefs.h"
1530 /* Override any gcc2 internal prototype to avoid an error. */
1531 /* We use char because int might match the return type of a gcc2
1532 builtin and then its argument prototype would still apply. */
1533 char drem();
1534
1535 int main() {
1536 drem()
1537 ; return 0; }
1538 EOF
1539 if { (eval echo configure:1540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1540 rm -rf conftest*
1541 eval "ac_cv_lib_$ac_lib_var=yes"
1542 else
1543 echo "configure: failed program was:" >&5
1544 cat conftest.$ac_ext >&5
1545 rm -rf conftest*
1546 eval "ac_cv_lib_$ac_lib_var=no"
1547 fi
1548 rm -f conftest*
1549 LIBS="$ac_save_LIBS"
1550
1551 fi
1552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1553 echo "$ac_t""yes" 1>&6
1554 cat >> confdefs.h <<\EOF
1555 #define IEEE_drem 1
1556 EOF
1557
1558 else
1559 echo "$ac_t""no" 1>&6
1560 fi
1561
1562
1563
1564 # posix will guarantee the right behaviour for sprintf, else we can't be
1565 # sure; HEADER_STDC wouldn't be the right check in sunos4, for instance.
1566 # However, on my sunos4/gcc setup unistd.h leads us wrongly to believe
1567 # we're posix-conformant, so always do the test.
1568 echo $ac_n "checking for ansi/posix sprintf result""... $ac_c" 1>&6
1569 echo "configure:1570: checking for ansi/posix sprintf result" >&5
1570 if test "$cross_compiling" = yes; then
1571 g77_cv_sys_sprintf_ansi=no
1572 else
1573 cat > conftest.$ac_ext <<EOF
1574 #line 1575 "configure"
1575 #include "confdefs.h"
1576 #include <stdio.h>
1577 /* does sprintf return the number of chars transferred? */
1578 main () {char foo[2]; (sprintf(foo, "1") == 1) ? exit(0) : exit(1);}
1579
1580 EOF
1581 if { (eval echo configure:1582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1582 then
1583 g77_cv_sys_sprintf_ansi=yes
1584 else
1585 echo "configure: failed program was:" >&5
1586 cat conftest.$ac_ext >&5
1587 rm -fr conftest*
1588 g77_cv_sys_sprintf_ansi=no
1589 fi
1590 rm -fr conftest*
1591 fi
1592
1593 if eval "test \"`echo '$''{'g77_cv_sys_sprintf_ansi'+set}'`\" = set"; then
1594 echo $ac_n "(cached) $ac_c" 1>&6
1595 else
1596 g77_cv_sys_sprintf_ansi=$g77_cv_sys_sprintf_ansi
1597 fi
1598
1599 if test $ac_cv_c_cross = no; then
1600 echo "$ac_t""$g77_cv_sys_sprintf_ansi" 1>&6
1601 else
1602 echo "$ac_t""can't tell -- assuming no" 1>&6
1603 fi
1604 # The cygwin patch takes steps to avoid defining USE_STRLEN here -- I don't
1605 # understand why.
1606 if test $g77_cv_sys_sprintf_ansi != yes; then
1607 cat >> confdefs.h <<\EOF
1608 #define USE_STRLEN 1
1609 EOF
1610
1611 fi
1612
1613 # define NON_ANSI_RW_MODES on unix (can't hurt)
1614 echo $ac_n "checking NON_ANSI_RW_MODES""... $ac_c" 1>&6
1615 echo "configure:1616: checking NON_ANSI_RW_MODES" >&5
1616 cat > conftest.$ac_ext <<EOF
1617 #line 1618 "configure"
1618 #include "confdefs.h"
1619 #ifdef unix
1620 yes
1621 #endif
1622 #ifdef __unix
1623 yes
1624 #endif
1625 #ifdef __unix__
1626 yes
1627 #endif
1628
1629 EOF
1630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1631 egrep "yes" >/dev/null 2>&1; then
1632 rm -rf conftest*
1633 is_unix=yes
1634 else
1635 rm -rf conftest*
1636 is_unix=no
1637 fi
1638 rm -f conftest*
1639
1640 if test $g77_cv_sys_cygwin32 = yes || test $g77_cv_sys_mingw32 = yes; then
1641 echo "$ac_t""no" 1>&6
1642 else
1643 if test $is_unix = yes; then
1644 cat >> confdefs.h <<\EOF
1645 #define NON_ANSI_RW_MODES 1
1646 EOF
1647
1648 echo "$ac_t""yes" 1>&6
1649 else
1650 echo "$ac_t""no" 1>&6
1651 fi
1652 fi
1653
1654 # We have to firkle with the info in hconfig.h to figure out suitable types
1655 # (via com.h). proj.h and com.h are in $srcdir/.., config.h which they need
1656 # is in ../.. and the config files are in $srcdir/../../config.
1657 echo $ac_n "checking f2c integer type""... $ac_c" 1>&6
1658 echo "configure:1659: checking f2c integer type" >&5
1659 late_ac_cpp=$ac_cpp
1660 ac_cpp="$late_ac_cpp -I$srcdir/../gcc/f -I../../gcc -I$srcdir/../gcc -I$srcdir/../gcc/config"
1661 if eval "test \"`echo '$''{'g77_cv_sys_f2cinteger'+set}'`\" = set"; then
1662 echo $ac_n "(cached) $ac_c" 1>&6
1663 else
1664 cat > conftest.$ac_ext <<EOF
1665 #line 1666 "configure"
1666 #include "confdefs.h"
1667 #include "proj.h"
1668 #define FFECOM_DETERMINE_TYPES 1
1669 #include "com.h"
1670 #if FFECOM_f2cINTEGER == FFECOM_f2ccodeLONG
1671 F2C_INTEGER=long int
1672 #elif FFECOM_f2cINTEGER == FFECOM_f2ccodeINT
1673 F2C_INTEGER=int
1674 #else
1675 # error "Cannot find a suitable type for F2C_INTEGER"
1676 #endif
1677
1678 EOF
1679 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1680 egrep "F2C_INTEGER=long int" >/dev/null 2>&1; then
1681 rm -rf conftest*
1682 g77_cv_sys_f2cinteger="long int"
1683 fi
1684 rm -f conftest*
1685
1686 if test "$g77_cv_sys_f2cinteger" = ""; then
1687 cat > conftest.$ac_ext <<EOF
1688 #line 1689 "configure"
1689 #include "confdefs.h"
1690 #include "proj.h"
1691 #define FFECOM_DETERMINE_TYPES 1
1692 #include "com.h"
1693 #if FFECOM_f2cINTEGER == FFECOM_f2ccodeLONG
1694 F2C_INTEGER=long int
1695 #elif FFECOM_f2cINTEGER == FFECOM_f2ccodeINT
1696 F2C_INTEGER=int
1697 #else
1698 # error "Cannot find a suitable type for F2C_INTEGER"
1699 #endif
1700
1701 EOF
1702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1703 egrep "F2C_INTEGER=int" >/dev/null 2>&1; then
1704 rm -rf conftest*
1705 g77_cv_sys_f2cinteger=int
1706 fi
1707 rm -f conftest*
1708
1709 fi
1710 if test "$g77_cv_sys_f2cinteger" = ""; then
1711 echo "$ac_t""""" 1>&6
1712 { echo "configure: error: Can't determine type for f2c integer; config.log may help." 1>&2; exit 1; }
1713 fi
1714
1715 fi
1716
1717 echo "$ac_t""$g77_cv_sys_f2cinteger" 1>&6
1718 F2C_INTEGER=$g77_cv_sys_f2cinteger
1719 ac_cpp=$late_ac_cpp
1720
1721
1722 echo $ac_n "checking f2c long int type""... $ac_c" 1>&6
1723 echo "configure:1724: checking f2c long int type" >&5
1724 late_ac_cpp=$ac_cpp
1725 ac_cpp="$late_ac_cpp -I$srcdir/../gcc/f -I../../gcc -I$srcdir/../gcc -I$srcdir/../gcc/config"
1726 if eval "test \"`echo '$''{'g77_cv_sys_f2clongint'+set}'`\" = set"; then
1727 echo $ac_n "(cached) $ac_c" 1>&6
1728 else
1729 cat > conftest.$ac_ext <<EOF
1730 #line 1731 "configure"
1731 #include "confdefs.h"
1732 #include "proj.h"
1733 #define FFECOM_DETERMINE_TYPES 1
1734 #include "com.h"
1735 #if FFECOM_f2cLONGINT == FFECOM_f2ccodeLONG
1736 F2C_LONGINT=long int
1737 #elif FFECOM_f2cLONGINT == FFECOM_f2ccodeLONGLONG
1738 F2C_LONGINT=long long int
1739 #else
1740 # error "Cannot find a suitable type for F2C_LONGINT"
1741 #endif
1742
1743 EOF
1744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1745 egrep "F2C_LONGINT=long int" >/dev/null 2>&1; then
1746 rm -rf conftest*
1747 g77_cv_sys_f2clongint="long int"
1748 fi
1749 rm -f conftest*
1750
1751 if test "$g77_cv_sys_f2clongint" = ""; then
1752 cat > conftest.$ac_ext <<EOF
1753 #line 1754 "configure"
1754 #include "confdefs.h"
1755 #include "proj.h"
1756 #define FFECOM_DETERMINE_TYPES 1
1757 #include "com.h"
1758 #if FFECOM_f2cLONGINT == FFECOM_f2ccodeLONG
1759 F2C_LONGINT=long int
1760 #elif FFECOM_f2cLONGINT == FFECOM_f2ccodeLONGLONG
1761 F2C_LONGINT=long long int
1762 #else
1763 # error "Cannot find a suitable type for F2C_LONGINT"
1764 #endif
1765
1766 EOF
1767 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1768 egrep "F2C_LONGINT=long long int" >/dev/null 2>&1; then
1769 rm -rf conftest*
1770 g77_cv_sys_f2clongint="long long int"
1771 fi
1772 rm -f conftest*
1773
1774 fi
1775 if test "$g77_cv_sys_f2clongint" = ""; then
1776 echo "$ac_t""""" 1>&6
1777 { echo "configure: error: Can't determine type for f2c long int; config.log may help." 1>&2; exit 1; }
1778 fi
1779
1780 fi
1781
1782 echo "$ac_t""$g77_cv_sys_f2clongint" 1>&6
1783 F2C_LONGINT=$g77_cv_sys_f2clongint
1784 ac_cpp=$late_ac_cpp
1785
1786
1787
1788
1789
1790
1791 # This EOF_CHAR is a misfeature on unix.
1792 cat >> confdefs.h <<\EOF
1793 #define NO_EOF_CHAR_CHECK 1
1794 EOF
1795
1796
1797 cat >> confdefs.h <<\EOF
1798 #define Skip_f2c_Undefs 1
1799 EOF
1800
1801
1802
1803
1804
1805 cat >> confdefs.h <<\EOF
1806 #define Pad_UDread 1
1807 EOF
1808
1809
1810
1811
1812
1813 cat >> confdefs.h <<\EOF
1814 #define WANT_LEAD_0 1
1815 EOF
1816
1817
1818 # avoid confusion in case the `makefile's from the f2c distribution have
1819 # got put here
1820 test -f libF77/makefile && mv libF77/makefile libF77/makefile.ori
1821 test -f libI77/makefile && mv libI77/makefile libI77/makefile.ori
1822 test -f libU77/makefile && mv libU77/makefile libU77/makefile.ori
1823
1824 ac_aux_dir=
1825 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1826 if test -f $ac_dir/install-sh; then
1827 ac_aux_dir=$ac_dir
1828 ac_install_sh="$ac_aux_dir/install-sh -c"
1829 break
1830 elif test -f $ac_dir/install.sh; then
1831 ac_aux_dir=$ac_dir
1832 ac_install_sh="$ac_aux_dir/install.sh -c"
1833 break
1834 fi
1835 done
1836 if test -z "$ac_aux_dir"; then
1837 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1838 fi
1839 ac_config_guess=$ac_aux_dir/config.guess
1840 ac_config_sub=$ac_aux_dir/config.sub
1841 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1842
1843 subdirs="libU77"
1844
1845 trap '' 1 2 15
1846 cat > confcache <<\EOF
1847 # This file is a shell script that caches the results of configure
1848 # tests run on this system so they can be shared between configure
1849 # scripts and configure runs. It is not useful on other systems.
1850 # If it contains results you don't want to keep, you may remove or edit it.
1851 #
1852 # By default, configure uses ./config.cache as the cache file,
1853 # creating it if it does not exist already. You can give configure
1854 # the --cache-file=FILE option to use a different cache file; that is
1855 # what configure does when it calls configure scripts in
1856 # subdirectories, so they share the cache.
1857 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1858 # config.status only pays attention to the cache file if you give it the
1859 # --recheck option to rerun configure.
1860 #
1861 EOF
1862 # The following way of writing the cache mishandles newlines in values,
1863 # but we know of no workaround that is simple, portable, and efficient.
1864 # So, don't put newlines in cache variables' values.
1865 # Ultrix sh set writes to stderr and can't be redirected directly,
1866 # and sets the high bit in the cache file unless we assign to the vars.
1867 (set) 2>&1 |
1868 case `(ac_space=' '; set) 2>&1` in
1869 *ac_space=\ *)
1870 # `set' does not quote correctly, so add quotes (double-quote substitution
1871 # turns \\\\ into \\, and sed turns \\ into \).
1872 sed -n \
1873 -e "s/'/'\\\\''/g" \
1874 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1875 ;;
1876 *)
1877 # `set' quotes correctly as required by POSIX, so do not add quotes.
1878 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1879 ;;
1880 esac >> confcache
1881 if cmp -s $cache_file confcache; then
1882 :
1883 else
1884 if test -w $cache_file; then
1885 echo "updating cache $cache_file"
1886 cat confcache > $cache_file
1887 else
1888 echo "not updating unwritable cache $cache_file"
1889 fi
1890 fi
1891 rm -f confcache
1892
1893 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1894
1895 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1896 # Let make expand exec_prefix.
1897 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1898
1899 # Any assignment to VPATH causes Sun make to only execute
1900 # the first set of double-colon rules, so remove it if not needed.
1901 # If there is a colon in the path, we need to keep it.
1902 if test "x$srcdir" = x.; then
1903 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1904 fi
1905
1906 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1907
1908 # Transform confdefs.h into DEFS.
1909 # Protect against shell expansion while executing Makefile rules.
1910 # Protect against Makefile macro expansion.
1911 cat > conftest.defs <<\EOF
1912 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1913 s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
1914 s%\[%\\&%g
1915 s%\]%\\&%g
1916 s%\$%$$%g
1917 EOF
1918 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1919 rm -f conftest.defs
1920
1921
1922 # Without the "./", some shells look in PATH for config.status.
1923 : ${CONFIG_STATUS=./config.status}
1924
1925 echo creating $CONFIG_STATUS
1926 rm -f $CONFIG_STATUS
1927 cat > $CONFIG_STATUS <<EOF
1928 #! /bin/sh
1929 # Generated automatically by configure.
1930 # Run this file to recreate the current configuration.
1931 # This directory was configured as follows,
1932 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1933 #
1934 # $0 $ac_configure_args
1935 #
1936 # Compiler output produced by configure, useful for debugging
1937 # configure, is in ./config.log if it exists.
1938
1939 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1940 for ac_option
1941 do
1942 case "\$ac_option" in
1943 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1944 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1945 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1946 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1947 echo "$CONFIG_STATUS generated by autoconf version 2.12"
1948 exit 0 ;;
1949 -help | --help | --hel | --he | --h)
1950 echo "\$ac_cs_usage"; exit 0 ;;
1951 *) echo "\$ac_cs_usage"; exit 1 ;;
1952 esac
1953 done
1954
1955 ac_given_srcdir=$srcdir
1956
1957 trap 'rm -fr `echo "Makefile f2c.h libI77/Makefile libF77/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1958 EOF
1959 cat >> $CONFIG_STATUS <<EOF
1960
1961 # Protect against being on the right side of a sed subst in config.status.
1962 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1963 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1964 $ac_vpsub
1965 $extrasub
1966 s%@CFLAGS@%$CFLAGS%g
1967 s%@CPPFLAGS@%$CPPFLAGS%g
1968 s%@CXXFLAGS@%$CXXFLAGS%g
1969 s%@DEFS@%$DEFS%g
1970 s%@LDFLAGS@%$LDFLAGS%g
1971 s%@LIBS@%$LIBS%g
1972 s%@exec_prefix@%$exec_prefix%g
1973 s%@prefix@%$prefix%g
1974 s%@program_transform_name@%$program_transform_name%g
1975 s%@bindir@%$bindir%g
1976 s%@sbindir@%$sbindir%g
1977 s%@libexecdir@%$libexecdir%g
1978 s%@datadir@%$datadir%g
1979 s%@sysconfdir@%$sysconfdir%g
1980 s%@sharedstatedir@%$sharedstatedir%g
1981 s%@localstatedir@%$localstatedir%g
1982 s%@libdir@%$libdir%g
1983 s%@includedir@%$includedir%g
1984 s%@oldincludedir@%$oldincludedir%g
1985 s%@infodir@%$infodir%g
1986 s%@mandir@%$mandir%g
1987 s%@CC@%$CC%g
1988 s%@AR@%$AR%g
1989 s%@RANLIB@%$RANLIB%g
1990 s%@RANLIB_TEST@%$RANLIB_TEST%g
1991 s%@CPP@%$CPP%g
1992 s%@F2C_INTEGER@%$F2C_INTEGER%g
1993 s%@F2C_LONGINT@%$F2C_LONGINT%g
1994 s%@CROSS@%$CROSS%g
1995 s%@subdirs@%$subdirs%g
1996
1997 CEOF
1998 EOF
1999
2000 cat >> $CONFIG_STATUS <<\EOF
2001
2002 # Split the substitutions into bite-sized pieces for seds with
2003 # small command number limits, like on Digital OSF/1 and HP-UX.
2004 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2005 ac_file=1 # Number of current file.
2006 ac_beg=1 # First line for current file.
2007 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2008 ac_more_lines=:
2009 ac_sed_cmds=""
2010 while $ac_more_lines; do
2011 if test $ac_beg -gt 1; then
2012 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2013 else
2014 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2015 fi
2016 if test ! -s conftest.s$ac_file; then
2017 ac_more_lines=false
2018 rm -f conftest.s$ac_file
2019 else
2020 if test -z "$ac_sed_cmds"; then
2021 ac_sed_cmds="sed -f conftest.s$ac_file"
2022 else
2023 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2024 fi
2025 ac_file=`expr $ac_file + 1`
2026 ac_beg=$ac_end
2027 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2028 fi
2029 done
2030 if test -z "$ac_sed_cmds"; then
2031 ac_sed_cmds=cat
2032 fi
2033 EOF
2034
2035 cat >> $CONFIG_STATUS <<EOF
2036
2037 CONFIG_FILES=\${CONFIG_FILES-"Makefile f2c.h libI77/Makefile libF77/Makefile"}
2038 EOF
2039 cat >> $CONFIG_STATUS <<\EOF
2040 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2041 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2042 case "$ac_file" in
2043 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2044 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2045 *) ac_file_in="${ac_file}.in" ;;
2046 esac
2047
2048 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2049
2050 # Remove last slash and all that follows it. Not all systems have dirname.
2051 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2052 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2053 # The file is in a subdirectory.
2054 test ! -d "$ac_dir" && mkdir "$ac_dir"
2055 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2056 # A "../" for each directory in $ac_dir_suffix.
2057 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2058 else
2059 ac_dir_suffix= ac_dots=
2060 fi
2061
2062 case "$ac_given_srcdir" in
2063 .) srcdir=.
2064 if test -z "$ac_dots"; then top_srcdir=.
2065 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2066 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2067 *) # Relative path.
2068 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2069 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2070 esac
2071
2072
2073 echo creating "$ac_file"
2074 rm -f "$ac_file"
2075 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2076 case "$ac_file" in
2077 *Makefile*) ac_comsub="1i\\
2078 # $configure_input" ;;
2079 *) ac_comsub= ;;
2080 esac
2081
2082 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2083 sed -e "$ac_comsub
2084 s%@configure_input@%$configure_input%g
2085 s%@srcdir@%$srcdir%g
2086 s%@top_srcdir@%$top_srcdir%g
2087 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2088 fi; done
2089 rm -f conftest.s*
2090
2091 EOF
2092 cat >> $CONFIG_STATUS <<EOF
2093
2094 EOF
2095 cat >> $CONFIG_STATUS <<\EOF
2096
2097 exit 0
2098 EOF
2099 chmod +x $CONFIG_STATUS
2100 rm -fr confdefs* $ac_clean_files
2101 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2102
2103 if test "$no_recursion" != yes; then
2104
2105 # Remove --cache-file and --srcdir arguments so they do not pile up.
2106 ac_sub_configure_args=
2107 ac_prev=
2108 for ac_arg in $ac_configure_args; do
2109 if test -n "$ac_prev"; then
2110 ac_prev=
2111 continue
2112 fi
2113 case "$ac_arg" in
2114 -cache-file | --cache-file | --cache-fil | --cache-fi \
2115 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2116 ac_prev=cache_file ;;
2117 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2118 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2119 ;;
2120 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2121 ac_prev=srcdir ;;
2122 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2123 ;;
2124 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
2125 esac
2126 done
2127
2128 for ac_config_dir in libU77; do
2129
2130 # Do not complain, so a configure script can configure whichever
2131 # parts of a large source tree are present.
2132 if test ! -d $srcdir/$ac_config_dir; then
2133 continue
2134 fi
2135
2136 echo configuring in $ac_config_dir
2137
2138 case "$srcdir" in
2139 .) ;;
2140 *)
2141 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
2142 else
2143 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
2144 fi
2145 ;;
2146 esac
2147
2148 ac_popdir=`pwd`
2149 cd $ac_config_dir
2150
2151 # A "../" for each directory in /$ac_config_dir.
2152 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
2153
2154 case "$srcdir" in
2155 .) # No --srcdir option. We are building in place.
2156 ac_sub_srcdir=$srcdir ;;
2157 /*) # Absolute path.
2158 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
2159 *) # Relative path.
2160 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
2161 esac
2162
2163 # Check for guested configure; otherwise get Cygnus style configure.
2164 if test -f $ac_sub_srcdir/configure; then
2165 ac_sub_configure=$ac_sub_srcdir/configure
2166 elif test -f $ac_sub_srcdir/configure.in; then
2167 ac_sub_configure=$ac_configure
2168 else
2169 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
2170 ac_sub_configure=
2171 fi
2172
2173 # The recursion is here.
2174 if test -n "$ac_sub_configure"; then
2175
2176 # Make the cache file name correct relative to the subdirectory.
2177 case "$cache_file" in
2178 /*) ac_sub_cache_file=$cache_file ;;
2179 *) # Relative path.
2180 ac_sub_cache_file="$ac_dots$cache_file" ;;
2181 esac
2182
2183 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
2184 # The eval makes quoting arguments work.
2185 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
2186 then :
2187 else
2188 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
2189 fi
2190 fi
2191
2192 cd $ac_popdir
2193 done
2194 fi
2195
2196
2197
This page took 0.171015 seconds and 6 git commands to generate.