source: tags/release-1.1.9/configure @ 1441

Last change on this file since 1441 was 676, checked in by MatthewWhiting, 14 years ago

Making sure the version number is up to date for the next release - 1.1.9

  • Property svn:executable set to *
File size: 244.4 KB
Line 
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.59 for Duchamp 1.1.9.
4#
5# Report bugs to <Matthew.Whiting@csiro.au>.
6#
7# Copyright (C) 2003 Free Software Foundation, Inc.
8# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
10## --------------------- ##
11## M4sh Initialization.  ##
12## --------------------- ##
13
14# Be Bourne compatible
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16  emulate sh
17  NULLCMD=:
18  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19  # is contrary to our usage.  Disable this feature.
20  alias -g '${1+"$@"}'='"$@"'
21elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22  set -o posix
23fi
24DUALCASE=1; export DUALCASE # for MKS sh
25
26# Support unset when possible.
27if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
28  as_unset=unset
29else
30  as_unset=false
31fi
32
33
34# Work around bugs in pre-3.0 UWIN ksh.
35$as_unset ENV MAIL MAILPATH
36PS1='$ '
37PS2='> '
38PS4='+ '
39
40# NLS nuisances.
41for as_var in \
42  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
43  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
44  LC_TELEPHONE LC_TIME
45do
46  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
47    eval $as_var=C; export $as_var
48  else
49    $as_unset $as_var
50  fi
51done
52
53# Required to use basename.
54if expr a : '\(a\)' >/dev/null 2>&1; then
55  as_expr=expr
56else
57  as_expr=false
58fi
59
60if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
61  as_basename=basename
62else
63  as_basename=false
64fi
65
66
67# Name of the executable.
68as_me=`$as_basename "$0" ||
69$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
70         X"$0" : 'X\(//\)$' \| \
71         X"$0" : 'X\(/\)$' \| \
72         .     : '\(.\)' 2>/dev/null ||
73echo X/"$0" |
74    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
75          /^X\/\(\/\/\)$/{ s//\1/; q; }
76          /^X\/\(\/\).*/{ s//\1/; q; }
77          s/.*/./; q'`
78
79
80# PATH needs CR, and LINENO needs CR and PATH.
81# Avoid depending upon Character Ranges.
82as_cr_letters='abcdefghijklmnopqrstuvwxyz'
83as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
84as_cr_Letters=$as_cr_letters$as_cr_LETTERS
85as_cr_digits='0123456789'
86as_cr_alnum=$as_cr_Letters$as_cr_digits
87
88# The user is always right.
89if test "${PATH_SEPARATOR+set}" != set; then
90  echo "#! /bin/sh" >conf$$.sh
91  echo  "exit 0"   >>conf$$.sh
92  chmod +x conf$$.sh
93  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
94    PATH_SEPARATOR=';'
95  else
96    PATH_SEPARATOR=:
97  fi
98  rm -f conf$$.sh
99fi
100
101
102  as_lineno_1=$LINENO
103  as_lineno_2=$LINENO
104  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
105  test "x$as_lineno_1" != "x$as_lineno_2" &&
106  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
107  # Find who we are.  Look in the path if we contain no path at all
108  # relative or not.
109  case $0 in
110    *[\\/]* ) as_myself=$0 ;;
111    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
112for as_dir in $PATH
113do
114  IFS=$as_save_IFS
115  test -z "$as_dir" && as_dir=.
116  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
117done
118
119       ;;
120  esac
121  # We did not find ourselves, most probably we were run as `sh COMMAND'
122  # in which case we are not to be found in the path.
123  if test "x$as_myself" = x; then
124    as_myself=$0
125  fi
126  if test ! -f "$as_myself"; then
127    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
128   { (exit 1); exit 1; }; }
129  fi
130  case $CONFIG_SHELL in
131  '')
132    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
133for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
134do
135  IFS=$as_save_IFS
136  test -z "$as_dir" && as_dir=.
137  for as_base in sh bash ksh sh5; do
138         case $as_dir in
139         /*)
140           if ("$as_dir/$as_base" -c '
141  as_lineno_1=$LINENO
142  as_lineno_2=$LINENO
143  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
144  test "x$as_lineno_1" != "x$as_lineno_2" &&
145  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
146             $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
147             $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
148             CONFIG_SHELL=$as_dir/$as_base
149             export CONFIG_SHELL
150             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
151           fi;;
152         esac
153       done
154done
155;;
156  esac
157
158  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
159  # uniformly replaced by the line number.  The first 'sed' inserts a
160  # line-number line before each line; the second 'sed' does the real
161  # work.  The second script uses 'N' to pair each line-number line
162  # with the numbered line, and appends trailing '-' during
163  # substitution so that $LINENO is not a special case at line end.
164  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
165  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
166  sed '=' <$as_myself |
167    sed '
168      N
169      s,$,-,
170      : loop
171      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
172      t loop
173      s,-$,,
174      s,^['$as_cr_digits']*\n,,
175    ' >$as_me.lineno &&
176  chmod +x $as_me.lineno ||
177    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
178   { (exit 1); exit 1; }; }
179
180  # Don't try to exec as it changes $[0], causing all sort of problems
181  # (the dirname of $[0] is not the place where we might find the
182  # original and so on.  Autoconf is especially sensible to this).
183  . ./$as_me.lineno
184  # Exit status is that of the last command.
185  exit
186}
187
188
189case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
190  *c*,-n*) ECHO_N= ECHO_C='
191' ECHO_T='      ' ;;
192  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
193  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
194esac
195
196if expr a : '\(a\)' >/dev/null 2>&1; then
197  as_expr=expr
198else
199  as_expr=false
200fi
201
202rm -f conf$$ conf$$.exe conf$$.file
203echo >conf$$.file
204if ln -s conf$$.file conf$$ 2>/dev/null; then
205  # We could just check for DJGPP; but this test a) works b) is more generic
206  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
207  if test -f conf$$.exe; then
208    # Don't use ln at all; we don't have any links
209    as_ln_s='cp -p'
210  else
211    as_ln_s='ln -s'
212  fi
213elif ln conf$$.file conf$$ 2>/dev/null; then
214  as_ln_s=ln
215else
216  as_ln_s='cp -p'
217fi
218rm -f conf$$ conf$$.exe conf$$.file
219
220if mkdir -p . 2>/dev/null; then
221  as_mkdir_p=:
222else
223  test -d ./-p && rmdir ./-p
224  as_mkdir_p=false
225fi
226
227as_executable_p="test -f"
228
229# Sed expression to map a string onto a valid CPP name.
230as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
231
232# Sed expression to map a string onto a valid variable name.
233as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
234
235
236# IFS
237# We need space, tab and new line, in precisely that order.
238as_nl='
239'
240IFS="   $as_nl"
241
242# CDPATH.
243$as_unset CDPATH
244
245
246# Name of the host.
247# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
248# so uname gets run too.
249ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
250
251exec 6>&1
252
253#
254# Initializations.
255#
256ac_default_prefix=/usr/local
257ac_config_libobj_dir=.
258cross_compiling=no
259subdirs=
260MFLAGS=
261MAKEFLAGS=
262SHELL=${CONFIG_SHELL-/bin/sh}
263
264# Maximum number of lines to put in a shell here document.
265# This variable seems obsolete.  It should probably be removed, and
266# only ac_max_sed_lines should be used.
267: ${ac_max_here_lines=38}
268
269# Identity of this package.
270PACKAGE_NAME='Duchamp'
271PACKAGE_TARNAME='duchamp'
272PACKAGE_VERSION='1.1.9'
273PACKAGE_STRING='Duchamp 1.1.9'
274PACKAGE_BUGREPORT='Matthew.Whiting@csiro.au'
275
276ac_unique_file="src/duchamp.hh"
277ac_default_prefix=/usr/local
278# Factoring default headers for most tests.
279ac_includes_default="\
280#include <stdio.h>
281#if HAVE_SYS_TYPES_H
282# include <sys/types.h>
283#endif
284#if HAVE_SYS_STAT_H
285# include <sys/stat.h>
286#endif
287#if STDC_HEADERS
288# include <stdlib.h>
289# include <stddef.h>
290#else
291# if HAVE_STDLIB_H
292#  include <stdlib.h>
293# endif
294#endif
295#if HAVE_STRING_H
296# if !STDC_HEADERS && HAVE_MEMORY_H
297#  include <memory.h>
298# endif
299# include <string.h>
300#endif
301#if HAVE_STRINGS_H
302# include <strings.h>
303#endif
304#if HAVE_INTTYPES_H
305# include <inttypes.h>
306#else
307# if HAVE_STDINT_H
308#  include <stdint.h>
309# endif
310#endif
311#if HAVE_UNISTD_H
312# include <unistd.h>
313#endif"
314
315ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC CPP F77 FFLAGS ac_ct_F77 LN_S INSTALL EGREP RANLIB ac_ct_RANLIB POW_LIB LIBOBJS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LINKER PGPLOTINC PGPLOTLIB CFITSIOINC CFITSIOLIB WCSINC WCSLIB LTLIBOBJS'
316ac_subst_files=''
317
318# Initialize some variables set by options.
319ac_init_help=
320ac_init_version=false
321# The variables have the same names as the options, with
322# dashes changed to underlines.
323cache_file=/dev/null
324exec_prefix=NONE
325no_create=
326no_recursion=
327prefix=NONE
328program_prefix=NONE
329program_suffix=NONE
330program_transform_name=s,x,x,
331silent=
332site=
333srcdir=
334verbose=
335x_includes=NONE
336x_libraries=NONE
337
338# Installation directory options.
339# These are left unexpanded so users can "make install exec_prefix=/foo"
340# and all the variables that are supposed to be based on exec_prefix
341# by default will actually change.
342# Use braces instead of parens because sh, perl, etc. also accept them.
343bindir='${exec_prefix}/bin'
344sbindir='${exec_prefix}/sbin'
345libexecdir='${exec_prefix}/libexec'
346datadir='${prefix}/share'
347sysconfdir='${prefix}/etc'
348sharedstatedir='${prefix}/com'
349localstatedir='${prefix}/var'
350libdir='${exec_prefix}/lib'
351includedir='${prefix}/include'
352oldincludedir='/usr/include'
353infodir='${prefix}/info'
354mandir='${prefix}/man'
355
356ac_prev=
357for ac_option
358do
359  # If the previous option needs an argument, assign it.
360  if test -n "$ac_prev"; then
361    eval "$ac_prev=\$ac_option"
362    ac_prev=
363    continue
364  fi
365
366  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
367
368  # Accept the important Cygnus configure options, so we can diagnose typos.
369
370  case $ac_option in
371
372  -bindir | --bindir | --bindi | --bind | --bin | --bi)
373    ac_prev=bindir ;;
374  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
375    bindir=$ac_optarg ;;
376
377  -build | --build | --buil | --bui | --bu)
378    ac_prev=build_alias ;;
379  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
380    build_alias=$ac_optarg ;;
381
382  -cache-file | --cache-file | --cache-fil | --cache-fi \
383  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
384    ac_prev=cache_file ;;
385  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
386  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
387    cache_file=$ac_optarg ;;
388
389  --config-cache | -C)
390    cache_file=config.cache ;;
391
392  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
393    ac_prev=datadir ;;
394  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
395  | --da=*)
396    datadir=$ac_optarg ;;
397
398  -disable-* | --disable-*)
399    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
400    # Reject names that are not valid shell variable names.
401    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
402      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
403   { (exit 1); exit 1; }; }
404    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
405    eval "enable_$ac_feature=no" ;;
406
407  -enable-* | --enable-*)
408    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
409    # Reject names that are not valid shell variable names.
410    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
411      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
412   { (exit 1); exit 1; }; }
413    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
414    case $ac_option in
415      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
416      *) ac_optarg=yes ;;
417    esac
418    eval "enable_$ac_feature='$ac_optarg'" ;;
419
420  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
421  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
422  | --exec | --exe | --ex)
423    ac_prev=exec_prefix ;;
424  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
425  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
426  | --exec=* | --exe=* | --ex=*)
427    exec_prefix=$ac_optarg ;;
428
429  -gas | --gas | --ga | --g)
430    # Obsolete; use --with-gas.
431    with_gas=yes ;;
432
433  -help | --help | --hel | --he | -h)
434    ac_init_help=long ;;
435  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
436    ac_init_help=recursive ;;
437  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
438    ac_init_help=short ;;
439
440  -host | --host | --hos | --ho)
441    ac_prev=host_alias ;;
442  -host=* | --host=* | --hos=* | --ho=*)
443    host_alias=$ac_optarg ;;
444
445  -includedir | --includedir | --includedi | --included | --include \
446  | --includ | --inclu | --incl | --inc)
447    ac_prev=includedir ;;
448  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
449  | --includ=* | --inclu=* | --incl=* | --inc=*)
450    includedir=$ac_optarg ;;
451
452  -infodir | --infodir | --infodi | --infod | --info | --inf)
453    ac_prev=infodir ;;
454  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
455    infodir=$ac_optarg ;;
456
457  -libdir | --libdir | --libdi | --libd)
458    ac_prev=libdir ;;
459  -libdir=* | --libdir=* | --libdi=* | --libd=*)
460    libdir=$ac_optarg ;;
461
462  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
463  | --libexe | --libex | --libe)
464    ac_prev=libexecdir ;;
465  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
466  | --libexe=* | --libex=* | --libe=*)
467    libexecdir=$ac_optarg ;;
468
469  -localstatedir | --localstatedir | --localstatedi | --localstated \
470  | --localstate | --localstat | --localsta | --localst \
471  | --locals | --local | --loca | --loc | --lo)
472    ac_prev=localstatedir ;;
473  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
474  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
475  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
476    localstatedir=$ac_optarg ;;
477
478  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
479    ac_prev=mandir ;;
480  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
481    mandir=$ac_optarg ;;
482
483  -nfp | --nfp | --nf)
484    # Obsolete; use --without-fp.
485    with_fp=no ;;
486
487  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
488  | --no-cr | --no-c | -n)
489    no_create=yes ;;
490
491  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
492  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
493    no_recursion=yes ;;
494
495  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
496  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
497  | --oldin | --oldi | --old | --ol | --o)
498    ac_prev=oldincludedir ;;
499  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
500  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
501  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
502    oldincludedir=$ac_optarg ;;
503
504  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
505    ac_prev=prefix ;;
506  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
507    prefix=$ac_optarg ;;
508
509  -program-prefix | --program-prefix | --program-prefi | --program-pref \
510  | --program-pre | --program-pr | --program-p)
511    ac_prev=program_prefix ;;
512  -program-prefix=* | --program-prefix=* | --program-prefi=* \
513  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
514    program_prefix=$ac_optarg ;;
515
516  -program-suffix | --program-suffix | --program-suffi | --program-suff \
517  | --program-suf | --program-su | --program-s)
518    ac_prev=program_suffix ;;
519  -program-suffix=* | --program-suffix=* | --program-suffi=* \
520  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
521    program_suffix=$ac_optarg ;;
522
523  -program-transform-name | --program-transform-name \
524  | --program-transform-nam | --program-transform-na \
525  | --program-transform-n | --program-transform- \
526  | --program-transform | --program-transfor \
527  | --program-transfo | --program-transf \
528  | --program-trans | --program-tran \
529  | --progr-tra | --program-tr | --program-t)
530    ac_prev=program_transform_name ;;
531  -program-transform-name=* | --program-transform-name=* \
532  | --program-transform-nam=* | --program-transform-na=* \
533  | --program-transform-n=* | --program-transform-=* \
534  | --program-transform=* | --program-transfor=* \
535  | --program-transfo=* | --program-transf=* \
536  | --program-trans=* | --program-tran=* \
537  | --progr-tra=* | --program-tr=* | --program-t=*)
538    program_transform_name=$ac_optarg ;;
539
540  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
541  | -silent | --silent | --silen | --sile | --sil)
542    silent=yes ;;
543
544  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
545    ac_prev=sbindir ;;
546  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
547  | --sbi=* | --sb=*)
548    sbindir=$ac_optarg ;;
549
550  -sharedstatedir | --sharedstatedir | --sharedstatedi \
551  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
552  | --sharedst | --shareds | --shared | --share | --shar \
553  | --sha | --sh)
554    ac_prev=sharedstatedir ;;
555  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
556  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
557  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
558  | --sha=* | --sh=*)
559    sharedstatedir=$ac_optarg ;;
560
561  -site | --site | --sit)
562    ac_prev=site ;;
563  -site=* | --site=* | --sit=*)
564    site=$ac_optarg ;;
565
566  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
567    ac_prev=srcdir ;;
568  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
569    srcdir=$ac_optarg ;;
570
571  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
572  | --syscon | --sysco | --sysc | --sys | --sy)
573    ac_prev=sysconfdir ;;
574  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
575  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
576    sysconfdir=$ac_optarg ;;
577
578  -target | --target | --targe | --targ | --tar | --ta | --t)
579    ac_prev=target_alias ;;
580  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
581    target_alias=$ac_optarg ;;
582
583  -v | -verbose | --verbose | --verbos | --verbo | --verb)
584    verbose=yes ;;
585
586  -version | --version | --versio | --versi | --vers | -V)
587    ac_init_version=: ;;
588
589  -with-* | --with-*)
590    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
591    # Reject names that are not valid shell variable names.
592    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
593      { echo "$as_me: error: invalid package name: $ac_package" >&2
594   { (exit 1); exit 1; }; }
595    ac_package=`echo $ac_package| sed 's/-/_/g'`
596    case $ac_option in
597      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
598      *) ac_optarg=yes ;;
599    esac
600    eval "with_$ac_package='$ac_optarg'" ;;
601
602  -without-* | --without-*)
603    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
604    # Reject names that are not valid shell variable names.
605    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
606      { echo "$as_me: error: invalid package name: $ac_package" >&2
607   { (exit 1); exit 1; }; }
608    ac_package=`echo $ac_package | sed 's/-/_/g'`
609    eval "with_$ac_package=no" ;;
610
611  --x)
612    # Obsolete; use --with-x.
613    with_x=yes ;;
614
615  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
616  | --x-incl | --x-inc | --x-in | --x-i)
617    ac_prev=x_includes ;;
618  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
619  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
620    x_includes=$ac_optarg ;;
621
622  -x-libraries | --x-libraries | --x-librarie | --x-librari \
623  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
624    ac_prev=x_libraries ;;
625  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
626  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
627    x_libraries=$ac_optarg ;;
628
629  -*) { echo "$as_me: error: unrecognized option: $ac_option
630Try \`$0 --help' for more information." >&2
631   { (exit 1); exit 1; }; }
632    ;;
633
634  *=*)
635    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
636    # Reject names that are not valid shell variable names.
637    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
638      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
639   { (exit 1); exit 1; }; }
640    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
641    eval "$ac_envvar='$ac_optarg'"
642    export $ac_envvar ;;
643
644  *)
645    # FIXME: should be removed in autoconf 3.0.
646    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
647    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
648      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
649    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
650    ;;
651
652  esac
653done
654
655if test -n "$ac_prev"; then
656  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
657  { echo "$as_me: error: missing argument to $ac_option" >&2
658   { (exit 1); exit 1; }; }
659fi
660
661# Be sure to have absolute paths.
662for ac_var in exec_prefix prefix
663do
664  eval ac_val=$`echo $ac_var`
665  case $ac_val in
666    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
667    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
668   { (exit 1); exit 1; }; };;
669  esac
670done
671
672# Be sure to have absolute paths.
673for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
674              localstatedir libdir includedir oldincludedir infodir mandir
675do
676  eval ac_val=$`echo $ac_var`
677  case $ac_val in
678    [\\/$]* | ?:[\\/]* ) ;;
679    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
680   { (exit 1); exit 1; }; };;
681  esac
682done
683
684# There might be people who depend on the old broken behavior: `$host'
685# used to hold the argument of --host etc.
686# FIXME: To remove some day.
687build=$build_alias
688host=$host_alias
689target=$target_alias
690
691# FIXME: To remove some day.
692if test "x$host_alias" != x; then
693  if test "x$build_alias" = x; then
694    cross_compiling=maybe
695    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
696    If a cross compiler is detected then cross compile mode will be used." >&2
697  elif test "x$build_alias" != "x$host_alias"; then
698    cross_compiling=yes
699  fi
700fi
701
702ac_tool_prefix=
703test -n "$host_alias" && ac_tool_prefix=$host_alias-
704
705test "$silent" = yes && exec 6>/dev/null
706
707
708# Find the source files, if location was not specified.
709if test -z "$srcdir"; then
710  ac_srcdir_defaulted=yes
711  # Try the directory containing this script, then its parent.
712  ac_confdir=`(dirname "$0") 2>/dev/null ||
713$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
714         X"$0" : 'X\(//\)[^/]' \| \
715         X"$0" : 'X\(//\)$' \| \
716         X"$0" : 'X\(/\)' \| \
717         .     : '\(.\)' 2>/dev/null ||
718echo X"$0" |
719    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
720          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
721          /^X\(\/\/\)$/{ s//\1/; q; }
722          /^X\(\/\).*/{ s//\1/; q; }
723          s/.*/./; q'`
724  srcdir=$ac_confdir
725  if test ! -r $srcdir/$ac_unique_file; then
726    srcdir=..
727  fi
728else
729  ac_srcdir_defaulted=no
730fi
731if test ! -r $srcdir/$ac_unique_file; then
732  if test "$ac_srcdir_defaulted" = yes; then
733    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
734   { (exit 1); exit 1; }; }
735  else
736    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
737   { (exit 1); exit 1; }; }
738  fi
739fi
740(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
741  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
742   { (exit 1); exit 1; }; }
743srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
744ac_env_build_alias_set=${build_alias+set}
745ac_env_build_alias_value=$build_alias
746ac_cv_env_build_alias_set=${build_alias+set}
747ac_cv_env_build_alias_value=$build_alias
748ac_env_host_alias_set=${host_alias+set}
749ac_env_host_alias_value=$host_alias
750ac_cv_env_host_alias_set=${host_alias+set}
751ac_cv_env_host_alias_value=$host_alias
752ac_env_target_alias_set=${target_alias+set}
753ac_env_target_alias_value=$target_alias
754ac_cv_env_target_alias_set=${target_alias+set}
755ac_cv_env_target_alias_value=$target_alias
756ac_env_CXX_set=${CXX+set}
757ac_env_CXX_value=$CXX
758ac_cv_env_CXX_set=${CXX+set}
759ac_cv_env_CXX_value=$CXX
760ac_env_CXXFLAGS_set=${CXXFLAGS+set}
761ac_env_CXXFLAGS_value=$CXXFLAGS
762ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
763ac_cv_env_CXXFLAGS_value=$CXXFLAGS
764ac_env_LDFLAGS_set=${LDFLAGS+set}
765ac_env_LDFLAGS_value=$LDFLAGS
766ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
767ac_cv_env_LDFLAGS_value=$LDFLAGS
768ac_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_env_CPPFLAGS_value=$CPPFLAGS
770ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
771ac_cv_env_CPPFLAGS_value=$CPPFLAGS
772ac_env_CC_set=${CC+set}
773ac_env_CC_value=$CC
774ac_cv_env_CC_set=${CC+set}
775ac_cv_env_CC_value=$CC
776ac_env_CFLAGS_set=${CFLAGS+set}
777ac_env_CFLAGS_value=$CFLAGS
778ac_cv_env_CFLAGS_set=${CFLAGS+set}
779ac_cv_env_CFLAGS_value=$CFLAGS
780ac_env_CPP_set=${CPP+set}
781ac_env_CPP_value=$CPP
782ac_cv_env_CPP_set=${CPP+set}
783ac_cv_env_CPP_value=$CPP
784ac_env_F77_set=${F77+set}
785ac_env_F77_value=$F77
786ac_cv_env_F77_set=${F77+set}
787ac_cv_env_F77_value=$F77
788ac_env_FFLAGS_set=${FFLAGS+set}
789ac_env_FFLAGS_value=$FFLAGS
790ac_cv_env_FFLAGS_set=${FFLAGS+set}
791ac_cv_env_FFLAGS_value=$FFLAGS
792
793#
794# Report the --help message.
795#
796if test "$ac_init_help" = "long"; then
797  # Omit some internal or obsolete options to make the list less imposing.
798  # This message is too long to be a string in the A/UX 3.1 sh.
799  cat <<_ACEOF
800\`configure' configures Duchamp 1.1.9 to adapt to many kinds of systems.
801
802Usage: $0 [OPTION]... [VAR=VALUE]...
803
804To assign environment variables (e.g., CC, CFLAGS...), specify them as
805VAR=VALUE.  See below for descriptions of some of the useful variables.
806
807Defaults for the options are specified in brackets.
808
809Configuration:
810  -h, --help              display this help and exit
811      --help=short        display options specific to this package
812      --help=recursive    display the short help of all the included packages
813  -V, --version           display version information and exit
814  -q, --quiet, --silent   do not print \`checking...' messages
815      --cache-file=FILE   cache test results in FILE [disabled]
816  -C, --config-cache      alias for \`--cache-file=config.cache'
817  -n, --no-create         do not create output files
818      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
819
820_ACEOF
821
822  cat <<_ACEOF
823Installation directories:
824  --prefix=PREFIX         install architecture-independent files in PREFIX
825                          [$ac_default_prefix]
826  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
827                          [PREFIX]
828
829By default, \`make install' will install all the files in
830\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
831an installation prefix other than \`$ac_default_prefix' using \`--prefix',
832for instance \`--prefix=\$HOME'.
833
834For better control, use the options below.
835
836Fine tuning of the installation directories:
837  --bindir=DIR           user executables [EPREFIX/bin]
838  --sbindir=DIR          system admin executables [EPREFIX/sbin]
839  --libexecdir=DIR       program executables [EPREFIX/libexec]
840  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
841  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
842  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
843  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
844  --libdir=DIR           object code libraries [EPREFIX/lib]
845  --includedir=DIR       C header files [PREFIX/include]
846  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
847  --infodir=DIR          info documentation [PREFIX/info]
848  --mandir=DIR           man documentation [PREFIX/man]
849_ACEOF
850
851  cat <<\_ACEOF
852
853X features:
854  --x-includes=DIR    X include files are in DIR
855  --x-libraries=DIR   X library files are in DIR
856_ACEOF
857fi
858
859if test -n "$ac_init_help"; then
860  case $ac_init_help in
861     short | recursive ) echo "Configuration of Duchamp 1.1.9:";;
862   esac
863  cat <<\_ACEOF
864
865Optional Packages:
866  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
867  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
868
869  --with-pgplot=no        Compile without PGPLOT graphics capabilities.
870  --without-pgplot        Compile without PGPLOT graphics capabilities.
871  --with-pgplot=<dir>     Compile with PGPLOT graphics capabilities, using the
872                          directory <dir> to specify the PGPLOT library.,
873
874  --with-x                use the X Window System
875  --with-cfitsio=<dir>    The CFITSIO library and include files are in
876                          directory <dir>.
877  --with-wcslib=<dir>     The WCSLIB library and include files are in
878                          directory <dir>.
879
880Some influential environment variables:
881  CXX         C++ compiler command
882  CXXFLAGS    C++ compiler flags
883  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
884              nonstandard directory <lib dir>
885  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
886              headers in a nonstandard directory <include dir>
887  CC          C compiler command
888  CFLAGS      C compiler flags
889  CPP         C preprocessor
890  F77         Fortran 77 compiler command
891  FFLAGS      Fortran 77 compiler flags
892
893Use these variables to override the choices made by `configure' or to help
894it to find libraries and programs with nonstandard names/locations.
895
896Report bugs to <Matthew.Whiting@csiro.au>.
897_ACEOF
898fi
899
900if test "$ac_init_help" = "recursive"; then
901  # If there are subdirs, report their specific --help.
902  ac_popdir=`pwd`
903  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
904    test -d $ac_dir || continue
905    ac_builddir=.
906
907if test "$ac_dir" != .; then
908  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
909  # A "../" for each directory in $ac_dir_suffix.
910  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
911else
912  ac_dir_suffix= ac_top_builddir=
913fi
914
915case $srcdir in
916  .)  # No --srcdir option.  We are building in place.
917    ac_srcdir=.
918    if test -z "$ac_top_builddir"; then
919       ac_top_srcdir=.
920    else
921       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
922    fi ;;
923  [\\/]* | ?:[\\/]* )  # Absolute path.
924    ac_srcdir=$srcdir$ac_dir_suffix;
925    ac_top_srcdir=$srcdir ;;
926  *) # Relative path.
927    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
928    ac_top_srcdir=$ac_top_builddir$srcdir ;;
929esac
930
931# Do not use `cd foo && pwd` to compute absolute paths, because
932# the directories may not exist.
933case `pwd` in
934.) ac_abs_builddir="$ac_dir";;
935*)
936  case "$ac_dir" in
937  .) ac_abs_builddir=`pwd`;;
938  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
939  *) ac_abs_builddir=`pwd`/"$ac_dir";;
940  esac;;
941esac
942case $ac_abs_builddir in
943.) ac_abs_top_builddir=${ac_top_builddir}.;;
944*)
945  case ${ac_top_builddir}. in
946  .) ac_abs_top_builddir=$ac_abs_builddir;;
947  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
948  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
949  esac;;
950esac
951case $ac_abs_builddir in
952.) ac_abs_srcdir=$ac_srcdir;;
953*)
954  case $ac_srcdir in
955  .) ac_abs_srcdir=$ac_abs_builddir;;
956  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
957  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
958  esac;;
959esac
960case $ac_abs_builddir in
961.) ac_abs_top_srcdir=$ac_top_srcdir;;
962*)
963  case $ac_top_srcdir in
964  .) ac_abs_top_srcdir=$ac_abs_builddir;;
965  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
966  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
967  esac;;
968esac
969
970    cd $ac_dir
971    # Check for guested configure; otherwise get Cygnus style configure.
972    if test -f $ac_srcdir/configure.gnu; then
973      echo
974      $SHELL $ac_srcdir/configure.gnu  --help=recursive
975    elif test -f $ac_srcdir/configure; then
976      echo
977      $SHELL $ac_srcdir/configure  --help=recursive
978    elif test -f $ac_srcdir/configure.ac ||
979           test -f $ac_srcdir/configure.in; then
980      echo
981      $ac_configure --help
982    else
983      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
984    fi
985    cd $ac_popdir
986  done
987fi
988
989test -n "$ac_init_help" && exit 0
990if $ac_init_version; then
991  cat <<\_ACEOF
992Duchamp configure 1.1.9
993generated by GNU Autoconf 2.59
994
995Copyright (C) 2003 Free Software Foundation, Inc.
996This configure script is free software; the Free Software Foundation
997gives unlimited permission to copy, distribute and modify it.
998_ACEOF
999  exit 0
1000fi
1001exec 5>config.log
1002cat >&5 <<_ACEOF
1003This file contains any messages produced by compilers while
1004running configure, to aid debugging if configure makes a mistake.
1005
1006It was created by Duchamp $as_me 1.1.9, which was
1007generated by GNU Autoconf 2.59.  Invocation command line was
1008
1009  $ $0 $@
1010
1011_ACEOF
1012{
1013cat <<_ASUNAME
1014## --------- ##
1015## Platform. ##
1016## --------- ##
1017
1018hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1019uname -m = `(uname -m) 2>/dev/null || echo unknown`
1020uname -r = `(uname -r) 2>/dev/null || echo unknown`
1021uname -s = `(uname -s) 2>/dev/null || echo unknown`
1022uname -v = `(uname -v) 2>/dev/null || echo unknown`
1023
1024/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1025/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1026
1027/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1028/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1029/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1030hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1031/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1032/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1033/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1034
1035_ASUNAME
1036
1037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1038for as_dir in $PATH
1039do
1040  IFS=$as_save_IFS
1041  test -z "$as_dir" && as_dir=.
1042  echo "PATH: $as_dir"
1043done
1044
1045} >&5
1046
1047cat >&5 <<_ACEOF
1048
1049
1050## ----------- ##
1051## Core tests. ##
1052## ----------- ##
1053
1054_ACEOF
1055
1056
1057# Keep a trace of the command line.
1058# Strip out --no-create and --no-recursion so they do not pile up.
1059# Strip out --silent because we don't want to record it for future runs.
1060# Also quote any args containing shell meta-characters.
1061# Make two passes to allow for proper duplicate-argument suppression.
1062ac_configure_args=
1063ac_configure_args0=
1064ac_configure_args1=
1065ac_sep=
1066ac_must_keep_next=false
1067for ac_pass in 1 2
1068do
1069  for ac_arg
1070  do
1071    case $ac_arg in
1072    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1073    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1074    | -silent | --silent | --silen | --sile | --sil)
1075      continue ;;
1076    *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1077      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1078    esac
1079    case $ac_pass in
1080    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1081    2)
1082      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1083      if test $ac_must_keep_next = true; then
1084        ac_must_keep_next=false # Got value, back to normal.
1085      else
1086        case $ac_arg in
1087          *=* | --config-cache | -C | -disable-* | --disable-* \
1088          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1089          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1090          | -with-* | --with-* | -without-* | --without-* | --x)
1091            case "$ac_configure_args0 " in
1092              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1093            esac
1094            ;;
1095          -* ) ac_must_keep_next=true ;;
1096        esac
1097      fi
1098      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1099      # Get rid of the leading space.
1100      ac_sep=" "
1101      ;;
1102    esac
1103  done
1104done
1105$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1106$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1107
1108# When interrupted or exit'd, cleanup temporary files, and complete
1109# config.log.  We remove comments because anyway the quotes in there
1110# would cause problems or look ugly.
1111# WARNING: Be sure not to use single quotes in there, as some shells,
1112# such as our DU 5.0 friend, will then `close' the trap.
1113trap 'exit_status=$?
1114  # Save into config.log some information that might help in debugging.
1115  {
1116    echo
1117
1118    cat <<\_ASBOX
1119## ---------------- ##
1120## Cache variables. ##
1121## ---------------- ##
1122_ASBOX
1123    echo
1124    # The following way of writing the cache mishandles newlines in values,
1125{
1126  (set) 2>&1 |
1127    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1128    *ac_space=\ *)
1129      sed -n \
1130        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1131          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1132      ;;
1133    *)
1134      sed -n \
1135        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1136      ;;
1137    esac;
1138}
1139    echo
1140
1141    cat <<\_ASBOX
1142## ----------------- ##
1143## Output variables. ##
1144## ----------------- ##
1145_ASBOX
1146    echo
1147    for ac_var in $ac_subst_vars
1148    do
1149      eval ac_val=$`echo $ac_var`
1150      echo "$ac_var='"'"'$ac_val'"'"'"
1151    done | sort
1152    echo
1153
1154    if test -n "$ac_subst_files"; then
1155      cat <<\_ASBOX
1156## ------------- ##
1157## Output files. ##
1158## ------------- ##
1159_ASBOX
1160      echo
1161      for ac_var in $ac_subst_files
1162      do
1163        eval ac_val=$`echo $ac_var`
1164        echo "$ac_var='"'"'$ac_val'"'"'"
1165      done | sort
1166      echo
1167    fi
1168
1169    if test -s confdefs.h; then
1170      cat <<\_ASBOX
1171## ----------- ##
1172## confdefs.h. ##
1173## ----------- ##
1174_ASBOX
1175      echo
1176      sed "/^$/d" confdefs.h | sort
1177      echo
1178    fi
1179    test "$ac_signal" != 0 &&
1180      echo "$as_me: caught signal $ac_signal"
1181    echo "$as_me: exit $exit_status"
1182  } >&5
1183  rm -f core *.core &&
1184  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1185    exit $exit_status
1186     ' 0
1187for ac_signal in 1 2 13 15; do
1188  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1189done
1190ac_signal=0
1191
1192# confdefs.h avoids OS command line length limits that DEFS can exceed.
1193rm -rf conftest* confdefs.h
1194# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1195echo >confdefs.h
1196
1197# Predefined preprocessor variables.
1198
1199cat >>confdefs.h <<_ACEOF
1200#define PACKAGE_NAME "$PACKAGE_NAME"
1201_ACEOF
1202
1203
1204cat >>confdefs.h <<_ACEOF
1205#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1206_ACEOF
1207
1208
1209cat >>confdefs.h <<_ACEOF
1210#define PACKAGE_VERSION "$PACKAGE_VERSION"
1211_ACEOF
1212
1213
1214cat >>confdefs.h <<_ACEOF
1215#define PACKAGE_STRING "$PACKAGE_STRING"
1216_ACEOF
1217
1218
1219cat >>confdefs.h <<_ACEOF
1220#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1221_ACEOF
1222
1223
1224# Let the site file select an alternate cache file if it wants to.
1225# Prefer explicitly selected file to automatically selected ones.
1226if test -z "$CONFIG_SITE"; then
1227  if test "x$prefix" != xNONE; then
1228    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1229  else
1230    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1231  fi
1232fi
1233for ac_site_file in $CONFIG_SITE; do
1234  if test -r "$ac_site_file"; then
1235    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1236echo "$as_me: loading site script $ac_site_file" >&6;}
1237    sed 's/^/| /' "$ac_site_file" >&5
1238    . "$ac_site_file"
1239  fi
1240done
1241
1242if test -r "$cache_file"; then
1243  # Some versions of bash will fail to source /dev/null (special
1244  # files actually), so we avoid doing that.
1245  if test -f "$cache_file"; then
1246    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1247echo "$as_me: loading cache $cache_file" >&6;}
1248    case $cache_file in
1249      [\\/]* | ?:[\\/]* ) . $cache_file;;
1250      *)                      . ./$cache_file;;
1251    esac
1252  fi
1253else
1254  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1255echo "$as_me: creating cache $cache_file" >&6;}
1256  >$cache_file
1257fi
1258
1259# Check that the precious variables saved in the cache have kept the same
1260# value.
1261ac_cache_corrupted=false
1262for ac_var in `(set) 2>&1 |
1263               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1264  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1265  eval ac_new_set=\$ac_env_${ac_var}_set
1266  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1267  eval ac_new_val="\$ac_env_${ac_var}_value"
1268  case $ac_old_set,$ac_new_set in
1269    set,)
1270      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1271echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1272      ac_cache_corrupted=: ;;
1273    ,set)
1274      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1275echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1276      ac_cache_corrupted=: ;;
1277    ,);;
1278    *)
1279      if test "x$ac_old_val" != "x$ac_new_val"; then
1280        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1281echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1282        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1283echo "$as_me:   former value:  $ac_old_val" >&2;}
1284        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1285echo "$as_me:   current value: $ac_new_val" >&2;}
1286        ac_cache_corrupted=:
1287      fi;;
1288  esac
1289  # Pass precious variables to config.status.
1290  if test "$ac_new_set" = set; then
1291    case $ac_new_val in
1292    *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1293      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1294    *) ac_arg=$ac_var=$ac_new_val ;;
1295    esac
1296    case " $ac_configure_args " in
1297      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1298      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1299    esac
1300  fi
1301done
1302if $ac_cache_corrupted; then
1303  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1304echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1305  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1306echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1307   { (exit 1); exit 1; }; }
1308fi
1309
1310ac_ext=c
1311ac_cpp='$CPP $CPPFLAGS'
1312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1314ac_compiler_gnu=$ac_cv_c_compiler_gnu
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343          ac_config_headers="$ac_config_headers src/config.h"
1344
1345
1346
1347# Checks for programs.
1348ac_ext=cc
1349ac_cpp='$CXXCPP $CPPFLAGS'
1350ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1351ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1352ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1353if test -n "$ac_tool_prefix"; then
1354  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
1355  do
1356    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1357set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1358echo "$as_me:$LINENO: checking for $ac_word" >&5
1359echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1360if test "${ac_cv_prog_CXX+set}" = set; then
1361  echo $ECHO_N "(cached) $ECHO_C" >&6
1362else
1363  if test -n "$CXX"; then
1364  ac_cv_prog_CXX="$CXX" # Let the user override the test.
1365else
1366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1367for as_dir in $PATH
1368do
1369  IFS=$as_save_IFS
1370  test -z "$as_dir" && as_dir=.
1371  for ac_exec_ext in '' $ac_executable_extensions; do
1372  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1373    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
1374    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1375    break 2
1376  fi
1377done
1378done
1379
1380fi
1381fi
1382CXX=$ac_cv_prog_CXX
1383if test -n "$CXX"; then
1384  echo "$as_me:$LINENO: result: $CXX" >&5
1385echo "${ECHO_T}$CXX" >&6
1386else
1387  echo "$as_me:$LINENO: result: no" >&5
1388echo "${ECHO_T}no" >&6
1389fi
1390
1391    test -n "$CXX" && break
1392  done
1393fi
1394if test -z "$CXX"; then
1395  ac_ct_CXX=$CXX
1396  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
1397do
1398  # Extract the first word of "$ac_prog", so it can be a program name with args.
1399set dummy $ac_prog; ac_word=$2
1400echo "$as_me:$LINENO: checking for $ac_word" >&5
1401echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1402if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
1403  echo $ECHO_N "(cached) $ECHO_C" >&6
1404else
1405  if test -n "$ac_ct_CXX"; then
1406  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
1407else
1408as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1409for as_dir in $PATH
1410do
1411  IFS=$as_save_IFS
1412  test -z "$as_dir" && as_dir=.
1413  for ac_exec_ext in '' $ac_executable_extensions; do
1414  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1415    ac_cv_prog_ac_ct_CXX="$ac_prog"
1416    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1417    break 2
1418  fi
1419done
1420done
1421
1422fi
1423fi
1424ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
1425if test -n "$ac_ct_CXX"; then
1426  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
1427echo "${ECHO_T}$ac_ct_CXX" >&6
1428else
1429  echo "$as_me:$LINENO: result: no" >&5
1430echo "${ECHO_T}no" >&6
1431fi
1432
1433  test -n "$ac_ct_CXX" && break
1434done
1435test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
1436
1437  CXX=$ac_ct_CXX
1438fi
1439
1440
1441# Provide some information about the compiler.
1442echo "$as_me:$LINENO:" \
1443     "checking for C++ compiler version" >&5
1444ac_compiler=`set X $ac_compile; echo $2`
1445{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1446  (eval $ac_compiler --version </dev/null >&5) 2>&5
1447  ac_status=$?
1448  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1449  (exit $ac_status); }
1450{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1451  (eval $ac_compiler -v </dev/null >&5) 2>&5
1452  ac_status=$?
1453  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1454  (exit $ac_status); }
1455{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1456  (eval $ac_compiler -V </dev/null >&5) 2>&5
1457  ac_status=$?
1458  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1459  (exit $ac_status); }
1460
1461cat >conftest.$ac_ext <<_ACEOF
1462/* confdefs.h.  */
1463_ACEOF
1464cat confdefs.h >>conftest.$ac_ext
1465cat >>conftest.$ac_ext <<_ACEOF
1466/* end confdefs.h.  */
1467
1468int
1469main ()
1470{
1471
1472  ;
1473  return 0;
1474}
1475_ACEOF
1476ac_clean_files_save=$ac_clean_files
1477ac_clean_files="$ac_clean_files a.out a.exe b.out"
1478# Try to create an executable without -o first, disregard a.out.
1479# It will help us diagnose broken compilers, and finding out an intuition
1480# of exeext.
1481echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
1482echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6
1483ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1484if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1485  (eval $ac_link_default) 2>&5
1486  ac_status=$?
1487  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1488  (exit $ac_status); }; then
1489  # Find the output, starting from the most likely.  This scheme is
1490# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1491# resort.
1492
1493# Be careful to initialize this variable, since it used to be cached.
1494# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1495ac_cv_exeext=
1496# b.out is created by i960 compilers.
1497for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1498do
1499  test -f "$ac_file" || continue
1500  case $ac_file in
1501    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1502        ;;
1503    conftest.$ac_ext )
1504        # This is the source file.
1505        ;;
1506    [ab].out )
1507        # We found the default executable, but exeext='' is most
1508        # certainly right.
1509        break;;
1510    *.* )
1511        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1512        # FIXME: I believe we export ac_cv_exeext for Libtool,
1513        # but it would be cool to find out if it's true.  Does anybody
1514        # maintain Libtool? --akim.
1515        export ac_cv_exeext
1516        break;;
1517    * )
1518        break;;
1519  esac
1520done
1521else
1522  echo "$as_me: failed program was:" >&5
1523sed 's/^/| /' conftest.$ac_ext >&5
1524
1525{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1526See \`config.log' for more details." >&5
1527echo "$as_me: error: C++ compiler cannot create executables
1528See \`config.log' for more details." >&2;}
1529   { (exit 77); exit 77; }; }
1530fi
1531
1532ac_exeext=$ac_cv_exeext
1533echo "$as_me:$LINENO: result: $ac_file" >&5
1534echo "${ECHO_T}$ac_file" >&6
1535
1536# Check the compiler produces executables we can run.  If not, either
1537# the compiler is broken, or we cross compile.
1538echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1539echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1540# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1541# If not cross compiling, check that we can run a simple program.
1542if test "$cross_compiling" != yes; then
1543  if { ac_try='./$ac_file'
1544  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1545  (eval $ac_try) 2>&5
1546  ac_status=$?
1547  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1548  (exit $ac_status); }; }; then
1549    cross_compiling=no
1550  else
1551    if test "$cross_compiling" = maybe; then
1552        cross_compiling=yes
1553    else
1554        { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1555If you meant to cross compile, use \`--host'.
1556See \`config.log' for more details." >&5
1557echo "$as_me: error: cannot run C++ compiled programs.
1558If you meant to cross compile, use \`--host'.
1559See \`config.log' for more details." >&2;}
1560   { (exit 1); exit 1; }; }
1561    fi
1562  fi
1563fi
1564echo "$as_me:$LINENO: result: yes" >&5
1565echo "${ECHO_T}yes" >&6
1566
1567rm -f a.out a.exe conftest$ac_cv_exeext b.out
1568ac_clean_files=$ac_clean_files_save
1569# Check the compiler produces executables we can run.  If not, either
1570# the compiler is broken, or we cross compile.
1571echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1572echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1573echo "$as_me:$LINENO: result: $cross_compiling" >&5
1574echo "${ECHO_T}$cross_compiling" >&6
1575
1576echo "$as_me:$LINENO: checking for suffix of executables" >&5
1577echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1578if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1579  (eval $ac_link) 2>&5
1580  ac_status=$?
1581  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1582  (exit $ac_status); }; then
1583  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1584# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1585# work properly (i.e., refer to `conftest.exe'), while it won't with
1586# `rm'.
1587for ac_file in conftest.exe conftest conftest.*; do
1588  test -f "$ac_file" || continue
1589  case $ac_file in
1590    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1591    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1592          export ac_cv_exeext
1593          break;;
1594    * ) break;;
1595  esac
1596done
1597else
1598  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1599See \`config.log' for more details." >&5
1600echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1601See \`config.log' for more details." >&2;}
1602   { (exit 1); exit 1; }; }
1603fi
1604
1605rm -f conftest$ac_cv_exeext
1606echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1607echo "${ECHO_T}$ac_cv_exeext" >&6
1608
1609rm -f conftest.$ac_ext
1610EXEEXT=$ac_cv_exeext
1611ac_exeext=$EXEEXT
1612echo "$as_me:$LINENO: checking for suffix of object files" >&5
1613echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1614if test "${ac_cv_objext+set}" = set; then
1615  echo $ECHO_N "(cached) $ECHO_C" >&6
1616else
1617  cat >conftest.$ac_ext <<_ACEOF
1618/* confdefs.h.  */
1619_ACEOF
1620cat confdefs.h >>conftest.$ac_ext
1621cat >>conftest.$ac_ext <<_ACEOF
1622/* end confdefs.h.  */
1623
1624int
1625main ()
1626{
1627
1628  ;
1629  return 0;
1630}
1631_ACEOF
1632rm -f conftest.o conftest.obj
1633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1634  (eval $ac_compile) 2>&5
1635  ac_status=$?
1636  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1637  (exit $ac_status); }; then
1638  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1639  case $ac_file in
1640    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1641    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1642       break;;
1643  esac
1644done
1645else
1646  echo "$as_me: failed program was:" >&5
1647sed 's/^/| /' conftest.$ac_ext >&5
1648
1649{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1650See \`config.log' for more details." >&5
1651echo "$as_me: error: cannot compute suffix of object files: cannot compile
1652See \`config.log' for more details." >&2;}
1653   { (exit 1); exit 1; }; }
1654fi
1655
1656rm -f conftest.$ac_cv_objext conftest.$ac_ext
1657fi
1658echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1659echo "${ECHO_T}$ac_cv_objext" >&6
1660OBJEXT=$ac_cv_objext
1661ac_objext=$OBJEXT
1662echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
1663echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
1664if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
1665  echo $ECHO_N "(cached) $ECHO_C" >&6
1666else
1667  cat >conftest.$ac_ext <<_ACEOF
1668/* confdefs.h.  */
1669_ACEOF
1670cat confdefs.h >>conftest.$ac_ext
1671cat >>conftest.$ac_ext <<_ACEOF
1672/* end confdefs.h.  */
1673
1674int
1675main ()
1676{
1677#ifndef __GNUC__
1678       choke me
1679#endif
1680
1681  ;
1682  return 0;
1683}
1684_ACEOF
1685rm -f conftest.$ac_objext
1686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1687  (eval $ac_compile) 2>conftest.er1
1688  ac_status=$?
1689  grep -v '^ *+' conftest.er1 >conftest.err
1690  rm -f conftest.er1
1691  cat conftest.err >&5
1692  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1693  (exit $ac_status); } &&
1694         { ac_try='test -z "$ac_cxx_werror_flag"
1695                         || test ! -s conftest.err'
1696  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1697  (eval $ac_try) 2>&5
1698  ac_status=$?
1699  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1700  (exit $ac_status); }; } &&
1701         { ac_try='test -s conftest.$ac_objext'
1702  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1703  (eval $ac_try) 2>&5
1704  ac_status=$?
1705  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1706  (exit $ac_status); }; }; then
1707  ac_compiler_gnu=yes
1708else
1709  echo "$as_me: failed program was:" >&5
1710sed 's/^/| /' conftest.$ac_ext >&5
1711
1712ac_compiler_gnu=no
1713fi
1714rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1715ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
1716
1717fi
1718echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
1719echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
1720GXX=`test $ac_compiler_gnu = yes && echo yes`
1721ac_test_CXXFLAGS=${CXXFLAGS+set}
1722ac_save_CXXFLAGS=$CXXFLAGS
1723CXXFLAGS="-g"
1724echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
1725echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
1726if test "${ac_cv_prog_cxx_g+set}" = set; then
1727  echo $ECHO_N "(cached) $ECHO_C" >&6
1728else
1729  cat >conftest.$ac_ext <<_ACEOF
1730/* confdefs.h.  */
1731_ACEOF
1732cat confdefs.h >>conftest.$ac_ext
1733cat >>conftest.$ac_ext <<_ACEOF
1734/* end confdefs.h.  */
1735
1736int
1737main ()
1738{
1739
1740  ;
1741  return 0;
1742}
1743_ACEOF
1744rm -f conftest.$ac_objext
1745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1746  (eval $ac_compile) 2>conftest.er1
1747  ac_status=$?
1748  grep -v '^ *+' conftest.er1 >conftest.err
1749  rm -f conftest.er1
1750  cat conftest.err >&5
1751  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1752  (exit $ac_status); } &&
1753         { ac_try='test -z "$ac_cxx_werror_flag"
1754                         || test ! -s conftest.err'
1755  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1756  (eval $ac_try) 2>&5
1757  ac_status=$?
1758  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1759  (exit $ac_status); }; } &&
1760         { ac_try='test -s conftest.$ac_objext'
1761  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1762  (eval $ac_try) 2>&5
1763  ac_status=$?
1764  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1765  (exit $ac_status); }; }; then
1766  ac_cv_prog_cxx_g=yes
1767else
1768  echo "$as_me: failed program was:" >&5
1769sed 's/^/| /' conftest.$ac_ext >&5
1770
1771ac_cv_prog_cxx_g=no
1772fi
1773rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1774fi
1775echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
1776echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
1777if test "$ac_test_CXXFLAGS" = set; then
1778  CXXFLAGS=$ac_save_CXXFLAGS
1779elif test $ac_cv_prog_cxx_g = yes; then
1780  if test "$GXX" = yes; then
1781    CXXFLAGS="-g -O2"
1782  else
1783    CXXFLAGS="-g"
1784  fi
1785else
1786  if test "$GXX" = yes; then
1787    CXXFLAGS="-O2"
1788  else
1789    CXXFLAGS=
1790  fi
1791fi
1792for ac_declaration in \
1793   '' \
1794   'extern "C" void std::exit (int) throw (); using std::exit;' \
1795   'extern "C" void std::exit (int); using std::exit;' \
1796   'extern "C" void exit (int) throw ();' \
1797   'extern "C" void exit (int);' \
1798   'void exit (int);'
1799do
1800  cat >conftest.$ac_ext <<_ACEOF
1801/* confdefs.h.  */
1802_ACEOF
1803cat confdefs.h >>conftest.$ac_ext
1804cat >>conftest.$ac_ext <<_ACEOF
1805/* end confdefs.h.  */
1806$ac_declaration
1807#include <stdlib.h>
1808int
1809main ()
1810{
1811exit (42);
1812  ;
1813  return 0;
1814}
1815_ACEOF
1816rm -f conftest.$ac_objext
1817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1818  (eval $ac_compile) 2>conftest.er1
1819  ac_status=$?
1820  grep -v '^ *+' conftest.er1 >conftest.err
1821  rm -f conftest.er1
1822  cat conftest.err >&5
1823  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1824  (exit $ac_status); } &&
1825         { ac_try='test -z "$ac_cxx_werror_flag"
1826                         || test ! -s conftest.err'
1827  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1828  (eval $ac_try) 2>&5
1829  ac_status=$?
1830  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1831  (exit $ac_status); }; } &&
1832         { ac_try='test -s conftest.$ac_objext'
1833  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1834  (eval $ac_try) 2>&5
1835  ac_status=$?
1836  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1837  (exit $ac_status); }; }; then
1838  :
1839else
1840  echo "$as_me: failed program was:" >&5
1841sed 's/^/| /' conftest.$ac_ext >&5
1842
1843continue
1844fi
1845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1846  cat >conftest.$ac_ext <<_ACEOF
1847/* confdefs.h.  */
1848_ACEOF
1849cat confdefs.h >>conftest.$ac_ext
1850cat >>conftest.$ac_ext <<_ACEOF
1851/* end confdefs.h.  */
1852$ac_declaration
1853int
1854main ()
1855{
1856exit (42);
1857  ;
1858  return 0;
1859}
1860_ACEOF
1861rm -f conftest.$ac_objext
1862if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1863  (eval $ac_compile) 2>conftest.er1
1864  ac_status=$?
1865  grep -v '^ *+' conftest.er1 >conftest.err
1866  rm -f conftest.er1
1867  cat conftest.err >&5
1868  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1869  (exit $ac_status); } &&
1870         { ac_try='test -z "$ac_cxx_werror_flag"
1871                         || test ! -s conftest.err'
1872  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1873  (eval $ac_try) 2>&5
1874  ac_status=$?
1875  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1876  (exit $ac_status); }; } &&
1877         { ac_try='test -s conftest.$ac_objext'
1878  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1879  (eval $ac_try) 2>&5
1880  ac_status=$?
1881  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1882  (exit $ac_status); }; }; then
1883  break
1884else
1885  echo "$as_me: failed program was:" >&5
1886sed 's/^/| /' conftest.$ac_ext >&5
1887
1888fi
1889rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1890done
1891rm -f conftest*
1892if test -n "$ac_declaration"; then
1893  echo '#ifdef __cplusplus' >>confdefs.h
1894  echo $ac_declaration      >>confdefs.h
1895  echo '#endif'             >>confdefs.h
1896fi
1897
1898ac_ext=c
1899ac_cpp='$CPP $CPPFLAGS'
1900ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1901ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1902ac_compiler_gnu=$ac_cv_c_compiler_gnu
1903
1904ac_ext=c
1905ac_cpp='$CPP $CPPFLAGS'
1906ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1907ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1908ac_compiler_gnu=$ac_cv_c_compiler_gnu
1909if test -n "$ac_tool_prefix"; then
1910  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1911set dummy ${ac_tool_prefix}gcc; ac_word=$2
1912echo "$as_me:$LINENO: checking for $ac_word" >&5
1913echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1914if test "${ac_cv_prog_CC+set}" = set; then
1915  echo $ECHO_N "(cached) $ECHO_C" >&6
1916else
1917  if test -n "$CC"; then
1918  ac_cv_prog_CC="$CC" # Let the user override the test.
1919else
1920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1921for as_dir in $PATH
1922do
1923  IFS=$as_save_IFS
1924  test -z "$as_dir" && as_dir=.
1925  for ac_exec_ext in '' $ac_executable_extensions; do
1926  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1927    ac_cv_prog_CC="${ac_tool_prefix}gcc"
1928    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1929    break 2
1930  fi
1931done
1932done
1933
1934fi
1935fi
1936CC=$ac_cv_prog_CC
1937if test -n "$CC"; then
1938  echo "$as_me:$LINENO: result: $CC" >&5
1939echo "${ECHO_T}$CC" >&6
1940else
1941  echo "$as_me:$LINENO: result: no" >&5
1942echo "${ECHO_T}no" >&6
1943fi
1944
1945fi
1946if test -z "$ac_cv_prog_CC"; then
1947  ac_ct_CC=$CC
1948  # Extract the first word of "gcc", so it can be a program name with args.
1949set dummy gcc; ac_word=$2
1950echo "$as_me:$LINENO: checking for $ac_word" >&5
1951echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1952if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1953  echo $ECHO_N "(cached) $ECHO_C" >&6
1954else
1955  if test -n "$ac_ct_CC"; then
1956  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1957else
1958as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1959for as_dir in $PATH
1960do
1961  IFS=$as_save_IFS
1962  test -z "$as_dir" && as_dir=.
1963  for ac_exec_ext in '' $ac_executable_extensions; do
1964  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1965    ac_cv_prog_ac_ct_CC="gcc"
1966    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1967    break 2
1968  fi
1969done
1970done
1971
1972fi
1973fi
1974ac_ct_CC=$ac_cv_prog_ac_ct_CC
1975if test -n "$ac_ct_CC"; then
1976  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1977echo "${ECHO_T}$ac_ct_CC" >&6
1978else
1979  echo "$as_me:$LINENO: result: no" >&5
1980echo "${ECHO_T}no" >&6
1981fi
1982
1983  CC=$ac_ct_CC
1984else
1985  CC="$ac_cv_prog_CC"
1986fi
1987
1988if test -z "$CC"; then
1989  if test -n "$ac_tool_prefix"; then
1990  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1991set dummy ${ac_tool_prefix}cc; ac_word=$2
1992echo "$as_me:$LINENO: checking for $ac_word" >&5
1993echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1994if test "${ac_cv_prog_CC+set}" = set; then
1995  echo $ECHO_N "(cached) $ECHO_C" >&6
1996else
1997  if test -n "$CC"; then
1998  ac_cv_prog_CC="$CC" # Let the user override the test.
1999else
2000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2001for as_dir in $PATH
2002do
2003  IFS=$as_save_IFS
2004  test -z "$as_dir" && as_dir=.
2005  for ac_exec_ext in '' $ac_executable_extensions; do
2006  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2007    ac_cv_prog_CC="${ac_tool_prefix}cc"
2008    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2009    break 2
2010  fi
2011done
2012done
2013
2014fi
2015fi
2016CC=$ac_cv_prog_CC
2017if test -n "$CC"; then
2018  echo "$as_me:$LINENO: result: $CC" >&5
2019echo "${ECHO_T}$CC" >&6
2020else
2021  echo "$as_me:$LINENO: result: no" >&5
2022echo "${ECHO_T}no" >&6
2023fi
2024
2025fi
2026if test -z "$ac_cv_prog_CC"; then
2027  ac_ct_CC=$CC
2028  # Extract the first word of "cc", so it can be a program name with args.
2029set dummy cc; ac_word=$2
2030echo "$as_me:$LINENO: checking for $ac_word" >&5
2031echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2032if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2033  echo $ECHO_N "(cached) $ECHO_C" >&6
2034else
2035  if test -n "$ac_ct_CC"; then
2036  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2037else
2038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2039for as_dir in $PATH
2040do
2041  IFS=$as_save_IFS
2042  test -z "$as_dir" && as_dir=.
2043  for ac_exec_ext in '' $ac_executable_extensions; do
2044  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2045    ac_cv_prog_ac_ct_CC="cc"
2046    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2047    break 2
2048  fi
2049done
2050done
2051
2052fi
2053fi
2054ac_ct_CC=$ac_cv_prog_ac_ct_CC
2055if test -n "$ac_ct_CC"; then
2056  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2057echo "${ECHO_T}$ac_ct_CC" >&6
2058else
2059  echo "$as_me:$LINENO: result: no" >&5
2060echo "${ECHO_T}no" >&6
2061fi
2062
2063  CC=$ac_ct_CC
2064else
2065  CC="$ac_cv_prog_CC"
2066fi
2067
2068fi
2069if test -z "$CC"; then
2070  # Extract the first word of "cc", so it can be a program name with args.
2071set dummy cc; ac_word=$2
2072echo "$as_me:$LINENO: checking for $ac_word" >&5
2073echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2074if test "${ac_cv_prog_CC+set}" = set; then
2075  echo $ECHO_N "(cached) $ECHO_C" >&6
2076else
2077  if test -n "$CC"; then
2078  ac_cv_prog_CC="$CC" # Let the user override the test.
2079else
2080  ac_prog_rejected=no
2081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2082for as_dir in $PATH
2083do
2084  IFS=$as_save_IFS
2085  test -z "$as_dir" && as_dir=.
2086  for ac_exec_ext in '' $ac_executable_extensions; do
2087  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2088    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2089       ac_prog_rejected=yes
2090       continue
2091     fi
2092    ac_cv_prog_CC="cc"
2093    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2094    break 2
2095  fi
2096done
2097done
2098
2099if test $ac_prog_rejected = yes; then
2100  # We found a bogon in the path, so make sure we never use it.
2101  set dummy $ac_cv_prog_CC
2102  shift
2103  if test $# != 0; then
2104    # We chose a different compiler from the bogus one.
2105    # However, it has the same basename, so the bogon will be chosen
2106    # first if we set CC to just the basename; use the full file name.
2107    shift
2108    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2109  fi
2110fi
2111fi
2112fi
2113CC=$ac_cv_prog_CC
2114if test -n "$CC"; then
2115  echo "$as_me:$LINENO: result: $CC" >&5
2116echo "${ECHO_T}$CC" >&6
2117else
2118  echo "$as_me:$LINENO: result: no" >&5
2119echo "${ECHO_T}no" >&6
2120fi
2121
2122fi
2123if test -z "$CC"; then
2124  if test -n "$ac_tool_prefix"; then
2125  for ac_prog in cl
2126  do
2127    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2128set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2129echo "$as_me:$LINENO: checking for $ac_word" >&5
2130echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2131if test "${ac_cv_prog_CC+set}" = set; then
2132  echo $ECHO_N "(cached) $ECHO_C" >&6
2133else
2134  if test -n "$CC"; then
2135  ac_cv_prog_CC="$CC" # Let the user override the test.
2136else
2137as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2138for as_dir in $PATH
2139do
2140  IFS=$as_save_IFS
2141  test -z "$as_dir" && as_dir=.
2142  for ac_exec_ext in '' $ac_executable_extensions; do
2143  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2144    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2145    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2146    break 2
2147  fi
2148done
2149done
2150
2151fi
2152fi
2153CC=$ac_cv_prog_CC
2154if test -n "$CC"; then
2155  echo "$as_me:$LINENO: result: $CC" >&5
2156echo "${ECHO_T}$CC" >&6
2157else
2158  echo "$as_me:$LINENO: result: no" >&5
2159echo "${ECHO_T}no" >&6
2160fi
2161
2162    test -n "$CC" && break
2163  done
2164fi
2165if test -z "$CC"; then
2166  ac_ct_CC=$CC
2167  for ac_prog in cl
2168do
2169  # Extract the first word of "$ac_prog", so it can be a program name with args.
2170set dummy $ac_prog; ac_word=$2
2171echo "$as_me:$LINENO: checking for $ac_word" >&5
2172echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2173if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2174  echo $ECHO_N "(cached) $ECHO_C" >&6
2175else
2176  if test -n "$ac_ct_CC"; then
2177  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2178else
2179as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2180for as_dir in $PATH
2181do
2182  IFS=$as_save_IFS
2183  test -z "$as_dir" && as_dir=.
2184  for ac_exec_ext in '' $ac_executable_extensions; do
2185  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2186    ac_cv_prog_ac_ct_CC="$ac_prog"
2187    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2188    break 2
2189  fi
2190done
2191done
2192
2193fi
2194fi
2195ac_ct_CC=$ac_cv_prog_ac_ct_CC
2196if test -n "$ac_ct_CC"; then
2197  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2198echo "${ECHO_T}$ac_ct_CC" >&6
2199else
2200  echo "$as_me:$LINENO: result: no" >&5
2201echo "${ECHO_T}no" >&6
2202fi
2203
2204  test -n "$ac_ct_CC" && break
2205done
2206
2207  CC=$ac_ct_CC
2208fi
2209
2210fi
2211
2212
2213test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2214See \`config.log' for more details." >&5
2215echo "$as_me: error: no acceptable C compiler found in \$PATH
2216See \`config.log' for more details." >&2;}
2217   { (exit 1); exit 1; }; }
2218
2219# Provide some information about the compiler.
2220echo "$as_me:$LINENO:" \
2221     "checking for C compiler version" >&5
2222ac_compiler=`set X $ac_compile; echo $2`
2223{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2224  (eval $ac_compiler --version </dev/null >&5) 2>&5
2225  ac_status=$?
2226  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2227  (exit $ac_status); }
2228{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2229  (eval $ac_compiler -v </dev/null >&5) 2>&5
2230  ac_status=$?
2231  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2232  (exit $ac_status); }
2233{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2234  (eval $ac_compiler -V </dev/null >&5) 2>&5
2235  ac_status=$?
2236  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2237  (exit $ac_status); }
2238
2239echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2240echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2241if test "${ac_cv_c_compiler_gnu+set}" = set; then
2242  echo $ECHO_N "(cached) $ECHO_C" >&6
2243else
2244  cat >conftest.$ac_ext <<_ACEOF
2245/* confdefs.h.  */
2246_ACEOF
2247cat confdefs.h >>conftest.$ac_ext
2248cat >>conftest.$ac_ext <<_ACEOF
2249/* end confdefs.h.  */
2250
2251int
2252main ()
2253{
2254#ifndef __GNUC__
2255       choke me
2256#endif
2257
2258  ;
2259  return 0;
2260}
2261_ACEOF
2262rm -f conftest.$ac_objext
2263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2264  (eval $ac_compile) 2>conftest.er1
2265  ac_status=$?
2266  grep -v '^ *+' conftest.er1 >conftest.err
2267  rm -f conftest.er1
2268  cat conftest.err >&5
2269  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2270  (exit $ac_status); } &&
2271         { ac_try='test -z "$ac_c_werror_flag"
2272                         || test ! -s conftest.err'
2273  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2274  (eval $ac_try) 2>&5
2275  ac_status=$?
2276  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2277  (exit $ac_status); }; } &&
2278         { ac_try='test -s conftest.$ac_objext'
2279  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2280  (eval $ac_try) 2>&5
2281  ac_status=$?
2282  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2283  (exit $ac_status); }; }; then
2284  ac_compiler_gnu=yes
2285else
2286  echo "$as_me: failed program was:" >&5
2287sed 's/^/| /' conftest.$ac_ext >&5
2288
2289ac_compiler_gnu=no
2290fi
2291rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2292ac_cv_c_compiler_gnu=$ac_compiler_gnu
2293
2294fi
2295echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2296echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2297GCC=`test $ac_compiler_gnu = yes && echo yes`
2298ac_test_CFLAGS=${CFLAGS+set}
2299ac_save_CFLAGS=$CFLAGS
2300CFLAGS="-g"
2301echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2302echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2303if test "${ac_cv_prog_cc_g+set}" = set; then
2304  echo $ECHO_N "(cached) $ECHO_C" >&6
2305else
2306  cat >conftest.$ac_ext <<_ACEOF
2307/* confdefs.h.  */
2308_ACEOF
2309cat confdefs.h >>conftest.$ac_ext
2310cat >>conftest.$ac_ext <<_ACEOF
2311/* end confdefs.h.  */
2312
2313int
2314main ()
2315{
2316
2317  ;
2318  return 0;
2319}
2320_ACEOF
2321rm -f conftest.$ac_objext
2322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2323  (eval $ac_compile) 2>conftest.er1
2324  ac_status=$?
2325  grep -v '^ *+' conftest.er1 >conftest.err
2326  rm -f conftest.er1
2327  cat conftest.err >&5
2328  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2329  (exit $ac_status); } &&
2330         { ac_try='test -z "$ac_c_werror_flag"
2331                         || test ! -s conftest.err'
2332  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2333  (eval $ac_try) 2>&5
2334  ac_status=$?
2335  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2336  (exit $ac_status); }; } &&
2337         { ac_try='test -s conftest.$ac_objext'
2338  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2339  (eval $ac_try) 2>&5
2340  ac_status=$?
2341  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2342  (exit $ac_status); }; }; then
2343  ac_cv_prog_cc_g=yes
2344else
2345  echo "$as_me: failed program was:" >&5
2346sed 's/^/| /' conftest.$ac_ext >&5
2347
2348ac_cv_prog_cc_g=no
2349fi
2350rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2351fi
2352echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2353echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2354if test "$ac_test_CFLAGS" = set; then
2355  CFLAGS=$ac_save_CFLAGS
2356elif test $ac_cv_prog_cc_g = yes; then
2357  if test "$GCC" = yes; then
2358    CFLAGS="-g -O2"
2359  else
2360    CFLAGS="-g"
2361  fi
2362else
2363  if test "$GCC" = yes; then
2364    CFLAGS="-O2"
2365  else
2366    CFLAGS=
2367  fi
2368fi
2369echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2370echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2371if test "${ac_cv_prog_cc_stdc+set}" = set; then
2372  echo $ECHO_N "(cached) $ECHO_C" >&6
2373else
2374  ac_cv_prog_cc_stdc=no
2375ac_save_CC=$CC
2376cat >conftest.$ac_ext <<_ACEOF
2377/* confdefs.h.  */
2378_ACEOF
2379cat confdefs.h >>conftest.$ac_ext
2380cat >>conftest.$ac_ext <<_ACEOF
2381/* end confdefs.h.  */
2382#include <stdarg.h>
2383#include <stdio.h>
2384#include <sys/types.h>
2385#include <sys/stat.h>
2386/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2387struct buf { int x; };
2388FILE * (*rcsopen) (struct buf *, struct stat *, int);
2389static char *e (p, i)
2390     char **p;
2391     int i;
2392{
2393  return p[i];
2394}
2395static char *f (char * (*g) (char **, int), char **p, ...)
2396{
2397  char *s;
2398  va_list v;
2399  va_start (v,p);
2400  s = g (p, va_arg (v,int));
2401  va_end (v);
2402  return s;
2403}
2404
2405/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2406   function prototypes and stuff, but not '\xHH' hex character constants.
2407   These don't provoke an error unfortunately, instead are silently treated
2408   as 'x'.  The following induces an error, until -std1 is added to get
2409   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2410   array size at least.  It's necessary to write '\x00'==0 to get something
2411   that's true only with -std1.  */
2412int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2413
2414int test (int i, double x);
2415struct s1 {int (*f) (int a);};
2416struct s2 {int (*f) (double a);};
2417int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2418int argc;
2419char **argv;
2420int
2421main ()
2422{
2423return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2424  ;
2425  return 0;
2426}
2427_ACEOF
2428# Don't try gcc -ansi; that turns off useful extensions and
2429# breaks some systems' header files.
2430# AIX                   -qlanglvl=ansi
2431# Ultrix and OSF/1      -std1
2432# HP-UX 10.20 and later -Ae
2433# HP-UX older versions  -Aa -D_HPUX_SOURCE
2434# SVR4                  -Xc -D__EXTENSIONS__
2435for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2436do
2437  CC="$ac_save_CC $ac_arg"
2438  rm -f conftest.$ac_objext
2439if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2440  (eval $ac_compile) 2>conftest.er1
2441  ac_status=$?
2442  grep -v '^ *+' conftest.er1 >conftest.err
2443  rm -f conftest.er1
2444  cat conftest.err >&5
2445  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2446  (exit $ac_status); } &&
2447         { ac_try='test -z "$ac_c_werror_flag"
2448                         || test ! -s conftest.err'
2449  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2450  (eval $ac_try) 2>&5
2451  ac_status=$?
2452  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2453  (exit $ac_status); }; } &&
2454         { ac_try='test -s conftest.$ac_objext'
2455  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2456  (eval $ac_try) 2>&5
2457  ac_status=$?
2458  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2459  (exit $ac_status); }; }; then
2460  ac_cv_prog_cc_stdc=$ac_arg
2461break
2462else
2463  echo "$as_me: failed program was:" >&5
2464sed 's/^/| /' conftest.$ac_ext >&5
2465
2466fi
2467rm -f conftest.err conftest.$ac_objext
2468done
2469rm -f conftest.$ac_ext conftest.$ac_objext
2470CC=$ac_save_CC
2471
2472fi
2473
2474case "x$ac_cv_prog_cc_stdc" in
2475  x|xno)
2476    echo "$as_me:$LINENO: result: none needed" >&5
2477echo "${ECHO_T}none needed" >&6 ;;
2478  *)
2479    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2480echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2481    CC="$CC $ac_cv_prog_cc_stdc" ;;
2482esac
2483
2484# Some people use a C++ compiler to compile C.  Since we use `exit',
2485# in C++ we need to declare it.  In case someone uses the same compiler
2486# for both compiling C and C++ we need to have the C++ compiler decide
2487# the declaration of exit, since it's the most demanding environment.
2488cat >conftest.$ac_ext <<_ACEOF
2489#ifndef __cplusplus
2490  choke me
2491#endif
2492_ACEOF
2493rm -f conftest.$ac_objext
2494if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2495  (eval $ac_compile) 2>conftest.er1
2496  ac_status=$?
2497  grep -v '^ *+' conftest.er1 >conftest.err
2498  rm -f conftest.er1
2499  cat conftest.err >&5
2500  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2501  (exit $ac_status); } &&
2502         { ac_try='test -z "$ac_c_werror_flag"
2503                         || test ! -s conftest.err'
2504  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2505  (eval $ac_try) 2>&5
2506  ac_status=$?
2507  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2508  (exit $ac_status); }; } &&
2509         { ac_try='test -s conftest.$ac_objext'
2510  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2511  (eval $ac_try) 2>&5
2512  ac_status=$?
2513  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2514  (exit $ac_status); }; }; then
2515  for ac_declaration in \
2516   '' \
2517   'extern "C" void std::exit (int) throw (); using std::exit;' \
2518   'extern "C" void std::exit (int); using std::exit;' \
2519   'extern "C" void exit (int) throw ();' \
2520   'extern "C" void exit (int);' \
2521   'void exit (int);'
2522do
2523  cat >conftest.$ac_ext <<_ACEOF
2524/* confdefs.h.  */
2525_ACEOF
2526cat confdefs.h >>conftest.$ac_ext
2527cat >>conftest.$ac_ext <<_ACEOF
2528/* end confdefs.h.  */
2529$ac_declaration
2530#include <stdlib.h>
2531int
2532main ()
2533{
2534exit (42);
2535  ;
2536  return 0;
2537}
2538_ACEOF
2539rm -f conftest.$ac_objext
2540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2541  (eval $ac_compile) 2>conftest.er1
2542  ac_status=$?
2543  grep -v '^ *+' conftest.er1 >conftest.err
2544  rm -f conftest.er1
2545  cat conftest.err >&5
2546  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2547  (exit $ac_status); } &&
2548         { ac_try='test -z "$ac_c_werror_flag"
2549                         || test ! -s conftest.err'
2550  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2551  (eval $ac_try) 2>&5
2552  ac_status=$?
2553  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2554  (exit $ac_status); }; } &&
2555         { ac_try='test -s conftest.$ac_objext'
2556  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2557  (eval $ac_try) 2>&5
2558  ac_status=$?
2559  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2560  (exit $ac_status); }; }; then
2561  :
2562else
2563  echo "$as_me: failed program was:" >&5
2564sed 's/^/| /' conftest.$ac_ext >&5
2565
2566continue
2567fi
2568rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2569  cat >conftest.$ac_ext <<_ACEOF
2570/* confdefs.h.  */
2571_ACEOF
2572cat confdefs.h >>conftest.$ac_ext
2573cat >>conftest.$ac_ext <<_ACEOF
2574/* end confdefs.h.  */
2575$ac_declaration
2576int
2577main ()
2578{
2579exit (42);
2580  ;
2581  return 0;
2582}
2583_ACEOF
2584rm -f conftest.$ac_objext
2585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2586  (eval $ac_compile) 2>conftest.er1
2587  ac_status=$?
2588  grep -v '^ *+' conftest.er1 >conftest.err
2589  rm -f conftest.er1
2590  cat conftest.err >&5
2591  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2592  (exit $ac_status); } &&
2593         { ac_try='test -z "$ac_c_werror_flag"
2594                         || test ! -s conftest.err'
2595  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2596  (eval $ac_try) 2>&5
2597  ac_status=$?
2598  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2599  (exit $ac_status); }; } &&
2600         { ac_try='test -s conftest.$ac_objext'
2601  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2602  (eval $ac_try) 2>&5
2603  ac_status=$?
2604  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2605  (exit $ac_status); }; }; then
2606  break
2607else
2608  echo "$as_me: failed program was:" >&5
2609sed 's/^/| /' conftest.$ac_ext >&5
2610
2611fi
2612rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2613done
2614rm -f conftest*
2615if test -n "$ac_declaration"; then
2616  echo '#ifdef __cplusplus' >>confdefs.h
2617  echo $ac_declaration      >>confdefs.h
2618  echo '#endif'             >>confdefs.h
2619fi
2620
2621else
2622  echo "$as_me: failed program was:" >&5
2623sed 's/^/| /' conftest.$ac_ext >&5
2624
2625fi
2626rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2627ac_ext=c
2628ac_cpp='$CPP $CPPFLAGS'
2629ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2630ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2631ac_compiler_gnu=$ac_cv_c_compiler_gnu
2632
2633ac_ext=c
2634ac_cpp='$CPP $CPPFLAGS'
2635ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2636ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2637ac_compiler_gnu=$ac_cv_c_compiler_gnu
2638echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2639echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2640# On Suns, sometimes $CPP names a directory.
2641if test -n "$CPP" && test -d "$CPP"; then
2642  CPP=
2643fi
2644if test -z "$CPP"; then
2645  if test "${ac_cv_prog_CPP+set}" = set; then
2646  echo $ECHO_N "(cached) $ECHO_C" >&6
2647else
2648      # Double quotes because CPP needs to be expanded
2649    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2650    do
2651      ac_preproc_ok=false
2652for ac_c_preproc_warn_flag in '' yes
2653do
2654  # Use a header file that comes with gcc, so configuring glibc
2655  # with a fresh cross-compiler works.
2656  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2657  # <limits.h> exists even on freestanding compilers.
2658  # On the NeXT, cc -E runs the code through the compiler's parser,
2659  # not just through cpp. "Syntax error" is here to catch this case.
2660  cat >conftest.$ac_ext <<_ACEOF
2661/* confdefs.h.  */
2662_ACEOF
2663cat confdefs.h >>conftest.$ac_ext
2664cat >>conftest.$ac_ext <<_ACEOF
2665/* end confdefs.h.  */
2666#ifdef __STDC__
2667# include <limits.h>
2668#else
2669# include <assert.h>
2670#endif
2671                     Syntax error
2672_ACEOF
2673if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2674  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2675  ac_status=$?
2676  grep -v '^ *+' conftest.er1 >conftest.err
2677  rm -f conftest.er1
2678  cat conftest.err >&5
2679  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2680  (exit $ac_status); } >/dev/null; then
2681  if test -s conftest.err; then
2682    ac_cpp_err=$ac_c_preproc_warn_flag
2683    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2684  else
2685    ac_cpp_err=
2686  fi
2687else
2688  ac_cpp_err=yes
2689fi
2690if test -z "$ac_cpp_err"; then
2691  :
2692else
2693  echo "$as_me: failed program was:" >&5
2694sed 's/^/| /' conftest.$ac_ext >&5
2695
2696  # Broken: fails on valid input.
2697continue
2698fi
2699rm -f conftest.err conftest.$ac_ext
2700
2701  # OK, works on sane cases.  Now check whether non-existent headers
2702  # can be detected and how.
2703  cat >conftest.$ac_ext <<_ACEOF
2704/* confdefs.h.  */
2705_ACEOF
2706cat confdefs.h >>conftest.$ac_ext
2707cat >>conftest.$ac_ext <<_ACEOF
2708/* end confdefs.h.  */
2709#include <ac_nonexistent.h>
2710_ACEOF
2711if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2712  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2713  ac_status=$?
2714  grep -v '^ *+' conftest.er1 >conftest.err
2715  rm -f conftest.er1
2716  cat conftest.err >&5
2717  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2718  (exit $ac_status); } >/dev/null; then
2719  if test -s conftest.err; then
2720    ac_cpp_err=$ac_c_preproc_warn_flag
2721    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2722  else
2723    ac_cpp_err=
2724  fi
2725else
2726  ac_cpp_err=yes
2727fi
2728if test -z "$ac_cpp_err"; then
2729  # Broken: success on invalid input.
2730continue
2731else
2732  echo "$as_me: failed program was:" >&5
2733sed 's/^/| /' conftest.$ac_ext >&5
2734
2735  # Passes both tests.
2736ac_preproc_ok=:
2737break
2738fi
2739rm -f conftest.err conftest.$ac_ext
2740
2741done
2742# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2743rm -f conftest.err conftest.$ac_ext
2744if $ac_preproc_ok; then
2745  break
2746fi
2747
2748    done
2749    ac_cv_prog_CPP=$CPP
2750
2751fi
2752  CPP=$ac_cv_prog_CPP
2753else
2754  ac_cv_prog_CPP=$CPP
2755fi
2756echo "$as_me:$LINENO: result: $CPP" >&5
2757echo "${ECHO_T}$CPP" >&6
2758ac_preproc_ok=false
2759for ac_c_preproc_warn_flag in '' yes
2760do
2761  # Use a header file that comes with gcc, so configuring glibc
2762  # with a fresh cross-compiler works.
2763  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2764  # <limits.h> exists even on freestanding compilers.
2765  # On the NeXT, cc -E runs the code through the compiler's parser,
2766  # not just through cpp. "Syntax error" is here to catch this case.
2767  cat >conftest.$ac_ext <<_ACEOF
2768/* confdefs.h.  */
2769_ACEOF
2770cat confdefs.h >>conftest.$ac_ext
2771cat >>conftest.$ac_ext <<_ACEOF
2772/* end confdefs.h.  */
2773#ifdef __STDC__
2774# include <limits.h>
2775#else
2776# include <assert.h>
2777#endif
2778                     Syntax error
2779_ACEOF
2780if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2781  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2782  ac_status=$?
2783  grep -v '^ *+' conftest.er1 >conftest.err
2784  rm -f conftest.er1
2785  cat conftest.err >&5
2786  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2787  (exit $ac_status); } >/dev/null; then
2788  if test -s conftest.err; then
2789    ac_cpp_err=$ac_c_preproc_warn_flag
2790    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2791  else
2792    ac_cpp_err=
2793  fi
2794else
2795  ac_cpp_err=yes
2796fi
2797if test -z "$ac_cpp_err"; then
2798  :
2799else
2800  echo "$as_me: failed program was:" >&5
2801sed 's/^/| /' conftest.$ac_ext >&5
2802
2803  # Broken: fails on valid input.
2804continue
2805fi
2806rm -f conftest.err conftest.$ac_ext
2807
2808  # OK, works on sane cases.  Now check whether non-existent headers
2809  # can be detected and how.
2810  cat >conftest.$ac_ext <<_ACEOF
2811/* confdefs.h.  */
2812_ACEOF
2813cat confdefs.h >>conftest.$ac_ext
2814cat >>conftest.$ac_ext <<_ACEOF
2815/* end confdefs.h.  */
2816#include <ac_nonexistent.h>
2817_ACEOF
2818if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2819  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2820  ac_status=$?
2821  grep -v '^ *+' conftest.er1 >conftest.err
2822  rm -f conftest.er1
2823  cat conftest.err >&5
2824  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2825  (exit $ac_status); } >/dev/null; then
2826  if test -s conftest.err; then
2827    ac_cpp_err=$ac_c_preproc_warn_flag
2828    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2829  else
2830    ac_cpp_err=
2831  fi
2832else
2833  ac_cpp_err=yes
2834fi
2835if test -z "$ac_cpp_err"; then
2836  # Broken: success on invalid input.
2837continue
2838else
2839  echo "$as_me: failed program was:" >&5
2840sed 's/^/| /' conftest.$ac_ext >&5
2841
2842  # Passes both tests.
2843ac_preproc_ok=:
2844break
2845fi
2846rm -f conftest.err conftest.$ac_ext
2847
2848done
2849# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2850rm -f conftest.err conftest.$ac_ext
2851if $ac_preproc_ok; then
2852  :
2853else
2854  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2855See \`config.log' for more details." >&5
2856echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2857See \`config.log' for more details." >&2;}
2858   { (exit 1); exit 1; }; }
2859fi
2860
2861ac_ext=c
2862ac_cpp='$CPP $CPPFLAGS'
2863ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2864ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2865ac_compiler_gnu=$ac_cv_c_compiler_gnu
2866
2867ac_ext=f
2868ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
2869ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2870ac_compiler_gnu=$ac_cv_f77_compiler_gnu
2871if test -n "$ac_tool_prefix"; then
2872  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
2873  do
2874    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2875set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2876echo "$as_me:$LINENO: checking for $ac_word" >&5
2877echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2878if test "${ac_cv_prog_F77+set}" = set; then
2879  echo $ECHO_N "(cached) $ECHO_C" >&6
2880else
2881  if test -n "$F77"; then
2882  ac_cv_prog_F77="$F77" # Let the user override the test.
2883else
2884as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2885for as_dir in $PATH
2886do
2887  IFS=$as_save_IFS
2888  test -z "$as_dir" && as_dir=.
2889  for ac_exec_ext in '' $ac_executable_extensions; do
2890  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2891    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
2892    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2893    break 2
2894  fi
2895done
2896done
2897
2898fi
2899fi
2900F77=$ac_cv_prog_F77
2901if test -n "$F77"; then
2902  echo "$as_me:$LINENO: result: $F77" >&5
2903echo "${ECHO_T}$F77" >&6
2904else
2905  echo "$as_me:$LINENO: result: no" >&5
2906echo "${ECHO_T}no" >&6
2907fi
2908
2909    test -n "$F77" && break
2910  done
2911fi
2912if test -z "$F77"; then
2913  ac_ct_F77=$F77
2914  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
2915do
2916  # Extract the first word of "$ac_prog", so it can be a program name with args.
2917set dummy $ac_prog; ac_word=$2
2918echo "$as_me:$LINENO: checking for $ac_word" >&5
2919echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2920if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
2921  echo $ECHO_N "(cached) $ECHO_C" >&6
2922else
2923  if test -n "$ac_ct_F77"; then
2924  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
2925else
2926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2927for as_dir in $PATH
2928do
2929  IFS=$as_save_IFS
2930  test -z "$as_dir" && as_dir=.
2931  for ac_exec_ext in '' $ac_executable_extensions; do
2932  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2933    ac_cv_prog_ac_ct_F77="$ac_prog"
2934    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2935    break 2
2936  fi
2937done
2938done
2939
2940fi
2941fi
2942ac_ct_F77=$ac_cv_prog_ac_ct_F77
2943if test -n "$ac_ct_F77"; then
2944  echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
2945echo "${ECHO_T}$ac_ct_F77" >&6
2946else
2947  echo "$as_me:$LINENO: result: no" >&5
2948echo "${ECHO_T}no" >&6
2949fi
2950
2951  test -n "$ac_ct_F77" && break
2952done
2953
2954  F77=$ac_ct_F77
2955fi
2956
2957
2958# Provide some information about the compiler.
2959echo "$as_me:2959:" \
2960     "checking for Fortran 77 compiler version" >&5
2961ac_compiler=`set X $ac_compile; echo $2`
2962{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2963  (eval $ac_compiler --version </dev/null >&5) 2>&5
2964  ac_status=$?
2965  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2966  (exit $ac_status); }
2967{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2968  (eval $ac_compiler -v </dev/null >&5) 2>&5
2969  ac_status=$?
2970  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2971  (exit $ac_status); }
2972{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2973  (eval $ac_compiler -V </dev/null >&5) 2>&5
2974  ac_status=$?
2975  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2976  (exit $ac_status); }
2977rm -f a.out
2978
2979# If we don't use `.F' as extension, the preprocessor is not run on the
2980# input file.  (Note that this only needs to work for GNU compilers.)
2981ac_save_ext=$ac_ext
2982ac_ext=F
2983echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
2984echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
2985if test "${ac_cv_f77_compiler_gnu+set}" = set; then
2986  echo $ECHO_N "(cached) $ECHO_C" >&6
2987else
2988  cat >conftest.$ac_ext <<_ACEOF
2989      program main
2990#ifndef __GNUC__
2991       choke me
2992#endif
2993
2994      end
2995_ACEOF
2996rm -f conftest.$ac_objext
2997if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2998  (eval $ac_compile) 2>conftest.er1
2999  ac_status=$?
3000  grep -v '^ *+' conftest.er1 >conftest.err
3001  rm -f conftest.er1
3002  cat conftest.err >&5
3003  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3004  (exit $ac_status); } &&
3005         { ac_try='test -z "$ac_f77_werror_flag"
3006                         || test ! -s conftest.err'
3007  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3008  (eval $ac_try) 2>&5
3009  ac_status=$?
3010  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3011  (exit $ac_status); }; } &&
3012         { ac_try='test -s conftest.$ac_objext'
3013  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3014  (eval $ac_try) 2>&5
3015  ac_status=$?
3016  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3017  (exit $ac_status); }; }; then
3018  ac_compiler_gnu=yes
3019else
3020  echo "$as_me: failed program was:" >&5
3021sed 's/^/| /' conftest.$ac_ext >&5
3022
3023ac_compiler_gnu=no
3024fi
3025rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3026ac_cv_f77_compiler_gnu=$ac_compiler_gnu
3027
3028fi
3029echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
3030echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
3031ac_ext=$ac_save_ext
3032ac_test_FFLAGS=${FFLAGS+set}
3033ac_save_FFLAGS=$FFLAGS
3034FFLAGS=
3035echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
3036echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
3037if test "${ac_cv_prog_f77_g+set}" = set; then
3038  echo $ECHO_N "(cached) $ECHO_C" >&6
3039else
3040  FFLAGS=-g
3041cat >conftest.$ac_ext <<_ACEOF
3042      program main
3043
3044      end
3045_ACEOF
3046rm -f conftest.$ac_objext
3047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3048  (eval $ac_compile) 2>conftest.er1
3049  ac_status=$?
3050  grep -v '^ *+' conftest.er1 >conftest.err
3051  rm -f conftest.er1
3052  cat conftest.err >&5
3053  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3054  (exit $ac_status); } &&
3055         { ac_try='test -z "$ac_f77_werror_flag"
3056                         || test ! -s conftest.err'
3057  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3058  (eval $ac_try) 2>&5
3059  ac_status=$?
3060  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3061  (exit $ac_status); }; } &&
3062         { ac_try='test -s conftest.$ac_objext'
3063  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3064  (eval $ac_try) 2>&5
3065  ac_status=$?
3066  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3067  (exit $ac_status); }; }; then
3068  ac_cv_prog_f77_g=yes
3069else
3070  echo "$as_me: failed program was:" >&5
3071sed 's/^/| /' conftest.$ac_ext >&5
3072
3073ac_cv_prog_f77_g=no
3074fi
3075rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3076
3077fi
3078echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
3079echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
3080if test "$ac_test_FFLAGS" = set; then
3081  FFLAGS=$ac_save_FFLAGS
3082elif test $ac_cv_prog_f77_g = yes; then
3083  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
3084    FFLAGS="-g -O2"
3085  else
3086    FFLAGS="-g"
3087  fi
3088else
3089  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
3090    FFLAGS="-O2"
3091  else
3092    FFLAGS=
3093  fi
3094fi
3095
3096G77=`test $ac_compiler_gnu = yes && echo yes`
3097ac_ext=c
3098ac_cpp='$CPP $CPPFLAGS'
3099ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3100ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3101ac_compiler_gnu=$ac_cv_c_compiler_gnu
3102
3103echo "$as_me:$LINENO: checking whether ln -s works" >&5
3104echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3105LN_S=$as_ln_s
3106if test "$LN_S" = "ln -s"; then
3107  echo "$as_me:$LINENO: result: yes" >&5
3108echo "${ECHO_T}yes" >&6
3109else
3110  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
3111echo "${ECHO_T}no, using $LN_S" >&6
3112fi
3113
3114for ac_prog in install
3115do
3116  # Extract the first word of "$ac_prog", so it can be a program name with args.
3117set dummy $ac_prog; ac_word=$2
3118echo "$as_me:$LINENO: checking for $ac_word" >&5
3119echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3120if test "${ac_cv_prog_INSTALL+set}" = set; then
3121  echo $ECHO_N "(cached) $ECHO_C" >&6
3122else
3123  if test -n "$INSTALL"; then
3124  ac_cv_prog_INSTALL="$INSTALL" # Let the user override the test.
3125else
3126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3127for as_dir in $PATH
3128do
3129  IFS=$as_save_IFS
3130  test -z "$as_dir" && as_dir=.
3131  for ac_exec_ext in '' $ac_executable_extensions; do
3132  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3133    ac_cv_prog_INSTALL="$ac_prog"
3134    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3135    break 2
3136  fi
3137done
3138done
3139
3140fi
3141fi
3142INSTALL=$ac_cv_prog_INSTALL
3143if test -n "$INSTALL"; then
3144  echo "$as_me:$LINENO: result: $INSTALL" >&5
3145echo "${ECHO_T}$INSTALL" >&6
3146else
3147  echo "$as_me:$LINENO: result: no" >&5
3148echo "${ECHO_T}no" >&6
3149fi
3150
3151  test -n "$INSTALL" && break
3152done
3153
3154
3155# Check for maths library -- will add -lm to $LIBS
3156
3157
3158echo "$as_me:$LINENO: checking for log in -lm" >&5
3159echo $ECHO_N "checking for log in -lm... $ECHO_C" >&6
3160if test "${ac_cv_lib_m_log+set}" = set; then
3161  echo $ECHO_N "(cached) $ECHO_C" >&6
3162else
3163  ac_check_lib_save_LIBS=$LIBS
3164LIBS="-lm  $LIBS"
3165cat >conftest.$ac_ext <<_ACEOF
3166/* confdefs.h.  */
3167_ACEOF
3168cat confdefs.h >>conftest.$ac_ext
3169cat >>conftest.$ac_ext <<_ACEOF
3170/* end confdefs.h.  */
3171
3172/* Override any gcc2 internal prototype to avoid an error.  */
3173#ifdef __cplusplus
3174extern "C"
3175#endif
3176/* We use char because int might match the return type of a gcc2
3177   builtin and then its argument prototype would still apply.  */
3178char log ();
3179int
3180main ()
3181{
3182log ();
3183  ;
3184  return 0;
3185}
3186_ACEOF
3187rm -f conftest.$ac_objext conftest$ac_exeext
3188if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3189  (eval $ac_link) 2>conftest.er1
3190  ac_status=$?
3191  grep -v '^ *+' conftest.er1 >conftest.err
3192  rm -f conftest.er1
3193  cat conftest.err >&5
3194  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3195  (exit $ac_status); } &&
3196         { ac_try='test -z "$ac_c_werror_flag"
3197                         || test ! -s conftest.err'
3198  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3199  (eval $ac_try) 2>&5
3200  ac_status=$?
3201  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3202  (exit $ac_status); }; } &&
3203         { ac_try='test -s conftest$ac_exeext'
3204  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3205  (eval $ac_try) 2>&5
3206  ac_status=$?
3207  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3208  (exit $ac_status); }; }; then
3209  ac_cv_lib_m_log=yes
3210else
3211  echo "$as_me: failed program was:" >&5
3212sed 's/^/| /' conftest.$ac_ext >&5
3213
3214ac_cv_lib_m_log=no
3215fi
3216rm -f conftest.err conftest.$ac_objext \
3217      conftest$ac_exeext conftest.$ac_ext
3218LIBS=$ac_check_lib_save_LIBS
3219fi
3220echo "$as_me:$LINENO: result: $ac_cv_lib_m_log" >&5
3221echo "${ECHO_T}$ac_cv_lib_m_log" >&6
3222if test $ac_cv_lib_m_log = yes; then
3223  cat >>confdefs.h <<_ACEOF
3224#define HAVE_LIBM 1
3225_ACEOF
3226
3227  LIBS="-lm $LIBS"
3228
3229fi
3230
3231
3232# Checks for header files.
3233
3234echo "$as_me:$LINENO: checking for egrep" >&5
3235echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3236if test "${ac_cv_prog_egrep+set}" = set; then
3237  echo $ECHO_N "(cached) $ECHO_C" >&6
3238else
3239  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3240    then ac_cv_prog_egrep='grep -E'
3241    else ac_cv_prog_egrep='egrep'
3242    fi
3243fi
3244echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3245echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3246 EGREP=$ac_cv_prog_egrep
3247
3248
3249echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3250echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3251if test "${ac_cv_header_stdc+set}" = set; then
3252  echo $ECHO_N "(cached) $ECHO_C" >&6
3253else
3254  cat >conftest.$ac_ext <<_ACEOF
3255/* confdefs.h.  */
3256_ACEOF
3257cat confdefs.h >>conftest.$ac_ext
3258cat >>conftest.$ac_ext <<_ACEOF
3259/* end confdefs.h.  */
3260#include <stdlib.h>
3261#include <stdarg.h>
3262#include <string.h>
3263#include <float.h>
3264
3265int
3266main ()
3267{
3268
3269  ;
3270  return 0;
3271}
3272_ACEOF
3273rm -f conftest.$ac_objext
3274if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3275  (eval $ac_compile) 2>conftest.er1
3276  ac_status=$?
3277  grep -v '^ *+' conftest.er1 >conftest.err
3278  rm -f conftest.er1
3279  cat conftest.err >&5
3280  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3281  (exit $ac_status); } &&
3282         { ac_try='test -z "$ac_c_werror_flag"
3283                         || test ! -s conftest.err'
3284  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3285  (eval $ac_try) 2>&5
3286  ac_status=$?
3287  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3288  (exit $ac_status); }; } &&
3289         { ac_try='test -s conftest.$ac_objext'
3290  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3291  (eval $ac_try) 2>&5
3292  ac_status=$?
3293  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3294  (exit $ac_status); }; }; then
3295  ac_cv_header_stdc=yes
3296else
3297  echo "$as_me: failed program was:" >&5
3298sed 's/^/| /' conftest.$ac_ext >&5
3299
3300ac_cv_header_stdc=no
3301fi
3302rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3303
3304if test $ac_cv_header_stdc = yes; then
3305  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3306  cat >conftest.$ac_ext <<_ACEOF
3307/* confdefs.h.  */
3308_ACEOF
3309cat confdefs.h >>conftest.$ac_ext
3310cat >>conftest.$ac_ext <<_ACEOF
3311/* end confdefs.h.  */
3312#include <string.h>
3313
3314_ACEOF
3315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3316  $EGREP "memchr" >/dev/null 2>&1; then
3317  :
3318else
3319  ac_cv_header_stdc=no
3320fi
3321rm -f conftest*
3322
3323fi
3324
3325if test $ac_cv_header_stdc = yes; then
3326  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3327  cat >conftest.$ac_ext <<_ACEOF
3328/* confdefs.h.  */
3329_ACEOF
3330cat confdefs.h >>conftest.$ac_ext
3331cat >>conftest.$ac_ext <<_ACEOF
3332/* end confdefs.h.  */
3333#include <stdlib.h>
3334
3335_ACEOF
3336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3337  $EGREP "free" >/dev/null 2>&1; then
3338  :
3339else
3340  ac_cv_header_stdc=no
3341fi
3342rm -f conftest*
3343
3344fi
3345
3346if test $ac_cv_header_stdc = yes; then
3347  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3348  if test "$cross_compiling" = yes; then
3349  :
3350else
3351  cat >conftest.$ac_ext <<_ACEOF
3352/* confdefs.h.  */
3353_ACEOF
3354cat confdefs.h >>conftest.$ac_ext
3355cat >>conftest.$ac_ext <<_ACEOF
3356/* end confdefs.h.  */
3357#include <ctype.h>
3358#if ((' ' & 0x0FF) == 0x020)
3359# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3360# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3361#else
3362# define ISLOWER(c) \
3363                   (('a' <= (c) && (c) <= 'i') \
3364                     || ('j' <= (c) && (c) <= 'r') \
3365                     || ('s' <= (c) && (c) <= 'z'))
3366# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3367#endif
3368
3369#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3370int
3371main ()
3372{
3373  int i;
3374  for (i = 0; i < 256; i++)
3375    if (XOR (islower (i), ISLOWER (i))
3376        || toupper (i) != TOUPPER (i))
3377      exit(2);
3378  exit (0);
3379}
3380_ACEOF
3381rm -f conftest$ac_exeext
3382if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3383  (eval $ac_link) 2>&5
3384  ac_status=$?
3385  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3386  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3387  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3388  (eval $ac_try) 2>&5
3389  ac_status=$?
3390  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3391  (exit $ac_status); }; }; then
3392  :
3393else
3394  echo "$as_me: program exited with status $ac_status" >&5
3395echo "$as_me: failed program was:" >&5
3396sed 's/^/| /' conftest.$ac_ext >&5
3397
3398( exit $ac_status )
3399ac_cv_header_stdc=no
3400fi
3401rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3402fi
3403fi
3404fi
3405echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3406echo "${ECHO_T}$ac_cv_header_stdc" >&6
3407if test $ac_cv_header_stdc = yes; then
3408
3409cat >>confdefs.h <<\_ACEOF
3410#define STDC_HEADERS 1
3411_ACEOF
3412
3413fi
3414
3415# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3426                  inttypes.h stdint.h unistd.h
3427do
3428as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3429echo "$as_me:$LINENO: checking for $ac_header" >&5
3430echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3431if eval "test \"\${$as_ac_Header+set}\" = set"; then
3432  echo $ECHO_N "(cached) $ECHO_C" >&6
3433else
3434  cat >conftest.$ac_ext <<_ACEOF
3435/* confdefs.h.  */
3436_ACEOF
3437cat confdefs.h >>conftest.$ac_ext
3438cat >>conftest.$ac_ext <<_ACEOF
3439/* end confdefs.h.  */
3440$ac_includes_default
3441
3442#include <$ac_header>
3443_ACEOF
3444rm -f conftest.$ac_objext
3445if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3446  (eval $ac_compile) 2>conftest.er1
3447  ac_status=$?
3448  grep -v '^ *+' conftest.er1 >conftest.err
3449  rm -f conftest.er1
3450  cat conftest.err >&5
3451  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3452  (exit $ac_status); } &&
3453         { ac_try='test -z "$ac_c_werror_flag"
3454                         || test ! -s conftest.err'
3455  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3456  (eval $ac_try) 2>&5
3457  ac_status=$?
3458  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3459  (exit $ac_status); }; } &&
3460         { ac_try='test -s conftest.$ac_objext'
3461  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3462  (eval $ac_try) 2>&5
3463  ac_status=$?
3464  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3465  (exit $ac_status); }; }; then
3466  eval "$as_ac_Header=yes"
3467else
3468  echo "$as_me: failed program was:" >&5
3469sed 's/^/| /' conftest.$ac_ext >&5
3470
3471eval "$as_ac_Header=no"
3472fi
3473rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3474fi
3475echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3476echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3477if test `eval echo '${'$as_ac_Header'}'` = yes; then
3478  cat >>confdefs.h <<_ACEOF
3479#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3480_ACEOF
3481
3482fi
3483
3484done
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499for ac_header in unistd.h time.h math.h values.h iostream fstream sstream iomanip vector string algorithm functional
3500do
3501as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3502if eval "test \"\${$as_ac_Header+set}\" = set"; then
3503  echo "$as_me:$LINENO: checking for $ac_header" >&5
3504echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3505if eval "test \"\${$as_ac_Header+set}\" = set"; then
3506  echo $ECHO_N "(cached) $ECHO_C" >&6
3507fi
3508echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3509echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3510else
3511  # Is the header compilable?
3512echo "$as_me:$LINENO: checking $ac_header usability" >&5
3513echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3514cat >conftest.$ac_ext <<_ACEOF
3515/* confdefs.h.  */
3516_ACEOF
3517cat confdefs.h >>conftest.$ac_ext
3518cat >>conftest.$ac_ext <<_ACEOF
3519/* end confdefs.h.  */
3520$ac_includes_default
3521#include <$ac_header>
3522_ACEOF
3523rm -f conftest.$ac_objext
3524if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3525  (eval $ac_compile) 2>conftest.er1
3526  ac_status=$?
3527  grep -v '^ *+' conftest.er1 >conftest.err
3528  rm -f conftest.er1
3529  cat conftest.err >&5
3530  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3531  (exit $ac_status); } &&
3532         { ac_try='test -z "$ac_c_werror_flag"
3533                         || test ! -s conftest.err'
3534  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3535  (eval $ac_try) 2>&5
3536  ac_status=$?
3537  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3538  (exit $ac_status); }; } &&
3539         { ac_try='test -s conftest.$ac_objext'
3540  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3541  (eval $ac_try) 2>&5
3542  ac_status=$?
3543  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3544  (exit $ac_status); }; }; then
3545  ac_header_compiler=yes
3546else
3547  echo "$as_me: failed program was:" >&5
3548sed 's/^/| /' conftest.$ac_ext >&5
3549
3550ac_header_compiler=no
3551fi
3552rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3553echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3554echo "${ECHO_T}$ac_header_compiler" >&6
3555
3556# Is the header present?
3557echo "$as_me:$LINENO: checking $ac_header presence" >&5
3558echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3559cat >conftest.$ac_ext <<_ACEOF
3560/* confdefs.h.  */
3561_ACEOF
3562cat confdefs.h >>conftest.$ac_ext
3563cat >>conftest.$ac_ext <<_ACEOF
3564/* end confdefs.h.  */
3565#include <$ac_header>
3566_ACEOF
3567if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3568  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3569  ac_status=$?
3570  grep -v '^ *+' conftest.er1 >conftest.err
3571  rm -f conftest.er1
3572  cat conftest.err >&5
3573  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3574  (exit $ac_status); } >/dev/null; then
3575  if test -s conftest.err; then
3576    ac_cpp_err=$ac_c_preproc_warn_flag
3577    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3578  else
3579    ac_cpp_err=
3580  fi
3581else
3582  ac_cpp_err=yes
3583fi
3584if test -z "$ac_cpp_err"; then
3585  ac_header_preproc=yes
3586else
3587  echo "$as_me: failed program was:" >&5
3588sed 's/^/| /' conftest.$ac_ext >&5
3589
3590  ac_header_preproc=no
3591fi
3592rm -f conftest.err conftest.$ac_ext
3593echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3594echo "${ECHO_T}$ac_header_preproc" >&6
3595
3596# So?  What about this header?
3597case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3598  yes:no: )
3599    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3600echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3601    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
3602echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
3603    ac_header_preproc=yes
3604    ;;
3605  no:yes:* )
3606    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3607echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3608    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
3609echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
3610    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
3611echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
3612    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
3613echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
3614    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3615echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3616    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
3617echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
3618    (
3619      cat <<\_ASBOX
3620## --------------------------------------- ##
3621## Report this to Matthew.Whiting@csiro.au ##
3622## --------------------------------------- ##
3623_ASBOX
3624    ) |
3625      sed "s/^/$as_me: WARNING:     /" >&2
3626    ;;
3627esac
3628echo "$as_me:$LINENO: checking for $ac_header" >&5
3629echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3630if eval "test \"\${$as_ac_Header+set}\" = set"; then
3631  echo $ECHO_N "(cached) $ECHO_C" >&6
3632else
3633  eval "$as_ac_Header=\$ac_header_preproc"
3634fi
3635echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3636echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3637
3638fi
3639if test `eval echo '${'$as_ac_Header'}'` = yes; then
3640  cat >>confdefs.h <<_ACEOF
3641#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3642_ACEOF
3643
3644fi
3645
3646done
3647
3648if test "x$ac_cv_header_stdc" = xno; then
3649  { { echo "$as_me:$LINENO: error:
3650    -------------------------------------------------------------------
3651    An ANSI standard C library is required to build Duchamp.
3652    One of the ANSI C header files it requires is missing or unusable.
3653
3654    ERROR: Duchamp configuration failure.
3655    -------------------------------------------------------------------" >&5
3656echo "$as_me: error:
3657    -------------------------------------------------------------------
3658    An ANSI standard C library is required to build Duchamp.
3659    One of the ANSI C header files it requires is missing or unusable.
3660
3661    ERROR: Duchamp configuration failure.
3662    -------------------------------------------------------------------" >&2;}
3663   { (exit 1); exit 1; }; }
3664fi
3665
3666# Checks for typedefs, structures, and compiler characteristics.
3667echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
3668echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
3669if test "${ac_cv_header_stdbool_h+set}" = set; then
3670  echo $ECHO_N "(cached) $ECHO_C" >&6
3671else
3672  cat >conftest.$ac_ext <<_ACEOF
3673/* confdefs.h.  */
3674_ACEOF
3675cat confdefs.h >>conftest.$ac_ext
3676cat >>conftest.$ac_ext <<_ACEOF
3677/* end confdefs.h.  */
3678
3679#include <stdbool.h>
3680#ifndef bool
3681# error bool is not defined
3682#endif
3683#ifndef false
3684# error false is not defined
3685#endif
3686#if false
3687# error false is not 0
3688#endif
3689#ifndef true
3690# error true is not defined
3691#endif
3692#if true != 1
3693# error true is not 1
3694#endif
3695#ifndef __bool_true_false_are_defined
3696# error __bool_true_false_are_defined is not defined
3697#endif
3698
3699        struct s { _Bool s: 1; _Bool t; } s;
3700
3701        char a[true == 1 ? 1 : -1];
3702        char b[false == 0 ? 1 : -1];
3703        char c[__bool_true_false_are_defined == 1 ? 1 : -1];
3704        char d[(bool) -0.5 == true ? 1 : -1];
3705        bool e = &s;
3706        char f[(_Bool) -0.0 == false ? 1 : -1];
3707        char g[true];
3708        char h[sizeof (_Bool)];
3709        char i[sizeof s.t];
3710
3711int
3712main ()
3713{
3714 return !a + !b + !c + !d + !e + !f + !g + !h + !i;
3715  ;
3716  return 0;
3717}
3718_ACEOF
3719rm -f conftest.$ac_objext
3720if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3721  (eval $ac_compile) 2>conftest.er1
3722  ac_status=$?
3723  grep -v '^ *+' conftest.er1 >conftest.err
3724  rm -f conftest.er1
3725  cat conftest.err >&5
3726  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3727  (exit $ac_status); } &&
3728         { ac_try='test -z "$ac_c_werror_flag"
3729                         || test ! -s conftest.err'
3730  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3731  (eval $ac_try) 2>&5
3732  ac_status=$?
3733  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3734  (exit $ac_status); }; } &&
3735         { ac_try='test -s conftest.$ac_objext'
3736  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3737  (eval $ac_try) 2>&5
3738  ac_status=$?
3739  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3740  (exit $ac_status); }; }; then
3741  ac_cv_header_stdbool_h=yes
3742else
3743  echo "$as_me: failed program was:" >&5
3744sed 's/^/| /' conftest.$ac_ext >&5
3745
3746ac_cv_header_stdbool_h=no
3747fi
3748rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3749fi
3750echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
3751echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
3752echo "$as_me:$LINENO: checking for _Bool" >&5
3753echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
3754if test "${ac_cv_type__Bool+set}" = set; then
3755  echo $ECHO_N "(cached) $ECHO_C" >&6
3756else
3757  cat >conftest.$ac_ext <<_ACEOF
3758/* confdefs.h.  */
3759_ACEOF
3760cat confdefs.h >>conftest.$ac_ext
3761cat >>conftest.$ac_ext <<_ACEOF
3762/* end confdefs.h.  */
3763$ac_includes_default
3764int
3765main ()
3766{
3767if ((_Bool *) 0)
3768  return 0;
3769if (sizeof (_Bool))
3770  return 0;
3771  ;
3772  return 0;
3773}
3774_ACEOF
3775rm -f conftest.$ac_objext
3776if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3777  (eval $ac_compile) 2>conftest.er1
3778  ac_status=$?
3779  grep -v '^ *+' conftest.er1 >conftest.err
3780  rm -f conftest.er1
3781  cat conftest.err >&5
3782  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3783  (exit $ac_status); } &&
3784         { ac_try='test -z "$ac_c_werror_flag"
3785                         || test ! -s conftest.err'
3786  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3787  (eval $ac_try) 2>&5
3788  ac_status=$?
3789  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3790  (exit $ac_status); }; } &&
3791         { ac_try='test -s conftest.$ac_objext'
3792  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3793  (eval $ac_try) 2>&5
3794  ac_status=$?
3795  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3796  (exit $ac_status); }; }; then
3797  ac_cv_type__Bool=yes
3798else
3799  echo "$as_me: failed program was:" >&5
3800sed 's/^/| /' conftest.$ac_ext >&5
3801
3802ac_cv_type__Bool=no
3803fi
3804rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3805fi
3806echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
3807echo "${ECHO_T}$ac_cv_type__Bool" >&6
3808if test $ac_cv_type__Bool = yes; then
3809
3810cat >>confdefs.h <<_ACEOF
3811#define HAVE__BOOL 1
3812_ACEOF
3813
3814
3815fi
3816
3817if test $ac_cv_header_stdbool_h = yes; then
3818
3819cat >>confdefs.h <<\_ACEOF
3820#define HAVE_STDBOOL_H 1
3821_ACEOF
3822
3823fi
3824
3825echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3826echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3827if test "${ac_cv_c_const+set}" = set; then
3828  echo $ECHO_N "(cached) $ECHO_C" >&6
3829else
3830  cat >conftest.$ac_ext <<_ACEOF
3831/* confdefs.h.  */
3832_ACEOF
3833cat confdefs.h >>conftest.$ac_ext
3834cat >>conftest.$ac_ext <<_ACEOF
3835/* end confdefs.h.  */
3836
3837int
3838main ()
3839{
3840/* FIXME: Include the comments suggested by Paul. */
3841#ifndef __cplusplus
3842  /* Ultrix mips cc rejects this.  */
3843  typedef int charset[2];
3844  const charset x;
3845  /* SunOS 4.1.1 cc rejects this.  */
3846  char const *const *ccp;
3847  char **p;
3848  /* NEC SVR4.0.2 mips cc rejects this.  */
3849  struct point {int x, y;};
3850  static struct point const zero = {0,0};
3851  /* AIX XL C 1.02.0.0 rejects this.
3852     It does not let you subtract one const X* pointer from another in
3853     an arm of an if-expression whose if-part is not a constant
3854     expression */
3855  const char *g = "string";
3856  ccp = &g + (g ? g-g : 0);
3857  /* HPUX 7.0 cc rejects these. */
3858  ++ccp;
3859  p = (char**) ccp;
3860  ccp = (char const *const *) p;
3861  { /* SCO 3.2v4 cc rejects this.  */
3862    char *t;
3863    char const *s = 0 ? (char *) 0 : (char const *) 0;
3864
3865    *t++ = 0;
3866  }
3867  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3868    int x[] = {25, 17};
3869    const int *foo = &x[0];
3870    ++foo;
3871  }
3872  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3873    typedef const int *iptr;
3874    iptr p = 0;
3875    ++p;
3876  }
3877  { /* AIX XL C 1.02.0.0 rejects this saying
3878       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3879    struct s { int j; const int *ap[3]; };
3880    struct s *b; b->j = 5;
3881  }
3882  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3883    const int foo = 10;
3884  }
3885#endif
3886
3887  ;
3888  return 0;
3889}
3890_ACEOF
3891rm -f conftest.$ac_objext
3892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3893  (eval $ac_compile) 2>conftest.er1
3894  ac_status=$?
3895  grep -v '^ *+' conftest.er1 >conftest.err
3896  rm -f conftest.er1
3897  cat conftest.err >&5
3898  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3899  (exit $ac_status); } &&
3900         { ac_try='test -z "$ac_c_werror_flag"
3901                         || test ! -s conftest.err'
3902  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3903  (eval $ac_try) 2>&5
3904  ac_status=$?
3905  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3906  (exit $ac_status); }; } &&
3907         { ac_try='test -s conftest.$ac_objext'
3908  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3909  (eval $ac_try) 2>&5
3910  ac_status=$?
3911  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3912  (exit $ac_status); }; }; then
3913  ac_cv_c_const=yes
3914else
3915  echo "$as_me: failed program was:" >&5
3916sed 's/^/| /' conftest.$ac_ext >&5
3917
3918ac_cv_c_const=no
3919fi
3920rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3921fi
3922echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3923echo "${ECHO_T}$ac_cv_c_const" >&6
3924if test $ac_cv_c_const = no; then
3925
3926cat >>confdefs.h <<\_ACEOF
3927#define const
3928_ACEOF
3929
3930fi
3931
3932echo "$as_me:$LINENO: checking for inline" >&5
3933echo $ECHO_N "checking for inline... $ECHO_C" >&6
3934if test "${ac_cv_c_inline+set}" = set; then
3935  echo $ECHO_N "(cached) $ECHO_C" >&6
3936else
3937  ac_cv_c_inline=no
3938for ac_kw in inline __inline__ __inline; do
3939  cat >conftest.$ac_ext <<_ACEOF
3940/* confdefs.h.  */
3941_ACEOF
3942cat confdefs.h >>conftest.$ac_ext
3943cat >>conftest.$ac_ext <<_ACEOF
3944/* end confdefs.h.  */
3945#ifndef __cplusplus
3946typedef int foo_t;
3947static $ac_kw foo_t static_foo () {return 0; }
3948$ac_kw foo_t foo () {return 0; }
3949#endif
3950
3951_ACEOF
3952rm -f conftest.$ac_objext
3953if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3954  (eval $ac_compile) 2>conftest.er1
3955  ac_status=$?
3956  grep -v '^ *+' conftest.er1 >conftest.err
3957  rm -f conftest.er1
3958  cat conftest.err >&5
3959  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3960  (exit $ac_status); } &&
3961         { ac_try='test -z "$ac_c_werror_flag"
3962                         || test ! -s conftest.err'
3963  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3964  (eval $ac_try) 2>&5
3965  ac_status=$?
3966  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3967  (exit $ac_status); }; } &&
3968         { ac_try='test -s conftest.$ac_objext'
3969  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3970  (eval $ac_try) 2>&5
3971  ac_status=$?
3972  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3973  (exit $ac_status); }; }; then
3974  ac_cv_c_inline=$ac_kw; break
3975else
3976  echo "$as_me: failed program was:" >&5
3977sed 's/^/| /' conftest.$ac_ext >&5
3978
3979fi
3980rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3981done
3982
3983fi
3984echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3985echo "${ECHO_T}$ac_cv_c_inline" >&6
3986
3987
3988case $ac_cv_c_inline in
3989  inline | yes) ;;
3990  *)
3991    case $ac_cv_c_inline in
3992      no) ac_val=;;
3993      *) ac_val=$ac_cv_c_inline;;
3994    esac
3995    cat >>confdefs.h <<_ACEOF
3996#ifndef __cplusplus
3997#define inline $ac_val
3998#endif
3999_ACEOF
4000    ;;
4001esac
4002
4003
4004# Utilities.
4005if test -n "$ac_tool_prefix"; then
4006  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4007set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4008echo "$as_me:$LINENO: checking for $ac_word" >&5
4009echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4010if test "${ac_cv_prog_RANLIB+set}" = set; then
4011  echo $ECHO_N "(cached) $ECHO_C" >&6
4012else
4013  if test -n "$RANLIB"; then
4014  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4015else
4016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4017for as_dir in $PATH
4018do
4019  IFS=$as_save_IFS
4020  test -z "$as_dir" && as_dir=.
4021  for ac_exec_ext in '' $ac_executable_extensions; do
4022  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4023    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4024    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4025    break 2
4026  fi
4027done
4028done
4029
4030fi
4031fi
4032RANLIB=$ac_cv_prog_RANLIB
4033if test -n "$RANLIB"; then
4034  echo "$as_me:$LINENO: result: $RANLIB" >&5
4035echo "${ECHO_T}$RANLIB" >&6
4036else
4037  echo "$as_me:$LINENO: result: no" >&5
4038echo "${ECHO_T}no" >&6
4039fi
4040
4041fi
4042if test -z "$ac_cv_prog_RANLIB"; then
4043  ac_ct_RANLIB=$RANLIB
4044  # Extract the first word of "ranlib", so it can be a program name with args.
4045set dummy ranlib; ac_word=$2
4046echo "$as_me:$LINENO: checking for $ac_word" >&5
4047echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4048if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4049  echo $ECHO_N "(cached) $ECHO_C" >&6
4050else
4051  if test -n "$ac_ct_RANLIB"; then
4052  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4053else
4054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4055for as_dir in $PATH
4056do
4057  IFS=$as_save_IFS
4058  test -z "$as_dir" && as_dir=.
4059  for ac_exec_ext in '' $ac_executable_extensions; do
4060  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4061    ac_cv_prog_ac_ct_RANLIB="ranlib"
4062    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4063    break 2
4064  fi
4065done
4066done
4067
4068  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4069fi
4070fi
4071ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4072if test -n "$ac_ct_RANLIB"; then
4073  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4074echo "${ECHO_T}$ac_ct_RANLIB" >&6
4075else
4076  echo "$as_me:$LINENO: result: no" >&5
4077echo "${ECHO_T}no" >&6
4078fi
4079
4080  RANLIB=$ac_ct_RANLIB
4081else
4082  RANLIB="$ac_cv_prog_RANLIB"
4083fi
4084
4085
4086# Checks for library functions.
4087echo "$as_me:$LINENO: checking for working strtod" >&5
4088echo $ECHO_N "checking for working strtod... $ECHO_C" >&6
4089if test "${ac_cv_func_strtod+set}" = set; then
4090  echo $ECHO_N "(cached) $ECHO_C" >&6
4091else
4092  if test "$cross_compiling" = yes; then
4093  ac_cv_func_strtod=no
4094else
4095  cat >conftest.$ac_ext <<_ACEOF
4096/* confdefs.h.  */
4097_ACEOF
4098cat confdefs.h >>conftest.$ac_ext
4099cat >>conftest.$ac_ext <<_ACEOF
4100/* end confdefs.h.  */
4101
4102double strtod ();
4103int
4104main()
4105{
4106  {
4107    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
4108    char *string = " +69";
4109    char *term;
4110    double value;
4111    value = strtod (string, &term);
4112    if (value != 69 || term != (string + 4))
4113      exit (1);
4114  }
4115
4116  {
4117    /* Under Solaris 2.4, strtod returns the wrong value for the
4118       terminating character under some conditions.  */
4119    char *string = "NaN";
4120    char *term;
4121    strtod (string, &term);
4122    if (term != string && *(term - 1) == 0)
4123      exit (1);
4124  }
4125  exit (0);
4126}
4127
4128_ACEOF
4129rm -f conftest$ac_exeext
4130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4131  (eval $ac_link) 2>&5
4132  ac_status=$?
4133  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4134  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4135  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4136  (eval $ac_try) 2>&5
4137  ac_status=$?
4138  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4139  (exit $ac_status); }; }; then
4140  ac_cv_func_strtod=yes
4141else
4142  echo "$as_me: program exited with status $ac_status" >&5
4143echo "$as_me: failed program was:" >&5
4144sed 's/^/| /' conftest.$ac_ext >&5
4145
4146( exit $ac_status )
4147ac_cv_func_strtod=no
4148fi
4149rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4150fi
4151fi
4152echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
4153echo "${ECHO_T}$ac_cv_func_strtod" >&6
4154if test $ac_cv_func_strtod = no; then
4155  case $LIBOBJS in
4156    "strtod.$ac_objext"   | \
4157  *" strtod.$ac_objext"   | \
4158    "strtod.$ac_objext "* | \
4159  *" strtod.$ac_objext "* ) ;;
4160  *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;;
4161esac
4162
4163echo "$as_me:$LINENO: checking for pow" >&5
4164echo $ECHO_N "checking for pow... $ECHO_C" >&6
4165if test "${ac_cv_func_pow+set}" = set; then
4166  echo $ECHO_N "(cached) $ECHO_C" >&6
4167else
4168  cat >conftest.$ac_ext <<_ACEOF
4169/* confdefs.h.  */
4170_ACEOF
4171cat confdefs.h >>conftest.$ac_ext
4172cat >>conftest.$ac_ext <<_ACEOF
4173/* end confdefs.h.  */
4174/* Define pow to an innocuous variant, in case <limits.h> declares pow.
4175   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4176#define pow innocuous_pow
4177
4178/* System header to define __stub macros and hopefully few prototypes,
4179    which can conflict with char pow (); below.
4180    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4181    <limits.h> exists even on freestanding compilers.  */
4182
4183#ifdef __STDC__
4184# include <limits.h>
4185#else
4186# include <assert.h>
4187#endif
4188
4189#undef pow
4190
4191/* Override any gcc2 internal prototype to avoid an error.  */
4192#ifdef __cplusplus
4193extern "C"
4194{
4195#endif
4196/* We use char because int might match the return type of a gcc2
4197   builtin and then its argument prototype would still apply.  */
4198char pow ();
4199/* The GNU C library defines this for functions which it implements
4200    to always fail with ENOSYS.  Some functions are actually named
4201    something starting with __ and the normal name is an alias.  */
4202#if defined (__stub_pow) || defined (__stub___pow)
4203choke me
4204#else
4205char (*f) () = pow;
4206#endif
4207#ifdef __cplusplus
4208}
4209#endif
4210
4211int
4212main ()
4213{
4214return f != pow;
4215  ;
4216  return 0;
4217}
4218_ACEOF
4219rm -f conftest.$ac_objext conftest$ac_exeext
4220if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4221  (eval $ac_link) 2>conftest.er1
4222  ac_status=$?
4223  grep -v '^ *+' conftest.er1 >conftest.err
4224  rm -f conftest.er1
4225  cat conftest.err >&5
4226  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4227  (exit $ac_status); } &&
4228         { ac_try='test -z "$ac_c_werror_flag"
4229                         || test ! -s conftest.err'
4230  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4231  (eval $ac_try) 2>&5
4232  ac_status=$?
4233  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4234  (exit $ac_status); }; } &&
4235         { ac_try='test -s conftest$ac_exeext'
4236  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4237  (eval $ac_try) 2>&5
4238  ac_status=$?
4239  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4240  (exit $ac_status); }; }; then
4241  ac_cv_func_pow=yes
4242else
4243  echo "$as_me: failed program was:" >&5
4244sed 's/^/| /' conftest.$ac_ext >&5
4245
4246ac_cv_func_pow=no
4247fi
4248rm -f conftest.err conftest.$ac_objext \
4249      conftest$ac_exeext conftest.$ac_ext
4250fi
4251echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5
4252echo "${ECHO_T}$ac_cv_func_pow" >&6
4253
4254if test $ac_cv_func_pow = no; then
4255  echo "$as_me:$LINENO: checking for pow in -lm" >&5
4256echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6
4257if test "${ac_cv_lib_m_pow+set}" = set; then
4258  echo $ECHO_N "(cached) $ECHO_C" >&6
4259else
4260  ac_check_lib_save_LIBS=$LIBS
4261LIBS="-lm  $LIBS"
4262cat >conftest.$ac_ext <<_ACEOF
4263/* confdefs.h.  */
4264_ACEOF
4265cat confdefs.h >>conftest.$ac_ext
4266cat >>conftest.$ac_ext <<_ACEOF
4267/* end confdefs.h.  */
4268
4269/* Override any gcc2 internal prototype to avoid an error.  */
4270#ifdef __cplusplus
4271extern "C"
4272#endif
4273/* We use char because int might match the return type of a gcc2
4274   builtin and then its argument prototype would still apply.  */
4275char pow ();
4276int
4277main ()
4278{
4279pow ();
4280  ;
4281  return 0;
4282}
4283_ACEOF
4284rm -f conftest.$ac_objext conftest$ac_exeext
4285if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4286  (eval $ac_link) 2>conftest.er1
4287  ac_status=$?
4288  grep -v '^ *+' conftest.er1 >conftest.err
4289  rm -f conftest.er1
4290  cat conftest.err >&5
4291  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4292  (exit $ac_status); } &&
4293         { ac_try='test -z "$ac_c_werror_flag"
4294                         || test ! -s conftest.err'
4295  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4296  (eval $ac_try) 2>&5
4297  ac_status=$?
4298  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4299  (exit $ac_status); }; } &&
4300         { ac_try='test -s conftest$ac_exeext'
4301  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4302  (eval $ac_try) 2>&5
4303  ac_status=$?
4304  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4305  (exit $ac_status); }; }; then
4306  ac_cv_lib_m_pow=yes
4307else
4308  echo "$as_me: failed program was:" >&5
4309sed 's/^/| /' conftest.$ac_ext >&5
4310
4311ac_cv_lib_m_pow=no
4312fi
4313rm -f conftest.err conftest.$ac_objext \
4314      conftest$ac_exeext conftest.$ac_ext
4315LIBS=$ac_check_lib_save_LIBS
4316fi
4317echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5
4318echo "${ECHO_T}$ac_cv_lib_m_pow" >&6
4319if test $ac_cv_lib_m_pow = yes; then
4320  POW_LIB=-lm
4321else
4322  { echo "$as_me:$LINENO: WARNING: cannot find library containing definition of pow" >&5
4323echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
4324fi
4325
4326fi
4327
4328fi
4329
4330
4331
4332
4333
4334
4335
4336
4337for ac_func in floor pow sqrt strtol log atan fabs
4338do
4339as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4340echo "$as_me:$LINENO: checking for $ac_func" >&5
4341echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4342if eval "test \"\${$as_ac_var+set}\" = set"; then
4343  echo $ECHO_N "(cached) $ECHO_C" >&6
4344else
4345  cat >conftest.$ac_ext <<_ACEOF
4346/* confdefs.h.  */
4347_ACEOF
4348cat confdefs.h >>conftest.$ac_ext
4349cat >>conftest.$ac_ext <<_ACEOF
4350/* end confdefs.h.  */
4351/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4352   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4353#define $ac_func innocuous_$ac_func
4354
4355/* System header to define __stub macros and hopefully few prototypes,
4356    which can conflict with char $ac_func (); below.
4357    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4358    <limits.h> exists even on freestanding compilers.  */
4359
4360#ifdef __STDC__
4361# include <limits.h>
4362#else
4363# include <assert.h>
4364#endif
4365
4366#undef $ac_func
4367
4368/* Override any gcc2 internal prototype to avoid an error.  */
4369#ifdef __cplusplus
4370extern "C"
4371{
4372#endif
4373/* We use char because int might match the return type of a gcc2
4374   builtin and then its argument prototype would still apply.  */
4375char $ac_func ();
4376/* The GNU C library defines this for functions which it implements
4377    to always fail with ENOSYS.  Some functions are actually named
4378    something starting with __ and the normal name is an alias.  */
4379#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4380choke me
4381#else
4382char (*f) () = $ac_func;
4383#endif
4384#ifdef __cplusplus
4385}
4386#endif
4387
4388int
4389main ()
4390{
4391return f != $ac_func;
4392  ;
4393  return 0;
4394}
4395_ACEOF
4396rm -f conftest.$ac_objext conftest$ac_exeext
4397if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4398  (eval $ac_link) 2>conftest.er1
4399  ac_status=$?
4400  grep -v '^ *+' conftest.er1 >conftest.err
4401  rm -f conftest.er1
4402  cat conftest.err >&5
4403  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4404  (exit $ac_status); } &&
4405         { ac_try='test -z "$ac_c_werror_flag"
4406                         || test ! -s conftest.err'
4407  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4408  (eval $ac_try) 2>&5
4409  ac_status=$?
4410  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4411  (exit $ac_status); }; } &&
4412         { ac_try='test -s conftest$ac_exeext'
4413  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4414  (eval $ac_try) 2>&5
4415  ac_status=$?
4416  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4417  (exit $ac_status); }; }; then
4418  eval "$as_ac_var=yes"
4419else
4420  echo "$as_me: failed program was:" >&5
4421sed 's/^/| /' conftest.$ac_ext >&5
4422
4423eval "$as_ac_var=no"
4424fi
4425rm -f conftest.err conftest.$ac_objext \
4426      conftest$ac_exeext conftest.$ac_ext
4427fi
4428echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4429echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4430if test `eval echo '${'$as_ac_var'}'` = yes; then
4431  cat >>confdefs.h <<_ACEOF
4432#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4433_ACEOF
4434
4435fi
4436done
4437
4438
4439# Extra places to look for third-party include files and libraries.
4440INCDIRS="$INCDIRS           \
4441         /usr/include       \
4442         /usr/local/include \
4443         /usr/local/pgplot  \
4444         /usr/local/cfitsio \
4445         /usr/local/wcslib  \
4446         /local/pgplot      \
4447         /local/cfitsio     \
4448         /opt/local/include"
4449
4450LIBDIRS="$LIBDIRS           \
4451         /usr/lib           \
4452         /usr/local/lib     \
4453         /usr/local/pgplot  \
4454         /usr/local/cfitsio \
4455         /usr/local/wcslib  \
4456         /local/lib         \
4457         /local/pgplot      \
4458         /local/cfitsio     \
4459         /opt/SUNWspro/lib  \
4460         /opt/local/lib"
4461
4462{ echo "$as_me:$LINENO: LIBDIRS" >&5
4463echo "$as_me: LIBDIRS" >&6;}
4464
4465for LIBDIR in $LIBDIRS ; do
4466  as_ac_File=`echo "ac_cv_file_$LIBDIR" | $as_tr_sh`
4467echo "$as_me:$LINENO: checking for $LIBDIR" >&5
4468echo $ECHO_N "checking for $LIBDIR... $ECHO_C" >&6
4469if eval "test \"\${$as_ac_File+set}\" = set"; then
4470  echo $ECHO_N "(cached) $ECHO_C" >&6
4471else
4472  test "$cross_compiling" = yes &&
4473  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4474echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4475   { (exit 1); exit 1; }; }
4476if test -r "$LIBDIR"; then
4477  eval "$as_ac_File=yes"
4478else
4479  eval "$as_ac_File=no"
4480fi
4481fi
4482echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4483echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4484if test `eval echo '${'$as_ac_File'}'` = yes; then
4485  LDFLAGS="$LDFLAGS -L$LIBDIR"
4486else
4487  continue
4488fi
4489
4490done
4491
4492##########################################################################
4493# Search for PGPLOT
4494# use --with-cfitsio=directory to specify a particular PGPLOT directory.
4495# or  --without-pgplot or --with-pgplot=no to do without it
4496# else do the normal searching for libraries.
4497
4498{ echo "$as_me:$LINENO:   -- PGPLOT -- " >&5
4499echo "$as_me:   -- PGPLOT -- " >&6;}
4500
4501# Check whether --with-pgplot or --without-pgplot was given.
4502if test "${with_pgplot+set}" = set; then
4503  withval="$with_pgplot"
4504
4505if test "x$withval" != xno; then
4506{ echo "$as_me:$LINENO: Using directory \"$withval\"" >&5
4507echo "$as_me: Using directory \"$withval\"" >&6;}
4508PGPLOTINCDIRS=$withval
4509PGPLOTLIBDIRS=$withval
4510LDFLAGS="$LDFLAGS -L$withval"
4511fi
4512
4513else
4514
4515PGPLOTINCDIRS=$INCDIRS
4516PGPLOTLIBDIRS=$LIBDIRS
4517
4518fi;
4519
4520if test "x$PGPLOTLIBDIRS" = x; then
4521  #the argument to --with-pgplot was no, so we don't look for it.
4522  { echo "$as_me:$LINENO: Not enabling PGPLOT use." >&5
4523echo "$as_me: Not enabling PGPLOT use." >&6;}
4524  #This is the command to do the linking stage of the compilation
4525  #If no pgplot, we can just link with g++ (or equivalent)
4526  LINKER=$CXX
4527#  AC_CHECK_LIB([stdc++], [main], [PGPLOTLIB="-lstdc++"])
4528#  if test "x$F77" = xgfortran; then
4529#    PGPLOTLIB="$PGPLOTLIB -bind_at_load"
4530#  fi
4531else
4532
4533  #Set up the PGPLOT-related libraries and includes.
4534
4535  for INCDIR in $PGPLOTINCDIRS ; do
4536    as_ac_File=`echo "ac_cv_file_$INCDIR/cpgplot.h" | $as_tr_sh`
4537echo "$as_me:$LINENO: checking for $INCDIR/cpgplot.h" >&5
4538echo $ECHO_N "checking for $INCDIR/cpgplot.h... $ECHO_C" >&6
4539if eval "test \"\${$as_ac_File+set}\" = set"; then
4540  echo $ECHO_N "(cached) $ECHO_C" >&6
4541else
4542  test "$cross_compiling" = yes &&
4543  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4544echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4545   { (exit 1); exit 1; }; }
4546if test -r "$INCDIR/cpgplot.h"; then
4547  eval "$as_ac_File=yes"
4548else
4549  eval "$as_ac_File=no"
4550fi
4551fi
4552echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4553echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4554if test `eval echo '${'$as_ac_File'}'` = yes; then
4555  PGPLOTINC=-I$INCDIR; break
4556fi
4557
4558    INCDIR=$INCDIR/pgplot
4559    as_ac_File=`echo "ac_cv_file_$INCDIR/cpgplot.h" | $as_tr_sh`
4560echo "$as_me:$LINENO: checking for $INCDIR/cpgplot.h" >&5
4561echo $ECHO_N "checking for $INCDIR/cpgplot.h... $ECHO_C" >&6
4562if eval "test \"\${$as_ac_File+set}\" = set"; then
4563  echo $ECHO_N "(cached) $ECHO_C" >&6
4564else
4565  test "$cross_compiling" = yes &&
4566  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4567echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4568   { (exit 1); exit 1; }; }
4569if test -r "$INCDIR/cpgplot.h"; then
4570  eval "$as_ac_File=yes"
4571else
4572  eval "$as_ac_File=no"
4573fi
4574fi
4575echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4576echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4577if test `eval echo '${'$as_ac_File'}'` = yes; then
4578  PGPLOTINC=-I$INCDIR; break
4579fi
4580
4581  done
4582
4583  # PGPLOT compiled with a SUN compiler but linked with something else.
4584  echo "$as_me:$LINENO: checking for cosd in -lsunmath" >&5
4585echo $ECHO_N "checking for cosd in -lsunmath... $ECHO_C" >&6
4586if test "${ac_cv_lib_sunmath_cosd+set}" = set; then
4587  echo $ECHO_N "(cached) $ECHO_C" >&6
4588else
4589  ac_check_lib_save_LIBS=$LIBS
4590LIBS="-lsunmath $EXTRAPGLIB $LIBS $LIBS"
4591cat >conftest.$ac_ext <<_ACEOF
4592/* confdefs.h.  */
4593_ACEOF
4594cat confdefs.h >>conftest.$ac_ext
4595cat >>conftest.$ac_ext <<_ACEOF
4596/* end confdefs.h.  */
4597
4598/* Override any gcc2 internal prototype to avoid an error.  */
4599#ifdef __cplusplus
4600extern "C"
4601#endif
4602/* We use char because int might match the return type of a gcc2
4603   builtin and then its argument prototype would still apply.  */
4604char cosd ();
4605int
4606main ()
4607{
4608cosd ();
4609  ;
4610  return 0;
4611}
4612_ACEOF
4613rm -f conftest.$ac_objext conftest$ac_exeext
4614if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4615  (eval $ac_link) 2>conftest.er1
4616  ac_status=$?
4617  grep -v '^ *+' conftest.er1 >conftest.err
4618  rm -f conftest.er1
4619  cat conftest.err >&5
4620  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4621  (exit $ac_status); } &&
4622         { ac_try='test -z "$ac_c_werror_flag"
4623                         || test ! -s conftest.err'
4624  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4625  (eval $ac_try) 2>&5
4626  ac_status=$?
4627  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4628  (exit $ac_status); }; } &&
4629         { ac_try='test -s conftest$ac_exeext'
4630  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4631  (eval $ac_try) 2>&5
4632  ac_status=$?
4633  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4634  (exit $ac_status); }; }; then
4635  ac_cv_lib_sunmath_cosd=yes
4636else
4637  echo "$as_me: failed program was:" >&5
4638sed 's/^/| /' conftest.$ac_ext >&5
4639
4640ac_cv_lib_sunmath_cosd=no
4641fi
4642rm -f conftest.err conftest.$ac_objext \
4643      conftest$ac_exeext conftest.$ac_ext
4644LIBS=$ac_check_lib_save_LIBS
4645fi
4646echo "$as_me:$LINENO: result: $ac_cv_lib_sunmath_cosd" >&5
4647echo "${ECHO_T}$ac_cv_lib_sunmath_cosd" >&6
4648if test $ac_cv_lib_sunmath_cosd = yes; then
4649  EXTRAPGLIB="-lsunmath $EXTRAPGLIB"
4650fi
4651
4652  echo "$as_me:$LINENO: checking for iand_ in -lM77" >&5
4653echo $ECHO_N "checking for iand_ in -lM77... $ECHO_C" >&6
4654if test "${ac_cv_lib_M77_iand_+set}" = set; then
4655  echo $ECHO_N "(cached) $ECHO_C" >&6
4656else
4657  ac_check_lib_save_LIBS=$LIBS
4658LIBS="-lM77 $EXTRAPGLIB $LIBS $LIBS"
4659cat >conftest.$ac_ext <<_ACEOF
4660/* confdefs.h.  */
4661_ACEOF
4662cat confdefs.h >>conftest.$ac_ext
4663cat >>conftest.$ac_ext <<_ACEOF
4664/* end confdefs.h.  */
4665
4666/* Override any gcc2 internal prototype to avoid an error.  */
4667#ifdef __cplusplus
4668extern "C"
4669#endif
4670/* We use char because int might match the return type of a gcc2
4671   builtin and then its argument prototype would still apply.  */
4672char iand_ ();
4673int
4674main ()
4675{
4676iand_ ();
4677  ;
4678  return 0;
4679}
4680_ACEOF
4681rm -f conftest.$ac_objext conftest$ac_exeext
4682if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4683  (eval $ac_link) 2>conftest.er1
4684  ac_status=$?
4685  grep -v '^ *+' conftest.er1 >conftest.err
4686  rm -f conftest.er1
4687  cat conftest.err >&5
4688  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4689  (exit $ac_status); } &&
4690         { ac_try='test -z "$ac_c_werror_flag"
4691                         || test ! -s conftest.err'
4692  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4693  (eval $ac_try) 2>&5
4694  ac_status=$?
4695  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4696  (exit $ac_status); }; } &&
4697         { ac_try='test -s conftest$ac_exeext'
4698  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4699  (eval $ac_try) 2>&5
4700  ac_status=$?
4701  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4702  (exit $ac_status); }; }; then
4703  ac_cv_lib_M77_iand_=yes
4704else
4705  echo "$as_me: failed program was:" >&5
4706sed 's/^/| /' conftest.$ac_ext >&5
4707
4708ac_cv_lib_M77_iand_=no
4709fi
4710rm -f conftest.err conftest.$ac_objext \
4711      conftest$ac_exeext conftest.$ac_ext
4712LIBS=$ac_check_lib_save_LIBS
4713fi
4714echo "$as_me:$LINENO: result: $ac_cv_lib_M77_iand_" >&5
4715echo "${ECHO_T}$ac_cv_lib_M77_iand_" >&6
4716if test $ac_cv_lib_M77_iand_ = yes; then
4717  EXTRAPGLIB="-lM77 $EXTRAPGLIB"
4718fi
4719
4720  echo "$as_me:$LINENO: checking for f77_init in -lF77" >&5
4721echo $ECHO_N "checking for f77_init in -lF77... $ECHO_C" >&6
4722if test "${ac_cv_lib_F77_f77_init+set}" = set; then
4723  echo $ECHO_N "(cached) $ECHO_C" >&6
4724else
4725  ac_check_lib_save_LIBS=$LIBS
4726LIBS="-lF77 $EXTRAPGLIB $LIBS $LIBS"
4727cat >conftest.$ac_ext <<_ACEOF
4728/* confdefs.h.  */
4729_ACEOF
4730cat confdefs.h >>conftest.$ac_ext
4731cat >>conftest.$ac_ext <<_ACEOF
4732/* end confdefs.h.  */
4733
4734/* Override any gcc2 internal prototype to avoid an error.  */
4735#ifdef __cplusplus
4736extern "C"
4737#endif
4738/* We use char because int might match the return type of a gcc2
4739   builtin and then its argument prototype would still apply.  */
4740char f77_init ();
4741int
4742main ()
4743{
4744f77_init ();
4745  ;
4746  return 0;
4747}
4748_ACEOF
4749rm -f conftest.$ac_objext conftest$ac_exeext
4750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4751  (eval $ac_link) 2>conftest.er1
4752  ac_status=$?
4753  grep -v '^ *+' conftest.er1 >conftest.err
4754  rm -f conftest.er1
4755  cat conftest.err >&5
4756  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4757  (exit $ac_status); } &&
4758         { ac_try='test -z "$ac_c_werror_flag"
4759                         || test ! -s conftest.err'
4760  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4761  (eval $ac_try) 2>&5
4762  ac_status=$?
4763  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4764  (exit $ac_status); }; } &&
4765         { ac_try='test -s conftest$ac_exeext'
4766  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4767  (eval $ac_try) 2>&5
4768  ac_status=$?
4769  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4770  (exit $ac_status); }; }; then
4771  ac_cv_lib_F77_f77_init=yes
4772else
4773  echo "$as_me: failed program was:" >&5
4774sed 's/^/| /' conftest.$ac_ext >&5
4775
4776ac_cv_lib_F77_f77_init=no
4777fi
4778rm -f conftest.err conftest.$ac_objext \
4779      conftest$ac_exeext conftest.$ac_ext
4780LIBS=$ac_check_lib_save_LIBS
4781fi
4782echo "$as_me:$LINENO: result: $ac_cv_lib_F77_f77_init" >&5
4783echo "${ECHO_T}$ac_cv_lib_F77_f77_init" >&6
4784if test $ac_cv_lib_F77_f77_init = yes; then
4785  EXTRAPGLIB="-lF77 $EXTRAPGLIB"
4786fi
4787
4788
4789  # Search for X11 includes and libraries.
4790  echo "$as_me:$LINENO: checking for X" >&5
4791echo $ECHO_N "checking for X... $ECHO_C" >&6
4792
4793
4794# Check whether --with-x or --without-x was given.
4795if test "${with_x+set}" = set; then
4796  withval="$with_x"
4797
4798fi;
4799# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4800if test "x$with_x" = xno; then
4801  # The user explicitly disabled X.
4802  have_x=disabled
4803else
4804  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4805    # Both variables are already set.
4806    have_x=yes
4807  else
4808    if test "${ac_cv_have_x+set}" = set; then
4809  echo $ECHO_N "(cached) $ECHO_C" >&6
4810else
4811  # One or both of the vars are not set, and there is no cached value.
4812ac_x_includes=no ac_x_libraries=no
4813rm -fr conftest.dir
4814if mkdir conftest.dir; then
4815  cd conftest.dir
4816  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4817  cat >Imakefile <<'_ACEOF'
4818acfindx:
4819        @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4820_ACEOF
4821  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4822    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4823    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4824    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4825    for ac_extension in a so sl; do
4826      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4827         test -f $ac_im_libdir/libX11.$ac_extension; then
4828        ac_im_usrlibdir=$ac_im_libdir; break
4829      fi
4830    done
4831    # Screen out bogus values from the imake configuration.  They are
4832    # bogus both because they are the default anyway, and because
4833    # using them would break gcc on systems where it needs fixed includes.
4834    case $ac_im_incroot in
4835        /usr/include) ;;
4836        *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4837    esac
4838    case $ac_im_usrlibdir in
4839        /usr/lib | /lib) ;;
4840        *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4841    esac
4842  fi
4843  cd ..
4844  rm -fr conftest.dir
4845fi
4846
4847# Standard set of common directories for X headers.
4848# Check X11 before X11Rn because it is often a symlink to the current release.
4849ac_x_header_dirs='
4850/usr/X11/include
4851/usr/X11R6/include
4852/usr/X11R5/include
4853/usr/X11R4/include
4854
4855/usr/include/X11
4856/usr/include/X11R6
4857/usr/include/X11R5
4858/usr/include/X11R4
4859
4860/usr/local/X11/include
4861/usr/local/X11R6/include
4862/usr/local/X11R5/include
4863/usr/local/X11R4/include
4864
4865/usr/local/include/X11
4866/usr/local/include/X11R6
4867/usr/local/include/X11R5
4868/usr/local/include/X11R4
4869
4870/usr/X386/include
4871/usr/x386/include
4872/usr/XFree86/include/X11
4873
4874/usr/include
4875/usr/local/include
4876/usr/unsupported/include
4877/usr/athena/include
4878/usr/local/x11r5/include
4879/usr/lpp/Xamples/include
4880
4881/usr/openwin/include
4882/usr/openwin/share/include'
4883
4884if test "$ac_x_includes" = no; then
4885  # Guess where to find include files, by looking for Intrinsic.h.
4886  # First, try using that file with no special directory specified.
4887  cat >conftest.$ac_ext <<_ACEOF
4888/* confdefs.h.  */
4889_ACEOF
4890cat confdefs.h >>conftest.$ac_ext
4891cat >>conftest.$ac_ext <<_ACEOF
4892/* end confdefs.h.  */
4893#include <X11/Intrinsic.h>
4894_ACEOF
4895if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4896  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4897  ac_status=$?
4898  grep -v '^ *+' conftest.er1 >conftest.err
4899  rm -f conftest.er1
4900  cat conftest.err >&5
4901  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4902  (exit $ac_status); } >/dev/null; then
4903  if test -s conftest.err; then
4904    ac_cpp_err=$ac_c_preproc_warn_flag
4905    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4906  else
4907    ac_cpp_err=
4908  fi
4909else
4910  ac_cpp_err=yes
4911fi
4912if test -z "$ac_cpp_err"; then
4913  # We can compile using X headers with no special include directory.
4914ac_x_includes=
4915else
4916  echo "$as_me: failed program was:" >&5
4917sed 's/^/| /' conftest.$ac_ext >&5
4918
4919  for ac_dir in $ac_x_header_dirs; do
4920  if test -r "$ac_dir/X11/Intrinsic.h"; then
4921    ac_x_includes=$ac_dir
4922    break
4923  fi
4924done
4925fi
4926rm -f conftest.err conftest.$ac_ext
4927fi # $ac_x_includes = no
4928
4929if test "$ac_x_libraries" = no; then
4930  # Check for the libraries.
4931  # See if we find them without any special options.
4932  # Don't add to $LIBS permanently.
4933  ac_save_LIBS=$LIBS
4934  LIBS="-lXt $LIBS"
4935  cat >conftest.$ac_ext <<_ACEOF
4936/* confdefs.h.  */
4937_ACEOF
4938cat confdefs.h >>conftest.$ac_ext
4939cat >>conftest.$ac_ext <<_ACEOF
4940/* end confdefs.h.  */
4941#include <X11/Intrinsic.h>
4942int
4943main ()
4944{
4945XtMalloc (0)
4946  ;
4947  return 0;
4948}
4949_ACEOF
4950rm -f conftest.$ac_objext conftest$ac_exeext
4951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4952  (eval $ac_link) 2>conftest.er1
4953  ac_status=$?
4954  grep -v '^ *+' conftest.er1 >conftest.err
4955  rm -f conftest.er1
4956  cat conftest.err >&5
4957  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4958  (exit $ac_status); } &&
4959         { ac_try='test -z "$ac_c_werror_flag"
4960                         || test ! -s conftest.err'
4961  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4962  (eval $ac_try) 2>&5
4963  ac_status=$?
4964  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4965  (exit $ac_status); }; } &&
4966         { ac_try='test -s conftest$ac_exeext'
4967  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4968  (eval $ac_try) 2>&5
4969  ac_status=$?
4970  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4971  (exit $ac_status); }; }; then
4972  LIBS=$ac_save_LIBS
4973# We can link X programs with no special library path.
4974ac_x_libraries=
4975else
4976  echo "$as_me: failed program was:" >&5
4977sed 's/^/| /' conftest.$ac_ext >&5
4978
4979LIBS=$ac_save_LIBS
4980for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
4981do
4982  # Don't even attempt the hair of trying to link an X program!
4983  for ac_extension in a so sl; do
4984    if test -r $ac_dir/libXt.$ac_extension; then
4985      ac_x_libraries=$ac_dir
4986      break 2
4987    fi
4988  done
4989done
4990fi
4991rm -f conftest.err conftest.$ac_objext \
4992      conftest$ac_exeext conftest.$ac_ext
4993fi # $ac_x_libraries = no
4994
4995if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
4996  # Didn't find X anywhere.  Cache the known absence of X.
4997  ac_cv_have_x="have_x=no"
4998else
4999  # Record where we found X for the cache.
5000  ac_cv_have_x="have_x=yes \
5001                ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5002fi
5003fi
5004
5005  fi
5006  eval "$ac_cv_have_x"
5007fi # $with_x != no
5008
5009if test "$have_x" != yes; then
5010  echo "$as_me:$LINENO: result: $have_x" >&5
5011echo "${ECHO_T}$have_x" >&6
5012  no_x=yes
5013else
5014  # If each of the values was on the command line, it overrides each guess.
5015  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5016  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5017  # Update the cache value to reflect the command line values.
5018  ac_cv_have_x="have_x=yes \
5019                ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5020  echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
5021echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5022fi
5023
5024if test "$no_x" = yes; then
5025  # Not all programs may use this symbol, but it does not hurt to define it.
5026
5027cat >>confdefs.h <<\_ACEOF
5028#define X_DISPLAY_MISSING 1
5029_ACEOF
5030
5031  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5032else
5033  if test -n "$x_includes"; then
5034    X_CFLAGS="$X_CFLAGS -I$x_includes"
5035  fi
5036
5037  # It would also be nice to do this for all -L options, not just this one.
5038  if test -n "$x_libraries"; then
5039    X_LIBS="$X_LIBS -L$x_libraries"
5040    # For Solaris; some versions of Sun CC require a space after -R and
5041    # others require no space.  Words are not sufficient . . . .
5042    case `(uname -sr) 2>/dev/null` in
5043    "SunOS 5"*)
5044      echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
5045echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
5046      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
5047      cat >conftest.$ac_ext <<_ACEOF
5048/* confdefs.h.  */
5049_ACEOF
5050cat confdefs.h >>conftest.$ac_ext
5051cat >>conftest.$ac_ext <<_ACEOF
5052/* end confdefs.h.  */
5053
5054int
5055main ()
5056{
5057
5058  ;
5059  return 0;
5060}
5061_ACEOF
5062rm -f conftest.$ac_objext conftest$ac_exeext
5063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5064  (eval $ac_link) 2>conftest.er1
5065  ac_status=$?
5066  grep -v '^ *+' conftest.er1 >conftest.err
5067  rm -f conftest.er1
5068  cat conftest.err >&5
5069  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5070  (exit $ac_status); } &&
5071         { ac_try='test -z "$ac_c_werror_flag"
5072                         || test ! -s conftest.err'
5073  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5074  (eval $ac_try) 2>&5
5075  ac_status=$?
5076  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5077  (exit $ac_status); }; } &&
5078         { ac_try='test -s conftest$ac_exeext'
5079  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5080  (eval $ac_try) 2>&5
5081  ac_status=$?
5082  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5083  (exit $ac_status); }; }; then
5084  ac_R_nospace=yes
5085else
5086  echo "$as_me: failed program was:" >&5
5087sed 's/^/| /' conftest.$ac_ext >&5
5088
5089ac_R_nospace=no
5090fi
5091rm -f conftest.err conftest.$ac_objext \
5092      conftest$ac_exeext conftest.$ac_ext
5093      if test $ac_R_nospace = yes; then
5094        echo "$as_me:$LINENO: result: no" >&5
5095echo "${ECHO_T}no" >&6
5096        X_LIBS="$X_LIBS -R$x_libraries"
5097      else
5098        LIBS="$ac_xsave_LIBS -R $x_libraries"
5099        cat >conftest.$ac_ext <<_ACEOF
5100/* confdefs.h.  */
5101_ACEOF
5102cat confdefs.h >>conftest.$ac_ext
5103cat >>conftest.$ac_ext <<_ACEOF
5104/* end confdefs.h.  */
5105
5106int
5107main ()
5108{
5109
5110  ;
5111  return 0;
5112}
5113_ACEOF
5114rm -f conftest.$ac_objext conftest$ac_exeext
5115if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5116  (eval $ac_link) 2>conftest.er1
5117  ac_status=$?
5118  grep -v '^ *+' conftest.er1 >conftest.err
5119  rm -f conftest.er1
5120  cat conftest.err >&5
5121  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5122  (exit $ac_status); } &&
5123         { ac_try='test -z "$ac_c_werror_flag"
5124                         || test ! -s conftest.err'
5125  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5126  (eval $ac_try) 2>&5
5127  ac_status=$?
5128  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5129  (exit $ac_status); }; } &&
5130         { ac_try='test -s conftest$ac_exeext'
5131  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5132  (eval $ac_try) 2>&5
5133  ac_status=$?
5134  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5135  (exit $ac_status); }; }; then
5136  ac_R_space=yes
5137else
5138  echo "$as_me: failed program was:" >&5
5139sed 's/^/| /' conftest.$ac_ext >&5
5140
5141ac_R_space=no
5142fi
5143rm -f conftest.err conftest.$ac_objext \
5144      conftest$ac_exeext conftest.$ac_ext
5145        if test $ac_R_space = yes; then
5146          echo "$as_me:$LINENO: result: yes" >&5
5147echo "${ECHO_T}yes" >&6
5148          X_LIBS="$X_LIBS -R $x_libraries"
5149        else
5150          echo "$as_me:$LINENO: result: neither works" >&5
5151echo "${ECHO_T}neither works" >&6
5152        fi
5153      fi
5154      LIBS=$ac_xsave_LIBS
5155    esac
5156  fi
5157
5158  # Check for system-dependent libraries X programs must link with.
5159  # Do this before checking for the system-independent R6 libraries
5160  # (-lICE), since we may need -lsocket or whatever for X linking.
5161
5162  if test "$ISC" = yes; then
5163    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5164  else
5165    # Martyn Johnson says this is needed for Ultrix, if the X
5166    # libraries were built with DECnet support.  And Karl Berry says
5167    # the Alpha needs dnet_stub (dnet does not exist).
5168    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5169    cat >conftest.$ac_ext <<_ACEOF
5170/* confdefs.h.  */
5171_ACEOF
5172cat confdefs.h >>conftest.$ac_ext
5173cat >>conftest.$ac_ext <<_ACEOF
5174/* end confdefs.h.  */
5175
5176/* Override any gcc2 internal prototype to avoid an error.  */
5177#ifdef __cplusplus
5178extern "C"
5179#endif
5180/* We use char because int might match the return type of a gcc2
5181   builtin and then its argument prototype would still apply.  */
5182char XOpenDisplay ();
5183int
5184main ()
5185{
5186XOpenDisplay ();
5187  ;
5188  return 0;
5189}
5190_ACEOF
5191rm -f conftest.$ac_objext conftest$ac_exeext
5192if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5193  (eval $ac_link) 2>conftest.er1
5194  ac_status=$?
5195  grep -v '^ *+' conftest.er1 >conftest.err
5196  rm -f conftest.er1
5197  cat conftest.err >&5
5198  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5199  (exit $ac_status); } &&
5200         { ac_try='test -z "$ac_c_werror_flag"
5201                         || test ! -s conftest.err'
5202  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5203  (eval $ac_try) 2>&5
5204  ac_status=$?
5205  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5206  (exit $ac_status); }; } &&
5207         { ac_try='test -s conftest$ac_exeext'
5208  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5209  (eval $ac_try) 2>&5
5210  ac_status=$?
5211  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5212  (exit $ac_status); }; }; then
5213  :
5214else
5215  echo "$as_me: failed program was:" >&5
5216sed 's/^/| /' conftest.$ac_ext >&5
5217
5218echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5219echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5220if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5221  echo $ECHO_N "(cached) $ECHO_C" >&6
5222else
5223  ac_check_lib_save_LIBS=$LIBS
5224LIBS="-ldnet  $LIBS"
5225cat >conftest.$ac_ext <<_ACEOF
5226/* confdefs.h.  */
5227_ACEOF
5228cat confdefs.h >>conftest.$ac_ext
5229cat >>conftest.$ac_ext <<_ACEOF
5230/* end confdefs.h.  */
5231
5232/* Override any gcc2 internal prototype to avoid an error.  */
5233#ifdef __cplusplus
5234extern "C"
5235#endif
5236/* We use char because int might match the return type of a gcc2
5237   builtin and then its argument prototype would still apply.  */
5238char dnet_ntoa ();
5239int
5240main ()
5241{
5242dnet_ntoa ();
5243  ;
5244  return 0;
5245}
5246_ACEOF
5247rm -f conftest.$ac_objext conftest$ac_exeext
5248if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5249  (eval $ac_link) 2>conftest.er1
5250  ac_status=$?
5251  grep -v '^ *+' conftest.er1 >conftest.err
5252  rm -f conftest.er1
5253  cat conftest.err >&5
5254  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5255  (exit $ac_status); } &&
5256         { ac_try='test -z "$ac_c_werror_flag"
5257                         || test ! -s conftest.err'
5258  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5259  (eval $ac_try) 2>&5
5260  ac_status=$?
5261  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5262  (exit $ac_status); }; } &&
5263         { ac_try='test -s conftest$ac_exeext'
5264  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5265  (eval $ac_try) 2>&5
5266  ac_status=$?
5267  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5268  (exit $ac_status); }; }; then
5269  ac_cv_lib_dnet_dnet_ntoa=yes
5270else
5271  echo "$as_me: failed program was:" >&5
5272sed 's/^/| /' conftest.$ac_ext >&5
5273
5274ac_cv_lib_dnet_dnet_ntoa=no
5275fi
5276rm -f conftest.err conftest.$ac_objext \
5277      conftest$ac_exeext conftest.$ac_ext
5278LIBS=$ac_check_lib_save_LIBS
5279fi
5280echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5281echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5282if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5283  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5284fi
5285
5286    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5287      echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5288echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5289if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5290  echo $ECHO_N "(cached) $ECHO_C" >&6
5291else
5292  ac_check_lib_save_LIBS=$LIBS
5293LIBS="-ldnet_stub  $LIBS"
5294cat >conftest.$ac_ext <<_ACEOF
5295/* confdefs.h.  */
5296_ACEOF
5297cat confdefs.h >>conftest.$ac_ext
5298cat >>conftest.$ac_ext <<_ACEOF
5299/* end confdefs.h.  */
5300
5301/* Override any gcc2 internal prototype to avoid an error.  */
5302#ifdef __cplusplus
5303extern "C"
5304#endif
5305/* We use char because int might match the return type of a gcc2
5306   builtin and then its argument prototype would still apply.  */
5307char dnet_ntoa ();
5308int
5309main ()
5310{
5311dnet_ntoa ();
5312  ;
5313  return 0;
5314}
5315_ACEOF
5316rm -f conftest.$ac_objext conftest$ac_exeext
5317if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5318  (eval $ac_link) 2>conftest.er1
5319  ac_status=$?
5320  grep -v '^ *+' conftest.er1 >conftest.err
5321  rm -f conftest.er1
5322  cat conftest.err >&5
5323  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5324  (exit $ac_status); } &&
5325         { ac_try='test -z "$ac_c_werror_flag"
5326                         || test ! -s conftest.err'
5327  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5328  (eval $ac_try) 2>&5
5329  ac_status=$?
5330  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5331  (exit $ac_status); }; } &&
5332         { ac_try='test -s conftest$ac_exeext'
5333  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5334  (eval $ac_try) 2>&5
5335  ac_status=$?
5336  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5337  (exit $ac_status); }; }; then
5338  ac_cv_lib_dnet_stub_dnet_ntoa=yes
5339else
5340  echo "$as_me: failed program was:" >&5
5341sed 's/^/| /' conftest.$ac_ext >&5
5342
5343ac_cv_lib_dnet_stub_dnet_ntoa=no
5344fi
5345rm -f conftest.err conftest.$ac_objext \
5346      conftest$ac_exeext conftest.$ac_ext
5347LIBS=$ac_check_lib_save_LIBS
5348fi
5349echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5350echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5351if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5352  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5353fi
5354
5355    fi
5356fi
5357rm -f conftest.err conftest.$ac_objext \
5358      conftest$ac_exeext conftest.$ac_ext
5359    LIBS="$ac_xsave_LIBS"
5360
5361    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5362    # to get the SysV transport functions.
5363    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5364    # needs -lnsl.
5365    # The nsl library prevents programs from opening the X display
5366    # on Irix 5.2, according to T.E. Dickey.
5367    # The functions gethostbyname, getservbyname, and inet_addr are
5368    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5369    echo "$as_me:$LINENO: checking for gethostbyname" >&5
5370echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5371if test "${ac_cv_func_gethostbyname+set}" = set; then
5372  echo $ECHO_N "(cached) $ECHO_C" >&6
5373else
5374  cat >conftest.$ac_ext <<_ACEOF
5375/* confdefs.h.  */
5376_ACEOF
5377cat confdefs.h >>conftest.$ac_ext
5378cat >>conftest.$ac_ext <<_ACEOF
5379/* end confdefs.h.  */
5380/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5381   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5382#define gethostbyname innocuous_gethostbyname
5383
5384/* System header to define __stub macros and hopefully few prototypes,
5385    which can conflict with char gethostbyname (); below.
5386    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5387    <limits.h> exists even on freestanding compilers.  */
5388
5389#ifdef __STDC__
5390# include <limits.h>
5391#else
5392# include <assert.h>
5393#endif
5394
5395#undef gethostbyname
5396
5397/* Override any gcc2 internal prototype to avoid an error.  */
5398#ifdef __cplusplus
5399extern "C"
5400{
5401#endif
5402/* We use char because int might match the return type of a gcc2
5403   builtin and then its argument prototype would still apply.  */
5404char gethostbyname ();
5405/* The GNU C library defines this for functions which it implements
5406    to always fail with ENOSYS.  Some functions are actually named
5407    something starting with __ and the normal name is an alias.  */
5408#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5409choke me
5410#else
5411char (*f) () = gethostbyname;
5412#endif
5413#ifdef __cplusplus
5414}
5415#endif
5416
5417int
5418main ()
5419{
5420return f != gethostbyname;
5421  ;
5422  return 0;
5423}
5424_ACEOF
5425rm -f conftest.$ac_objext conftest$ac_exeext
5426if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5427  (eval $ac_link) 2>conftest.er1
5428  ac_status=$?
5429  grep -v '^ *+' conftest.er1 >conftest.err
5430  rm -f conftest.er1
5431  cat conftest.err >&5
5432  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5433  (exit $ac_status); } &&
5434         { ac_try='test -z "$ac_c_werror_flag"
5435                         || test ! -s conftest.err'
5436  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5437  (eval $ac_try) 2>&5
5438  ac_status=$?
5439  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5440  (exit $ac_status); }; } &&
5441         { ac_try='test -s conftest$ac_exeext'
5442  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5443  (eval $ac_try) 2>&5
5444  ac_status=$?
5445  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5446  (exit $ac_status); }; }; then
5447  ac_cv_func_gethostbyname=yes
5448else
5449  echo "$as_me: failed program was:" >&5
5450sed 's/^/| /' conftest.$ac_ext >&5
5451
5452ac_cv_func_gethostbyname=no
5453fi
5454rm -f conftest.err conftest.$ac_objext \
5455      conftest$ac_exeext conftest.$ac_ext
5456fi
5457echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5458echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5459
5460    if test $ac_cv_func_gethostbyname = no; then
5461      echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5462echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5463if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5464  echo $ECHO_N "(cached) $ECHO_C" >&6
5465else
5466  ac_check_lib_save_LIBS=$LIBS
5467LIBS="-lnsl  $LIBS"
5468cat >conftest.$ac_ext <<_ACEOF
5469/* confdefs.h.  */
5470_ACEOF
5471cat confdefs.h >>conftest.$ac_ext
5472cat >>conftest.$ac_ext <<_ACEOF
5473/* end confdefs.h.  */
5474
5475/* Override any gcc2 internal prototype to avoid an error.  */
5476#ifdef __cplusplus
5477extern "C"
5478#endif
5479/* We use char because int might match the return type of a gcc2
5480   builtin and then its argument prototype would still apply.  */
5481char gethostbyname ();
5482int
5483main ()
5484{
5485gethostbyname ();
5486  ;
5487  return 0;
5488}
5489_ACEOF
5490rm -f conftest.$ac_objext conftest$ac_exeext
5491if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5492  (eval $ac_link) 2>conftest.er1
5493  ac_status=$?
5494  grep -v '^ *+' conftest.er1 >conftest.err
5495  rm -f conftest.er1
5496  cat conftest.err >&5
5497  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5498  (exit $ac_status); } &&
5499         { ac_try='test -z "$ac_c_werror_flag"
5500                         || test ! -s conftest.err'
5501  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5502  (eval $ac_try) 2>&5
5503  ac_status=$?
5504  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5505  (exit $ac_status); }; } &&
5506         { ac_try='test -s conftest$ac_exeext'
5507  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5508  (eval $ac_try) 2>&5
5509  ac_status=$?
5510  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5511  (exit $ac_status); }; }; then
5512  ac_cv_lib_nsl_gethostbyname=yes
5513else
5514  echo "$as_me: failed program was:" >&5
5515sed 's/^/| /' conftest.$ac_ext >&5
5516
5517ac_cv_lib_nsl_gethostbyname=no
5518fi
5519rm -f conftest.err conftest.$ac_objext \
5520      conftest$ac_exeext conftest.$ac_ext
5521LIBS=$ac_check_lib_save_LIBS
5522fi
5523echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5524echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5525if test $ac_cv_lib_nsl_gethostbyname = yes; then
5526  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5527fi
5528
5529      if test $ac_cv_lib_nsl_gethostbyname = no; then
5530        echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5531echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5532if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5533  echo $ECHO_N "(cached) $ECHO_C" >&6
5534else
5535  ac_check_lib_save_LIBS=$LIBS
5536LIBS="-lbsd  $LIBS"
5537cat >conftest.$ac_ext <<_ACEOF
5538/* confdefs.h.  */
5539_ACEOF
5540cat confdefs.h >>conftest.$ac_ext
5541cat >>conftest.$ac_ext <<_ACEOF
5542/* end confdefs.h.  */
5543
5544/* Override any gcc2 internal prototype to avoid an error.  */
5545#ifdef __cplusplus
5546extern "C"
5547#endif
5548/* We use char because int might match the return type of a gcc2
5549   builtin and then its argument prototype would still apply.  */
5550char gethostbyname ();
5551int
5552main ()
5553{
5554gethostbyname ();
5555  ;
5556  return 0;
5557}
5558_ACEOF
5559rm -f conftest.$ac_objext conftest$ac_exeext
5560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5561  (eval $ac_link) 2>conftest.er1
5562  ac_status=$?
5563  grep -v '^ *+' conftest.er1 >conftest.err
5564  rm -f conftest.er1
5565  cat conftest.err >&5
5566  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5567  (exit $ac_status); } &&
5568         { ac_try='test -z "$ac_c_werror_flag"
5569                         || test ! -s conftest.err'
5570  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5571  (eval $ac_try) 2>&5
5572  ac_status=$?
5573  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5574  (exit $ac_status); }; } &&
5575         { ac_try='test -s conftest$ac_exeext'
5576  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5577  (eval $ac_try) 2>&5
5578  ac_status=$?
5579  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5580  (exit $ac_status); }; }; then
5581  ac_cv_lib_bsd_gethostbyname=yes
5582else
5583  echo "$as_me: failed program was:" >&5
5584sed 's/^/| /' conftest.$ac_ext >&5
5585
5586ac_cv_lib_bsd_gethostbyname=no
5587fi
5588rm -f conftest.err conftest.$ac_objext \
5589      conftest$ac_exeext conftest.$ac_ext
5590LIBS=$ac_check_lib_save_LIBS
5591fi
5592echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
5593echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
5594if test $ac_cv_lib_bsd_gethostbyname = yes; then
5595  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5596fi
5597
5598      fi
5599    fi
5600
5601    # lieder@skyler.mavd.honeywell.com says without -lsocket,
5602    # socket/setsockopt and other routines are undefined under SCO ODT
5603    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5604    # on later versions), says Simon Leinen: it contains gethostby*
5605    # variants that don't use the name server (or something).  -lsocket
5606    # must be given before -lnsl if both are needed.  We assume that
5607    # if connect needs -lnsl, so does gethostbyname.
5608    echo "$as_me:$LINENO: checking for connect" >&5
5609echo $ECHO_N "checking for connect... $ECHO_C" >&6
5610if test "${ac_cv_func_connect+set}" = set; then
5611  echo $ECHO_N "(cached) $ECHO_C" >&6
5612else
5613  cat >conftest.$ac_ext <<_ACEOF
5614/* confdefs.h.  */
5615_ACEOF
5616cat confdefs.h >>conftest.$ac_ext
5617cat >>conftest.$ac_ext <<_ACEOF
5618/* end confdefs.h.  */
5619/* Define connect to an innocuous variant, in case <limits.h> declares connect.
5620   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5621#define connect innocuous_connect
5622
5623/* System header to define __stub macros and hopefully few prototypes,
5624    which can conflict with char connect (); below.
5625    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5626    <limits.h> exists even on freestanding compilers.  */
5627
5628#ifdef __STDC__
5629# include <limits.h>
5630#else
5631# include <assert.h>
5632#endif
5633
5634#undef connect
5635
5636/* Override any gcc2 internal prototype to avoid an error.  */
5637#ifdef __cplusplus
5638extern "C"
5639{
5640#endif
5641/* We use char because int might match the return type of a gcc2
5642   builtin and then its argument prototype would still apply.  */
5643char connect ();
5644/* The GNU C library defines this for functions which it implements
5645    to always fail with ENOSYS.  Some functions are actually named
5646    something starting with __ and the normal name is an alias.  */
5647#if defined (__stub_connect) || defined (__stub___connect)
5648choke me
5649#else
5650char (*f) () = connect;
5651#endif
5652#ifdef __cplusplus
5653}
5654#endif
5655
5656int
5657main ()
5658{
5659return f != connect;
5660  ;
5661  return 0;
5662}
5663_ACEOF
5664rm -f conftest.$ac_objext conftest$ac_exeext
5665if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5666  (eval $ac_link) 2>conftest.er1
5667  ac_status=$?
5668  grep -v '^ *+' conftest.er1 >conftest.err
5669  rm -f conftest.er1
5670  cat conftest.err >&5
5671  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5672  (exit $ac_status); } &&
5673         { ac_try='test -z "$ac_c_werror_flag"
5674                         || test ! -s conftest.err'
5675  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5676  (eval $ac_try) 2>&5
5677  ac_status=$?
5678  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5679  (exit $ac_status); }; } &&
5680         { ac_try='test -s conftest$ac_exeext'
5681  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5682  (eval $ac_try) 2>&5
5683  ac_status=$?
5684  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5685  (exit $ac_status); }; }; then
5686  ac_cv_func_connect=yes
5687else
5688  echo "$as_me: failed program was:" >&5
5689sed 's/^/| /' conftest.$ac_ext >&5
5690
5691ac_cv_func_connect=no
5692fi
5693rm -f conftest.err conftest.$ac_objext \
5694      conftest$ac_exeext conftest.$ac_ext
5695fi
5696echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5697echo "${ECHO_T}$ac_cv_func_connect" >&6
5698
5699    if test $ac_cv_func_connect = no; then
5700      echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
5701echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
5702if test "${ac_cv_lib_socket_connect+set}" = set; then
5703  echo $ECHO_N "(cached) $ECHO_C" >&6
5704else
5705  ac_check_lib_save_LIBS=$LIBS
5706LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5707cat >conftest.$ac_ext <<_ACEOF
5708/* confdefs.h.  */
5709_ACEOF
5710cat confdefs.h >>conftest.$ac_ext
5711cat >>conftest.$ac_ext <<_ACEOF
5712/* end confdefs.h.  */
5713
5714/* Override any gcc2 internal prototype to avoid an error.  */
5715#ifdef __cplusplus
5716extern "C"
5717#endif
5718/* We use char because int might match the return type of a gcc2
5719   builtin and then its argument prototype would still apply.  */
5720char connect ();
5721int
5722main ()
5723{
5724connect ();
5725  ;
5726  return 0;
5727}
5728_ACEOF
5729rm -f conftest.$ac_objext conftest$ac_exeext
5730if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5731  (eval $ac_link) 2>conftest.er1
5732  ac_status=$?
5733  grep -v '^ *+' conftest.er1 >conftest.err
5734  rm -f conftest.er1
5735  cat conftest.err >&5
5736  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5737  (exit $ac_status); } &&
5738         { ac_try='test -z "$ac_c_werror_flag"
5739                         || test ! -s conftest.err'
5740  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5741  (eval $ac_try) 2>&5
5742  ac_status=$?
5743  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5744  (exit $ac_status); }; } &&
5745         { ac_try='test -s conftest$ac_exeext'
5746  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5747  (eval $ac_try) 2>&5
5748  ac_status=$?
5749  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5750  (exit $ac_status); }; }; then
5751  ac_cv_lib_socket_connect=yes
5752else
5753  echo "$as_me: failed program was:" >&5
5754sed 's/^/| /' conftest.$ac_ext >&5
5755
5756ac_cv_lib_socket_connect=no
5757fi
5758rm -f conftest.err conftest.$ac_objext \
5759      conftest$ac_exeext conftest.$ac_ext
5760LIBS=$ac_check_lib_save_LIBS
5761fi
5762echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
5763echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
5764if test $ac_cv_lib_socket_connect = yes; then
5765  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5766fi
5767
5768    fi
5769
5770    # Guillermo Gomez says -lposix is necessary on A/UX.
5771    echo "$as_me:$LINENO: checking for remove" >&5
5772echo $ECHO_N "checking for remove... $ECHO_C" >&6
5773if test "${ac_cv_func_remove+set}" = set; then
5774  echo $ECHO_N "(cached) $ECHO_C" >&6
5775else
5776  cat >conftest.$ac_ext <<_ACEOF
5777/* confdefs.h.  */
5778_ACEOF
5779cat confdefs.h >>conftest.$ac_ext
5780cat >>conftest.$ac_ext <<_ACEOF
5781/* end confdefs.h.  */
5782/* Define remove to an innocuous variant, in case <limits.h> declares remove.
5783   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5784#define remove innocuous_remove
5785
5786/* System header to define __stub macros and hopefully few prototypes,
5787    which can conflict with char remove (); below.
5788    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5789    <limits.h> exists even on freestanding compilers.  */
5790
5791#ifdef __STDC__
5792# include <limits.h>
5793#else
5794# include <assert.h>
5795#endif
5796
5797#undef remove
5798
5799/* Override any gcc2 internal prototype to avoid an error.  */
5800#ifdef __cplusplus
5801extern "C"
5802{
5803#endif
5804/* We use char because int might match the return type of a gcc2
5805   builtin and then its argument prototype would still apply.  */
5806char remove ();
5807/* The GNU C library defines this for functions which it implements
5808    to always fail with ENOSYS.  Some functions are actually named
5809    something starting with __ and the normal name is an alias.  */
5810#if defined (__stub_remove) || defined (__stub___remove)
5811choke me
5812#else
5813char (*f) () = remove;
5814#endif
5815#ifdef __cplusplus
5816}
5817#endif
5818
5819int
5820main ()
5821{
5822return f != remove;
5823  ;
5824  return 0;
5825}
5826_ACEOF
5827rm -f conftest.$ac_objext conftest$ac_exeext
5828if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5829  (eval $ac_link) 2>conftest.er1
5830  ac_status=$?
5831  grep -v '^ *+' conftest.er1 >conftest.err
5832  rm -f conftest.er1
5833  cat conftest.err >&5
5834  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5835  (exit $ac_status); } &&
5836         { ac_try='test -z "$ac_c_werror_flag"
5837                         || test ! -s conftest.err'
5838  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5839  (eval $ac_try) 2>&5
5840  ac_status=$?
5841  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5842  (exit $ac_status); }; } &&
5843         { ac_try='test -s conftest$ac_exeext'
5844  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5845  (eval $ac_try) 2>&5
5846  ac_status=$?
5847  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5848  (exit $ac_status); }; }; then
5849  ac_cv_func_remove=yes
5850else
5851  echo "$as_me: failed program was:" >&5
5852sed 's/^/| /' conftest.$ac_ext >&5
5853
5854ac_cv_func_remove=no
5855fi
5856rm -f conftest.err conftest.$ac_objext \
5857      conftest$ac_exeext conftest.$ac_ext
5858fi
5859echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
5860echo "${ECHO_T}$ac_cv_func_remove" >&6
5861
5862    if test $ac_cv_func_remove = no; then
5863      echo "$as_me:$LINENO: checking for remove in -lposix" >&5
5864echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
5865if test "${ac_cv_lib_posix_remove+set}" = set; then
5866  echo $ECHO_N "(cached) $ECHO_C" >&6
5867else
5868  ac_check_lib_save_LIBS=$LIBS
5869LIBS="-lposix  $LIBS"
5870cat >conftest.$ac_ext <<_ACEOF
5871/* confdefs.h.  */
5872_ACEOF
5873cat confdefs.h >>conftest.$ac_ext
5874cat >>conftest.$ac_ext <<_ACEOF
5875/* end confdefs.h.  */
5876
5877/* Override any gcc2 internal prototype to avoid an error.  */
5878#ifdef __cplusplus
5879extern "C"
5880#endif
5881/* We use char because int might match the return type of a gcc2
5882   builtin and then its argument prototype would still apply.  */
5883char remove ();
5884int
5885main ()
5886{
5887remove ();
5888  ;
5889  return 0;
5890}
5891_ACEOF
5892rm -f conftest.$ac_objext conftest$ac_exeext
5893if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5894  (eval $ac_link) 2>conftest.er1
5895  ac_status=$?
5896  grep -v '^ *+' conftest.er1 >conftest.err
5897  rm -f conftest.er1
5898  cat conftest.err >&5
5899  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5900  (exit $ac_status); } &&
5901         { ac_try='test -z "$ac_c_werror_flag"
5902                         || test ! -s conftest.err'
5903  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5904  (eval $ac_try) 2>&5
5905  ac_status=$?
5906  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907  (exit $ac_status); }; } &&
5908         { ac_try='test -s conftest$ac_exeext'
5909  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5910  (eval $ac_try) 2>&5
5911  ac_status=$?
5912  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5913  (exit $ac_status); }; }; then
5914  ac_cv_lib_posix_remove=yes
5915else
5916  echo "$as_me: failed program was:" >&5
5917sed 's/^/| /' conftest.$ac_ext >&5
5918
5919ac_cv_lib_posix_remove=no
5920fi
5921rm -f conftest.err conftest.$ac_objext \
5922      conftest$ac_exeext conftest.$ac_ext
5923LIBS=$ac_check_lib_save_LIBS
5924fi
5925echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
5926echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
5927if test $ac_cv_lib_posix_remove = yes; then
5928  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5929fi
5930
5931    fi
5932
5933    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5934    echo "$as_me:$LINENO: checking for shmat" >&5
5935echo $ECHO_N "checking for shmat... $ECHO_C" >&6
5936if test "${ac_cv_func_shmat+set}" = set; then
5937  echo $ECHO_N "(cached) $ECHO_C" >&6
5938else
5939  cat >conftest.$ac_ext <<_ACEOF
5940/* confdefs.h.  */
5941_ACEOF
5942cat confdefs.h >>conftest.$ac_ext
5943cat >>conftest.$ac_ext <<_ACEOF
5944/* end confdefs.h.  */
5945/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
5946   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5947#define shmat innocuous_shmat
5948
5949/* System header to define __stub macros and hopefully few prototypes,
5950    which can conflict with char shmat (); below.
5951    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5952    <limits.h> exists even on freestanding compilers.  */
5953
5954#ifdef __STDC__
5955# include <limits.h>
5956#else
5957# include <assert.h>
5958#endif
5959
5960#undef shmat
5961
5962/* Override any gcc2 internal prototype to avoid an error.  */
5963#ifdef __cplusplus
5964extern "C"
5965{
5966#endif
5967/* We use char because int might match the return type of a gcc2
5968   builtin and then its argument prototype would still apply.  */
5969char shmat ();
5970/* The GNU C library defines this for functions which it implements
5971    to always fail with ENOSYS.  Some functions are actually named
5972    something starting with __ and the normal name is an alias.  */
5973#if defined (__stub_shmat) || defined (__stub___shmat)
5974choke me
5975#else
5976char (*f) () = shmat;
5977#endif
5978#ifdef __cplusplus
5979}
5980#endif
5981
5982int
5983main ()
5984{
5985return f != shmat;
5986  ;
5987  return 0;
5988}
5989_ACEOF
5990rm -f conftest.$ac_objext conftest$ac_exeext
5991if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5992  (eval $ac_link) 2>conftest.er1
5993  ac_status=$?
5994  grep -v '^ *+' conftest.er1 >conftest.err
5995  rm -f conftest.er1
5996  cat conftest.err >&5
5997  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5998  (exit $ac_status); } &&
5999         { ac_try='test -z "$ac_c_werror_flag"
6000                         || test ! -s conftest.err'
6001  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6002  (eval $ac_try) 2>&5
6003  ac_status=$?
6004  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6005  (exit $ac_status); }; } &&
6006         { ac_try='test -s conftest$ac_exeext'
6007  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6008  (eval $ac_try) 2>&5
6009  ac_status=$?
6010  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6011  (exit $ac_status); }; }; then
6012  ac_cv_func_shmat=yes
6013else
6014  echo "$as_me: failed program was:" >&5
6015sed 's/^/| /' conftest.$ac_ext >&5
6016
6017ac_cv_func_shmat=no
6018fi
6019rm -f conftest.err conftest.$ac_objext \
6020      conftest$ac_exeext conftest.$ac_ext
6021fi
6022echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
6023echo "${ECHO_T}$ac_cv_func_shmat" >&6
6024
6025    if test $ac_cv_func_shmat = no; then
6026      echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
6027echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
6028if test "${ac_cv_lib_ipc_shmat+set}" = set; then
6029  echo $ECHO_N "(cached) $ECHO_C" >&6
6030else
6031  ac_check_lib_save_LIBS=$LIBS
6032LIBS="-lipc  $LIBS"
6033cat >conftest.$ac_ext <<_ACEOF
6034/* confdefs.h.  */
6035_ACEOF
6036cat confdefs.h >>conftest.$ac_ext
6037cat >>conftest.$ac_ext <<_ACEOF
6038/* end confdefs.h.  */
6039
6040/* Override any gcc2 internal prototype to avoid an error.  */
6041#ifdef __cplusplus
6042extern "C"
6043#endif
6044/* We use char because int might match the return type of a gcc2
6045   builtin and then its argument prototype would still apply.  */
6046char shmat ();
6047int
6048main ()
6049{
6050shmat ();
6051  ;
6052  return 0;
6053}
6054_ACEOF
6055rm -f conftest.$ac_objext conftest$ac_exeext
6056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6057  (eval $ac_link) 2>conftest.er1
6058  ac_status=$?
6059  grep -v '^ *+' conftest.er1 >conftest.err
6060  rm -f conftest.er1
6061  cat conftest.err >&5
6062  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6063  (exit $ac_status); } &&
6064         { ac_try='test -z "$ac_c_werror_flag"
6065                         || test ! -s conftest.err'
6066  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6067  (eval $ac_try) 2>&5
6068  ac_status=$?
6069  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6070  (exit $ac_status); }; } &&
6071         { ac_try='test -s conftest$ac_exeext'
6072  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6073  (eval $ac_try) 2>&5
6074  ac_status=$?
6075  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6076  (exit $ac_status); }; }; then
6077  ac_cv_lib_ipc_shmat=yes
6078else
6079  echo "$as_me: failed program was:" >&5
6080sed 's/^/| /' conftest.$ac_ext >&5
6081
6082ac_cv_lib_ipc_shmat=no
6083fi
6084rm -f conftest.err conftest.$ac_objext \
6085      conftest$ac_exeext conftest.$ac_ext
6086LIBS=$ac_check_lib_save_LIBS
6087fi
6088echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
6089echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
6090if test $ac_cv_lib_ipc_shmat = yes; then
6091  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6092fi
6093
6094    fi
6095  fi
6096
6097  # Check for libraries that X11R6 Xt/Xaw programs need.
6098  ac_save_LDFLAGS=$LDFLAGS
6099  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6100  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6101  # check for ICE first), but we must link in the order -lSM -lICE or
6102  # we get undefined symbols.  So assume we have SM if we have ICE.
6103  # These have to be linked with before -lX11, unlike the other
6104  # libraries we check for below, so use a different variable.
6105  # John Interrante, Karl Berry
6106  echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
6107echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
6108if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
6109  echo $ECHO_N "(cached) $ECHO_C" >&6
6110else
6111  ac_check_lib_save_LIBS=$LIBS
6112LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6113cat >conftest.$ac_ext <<_ACEOF
6114/* confdefs.h.  */
6115_ACEOF
6116cat confdefs.h >>conftest.$ac_ext
6117cat >>conftest.$ac_ext <<_ACEOF
6118/* end confdefs.h.  */
6119
6120/* Override any gcc2 internal prototype to avoid an error.  */
6121#ifdef __cplusplus
6122extern "C"
6123#endif
6124/* We use char because int might match the return type of a gcc2
6125   builtin and then its argument prototype would still apply.  */
6126char IceConnectionNumber ();
6127int
6128main ()
6129{
6130IceConnectionNumber ();
6131  ;
6132  return 0;
6133}
6134_ACEOF
6135rm -f conftest.$ac_objext conftest$ac_exeext
6136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6137  (eval $ac_link) 2>conftest.er1
6138  ac_status=$?
6139  grep -v '^ *+' conftest.er1 >conftest.err
6140  rm -f conftest.er1
6141  cat conftest.err >&5
6142  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6143  (exit $ac_status); } &&
6144         { ac_try='test -z "$ac_c_werror_flag"
6145                         || test ! -s conftest.err'
6146  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6147  (eval $ac_try) 2>&5
6148  ac_status=$?
6149  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6150  (exit $ac_status); }; } &&
6151         { ac_try='test -s conftest$ac_exeext'
6152  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6153  (eval $ac_try) 2>&5
6154  ac_status=$?
6155  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6156  (exit $ac_status); }; }; then
6157  ac_cv_lib_ICE_IceConnectionNumber=yes
6158else
6159  echo "$as_me: failed program was:" >&5
6160sed 's/^/| /' conftest.$ac_ext >&5
6161
6162ac_cv_lib_ICE_IceConnectionNumber=no
6163fi
6164rm -f conftest.err conftest.$ac_objext \
6165      conftest$ac_exeext conftest.$ac_ext
6166LIBS=$ac_check_lib_save_LIBS
6167fi
6168echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6169echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
6170if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
6171  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6172fi
6173
6174  LDFLAGS=$ac_save_LDFLAGS
6175
6176fi
6177
6178  # returns C compiler flags needed for X to X_CFLAGS and the X linker flags to X_LIBS
6179  if test "x$X_LIBS" != x; then
6180    LDFLAGS="$LDFLAGS $X_LIBS"
6181    EXTRAPGLIB="$X_LIBS -lX11 $EXTRAPGLIB"
6182  fi
6183
6184#  # Add pgplot libraries, if they exist to the lib path
6185#  for LIBDIR in $PGPLOTLIBDIRS ; do
6186#    AC_CHECK_FILE([$LIBDIR/libcpgplot.a], [PGPLOTLIB="-L$LIBDIR $PGPLOTLIB"; break])
6187#  done
6188
6189  # It is possible that other libraries may be required depending on what
6190  # graphics drivers were installed with PGPLOT.
6191  echo "$as_me:$LINENO: checking for deflate in -lz" >&5
6192echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
6193if test "${ac_cv_lib_z_deflate+set}" = set; then
6194  echo $ECHO_N "(cached) $ECHO_C" >&6
6195else
6196  ac_check_lib_save_LIBS=$LIBS
6197LIBS="-lz $EXTRAPGLIB $LIBS $LIBS"
6198cat >conftest.$ac_ext <<_ACEOF
6199/* confdefs.h.  */
6200_ACEOF
6201cat confdefs.h >>conftest.$ac_ext
6202cat >>conftest.$ac_ext <<_ACEOF
6203/* end confdefs.h.  */
6204
6205/* Override any gcc2 internal prototype to avoid an error.  */
6206#ifdef __cplusplus
6207extern "C"
6208#endif
6209/* We use char because int might match the return type of a gcc2
6210   builtin and then its argument prototype would still apply.  */
6211char deflate ();
6212int
6213main ()
6214{
6215deflate ();
6216  ;
6217  return 0;
6218}
6219_ACEOF
6220rm -f conftest.$ac_objext conftest$ac_exeext
6221if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6222  (eval $ac_link) 2>conftest.er1
6223  ac_status=$?
6224  grep -v '^ *+' conftest.er1 >conftest.err
6225  rm -f conftest.er1
6226  cat conftest.err >&5
6227  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6228  (exit $ac_status); } &&
6229         { ac_try='test -z "$ac_c_werror_flag"
6230                         || test ! -s conftest.err'
6231  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6232  (eval $ac_try) 2>&5
6233  ac_status=$?
6234  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6235  (exit $ac_status); }; } &&
6236         { ac_try='test -s conftest$ac_exeext'
6237  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6238  (eval $ac_try) 2>&5
6239  ac_status=$?
6240  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6241  (exit $ac_status); }; }; then
6242  ac_cv_lib_z_deflate=yes
6243else
6244  echo "$as_me: failed program was:" >&5
6245sed 's/^/| /' conftest.$ac_ext >&5
6246
6247ac_cv_lib_z_deflate=no
6248fi
6249rm -f conftest.err conftest.$ac_objext \
6250      conftest$ac_exeext conftest.$ac_ext
6251LIBS=$ac_check_lib_save_LIBS
6252fi
6253echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
6254echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
6255if test $ac_cv_lib_z_deflate = yes; then
6256  EXTRAPGLIB="$EXTRAPGLIB -lz"
6257fi
6258
6259  echo "$as_me:$LINENO: checking for png_error in -lpng" >&5
6260echo $ECHO_N "checking for png_error in -lpng... $ECHO_C" >&6
6261if test "${ac_cv_lib_png_png_error+set}" = set; then
6262  echo $ECHO_N "(cached) $ECHO_C" >&6
6263else
6264  ac_check_lib_save_LIBS=$LIBS
6265LIBS="-lpng $EXTRAPGLIB $LIBS $LIBS"
6266cat >conftest.$ac_ext <<_ACEOF
6267/* confdefs.h.  */
6268_ACEOF
6269cat confdefs.h >>conftest.$ac_ext
6270cat >>conftest.$ac_ext <<_ACEOF
6271/* end confdefs.h.  */
6272
6273/* Override any gcc2 internal prototype to avoid an error.  */
6274#ifdef __cplusplus
6275extern "C"
6276#endif
6277/* We use char because int might match the return type of a gcc2
6278   builtin and then its argument prototype would still apply.  */
6279char png_error ();
6280int
6281main ()
6282{
6283png_error ();
6284  ;
6285  return 0;
6286}
6287_ACEOF
6288rm -f conftest.$ac_objext conftest$ac_exeext
6289if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6290  (eval $ac_link) 2>conftest.er1
6291  ac_status=$?
6292  grep -v '^ *+' conftest.er1 >conftest.err
6293  rm -f conftest.er1
6294  cat conftest.err >&5
6295  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6296  (exit $ac_status); } &&
6297         { ac_try='test -z "$ac_c_werror_flag"
6298                         || test ! -s conftest.err'
6299  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6300  (eval $ac_try) 2>&5
6301  ac_status=$?
6302  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6303  (exit $ac_status); }; } &&
6304         { ac_try='test -s conftest$ac_exeext'
6305  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6306  (eval $ac_try) 2>&5
6307  ac_status=$?
6308  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6309  (exit $ac_status); }; }; then
6310  ac_cv_lib_png_png_error=yes
6311else
6312  echo "$as_me: failed program was:" >&5
6313sed 's/^/| /' conftest.$ac_ext >&5
6314
6315ac_cv_lib_png_png_error=no
6316fi
6317rm -f conftest.err conftest.$ac_objext \
6318      conftest$ac_exeext conftest.$ac_ext
6319LIBS=$ac_check_lib_save_LIBS
6320fi
6321echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_error" >&5
6322echo "${ECHO_T}$ac_cv_lib_png_png_error" >&6
6323if test $ac_cv_lib_png_png_error = yes; then
6324  EXTRAPGLIB="$EXTRAPGLIB -lpng"
6325fi
6326
6327
6328  ac_ext=f
6329ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
6330ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6331ac_compiler_gnu=$ac_cv_f77_compiler_gnu
6332
6333
6334echo "$as_me:$LINENO: checking for pgopen in -lpgplot" >&5
6335echo $ECHO_N "checking for pgopen in -lpgplot... $ECHO_C" >&6
6336if test "${ac_cv_lib_pgplot_pgopen+set}" = set; then
6337  echo $ECHO_N "(cached) $ECHO_C" >&6
6338else
6339  ac_check_lib_save_LIBS=$LIBS
6340LIBS="-lpgplot $PGPLOTLIB $EXTRAPGLIB $LIBS"
6341cat >conftest.$ac_ext <<_ACEOF
6342      program main
6343      call pgopen
6344      end
6345_ACEOF
6346rm -f conftest.$ac_objext conftest$ac_exeext
6347if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6348  (eval $ac_link) 2>conftest.er1
6349  ac_status=$?
6350  grep -v '^ *+' conftest.er1 >conftest.err
6351  rm -f conftest.er1
6352  cat conftest.err >&5
6353  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354  (exit $ac_status); } &&
6355         { ac_try='test -z "$ac_f77_werror_flag"
6356                         || test ! -s conftest.err'
6357  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6358  (eval $ac_try) 2>&5
6359  ac_status=$?
6360  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6361  (exit $ac_status); }; } &&
6362         { ac_try='test -s conftest$ac_exeext'
6363  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6364  (eval $ac_try) 2>&5
6365  ac_status=$?
6366  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6367  (exit $ac_status); }; }; then
6368  ac_cv_lib_pgplot_pgopen=yes
6369else
6370  echo "$as_me: failed program was:" >&5
6371sed 's/^/| /' conftest.$ac_ext >&5
6372
6373ac_cv_lib_pgplot_pgopen=no
6374fi
6375rm -f conftest.err conftest.$ac_objext \
6376      conftest$ac_exeext conftest.$ac_ext
6377LIBS=$ac_check_lib_save_LIBS
6378fi
6379echo "$as_me:$LINENO: result: $ac_cv_lib_pgplot_pgopen" >&5
6380echo "${ECHO_T}$ac_cv_lib_pgplot_pgopen" >&6
6381if test $ac_cv_lib_pgplot_pgopen = yes; then
6382  PGPLOTLIB="-lpgplot"
6383fi
6384
6385  ac_ext=c
6386ac_cpp='$CPP $CPPFLAGS'
6387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6389ac_compiler_gnu=$ac_cv_c_compiler_gnu
6390
6391  # Checks for extra libraries needed by PGPLOT -- will add -lg2c -lstdc++ to $LIBS
6392
6393echo "$as_me:$LINENO: checking for gerror_ in -lg2c" >&5
6394echo $ECHO_N "checking for gerror_ in -lg2c... $ECHO_C" >&6
6395if test "${ac_cv_lib_g2c_gerror_+set}" = set; then
6396  echo $ECHO_N "(cached) $ECHO_C" >&6
6397else
6398  ac_check_lib_save_LIBS=$LIBS
6399LIBS="-lg2c  $LIBS"
6400cat >conftest.$ac_ext <<_ACEOF
6401/* confdefs.h.  */
6402_ACEOF
6403cat confdefs.h >>conftest.$ac_ext
6404cat >>conftest.$ac_ext <<_ACEOF
6405/* end confdefs.h.  */
6406
6407/* Override any gcc2 internal prototype to avoid an error.  */
6408#ifdef __cplusplus
6409extern "C"
6410#endif
6411/* We use char because int might match the return type of a gcc2
6412   builtin and then its argument prototype would still apply.  */
6413char gerror_ ();
6414int
6415main ()
6416{
6417gerror_ ();
6418  ;
6419  return 0;
6420}
6421_ACEOF
6422rm -f conftest.$ac_objext conftest$ac_exeext
6423if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6424  (eval $ac_link) 2>conftest.er1
6425  ac_status=$?
6426  grep -v '^ *+' conftest.er1 >conftest.err
6427  rm -f conftest.er1
6428  cat conftest.err >&5
6429  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6430  (exit $ac_status); } &&
6431         { ac_try='test -z "$ac_c_werror_flag"
6432                         || test ! -s conftest.err'
6433  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6434  (eval $ac_try) 2>&5
6435  ac_status=$?
6436  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6437  (exit $ac_status); }; } &&
6438         { ac_try='test -s conftest$ac_exeext'
6439  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6440  (eval $ac_try) 2>&5
6441  ac_status=$?
6442  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6443  (exit $ac_status); }; }; then
6444  ac_cv_lib_g2c_gerror_=yes
6445else
6446  echo "$as_me: failed program was:" >&5
6447sed 's/^/| /' conftest.$ac_ext >&5
6448
6449ac_cv_lib_g2c_gerror_=no
6450fi
6451rm -f conftest.err conftest.$ac_objext \
6452      conftest$ac_exeext conftest.$ac_ext
6453LIBS=$ac_check_lib_save_LIBS
6454fi
6455echo "$as_me:$LINENO: result: $ac_cv_lib_g2c_gerror_" >&5
6456echo "${ECHO_T}$ac_cv_lib_g2c_gerror_" >&6
6457if test $ac_cv_lib_g2c_gerror_ = yes; then
6458  cat >>confdefs.h <<_ACEOF
6459#define HAVE_LIBG2C 1
6460_ACEOF
6461
6462  LIBS="-lg2c $LIBS"
6463
6464fi
6465
6466
6467echo "$as_me:$LINENO: checking for main in -lstdc++" >&5
6468echo $ECHO_N "checking for main in -lstdc++... $ECHO_C" >&6
6469if test "${ac_cv_lib_stdcpp_main+set}" = set; then
6470  echo $ECHO_N "(cached) $ECHO_C" >&6
6471else
6472  ac_check_lib_save_LIBS=$LIBS
6473LIBS="-lstdc++  $LIBS"
6474cat >conftest.$ac_ext <<_ACEOF
6475/* confdefs.h.  */
6476_ACEOF
6477cat confdefs.h >>conftest.$ac_ext
6478cat >>conftest.$ac_ext <<_ACEOF
6479/* end confdefs.h.  */
6480
6481
6482int
6483main ()
6484{
6485main ();
6486  ;
6487  return 0;
6488}
6489_ACEOF
6490rm -f conftest.$ac_objext conftest$ac_exeext
6491if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6492  (eval $ac_link) 2>conftest.er1
6493  ac_status=$?
6494  grep -v '^ *+' conftest.er1 >conftest.err
6495  rm -f conftest.er1
6496  cat conftest.err >&5
6497  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6498  (exit $ac_status); } &&
6499         { ac_try='test -z "$ac_c_werror_flag"
6500                         || test ! -s conftest.err'
6501  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6502  (eval $ac_try) 2>&5
6503  ac_status=$?
6504  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6505  (exit $ac_status); }; } &&
6506         { ac_try='test -s conftest$ac_exeext'
6507  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6508  (eval $ac_try) 2>&5
6509  ac_status=$?
6510  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6511  (exit $ac_status); }; }; then
6512  ac_cv_lib_stdcpp_main=yes
6513else
6514  echo "$as_me: failed program was:" >&5
6515sed 's/^/| /' conftest.$ac_ext >&5
6516
6517ac_cv_lib_stdcpp_main=no
6518fi
6519rm -f conftest.err conftest.$ac_objext \
6520      conftest$ac_exeext conftest.$ac_ext
6521LIBS=$ac_check_lib_save_LIBS
6522fi
6523echo "$as_me:$LINENO: result: $ac_cv_lib_stdcpp_main" >&5
6524echo "${ECHO_T}$ac_cv_lib_stdcpp_main" >&6
6525if test $ac_cv_lib_stdcpp_main = yes; then
6526  cat >>confdefs.h <<_ACEOF
6527#define HAVE_LIBSTDC__ 1
6528_ACEOF
6529
6530  LIBS="-lstdc++ $LIBS"
6531
6532fi
6533
6534  if test "x$F77" = xgfortran; then
6535    PGPLOTLIB="-lcpgplot $PGPLOTLIB"
6536    { echo "$as_me:$LINENO:  Using gfortran, so manually adding -lcpgplot to PGPLOTLIB string." >&5
6537echo "$as_me:  Using gfortran, so manually adding -lcpgplot to PGPLOTLIB string." >&6;}
6538  else
6539    echo "$as_me:$LINENO: checking for cpgopen in -lcpgplot" >&5
6540echo $ECHO_N "checking for cpgopen in -lcpgplot... $ECHO_C" >&6
6541if test "${ac_cv_lib_cpgplot_cpgopen+set}" = set; then
6542  echo $ECHO_N "(cached) $ECHO_C" >&6
6543else
6544  ac_check_lib_save_LIBS=$LIBS
6545LIBS="-lcpgplot $PGPLOTLIB $LIBS $EXTRAPGLIB $LIBS"
6546cat >conftest.$ac_ext <<_ACEOF
6547/* confdefs.h.  */
6548_ACEOF
6549cat confdefs.h >>conftest.$ac_ext
6550cat >>conftest.$ac_ext <<_ACEOF
6551/* end confdefs.h.  */
6552
6553/* Override any gcc2 internal prototype to avoid an error.  */
6554#ifdef __cplusplus
6555extern "C"
6556#endif
6557/* We use char because int might match the return type of a gcc2
6558   builtin and then its argument prototype would still apply.  */
6559char cpgopen ();
6560int
6561main ()
6562{
6563cpgopen ();
6564  ;
6565  return 0;
6566}
6567_ACEOF
6568rm -f conftest.$ac_objext conftest$ac_exeext
6569if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6570  (eval $ac_link) 2>conftest.er1
6571  ac_status=$?
6572  grep -v '^ *+' conftest.er1 >conftest.err
6573  rm -f conftest.er1
6574  cat conftest.err >&5
6575  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6576  (exit $ac_status); } &&
6577         { ac_try='test -z "$ac_c_werror_flag"
6578                         || test ! -s conftest.err'
6579  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6580  (eval $ac_try) 2>&5
6581  ac_status=$?
6582  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6583  (exit $ac_status); }; } &&
6584         { ac_try='test -s conftest$ac_exeext'
6585  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6586  (eval $ac_try) 2>&5
6587  ac_status=$?
6588  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6589  (exit $ac_status); }; }; then
6590  ac_cv_lib_cpgplot_cpgopen=yes
6591else
6592  echo "$as_me: failed program was:" >&5
6593sed 's/^/| /' conftest.$ac_ext >&5
6594
6595ac_cv_lib_cpgplot_cpgopen=no
6596fi
6597rm -f conftest.err conftest.$ac_objext \
6598      conftest$ac_exeext conftest.$ac_ext
6599LIBS=$ac_check_lib_save_LIBS
6600fi
6601echo "$as_me:$LINENO: result: $ac_cv_lib_cpgplot_cpgopen" >&5
6602echo "${ECHO_T}$ac_cv_lib_cpgplot_cpgopen" >&6
6603if test $ac_cv_lib_cpgplot_cpgopen = yes; then
6604  PGPLOTLIB="-lcpgplot $PGPLOTLIB"
6605fi
6606
6607  fi
6608
6609  # If PGPLOT is not present, we give a warning message but still continue.
6610  # The compilation is able to work without the PGPLOT-dependent files.
6611  if test "x$PGPLOTLIB" = x; then
6612    { echo "$as_me:$LINENO:
6613      -------------------------------------------------------
6614      WARNING! PGPLOT could not be found.
6615      Compiling Duchamp without graphics capabilities.
6616      -------------------------------------------------------" >&5
6617echo "$as_me:
6618      -------------------------------------------------------
6619      WARNING! PGPLOT could not be found.
6620      Compiling Duchamp without graphics capabilities.
6621      -------------------------------------------------------" >&6;}
6622    #We have no pgplot, so we just link with g++ (or equivalent)
6623    LINKER=$CXX
6624  else
6625    #We are using pgplot, so link with the fortran compiler.
6626    LINKER=$F77
6627    PGPLOTLIB="$PGPLOTLIB $EXTRAPGLIB $LIBS"
6628    { echo "$as_me:$LINENO: PGPLOT appears to be available." >&5
6629echo "$as_me: PGPLOT appears to be available." >&6;}
6630
6631cat >>confdefs.h <<\_ACEOF
6632#define HAVE_PGPLOT 1
6633_ACEOF
6634
6635    for LIBDIR in $PGPLOTLIBDIRS ; do
6636     as_ac_File=`echo "ac_cv_file_$LIBDIR/libcpgplot.a" | $as_tr_sh`
6637echo "$as_me:$LINENO: checking for $LIBDIR/libcpgplot.a" >&5
6638echo $ECHO_N "checking for $LIBDIR/libcpgplot.a... $ECHO_C" >&6
6639if eval "test \"\${$as_ac_File+set}\" = set"; then
6640  echo $ECHO_N "(cached) $ECHO_C" >&6
6641else
6642  test "$cross_compiling" = yes &&
6643  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
6644echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
6645   { (exit 1); exit 1; }; }
6646if test -r "$LIBDIR/libcpgplot.a"; then
6647  eval "$as_ac_File=yes"
6648else
6649  eval "$as_ac_File=no"
6650fi
6651fi
6652echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
6653echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
6654if test `eval echo '${'$as_ac_File'}'` = yes; then
6655  PGPLOTLIB="-L$LIBDIR $PGPLOTLIB"; break
6656fi
6657
6658    done
6659    if test "x$F77" = xgfortran; then
6660      PGPLOTLIB="$PGPLOTLIB -bind_at_load"
6661    fi
6662  fi
6663
6664fi
6665
6666
6667
6668
6669##########################################################################
6670
6671##########################################################################
6672# Search for CFITSIO.
6673# use --with-cfitsio=directory to specify a particular CFITSIO directory.
6674# else do the normal searching for libraries.
6675
6676{ echo "$as_me:$LINENO:   -- CFITSIO -- " >&5
6677echo "$as_me:   -- CFITSIO -- " >&6;}
6678
6679# Check whether --with-cfitsio or --without-cfitsio was given.
6680if test "${with_cfitsio+set}" = set; then
6681  withval="$with_cfitsio"
6682   #if we specify a directory...
6683if test "x$withval" = xno; then
6684  { echo "$as_me:$LINENO:
6685    The CFITSIO library is required.
6686    Ignoring the \"--with-cfitsio=no\" and searching for the library." >&5
6687echo "$as_me:
6688    The CFITSIO library is required.
6689    Ignoring the \"--with-cfitsio=no\" and searching for the library." >&1;}
6690  CFITSIOINCDIRS=$INCDIRS
6691  CFITSIOLIBDIRS=$LIBDIRS
6692else
6693  { echo "$as_me:$LINENO: Using directory \"$withval\"" >&5
6694echo "$as_me: Using directory \"$withval\"" >&6;}
6695  CFITSIOINCDIRS="$withval \
6696              $withval/include"
6697  CFITSIOLIBDIRS="$withval \
6698              $withval/lib"
6699  for LIBDIR in $CFITSIOLIBDIRS ; do
6700    as_ac_File=`echo "ac_cv_file_$LIBDIR" | $as_tr_sh`
6701echo "$as_me:$LINENO: checking for $LIBDIR" >&5
6702echo $ECHO_N "checking for $LIBDIR... $ECHO_C" >&6
6703if eval "test \"\${$as_ac_File+set}\" = set"; then
6704  echo $ECHO_N "(cached) $ECHO_C" >&6
6705else
6706  test "$cross_compiling" = yes &&
6707  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
6708echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
6709   { (exit 1); exit 1; }; }
6710if test -r "$LIBDIR"; then
6711  eval "$as_ac_File=yes"
6712else
6713  eval "$as_ac_File=no"
6714fi
6715fi
6716echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
6717echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
6718if test `eval echo '${'$as_ac_File'}'` = yes; then
6719  LDFLAGS="$LDFLAGS -L$LIBDIR"
6720else
6721  continue
6722fi
6723
6724  done
6725  for INCDIR in $CFITSIOINCDIRS ; do
6726    as_ac_File=`echo "ac_cv_file_$INCDIR" | $as_tr_sh`
6727echo "$as_me:$LINENO: checking for $INCDIR" >&5
6728echo $ECHO_N "checking for $INCDIR... $ECHO_C" >&6
6729if eval "test \"\${$as_ac_File+set}\" = set"; then
6730  echo $ECHO_N "(cached) $ECHO_C" >&6
6731else
6732  test "$cross_compiling" = yes &&
6733  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
6734echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
6735   { (exit 1); exit 1; }; }
6736if test -r "$INCDIR"; then
6737  eval "$as_ac_File=yes"
6738else
6739  eval "$as_ac_File=no"
6740fi
6741fi
6742echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
6743echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
6744if test `eval echo '${'$as_ac_File'}'` = yes; then
6745  CPPFLAGS="$CPPFLAGS -I$INCDIR"
6746else
6747  continue
6748fi
6749
6750  done
6751fi
6752
6753else
6754   # if directory not specified, go searching.
6755CFITSIOINCDIRS=$INCDIRS
6756CFITSIOLIBDIRS=$LIBDIRS
6757
6758fi;
6759
6760for INCDIR in $CFITSIOINCDIRS ; do
6761  as_ac_File=`echo "ac_cv_file_$INCDIR/fitsio.h" | $as_tr_sh`
6762echo "$as_me:$LINENO: checking for $INCDIR/fitsio.h" >&5
6763echo $ECHO_N "checking for $INCDIR/fitsio.h... $ECHO_C" >&6
6764if eval "test \"\${$as_ac_File+set}\" = set"; then
6765  echo $ECHO_N "(cached) $ECHO_C" >&6
6766else
6767  test "$cross_compiling" = yes &&
6768  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
6769echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
6770   { (exit 1); exit 1; }; }
6771if test -r "$INCDIR/fitsio.h"; then
6772  eval "$as_ac_File=yes"
6773else
6774  eval "$as_ac_File=no"
6775fi
6776fi
6777echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
6778echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
6779if test `eval echo '${'$as_ac_File'}'` = yes; then
6780  CFITSIOINC=-I$INCDIR; break
6781fi
6782
6783  INCDIR=$INCDIR/cfitsio
6784  as_ac_File=`echo "ac_cv_file_$INCDIR/fitsio.h" | $as_tr_sh`
6785echo "$as_me:$LINENO: checking for $INCDIR/fitsio.h" >&5
6786echo $ECHO_N "checking for $INCDIR/fitsio.h... $ECHO_C" >&6
6787if eval "test \"\${$as_ac_File+set}\" = set"; then
6788  echo $ECHO_N "(cached) $ECHO_C" >&6
6789else
6790  test "$cross_compiling" = yes &&
6791  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
6792echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
6793   { (exit 1); exit 1; }; }
6794if test -r "$INCDIR/fitsio.h"; then
6795  eval "$as_ac_File=yes"
6796else
6797  eval "$as_ac_File=no"
6798fi
6799fi
6800echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
6801echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
6802if test `eval echo '${'$as_ac_File'}'` = yes; then
6803  CFITSIOINC=-I$INCDIR; break
6804fi
6805
6806done
6807
6808echo "$as_me:$LINENO: checking for recv in -lsocket" >&5
6809echo $ECHO_N "checking for recv in -lsocket... $ECHO_C" >&6
6810if test "${ac_cv_lib_socket_recv+set}" = set; then
6811  echo $ECHO_N "(cached) $ECHO_C" >&6
6812else
6813  ac_check_lib_save_LIBS=$LIBS
6814LIBS="-lsocket $LIBS $LIBS"
6815cat >conftest.$ac_ext <<_ACEOF
6816/* confdefs.h.  */
6817_ACEOF
6818cat confdefs.h >>conftest.$ac_ext
6819cat >>conftest.$ac_ext <<_ACEOF
6820/* end confdefs.h.  */
6821
6822/* Override any gcc2 internal prototype to avoid an error.  */
6823#ifdef __cplusplus
6824extern "C"
6825#endif
6826/* We use char because int might match the return type of a gcc2
6827   builtin and then its argument prototype would still apply.  */
6828char recv ();
6829int
6830main ()
6831{
6832recv ();
6833  ;
6834  return 0;
6835}
6836_ACEOF
6837rm -f conftest.$ac_objext conftest$ac_exeext
6838if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6839  (eval $ac_link) 2>conftest.er1
6840  ac_status=$?
6841  grep -v '^ *+' conftest.er1 >conftest.err
6842  rm -f conftest.er1
6843  cat conftest.err >&5
6844  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6845  (exit $ac_status); } &&
6846         { ac_try='test -z "$ac_c_werror_flag"
6847                         || test ! -s conftest.err'
6848  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6849  (eval $ac_try) 2>&5
6850  ac_status=$?
6851  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6852  (exit $ac_status); }; } &&
6853         { ac_try='test -s conftest$ac_exeext'
6854  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6855  (eval $ac_try) 2>&5
6856  ac_status=$?
6857  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6858  (exit $ac_status); }; }; then
6859  ac_cv_lib_socket_recv=yes
6860else
6861  echo "$as_me: failed program was:" >&5
6862sed 's/^/| /' conftest.$ac_ext >&5
6863
6864ac_cv_lib_socket_recv=no
6865fi
6866rm -f conftest.err conftest.$ac_objext \
6867      conftest$ac_exeext conftest.$ac_ext
6868LIBS=$ac_check_lib_save_LIBS
6869fi
6870echo "$as_me:$LINENO: result: $ac_cv_lib_socket_recv" >&5
6871echo "${ECHO_T}$ac_cv_lib_socket_recv" >&6
6872if test $ac_cv_lib_socket_recv = yes; then
6873  CFITSIOLIB="$CFITSIOLIB -lsocket"
6874fi
6875
6876echo "$as_me:$LINENO: checking for ffopen in -lcfitsio" >&5
6877echo $ECHO_N "checking for ffopen in -lcfitsio... $ECHO_C" >&6
6878if test "${ac_cv_lib_cfitsio_ffopen+set}" = set; then
6879  echo $ECHO_N "(cached) $ECHO_C" >&6
6880else
6881  ac_check_lib_save_LIBS=$LIBS
6882LIBS="-lcfitsio $CFITSIOLIB $LIBS $LIBS"
6883cat >conftest.$ac_ext <<_ACEOF
6884/* confdefs.h.  */
6885_ACEOF
6886cat confdefs.h >>conftest.$ac_ext
6887cat >>conftest.$ac_ext <<_ACEOF
6888/* end confdefs.h.  */
6889
6890/* Override any gcc2 internal prototype to avoid an error.  */
6891#ifdef __cplusplus
6892extern "C"
6893#endif
6894/* We use char because int might match the return type of a gcc2
6895   builtin and then its argument prototype would still apply.  */
6896char ffopen ();
6897int
6898main ()
6899{
6900ffopen ();
6901  ;
6902  return 0;
6903}
6904_ACEOF
6905rm -f conftest.$ac_objext conftest$ac_exeext
6906if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6907  (eval $ac_link) 2>conftest.er1
6908  ac_status=$?
6909  grep -v '^ *+' conftest.er1 >conftest.err
6910  rm -f conftest.er1
6911  cat conftest.err >&5
6912  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6913  (exit $ac_status); } &&
6914         { ac_try='test -z "$ac_c_werror_flag"
6915                         || test ! -s conftest.err'
6916  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6917  (eval $ac_try) 2>&5
6918  ac_status=$?
6919  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6920  (exit $ac_status); }; } &&
6921         { ac_try='test -s conftest$ac_exeext'
6922  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6923  (eval $ac_try) 2>&5
6924  ac_status=$?
6925  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6926  (exit $ac_status); }; }; then
6927  ac_cv_lib_cfitsio_ffopen=yes
6928else
6929  echo "$as_me: failed program was:" >&5
6930sed 's/^/| /' conftest.$ac_ext >&5
6931
6932ac_cv_lib_cfitsio_ffopen=no
6933fi
6934rm -f conftest.err conftest.$ac_objext \
6935      conftest$ac_exeext conftest.$ac_ext
6936LIBS=$ac_check_lib_save_LIBS
6937fi
6938echo "$as_me:$LINENO: result: $ac_cv_lib_cfitsio_ffopen" >&5
6939echo "${ECHO_T}$ac_cv_lib_cfitsio_ffopen" >&6
6940if test $ac_cv_lib_cfitsio_ffopen = yes; then
6941  CFITSIOLIB="$CFITSIOLIB -lcfitsio"
6942fi
6943
6944
6945# CFITSIO is essential for Duchamp, so exit with error message if it
6946#   is not present.
6947if test "x$CFITSIOINC" = x -o "x$CFITSIOLIB" = x; then
6948  { { echo "$as_me:$LINENO: error:
6949    -------------------------------------------------------
6950    Could not find the CFITSIO library.
6951
6952    ERROR: Duchamp configuration failure.
6953    -------------------------------------------------------" >&5
6954echo "$as_me: error:
6955    -------------------------------------------------------
6956    Could not find the CFITSIO library.
6957
6958    ERROR: Duchamp configuration failure.
6959    -------------------------------------------------------" >&2;}
6960   { (exit 1); exit 1; }; }
6961else
6962  { echo "$as_me:$LINENO: CFITSIO appears to be available." >&5
6963echo "$as_me: CFITSIO appears to be available." >&6;}
6964
6965cat >>confdefs.h <<\_ACEOF
6966#define HAVE_CFITSIO 1
6967_ACEOF
6968
6969for LIBDIR in $CFITSIOLIBDIRS ; do
6970  as_ac_File=`echo "ac_cv_file_$LIBDIR/libcfitsio.a" | $as_tr_sh`
6971echo "$as_me:$LINENO: checking for $LIBDIR/libcfitsio.a" >&5
6972echo $ECHO_N "checking for $LIBDIR/libcfitsio.a... $ECHO_C" >&6
6973if eval "test \"\${$as_ac_File+set}\" = set"; then
6974  echo $ECHO_N "(cached) $ECHO_C" >&6
6975else
6976  test "$cross_compiling" = yes &&
6977  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
6978echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
6979   { (exit 1); exit 1; }; }
6980if test -r "$LIBDIR/libcfitsio.a"; then
6981  eval "$as_ac_File=yes"
6982else
6983  eval "$as_ac_File=no"
6984fi
6985fi
6986echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
6987echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
6988if test `eval echo '${'$as_ac_File'}'` = yes; then
6989  CFITSIOLIB="-L$LIBDIR $CFITSIOLIB"; break
6990fi
6991
6992  LIBDIR=$LIBDIR/cfitsio
6993  as_ac_File=`echo "ac_cv_file_$LIBDIR/libcfitsio.a" | $as_tr_sh`
6994echo "$as_me:$LINENO: checking for $LIBDIR/libcfitsio.a" >&5
6995echo $ECHO_N "checking for $LIBDIR/libcfitsio.a... $ECHO_C" >&6
6996if eval "test \"\${$as_ac_File+set}\" = set"; then
6997  echo $ECHO_N "(cached) $ECHO_C" >&6
6998else
6999  test "$cross_compiling" = yes &&
7000  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7001echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7002   { (exit 1); exit 1; }; }
7003if test -r "$LIBDIR/libcfitsio.a"; then
7004  eval "$as_ac_File=yes"
7005else
7006  eval "$as_ac_File=no"
7007fi
7008fi
7009echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7010echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7011if test `eval echo '${'$as_ac_File'}'` = yes; then
7012  CFITSIOLIB="-L$LIBDIR $CFITSIOLIB"; break
7013fi
7014
7015done
7016
7017fi
7018
7019
7020
7021##########################################################################
7022
7023##########################################################################
7024# Search for WCSLIB.
7025# use --with-wcslib=directory to specify a particular WCSLIB directory.
7026# else do the normal searching for libraries.
7027
7028{ echo "$as_me:$LINENO:   -- WCSLIB -- " >&5
7029echo "$as_me:   -- WCSLIB -- " >&6;}
7030WCSINCDIR=""
7031
7032# Check whether --with-wcslib or --without-wcslib was given.
7033if test "${with_wcslib+set}" = set; then
7034  withval="$with_wcslib"
7035   #if we specify a directory...
7036if test "x$withval" = xno; then
7037  { echo "$as_me:$LINENO:
7038    The WCSLIB library is required.
7039    Ignoring the \"--with-wcslib=no\" and searching for the library." >&5
7040echo "$as_me:
7041    The WCSLIB library is required.
7042    Ignoring the \"--with-wcslib=no\" and searching for the library." >&1;}
7043  WCSINCDIRS=$INCDIRS
7044  WCSLIBDIRS=$LIBDIRS
7045else
7046  { echo "$as_me:$LINENO: Using directory \"$withval\"" >&5
7047echo "$as_me: Using directory \"$withval\"" >&6;}
7048  WCSINCDIRS="$withval \
7049              $withval/include"
7050  WCSLIBDIRS="$withval \
7051              $withval/lib"
7052  for LIBDIR in $WCSLIBDIRS ; do
7053    as_ac_File=`echo "ac_cv_file_$LIBDIR" | $as_tr_sh`
7054echo "$as_me:$LINENO: checking for $LIBDIR" >&5
7055echo $ECHO_N "checking for $LIBDIR... $ECHO_C" >&6
7056if eval "test \"\${$as_ac_File+set}\" = set"; then
7057  echo $ECHO_N "(cached) $ECHO_C" >&6
7058else
7059  test "$cross_compiling" = yes &&
7060  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7061echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7062   { (exit 1); exit 1; }; }
7063if test -r "$LIBDIR"; then
7064  eval "$as_ac_File=yes"
7065else
7066  eval "$as_ac_File=no"
7067fi
7068fi
7069echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7070echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7071if test `eval echo '${'$as_ac_File'}'` = yes; then
7072  LDFLAGS="$LDFLAGS -L$LIBDIR"
7073else
7074  continue
7075fi
7076
7077  done
7078  for INCDIR in $WCSINCDIRS ; do
7079    as_ac_File=`echo "ac_cv_file_$INCDIR/wcslib" | $as_tr_sh`
7080echo "$as_me:$LINENO: checking for $INCDIR/wcslib" >&5
7081echo $ECHO_N "checking for $INCDIR/wcslib... $ECHO_C" >&6
7082if eval "test \"\${$as_ac_File+set}\" = set"; then
7083  echo $ECHO_N "(cached) $ECHO_C" >&6
7084else
7085  test "$cross_compiling" = yes &&
7086  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7087echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7088   { (exit 1); exit 1; }; }
7089if test -r "$INCDIR/wcslib"; then
7090  eval "$as_ac_File=yes"
7091else
7092  eval "$as_ac_File=no"
7093fi
7094fi
7095echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7096echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7097if test `eval echo '${'$as_ac_File'}'` = yes; then
7098  CPPFLAGS="$CPPFLAGS -I$INCDIR"; WCSINCDIR=$INCDIR; break
7099else
7100  continue
7101fi
7102
7103  done
7104fi
7105
7106else
7107   # if directory not specified, go searching.
7108WCSINCDIRS=$INCDIRS
7109WCSLIBDIRS=$LIBDIRS
7110
7111fi;
7112
7113
7114if test "x$WCSINCDIR" = x; then
7115  for INCBASE in $WCSINCDIRS ; do
7116    as_ac_File=`echo "ac_cv_file_$INCBASE/wcslib/wcs.h" | $as_tr_sh`
7117echo "$as_me:$LINENO: checking for $INCBASE/wcslib/wcs.h" >&5
7118echo $ECHO_N "checking for $INCBASE/wcslib/wcs.h... $ECHO_C" >&6
7119if eval "test \"\${$as_ac_File+set}\" = set"; then
7120  echo $ECHO_N "(cached) $ECHO_C" >&6
7121else
7122  test "$cross_compiling" = yes &&
7123  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7124echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7125   { (exit 1); exit 1; }; }
7126if test -r "$INCBASE/wcslib/wcs.h"; then
7127  eval "$as_ac_File=yes"
7128else
7129  eval "$as_ac_File=no"
7130fi
7131fi
7132echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7133echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7134if test `eval echo '${'$as_ac_File'}'` = yes; then
7135  WCSINC="-I$INCBASE -I$INCBASE/wcslib $WCSINC"; break
7136fi
7137
7138  done
7139else
7140  as_ac_File=`echo "ac_cv_file_$WCSINCDIR/wcslib/wcs.h" | $as_tr_sh`
7141echo "$as_me:$LINENO: checking for $WCSINCDIR/wcslib/wcs.h" >&5
7142echo $ECHO_N "checking for $WCSINCDIR/wcslib/wcs.h... $ECHO_C" >&6
7143if eval "test \"\${$as_ac_File+set}\" = set"; then
7144  echo $ECHO_N "(cached) $ECHO_C" >&6
7145else
7146  test "$cross_compiling" = yes &&
7147  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7148echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7149   { (exit 1); exit 1; }; }
7150if test -r "$WCSINCDIR/wcslib/wcs.h"; then
7151  eval "$as_ac_File=yes"
7152else
7153  eval "$as_ac_File=no"
7154fi
7155fi
7156echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7157echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7158if test `eval echo '${'$as_ac_File'}'` = yes; then
7159  WCSINC="-I$WCSINCDIR -I$WCSINCDIR/wcslib $WCSINC"
7160fi
7161
7162fi
7163
7164
7165# Look for libwcs.a, and libpgsbox.a
7166echo "$as_me:$LINENO: checking for wcss2p in -lwcs" >&5
7167echo $ECHO_N "checking for wcss2p in -lwcs... $ECHO_C" >&6
7168if test "${ac_cv_lib_wcs_wcss2p+set}" = set; then
7169  echo $ECHO_N "(cached) $ECHO_C" >&6
7170else
7171  ac_check_lib_save_LIBS=$LIBS
7172LIBS="-lwcs $WCSLIB $LIBS $CFITSIOLIB $PGPLOTLIB $LIBS"
7173cat >conftest.$ac_ext <<_ACEOF
7174/* confdefs.h.  */
7175_ACEOF
7176cat confdefs.h >>conftest.$ac_ext
7177cat >>conftest.$ac_ext <<_ACEOF
7178/* end confdefs.h.  */
7179
7180/* Override any gcc2 internal prototype to avoid an error.  */
7181#ifdef __cplusplus
7182extern "C"
7183#endif
7184/* We use char because int might match the return type of a gcc2
7185   builtin and then its argument prototype would still apply.  */
7186char wcss2p ();
7187int
7188main ()
7189{
7190wcss2p ();
7191  ;
7192  return 0;
7193}
7194_ACEOF
7195rm -f conftest.$ac_objext conftest$ac_exeext
7196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7197  (eval $ac_link) 2>conftest.er1
7198  ac_status=$?
7199  grep -v '^ *+' conftest.er1 >conftest.err
7200  rm -f conftest.er1
7201  cat conftest.err >&5
7202  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7203  (exit $ac_status); } &&
7204         { ac_try='test -z "$ac_c_werror_flag"
7205                         || test ! -s conftest.err'
7206  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7207  (eval $ac_try) 2>&5
7208  ac_status=$?
7209  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7210  (exit $ac_status); }; } &&
7211         { ac_try='test -s conftest$ac_exeext'
7212  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7213  (eval $ac_try) 2>&5
7214  ac_status=$?
7215  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7216  (exit $ac_status); }; }; then
7217  ac_cv_lib_wcs_wcss2p=yes
7218else
7219  echo "$as_me: failed program was:" >&5
7220sed 's/^/| /' conftest.$ac_ext >&5
7221
7222ac_cv_lib_wcs_wcss2p=no
7223fi
7224rm -f conftest.err conftest.$ac_objext \
7225      conftest$ac_exeext conftest.$ac_ext
7226LIBS=$ac_check_lib_save_LIBS
7227fi
7228echo "$as_me:$LINENO: result: $ac_cv_lib_wcs_wcss2p" >&5
7229echo "${ECHO_T}$ac_cv_lib_wcs_wcss2p" >&6
7230if test $ac_cv_lib_wcs_wcss2p = yes; then
7231  WCSLIB="$WCSLIB -lwcs"
7232fi
7233
7234if test "x$F77" = xgfortran; then
7235  WCSLIB="$WCSLIB -lpgsbox"
7236  { echo "$as_me:$LINENO:  Using gfortran, so manually adding -lpgsbox to WCSLIB string." >&5
7237echo "$as_me:  Using gfortran, so manually adding -lpgsbox to WCSLIB string." >&6;}
7238else
7239  echo "$as_me:$LINENO: checking for cpgsbox in -lpgsbox" >&5
7240echo $ECHO_N "checking for cpgsbox in -lpgsbox... $ECHO_C" >&6
7241if test "${ac_cv_lib_pgsbox_cpgsbox+set}" = set; then
7242  echo $ECHO_N "(cached) $ECHO_C" >&6
7243else
7244  ac_check_lib_save_LIBS=$LIBS
7245LIBS="-lpgsbox $WCSLIB $LIBS $CFITSIOLIB $PGPLOTLIB $LIBS"
7246cat >conftest.$ac_ext <<_ACEOF
7247/* confdefs.h.  */
7248_ACEOF
7249cat confdefs.h >>conftest.$ac_ext
7250cat >>conftest.$ac_ext <<_ACEOF
7251/* end confdefs.h.  */
7252
7253/* Override any gcc2 internal prototype to avoid an error.  */
7254#ifdef __cplusplus
7255extern "C"
7256#endif
7257/* We use char because int might match the return type of a gcc2
7258   builtin and then its argument prototype would still apply.  */
7259char cpgsbox ();
7260int
7261main ()
7262{
7263cpgsbox ();
7264  ;
7265  return 0;
7266}
7267_ACEOF
7268rm -f conftest.$ac_objext conftest$ac_exeext
7269if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7270  (eval $ac_link) 2>conftest.er1
7271  ac_status=$?
7272  grep -v '^ *+' conftest.er1 >conftest.err
7273  rm -f conftest.er1
7274  cat conftest.err >&5
7275  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7276  (exit $ac_status); } &&
7277         { ac_try='test -z "$ac_c_werror_flag"
7278                         || test ! -s conftest.err'
7279  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7280  (eval $ac_try) 2>&5
7281  ac_status=$?
7282  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7283  (exit $ac_status); }; } &&
7284         { ac_try='test -s conftest$ac_exeext'
7285  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7286  (eval $ac_try) 2>&5
7287  ac_status=$?
7288  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7289  (exit $ac_status); }; }; then
7290  ac_cv_lib_pgsbox_cpgsbox=yes
7291else
7292  echo "$as_me: failed program was:" >&5
7293sed 's/^/| /' conftest.$ac_ext >&5
7294
7295ac_cv_lib_pgsbox_cpgsbox=no
7296fi
7297rm -f conftest.err conftest.$ac_objext \
7298      conftest$ac_exeext conftest.$ac_ext
7299LIBS=$ac_check_lib_save_LIBS
7300fi
7301echo "$as_me:$LINENO: result: $ac_cv_lib_pgsbox_cpgsbox" >&5
7302echo "${ECHO_T}$ac_cv_lib_pgsbox_cpgsbox" >&6
7303if test $ac_cv_lib_pgsbox_cpgsbox = yes; then
7304  WCSLIB="$WCSLIB -lpgsbox"
7305fi
7306
7307fi
7308
7309# WCSLIB is essential for Duchamp, so exit with error message if it
7310#   is not present. Need at least libwcs to be available -- libpgsbox will
7311#   depend on PGPLOT being available, but is not critical.
7312if test "x$WCSINC" = x -o "x$WCSLIB" = x; then
7313  { { echo "$as_me:$LINENO: error:
7314    -------------------------------------------------------
7315    Could not find the WCSLIB library.
7316
7317    ERROR: Duchamp configuration failure.
7318    -------------------------------------------------------" >&5
7319echo "$as_me: error:
7320    -------------------------------------------------------
7321    Could not find the WCSLIB library.
7322
7323    ERROR: Duchamp configuration failure.
7324    -------------------------------------------------------" >&2;}
7325   { (exit 1); exit 1; }; }
7326else
7327  { echo "$as_me:$LINENO: WCSLIB appears to be available." >&5
7328echo "$as_me: WCSLIB appears to be available." >&6;}
7329
7330cat >>confdefs.h <<\_ACEOF
7331#define HAVE_WCSLIB 1
7332_ACEOF
7333
7334# Now add the -L statements to start of WCSLIB.
7335# Search for libwcs.a, and, if we find it, search for libpgsbox in same directory and
7336#   then in other directories, keeping the appropriate order of -L calls.
7337
7338  DIRLIST=". \
7339           wcs \
7340           wcslib"
7341
7342  for LIBBASE in $WCSLIBDIRS ; do
7343    for DIR in $DIRLIST; do
7344      if test "x$DIR" = x.; then
7345       LIBDIR=$LIBBASE
7346      else
7347       LIBDIR="$LIBBASE/$DIR"
7348      fi
7349      as_ac_File=`echo "ac_cv_file_$LIBDIR/libwcs.a" | $as_tr_sh`
7350echo "$as_me:$LINENO: checking for $LIBDIR/libwcs.a" >&5
7351echo $ECHO_N "checking for $LIBDIR/libwcs.a... $ECHO_C" >&6
7352if eval "test \"\${$as_ac_File+set}\" = set"; then
7353  echo $ECHO_N "(cached) $ECHO_C" >&6
7354else
7355  test "$cross_compiling" = yes &&
7356  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7357echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7358   { (exit 1); exit 1; }; }
7359if test -r "$LIBDIR/libwcs.a"; then
7360  eval "$as_ac_File=yes"
7361else
7362  eval "$as_ac_File=no"
7363fi
7364fi
7365echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7366echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7367if test `eval echo '${'$as_ac_File'}'` = yes; then
7368  WCSLIBFRONT="-L$LIBDIR";
7369             as_ac_File=`echo "ac_cv_file_$LIBDIR/libpgsbox.a" | $as_tr_sh`
7370echo "$as_me:$LINENO: checking for $LIBDIR/libpgsbox.a" >&5
7371echo $ECHO_N "checking for $LIBDIR/libpgsbox.a... $ECHO_C" >&6
7372if eval "test \"\${$as_ac_File+set}\" = set"; then
7373  echo $ECHO_N "(cached) $ECHO_C" >&6
7374else
7375  test "$cross_compiling" = yes &&
7376  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7377echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7378   { (exit 1); exit 1; }; }
7379if test -r "$LIBDIR/libpgsbox.a"; then
7380  eval "$as_ac_File=yes"
7381else
7382  eval "$as_ac_File=no"
7383fi
7384fi
7385echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7386echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7387if test `eval echo '${'$as_ac_File'}'` = yes; then
7388  :
7389else
7390
7391               for LIBBASE2 in $WCSLIBDIRS ; do
7392                for DIR2 in $DIRLIST; do
7393                 if test "x$DIR" = x.; then
7394                  LIBDIR=$LIBBASE
7395                 else
7396                  LIBDIR="$LIBBASE/$DIR"
7397                 fi
7398                 as_ac_File=`echo "ac_cv_file_$LIBDIR2/libpgsbox.a" | $as_tr_sh`
7399echo "$as_me:$LINENO: checking for $LIBDIR2/libpgsbox.a" >&5
7400echo $ECHO_N "checking for $LIBDIR2/libpgsbox.a... $ECHO_C" >&6
7401if eval "test \"\${$as_ac_File+set}\" = set"; then
7402  echo $ECHO_N "(cached) $ECHO_C" >&6
7403else
7404  test "$cross_compiling" = yes &&
7405  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7406echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7407   { (exit 1); exit 1; }; }
7408if test -r "$LIBDIR2/libpgsbox.a"; then
7409  eval "$as_ac_File=yes"
7410else
7411  eval "$as_ac_File=no"
7412fi
7413fi
7414echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7415echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7416if test `eval echo '${'$as_ac_File'}'` = yes; then
7417  WCSLIBFRONT="$WCSLIB -L$LIBDIR2"; break
7418fi
7419
7420                done
7421               done
7422fi
7423
7424              break
7425fi
7426
7427    done
7428  done
7429  WCSLIB="$WCSLIBFRONT $WCSLIB"
7430fi
7431
7432
7433
7434##########################################################################
7435
7436
7437
7438          ac_config_files="$ac_config_files Makefile"
7439
7440cat >confcache <<\_ACEOF
7441# This file is a shell script that caches the results of configure
7442# tests run on this system so they can be shared between configure
7443# scripts and configure runs, see configure's option --config-cache.
7444# It is not useful on other systems.  If it contains results you don't
7445# want to keep, you may remove or edit it.
7446#
7447# config.status only pays attention to the cache file if you give it
7448# the --recheck option to rerun configure.
7449#
7450# `ac_cv_env_foo' variables (set or unset) will be overridden when
7451# loading this file, other *unset* `ac_cv_foo' will be assigned the
7452# following values.
7453
7454_ACEOF
7455
7456# The following way of writing the cache mishandles newlines in values,
7457# but we know of no workaround that is simple, portable, and efficient.
7458# So, don't put newlines in cache variables' values.
7459# Ultrix sh set writes to stderr and can't be redirected directly,
7460# and sets the high bit in the cache file unless we assign to the vars.
7461{
7462  (set) 2>&1 |
7463    case `(ac_space=' '; set | grep ac_space) 2>&1` in
7464    *ac_space=\ *)
7465      # `set' does not quote correctly, so add quotes (double-quote
7466      # substitution turns \\\\ into \\, and sed turns \\ into \).
7467      sed -n \
7468        "s/'/'\\\\''/g;
7469          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
7470      ;;
7471    *)
7472      # `set' quotes correctly as required by POSIX, so do not add quotes.
7473      sed -n \
7474        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
7475      ;;
7476    esac;
7477} |
7478  sed '
7479     t clear
7480     : clear
7481     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
7482     t end
7483     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
7484     : end' >>confcache
7485if diff $cache_file confcache >/dev/null 2>&1; then :; else
7486  if test -w $cache_file; then
7487    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
7488    cat confcache >$cache_file
7489  else
7490    echo "not updating unwritable cache $cache_file"
7491  fi
7492fi
7493rm -f confcache
7494
7495test "x$prefix" = xNONE && prefix=$ac_default_prefix
7496# Let make expand exec_prefix.
7497test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7498
7499# VPATH may cause trouble with some makes, so we remove $(srcdir),
7500# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
7501# trailing colons and then remove the whole line if VPATH becomes empty
7502# (actually we leave an empty line to preserve line numbers).
7503if test "x$srcdir" = x.; then
7504  ac_vpsub='/^[  ]*VPATH[        ]*=/{
7505s/:*\$(srcdir):*/:/;
7506s/:*\${srcdir}:*/:/;
7507s/:*@srcdir@:*/:/;
7508s/^\([^=]*=[     ]*\):*/\1/;
7509s/:*$//;
7510s/^[^=]*=[       ]*$//;
7511}'
7512fi
7513
7514DEFS=-DHAVE_CONFIG_H
7515
7516ac_libobjs=
7517ac_ltlibobjs=
7518for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
7519  # 1. Remove the extension, and $U if already installed.
7520  ac_i=`echo "$ac_i" |
7521         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
7522  # 2. Add them.
7523  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
7524  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
7525done
7526LIBOBJS=$ac_libobjs
7527
7528LTLIBOBJS=$ac_ltlibobjs
7529
7530
7531
7532: ${CONFIG_STATUS=./config.status}
7533ac_clean_files_save=$ac_clean_files
7534ac_clean_files="$ac_clean_files $CONFIG_STATUS"
7535{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
7536echo "$as_me: creating $CONFIG_STATUS" >&6;}
7537cat >$CONFIG_STATUS <<_ACEOF
7538#! $SHELL
7539# Generated by $as_me.
7540# Run this file to recreate the current configuration.
7541# Compiler output produced by configure, useful for debugging
7542# configure, is in config.log if it exists.
7543
7544debug=false
7545ac_cs_recheck=false
7546ac_cs_silent=false
7547SHELL=\${CONFIG_SHELL-$SHELL}
7548_ACEOF
7549
7550cat >>$CONFIG_STATUS <<\_ACEOF
7551## --------------------- ##
7552## M4sh Initialization.  ##
7553## --------------------- ##
7554
7555# Be Bourne compatible
7556if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
7557  emulate sh
7558  NULLCMD=:
7559  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
7560  # is contrary to our usage.  Disable this feature.
7561  alias -g '${1+"$@"}'='"$@"'
7562elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
7563  set -o posix
7564fi
7565DUALCASE=1; export DUALCASE # for MKS sh
7566
7567# Support unset when possible.
7568if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7569  as_unset=unset
7570else
7571  as_unset=false
7572fi
7573
7574
7575# Work around bugs in pre-3.0 UWIN ksh.
7576$as_unset ENV MAIL MAILPATH
7577PS1='$ '
7578PS2='> '
7579PS4='+ '
7580
7581# NLS nuisances.
7582for as_var in \
7583  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
7584  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
7585  LC_TELEPHONE LC_TIME
7586do
7587  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
7588    eval $as_var=C; export $as_var
7589  else
7590    $as_unset $as_var
7591  fi
7592done
7593
7594# Required to use basename.
7595if expr a : '\(a\)' >/dev/null 2>&1; then
7596  as_expr=expr
7597else
7598  as_expr=false
7599fi
7600
7601if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
7602  as_basename=basename
7603else
7604  as_basename=false
7605fi
7606
7607
7608# Name of the executable.
7609as_me=`$as_basename "$0" ||
7610$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
7611         X"$0" : 'X\(//\)$' \| \
7612         X"$0" : 'X\(/\)$' \| \
7613         .     : '\(.\)' 2>/dev/null ||
7614echo X/"$0" |
7615    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
7616          /^X\/\(\/\/\)$/{ s//\1/; q; }
7617          /^X\/\(\/\).*/{ s//\1/; q; }
7618          s/.*/./; q'`
7619
7620
7621# PATH needs CR, and LINENO needs CR and PATH.
7622# Avoid depending upon Character Ranges.
7623as_cr_letters='abcdefghijklmnopqrstuvwxyz'
7624as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
7625as_cr_Letters=$as_cr_letters$as_cr_LETTERS
7626as_cr_digits='0123456789'
7627as_cr_alnum=$as_cr_Letters$as_cr_digits
7628
7629# The user is always right.
7630if test "${PATH_SEPARATOR+set}" != set; then
7631  echo "#! /bin/sh" >conf$$.sh
7632  echo  "exit 0"   >>conf$$.sh
7633  chmod +x conf$$.sh
7634  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7635    PATH_SEPARATOR=';'
7636  else
7637    PATH_SEPARATOR=:
7638  fi
7639  rm -f conf$$.sh
7640fi
7641
7642
7643  as_lineno_1=$LINENO
7644  as_lineno_2=$LINENO
7645  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
7646  test "x$as_lineno_1" != "x$as_lineno_2" &&
7647  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
7648  # Find who we are.  Look in the path if we contain no path at all
7649  # relative or not.
7650  case $0 in
7651    *[\\/]* ) as_myself=$0 ;;
7652    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7653for as_dir in $PATH
7654do
7655  IFS=$as_save_IFS
7656  test -z "$as_dir" && as_dir=.
7657  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
7658done
7659
7660       ;;
7661  esac
7662  # We did not find ourselves, most probably we were run as `sh COMMAND'
7663  # in which case we are not to be found in the path.
7664  if test "x$as_myself" = x; then
7665    as_myself=$0
7666  fi
7667  if test ! -f "$as_myself"; then
7668    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
7669echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
7670   { (exit 1); exit 1; }; }
7671  fi
7672  case $CONFIG_SHELL in
7673  '')
7674    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7675for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
7676do
7677  IFS=$as_save_IFS
7678  test -z "$as_dir" && as_dir=.
7679  for as_base in sh bash ksh sh5; do
7680         case $as_dir in
7681         /*)
7682           if ("$as_dir/$as_base" -c '
7683  as_lineno_1=$LINENO
7684  as_lineno_2=$LINENO
7685  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
7686  test "x$as_lineno_1" != "x$as_lineno_2" &&
7687  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
7688             $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
7689             $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
7690             CONFIG_SHELL=$as_dir/$as_base
7691             export CONFIG_SHELL
7692             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
7693           fi;;
7694         esac
7695       done
7696done
7697;;
7698  esac
7699
7700  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
7701  # uniformly replaced by the line number.  The first 'sed' inserts a
7702  # line-number line before each line; the second 'sed' does the real
7703  # work.  The second script uses 'N' to pair each line-number line
7704  # with the numbered line, and appends trailing '-' during
7705  # substitution so that $LINENO is not a special case at line end.
7706  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
7707  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
7708  sed '=' <$as_myself |
7709    sed '
7710      N
7711      s,$,-,
7712      : loop
7713      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
7714      t loop
7715      s,-$,,
7716      s,^['$as_cr_digits']*\n,,
7717    ' >$as_me.lineno &&
7718  chmod +x $as_me.lineno ||
7719    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
7720echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
7721   { (exit 1); exit 1; }; }
7722
7723  # Don't try to exec as it changes $[0], causing all sort of problems
7724  # (the dirname of $[0] is not the place where we might find the
7725  # original and so on.  Autoconf is especially sensible to this).
7726  . ./$as_me.lineno
7727  # Exit status is that of the last command.
7728  exit
7729}
7730
7731
7732case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
7733  *c*,-n*) ECHO_N= ECHO_C='
7734' ECHO_T='      ' ;;
7735  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
7736  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
7737esac
7738
7739if expr a : '\(a\)' >/dev/null 2>&1; then
7740  as_expr=expr
7741else
7742  as_expr=false
7743fi
7744
7745rm -f conf$$ conf$$.exe conf$$.file
7746echo >conf$$.file
7747if ln -s conf$$.file conf$$ 2>/dev/null; then
7748  # We could just check for DJGPP; but this test a) works b) is more generic
7749  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
7750  if test -f conf$$.exe; then
7751    # Don't use ln at all; we don't have any links
7752    as_ln_s='cp -p'
7753  else
7754    as_ln_s='ln -s'
7755  fi
7756elif ln conf$$.file conf$$ 2>/dev/null; then
7757  as_ln_s=ln
7758else
7759  as_ln_s='cp -p'
7760fi
7761rm -f conf$$ conf$$.exe conf$$.file
7762
7763if mkdir -p . 2>/dev/null; then
7764  as_mkdir_p=:
7765else
7766  test -d ./-p && rmdir ./-p
7767  as_mkdir_p=false
7768fi
7769
7770as_executable_p="test -f"
7771
7772# Sed expression to map a string onto a valid CPP name.
7773as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
7774
7775# Sed expression to map a string onto a valid variable name.
7776as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
7777
7778
7779# IFS
7780# We need space, tab and new line, in precisely that order.
7781as_nl='
7782'
7783IFS="   $as_nl"
7784
7785# CDPATH.
7786$as_unset CDPATH
7787
7788exec 6>&1
7789
7790# Open the log real soon, to keep \$[0] and so on meaningful, and to
7791# report actual input values of CONFIG_FILES etc. instead of their
7792# values after options handling.  Logging --version etc. is OK.
7793exec 5>>config.log
7794{
7795  echo
7796  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
7797## Running $as_me. ##
7798_ASBOX
7799} >&5
7800cat >&5 <<_CSEOF
7801
7802This file was extended by Duchamp $as_me 1.1.9, which was
7803generated by GNU Autoconf 2.59.  Invocation command line was
7804
7805  CONFIG_FILES    = $CONFIG_FILES
7806  CONFIG_HEADERS  = $CONFIG_HEADERS
7807  CONFIG_LINKS    = $CONFIG_LINKS
7808  CONFIG_COMMANDS = $CONFIG_COMMANDS
7809  $ $0 $@
7810
7811_CSEOF
7812echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
7813echo >&5
7814_ACEOF
7815
7816# Files that config.status was made for.
7817if test -n "$ac_config_files"; then
7818  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
7819fi
7820
7821if test -n "$ac_config_headers"; then
7822  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
7823fi
7824
7825if test -n "$ac_config_links"; then
7826  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
7827fi
7828
7829if test -n "$ac_config_commands"; then
7830  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
7831fi
7832
7833cat >>$CONFIG_STATUS <<\_ACEOF
7834
7835ac_cs_usage="\
7836\`$as_me' instantiates files from templates according to the
7837current configuration.
7838
7839Usage: $0 [OPTIONS] [FILE]...
7840
7841  -h, --help       print this help, then exit
7842  -V, --version    print version number, then exit
7843  -q, --quiet      do not print progress messages
7844  -d, --debug      don't remove temporary files
7845      --recheck    update $as_me by reconfiguring in the same conditions
7846  --file=FILE[:TEMPLATE]
7847                   instantiate the configuration file FILE
7848  --header=FILE[:TEMPLATE]
7849                   instantiate the configuration header FILE
7850
7851Configuration files:
7852$config_files
7853
7854Configuration headers:
7855$config_headers
7856
7857Report bugs to <bug-autoconf@gnu.org>."
7858_ACEOF
7859
7860cat >>$CONFIG_STATUS <<_ACEOF
7861ac_cs_version="\\
7862Duchamp config.status 1.1.9
7863configured by $0, generated by GNU Autoconf 2.59,
7864  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
7865
7866Copyright (C) 2003 Free Software Foundation, Inc.
7867This config.status script is free software; the Free Software Foundation
7868gives unlimited permission to copy, distribute and modify it."
7869srcdir=$srcdir
7870_ACEOF
7871
7872cat >>$CONFIG_STATUS <<\_ACEOF
7873# If no file are specified by the user, then we need to provide default
7874# value.  By we need to know if files were specified by the user.
7875ac_need_defaults=:
7876while test $# != 0
7877do
7878  case $1 in
7879  --*=*)
7880    ac_option=`expr "x$1" : 'x\([^=]*\)='`
7881    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
7882    ac_shift=:
7883    ;;
7884  -*)
7885    ac_option=$1
7886    ac_optarg=$2
7887    ac_shift=shift
7888    ;;
7889  *) # This is not an option, so the user has probably given explicit
7890     # arguments.
7891     ac_option=$1
7892     ac_need_defaults=false;;
7893  esac
7894
7895  case $ac_option in
7896  # Handling of the options.
7897_ACEOF
7898cat >>$CONFIG_STATUS <<\_ACEOF
7899  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7900    ac_cs_recheck=: ;;
7901  --version | --vers* | -V )
7902    echo "$ac_cs_version"; exit 0 ;;
7903  --he | --h)
7904    # Conflict between --help and --header
7905    { { echo "$as_me:$LINENO: error: ambiguous option: $1
7906Try \`$0 --help' for more information." >&5
7907echo "$as_me: error: ambiguous option: $1
7908Try \`$0 --help' for more information." >&2;}
7909   { (exit 1); exit 1; }; };;
7910  --help | --hel | -h )
7911    echo "$ac_cs_usage"; exit 0 ;;
7912  --debug | --d* | -d )
7913    debug=: ;;
7914  --file | --fil | --fi | --f )
7915    $ac_shift
7916    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
7917    ac_need_defaults=false;;
7918  --header | --heade | --head | --hea )
7919    $ac_shift
7920    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
7921    ac_need_defaults=false;;
7922  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
7923  | -silent | --silent | --silen | --sile | --sil | --si | --s)
7924    ac_cs_silent=: ;;
7925
7926  # This is an error.
7927  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
7928Try \`$0 --help' for more information." >&5
7929echo "$as_me: error: unrecognized option: $1
7930Try \`$0 --help' for more information." >&2;}
7931   { (exit 1); exit 1; }; } ;;
7932
7933  *) ac_config_targets="$ac_config_targets $1" ;;
7934
7935  esac
7936  shift
7937done
7938
7939ac_configure_extra_args=
7940
7941if $ac_cs_silent; then
7942  exec 6>/dev/null
7943  ac_configure_extra_args="$ac_configure_extra_args --silent"
7944fi
7945
7946_ACEOF
7947cat >>$CONFIG_STATUS <<_ACEOF
7948if \$ac_cs_recheck; then
7949  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
7950  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
7951fi
7952
7953_ACEOF
7954
7955
7956
7957
7958
7959cat >>$CONFIG_STATUS <<\_ACEOF
7960for ac_config_target in $ac_config_targets
7961do
7962  case "$ac_config_target" in
7963  # Handling of arguments.
7964  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
7965  "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
7966  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
7967echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
7968   { (exit 1); exit 1; }; };;
7969  esac
7970done
7971
7972# If the user did not use the arguments to specify the items to instantiate,
7973# then the envvar interface is used.  Set only those that are not.
7974# We use the long form for the default assignment because of an extremely
7975# bizarre bug on SunOS 4.1.3.
7976if $ac_need_defaults; then
7977  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
7978  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
7979fi
7980
7981# Have a temporary directory for convenience.  Make it in the build tree
7982# simply because there is no reason to put it here, and in addition,
7983# creating and moving files from /tmp can sometimes cause problems.
7984# Create a temporary directory, and hook for its removal unless debugging.
7985$debug ||
7986{
7987  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
7988  trap '{ (exit 1); exit 1; }' 1 2 13 15
7989}
7990
7991# Create a (secure) tmp directory for tmp files.
7992
7993{
7994  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
7995  test -n "$tmp" && test -d "$tmp"
7996}  ||
7997{
7998  tmp=./confstat$$-$RANDOM
7999  (umask 077 && mkdir $tmp)
8000} ||
8001{
8002   echo "$me: cannot create a temporary directory in ." >&2
8003   { (exit 1); exit 1; }
8004}
8005
8006_ACEOF
8007
8008cat >>$CONFIG_STATUS <<_ACEOF
8009
8010#
8011# CONFIG_FILES section.
8012#
8013
8014# No need to generate the scripts if there are no CONFIG_FILES.
8015# This happens for instance when ./config.status config.h
8016if test -n "\$CONFIG_FILES"; then
8017  # Protect against being on the right side of a sed subst in config.status.
8018  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
8019   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
8020s,@SHELL@,$SHELL,;t t
8021s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
8022s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
8023s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
8024s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
8025s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
8026s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
8027s,@exec_prefix@,$exec_prefix,;t t
8028s,@prefix@,$prefix,;t t
8029s,@program_transform_name@,$program_transform_name,;t t
8030s,@bindir@,$bindir,;t t
8031s,@sbindir@,$sbindir,;t t
8032s,@libexecdir@,$libexecdir,;t t
8033s,@datadir@,$datadir,;t t
8034s,@sysconfdir@,$sysconfdir,;t t
8035s,@sharedstatedir@,$sharedstatedir,;t t
8036s,@localstatedir@,$localstatedir,;t t
8037s,@libdir@,$libdir,;t t
8038s,@includedir@,$includedir,;t t
8039s,@oldincludedir@,$oldincludedir,;t t
8040s,@infodir@,$infodir,;t t
8041s,@mandir@,$mandir,;t t
8042s,@build_alias@,$build_alias,;t t
8043s,@host_alias@,$host_alias,;t t
8044s,@target_alias@,$target_alias,;t t
8045s,@DEFS@,$DEFS,;t t
8046s,@ECHO_C@,$ECHO_C,;t t
8047s,@ECHO_N@,$ECHO_N,;t t
8048s,@ECHO_T@,$ECHO_T,;t t
8049s,@LIBS@,$LIBS,;t t
8050s,@CXX@,$CXX,;t t
8051s,@CXXFLAGS@,$CXXFLAGS,;t t
8052s,@LDFLAGS@,$LDFLAGS,;t t
8053s,@CPPFLAGS@,$CPPFLAGS,;t t
8054s,@ac_ct_CXX@,$ac_ct_CXX,;t t
8055s,@EXEEXT@,$EXEEXT,;t t
8056s,@OBJEXT@,$OBJEXT,;t t
8057s,@CC@,$CC,;t t
8058s,@CFLAGS@,$CFLAGS,;t t
8059s,@ac_ct_CC@,$ac_ct_CC,;t t
8060s,@CPP@,$CPP,;t t
8061s,@F77@,$F77,;t t
8062s,@FFLAGS@,$FFLAGS,;t t
8063s,@ac_ct_F77@,$ac_ct_F77,;t t
8064s,@LN_S@,$LN_S,;t t
8065s,@INSTALL@,$INSTALL,;t t
8066s,@EGREP@,$EGREP,;t t
8067s,@RANLIB@,$RANLIB,;t t
8068s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
8069s,@POW_LIB@,$POW_LIB,;t t
8070s,@LIBOBJS@,$LIBOBJS,;t t
8071s,@X_CFLAGS@,$X_CFLAGS,;t t
8072s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
8073s,@X_LIBS@,$X_LIBS,;t t
8074s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
8075s,@LINKER@,$LINKER,;t t
8076s,@PGPLOTINC@,$PGPLOTINC,;t t
8077s,@PGPLOTLIB@,$PGPLOTLIB,;t t
8078s,@CFITSIOINC@,$CFITSIOINC,;t t
8079s,@CFITSIOLIB@,$CFITSIOLIB,;t t
8080s,@WCSINC@,$WCSINC,;t t
8081s,@WCSLIB@,$WCSLIB,;t t
8082s,@LTLIBOBJS@,$LTLIBOBJS,;t t
8083CEOF
8084
8085_ACEOF
8086
8087  cat >>$CONFIG_STATUS <<\_ACEOF
8088  # Split the substitutions into bite-sized pieces for seds with
8089  # small command number limits, like on Digital OSF/1 and HP-UX.
8090  ac_max_sed_lines=48
8091  ac_sed_frag=1 # Number of current file.
8092  ac_beg=1 # First line for current file.
8093  ac_end=$ac_max_sed_lines # Line after last line for current file.
8094  ac_more_lines=:
8095  ac_sed_cmds=
8096  while $ac_more_lines; do
8097    if test $ac_beg -gt 1; then
8098      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
8099    else
8100      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
8101    fi
8102    if test ! -s $tmp/subs.frag; then
8103      ac_more_lines=false
8104    else
8105      # The purpose of the label and of the branching condition is to
8106      # speed up the sed processing (if there are no `@' at all, there
8107      # is no need to browse any of the substitutions).
8108      # These are the two extra sed commands mentioned above.
8109      (echo ':t
8110  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
8111      if test -z "$ac_sed_cmds"; then
8112        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
8113      else
8114        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
8115      fi
8116      ac_sed_frag=`expr $ac_sed_frag + 1`
8117      ac_beg=$ac_end
8118      ac_end=`expr $ac_end + $ac_max_sed_lines`
8119    fi
8120  done
8121  if test -z "$ac_sed_cmds"; then
8122    ac_sed_cmds=cat
8123  fi
8124fi # test -n "$CONFIG_FILES"
8125
8126_ACEOF
8127cat >>$CONFIG_STATUS <<\_ACEOF
8128for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
8129  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8130  case $ac_file in
8131  - | *:- | *:-:* ) # input from stdin
8132        cat >$tmp/stdin
8133        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8134        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8135  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8136        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8137  * )   ac_file_in=$ac_file.in ;;
8138  esac
8139
8140  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
8141  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
8142$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8143         X"$ac_file" : 'X\(//\)[^/]' \| \
8144         X"$ac_file" : 'X\(//\)$' \| \
8145         X"$ac_file" : 'X\(/\)' \| \
8146         .     : '\(.\)' 2>/dev/null ||
8147echo X"$ac_file" |
8148    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8149          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8150          /^X\(\/\/\)$/{ s//\1/; q; }
8151          /^X\(\/\).*/{ s//\1/; q; }
8152          s/.*/./; q'`
8153  { if $as_mkdir_p; then
8154    mkdir -p "$ac_dir"
8155  else
8156    as_dir="$ac_dir"
8157    as_dirs=
8158    while test ! -d "$as_dir"; do
8159      as_dirs="$as_dir $as_dirs"
8160      as_dir=`(dirname "$as_dir") 2>/dev/null ||
8161$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8162         X"$as_dir" : 'X\(//\)[^/]' \| \
8163         X"$as_dir" : 'X\(//\)$' \| \
8164         X"$as_dir" : 'X\(/\)' \| \
8165         .     : '\(.\)' 2>/dev/null ||
8166echo X"$as_dir" |
8167    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8168          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8169          /^X\(\/\/\)$/{ s//\1/; q; }
8170          /^X\(\/\).*/{ s//\1/; q; }
8171          s/.*/./; q'`
8172    done
8173    test ! -n "$as_dirs" || mkdir $as_dirs
8174  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
8175echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
8176   { (exit 1); exit 1; }; }; }
8177
8178  ac_builddir=.
8179
8180if test "$ac_dir" != .; then
8181  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
8182  # A "../" for each directory in $ac_dir_suffix.
8183  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
8184else
8185  ac_dir_suffix= ac_top_builddir=
8186fi
8187
8188case $srcdir in
8189  .)  # No --srcdir option.  We are building in place.
8190    ac_srcdir=.
8191    if test -z "$ac_top_builddir"; then
8192       ac_top_srcdir=.
8193    else
8194       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
8195    fi ;;
8196  [\\/]* | ?:[\\/]* )  # Absolute path.
8197    ac_srcdir=$srcdir$ac_dir_suffix;
8198    ac_top_srcdir=$srcdir ;;
8199  *) # Relative path.
8200    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
8201    ac_top_srcdir=$ac_top_builddir$srcdir ;;
8202esac
8203
8204# Do not use `cd foo && pwd` to compute absolute paths, because
8205# the directories may not exist.
8206case `pwd` in
8207.) ac_abs_builddir="$ac_dir";;
8208*)
8209  case "$ac_dir" in
8210  .) ac_abs_builddir=`pwd`;;
8211  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
8212  *) ac_abs_builddir=`pwd`/"$ac_dir";;
8213  esac;;
8214esac
8215case $ac_abs_builddir in
8216.) ac_abs_top_builddir=${ac_top_builddir}.;;
8217*)
8218  case ${ac_top_builddir}. in
8219  .) ac_abs_top_builddir=$ac_abs_builddir;;
8220  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8221  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
8222  esac;;
8223esac
8224case $ac_abs_builddir in
8225.) ac_abs_srcdir=$ac_srcdir;;
8226*)
8227  case $ac_srcdir in
8228  .) ac_abs_srcdir=$ac_abs_builddir;;
8229  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8230  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
8231  esac;;
8232esac
8233case $ac_abs_builddir in
8234.) ac_abs_top_srcdir=$ac_top_srcdir;;
8235*)
8236  case $ac_top_srcdir in
8237  .) ac_abs_top_srcdir=$ac_abs_builddir;;
8238  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8239  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
8240  esac;;
8241esac
8242
8243
8244
8245  if test x"$ac_file" != x-; then
8246    { echo "$as_me:$LINENO: creating $ac_file" >&5
8247echo "$as_me: creating $ac_file" >&6;}
8248    rm -f "$ac_file"
8249  fi
8250  # Let's still pretend it is `configure' which instantiates (i.e., don't
8251  # use $as_me), people would be surprised to read:
8252  #    /* config.h.  Generated by config.status.  */
8253  if test x"$ac_file" = x-; then
8254    configure_input=
8255  else
8256    configure_input="$ac_file.  "
8257  fi
8258  configure_input=$configure_input"Generated from `echo $ac_file_in |
8259                                     sed 's,.*/,,'` by configure."
8260
8261  # First look for the input files in the build tree, otherwise in the
8262  # src tree.
8263  ac_file_inputs=`IFS=:
8264    for f in $ac_file_in; do
8265      case $f in
8266      -) echo $tmp/stdin ;;
8267      [\\/$]*)
8268         # Absolute (can't be DOS-style, as IFS=:)
8269         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8270echo "$as_me: error: cannot find input file: $f" >&2;}
8271   { (exit 1); exit 1; }; }
8272         echo "$f";;
8273      *) # Relative
8274         if test -f "$f"; then
8275           # Build tree
8276           echo "$f"
8277         elif test -f "$srcdir/$f"; then
8278           # Source tree
8279           echo "$srcdir/$f"
8280         else
8281           # /dev/null tree
8282           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8283echo "$as_me: error: cannot find input file: $f" >&2;}
8284   { (exit 1); exit 1; }; }
8285         fi;;
8286      esac
8287    done` || { (exit 1); exit 1; }
8288_ACEOF
8289cat >>$CONFIG_STATUS <<_ACEOF
8290  sed "$ac_vpsub
8291$extrasub
8292_ACEOF
8293cat >>$CONFIG_STATUS <<\_ACEOF
8294:t
8295/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
8296s,@configure_input@,$configure_input,;t t
8297s,@srcdir@,$ac_srcdir,;t t
8298s,@abs_srcdir@,$ac_abs_srcdir,;t t
8299s,@top_srcdir@,$ac_top_srcdir,;t t
8300s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
8301s,@builddir@,$ac_builddir,;t t
8302s,@abs_builddir@,$ac_abs_builddir,;t t
8303s,@top_builddir@,$ac_top_builddir,;t t
8304s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
8305" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
8306  rm -f $tmp/stdin
8307  if test x"$ac_file" != x-; then
8308    mv $tmp/out $ac_file
8309  else
8310    cat $tmp/out
8311    rm -f $tmp/out
8312  fi
8313
8314done
8315_ACEOF
8316cat >>$CONFIG_STATUS <<\_ACEOF
8317
8318#
8319# CONFIG_HEADER section.
8320#
8321
8322# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8323# NAME is the cpp macro being defined and VALUE is the value it is being given.
8324#
8325# ac_d sets the value in "#define NAME VALUE" lines.
8326ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
8327ac_dB='[         ].*$,\1#\2'
8328ac_dC=' '
8329ac_dD=',;t'
8330# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8331ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8332ac_uB='$,\1#\2define\3'
8333ac_uC=' '
8334ac_uD=',;t'
8335
8336for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
8337  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8338  case $ac_file in
8339  - | *:- | *:-:* ) # input from stdin
8340        cat >$tmp/stdin
8341        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8342        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8343  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8344        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8345  * )   ac_file_in=$ac_file.in ;;
8346  esac
8347
8348  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
8349echo "$as_me: creating $ac_file" >&6;}
8350
8351  # First look for the input files in the build tree, otherwise in the
8352  # src tree.
8353  ac_file_inputs=`IFS=:
8354    for f in $ac_file_in; do
8355      case $f in
8356      -) echo $tmp/stdin ;;
8357      [\\/$]*)
8358         # Absolute (can't be DOS-style, as IFS=:)
8359         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8360echo "$as_me: error: cannot find input file: $f" >&2;}
8361   { (exit 1); exit 1; }; }
8362         # Do quote $f, to prevent DOS paths from being IFS'd.
8363         echo "$f";;
8364      *) # Relative
8365         if test -f "$f"; then
8366           # Build tree
8367           echo "$f"
8368         elif test -f "$srcdir/$f"; then
8369           # Source tree
8370           echo "$srcdir/$f"
8371         else
8372           # /dev/null tree
8373           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8374echo "$as_me: error: cannot find input file: $f" >&2;}
8375   { (exit 1); exit 1; }; }
8376         fi;;
8377      esac
8378    done` || { (exit 1); exit 1; }
8379  # Remove the trailing spaces.
8380  sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
8381
8382_ACEOF
8383
8384# Transform confdefs.h into two sed scripts, `conftest.defines' and
8385# `conftest.undefs', that substitutes the proper values into
8386# config.h.in to produce config.h.  The first handles `#define'
8387# templates, and the second `#undef' templates.
8388# And first: Protect against being on the right side of a sed subst in
8389# config.status.  Protect against being in an unquoted here document
8390# in config.status.
8391rm -f conftest.defines conftest.undefs
8392# Using a here document instead of a string reduces the quoting nightmare.
8393# Putting comments in sed scripts is not portable.
8394#
8395# `end' is used to avoid that the second main sed command (meant for
8396# 0-ary CPP macros) applies to n-ary macro definitions.
8397# See the Autoconf documentation for `clear'.
8398cat >confdef2sed.sed <<\_ACEOF
8399s/[\\&,]/\\&/g
8400s,[\\$`],\\&,g
8401t clear
8402: clear
8403s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
8404t end
8405s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
8406: end
8407_ACEOF
8408# If some macros were called several times there might be several times
8409# the same #defines, which is useless.  Nevertheless, we may not want to
8410# sort them, since we want the *last* AC-DEFINE to be honored.
8411uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
8412sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
8413rm -f confdef2sed.sed
8414
8415# This sed command replaces #undef with comments.  This is necessary, for
8416# example, in the case of _POSIX_SOURCE, which is predefined and required
8417# on some systems where configure will not decide to define it.
8418cat >>conftest.undefs <<\_ACEOF
8419s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
8420_ACEOF
8421
8422# Break up conftest.defines because some shells have a limit on the size
8423# of here documents, and old seds have small limits too (100 cmds).
8424echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
8425echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
8426echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
8427echo '  :' >>$CONFIG_STATUS
8428rm -f conftest.tail
8429while grep . conftest.defines >/dev/null
8430do
8431  # Write a limited-size here document to $tmp/defines.sed.
8432  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
8433  # Speed up: don't consider the non `#define' lines.
8434  echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
8435  # Work around the forget-to-reset-the-flag bug.
8436  echo 't clr' >>$CONFIG_STATUS
8437  echo ': clr' >>$CONFIG_STATUS
8438  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
8439  echo 'CEOF
8440  sed -f $tmp/defines.sed $tmp/in >$tmp/out
8441  rm -f $tmp/in
8442  mv $tmp/out $tmp/in
8443' >>$CONFIG_STATUS
8444  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
8445  rm -f conftest.defines
8446  mv conftest.tail conftest.defines
8447done
8448rm -f conftest.defines
8449echo '  fi # grep' >>$CONFIG_STATUS
8450echo >>$CONFIG_STATUS
8451
8452# Break up conftest.undefs because some shells have a limit on the size
8453# of here documents, and old seds have small limits too (100 cmds).
8454echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
8455rm -f conftest.tail
8456while grep . conftest.undefs >/dev/null
8457do
8458  # Write a limited-size here document to $tmp/undefs.sed.
8459  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
8460  # Speed up: don't consider the non `#undef'
8461  echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
8462  # Work around the forget-to-reset-the-flag bug.
8463  echo 't clr' >>$CONFIG_STATUS
8464  echo ': clr' >>$CONFIG_STATUS
8465  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
8466  echo 'CEOF
8467  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
8468  rm -f $tmp/in
8469  mv $tmp/out $tmp/in
8470' >>$CONFIG_STATUS
8471  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
8472  rm -f conftest.undefs
8473  mv conftest.tail conftest.undefs
8474done
8475rm -f conftest.undefs
8476
8477cat >>$CONFIG_STATUS <<\_ACEOF
8478  # Let's still pretend it is `configure' which instantiates (i.e., don't
8479  # use $as_me), people would be surprised to read:
8480  #    /* config.h.  Generated by config.status.  */
8481  if test x"$ac_file" = x-; then
8482    echo "/* Generated by configure.  */" >$tmp/config.h
8483  else
8484    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
8485  fi
8486  cat $tmp/in >>$tmp/config.h
8487  rm -f $tmp/in
8488  if test x"$ac_file" != x-; then
8489    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
8490      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
8491echo "$as_me: $ac_file is unchanged" >&6;}
8492    else
8493      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
8494$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8495         X"$ac_file" : 'X\(//\)[^/]' \| \
8496         X"$ac_file" : 'X\(//\)$' \| \
8497         X"$ac_file" : 'X\(/\)' \| \
8498         .     : '\(.\)' 2>/dev/null ||
8499echo X"$ac_file" |
8500    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8501          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8502          /^X\(\/\/\)$/{ s//\1/; q; }
8503          /^X\(\/\).*/{ s//\1/; q; }
8504          s/.*/./; q'`
8505      { if $as_mkdir_p; then
8506    mkdir -p "$ac_dir"
8507  else
8508    as_dir="$ac_dir"
8509    as_dirs=
8510    while test ! -d "$as_dir"; do
8511      as_dirs="$as_dir $as_dirs"
8512      as_dir=`(dirname "$as_dir") 2>/dev/null ||
8513$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8514         X"$as_dir" : 'X\(//\)[^/]' \| \
8515         X"$as_dir" : 'X\(//\)$' \| \
8516         X"$as_dir" : 'X\(/\)' \| \
8517         .     : '\(.\)' 2>/dev/null ||
8518echo X"$as_dir" |
8519    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8520          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8521          /^X\(\/\/\)$/{ s//\1/; q; }
8522          /^X\(\/\).*/{ s//\1/; q; }
8523          s/.*/./; q'`
8524    done
8525    test ! -n "$as_dirs" || mkdir $as_dirs
8526  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
8527echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
8528   { (exit 1); exit 1; }; }; }
8529
8530      rm -f $ac_file
8531      mv $tmp/config.h $ac_file
8532    fi
8533  else
8534    cat $tmp/config.h
8535    rm -f $tmp/config.h
8536  fi
8537done
8538_ACEOF
8539
8540cat >>$CONFIG_STATUS <<\_ACEOF
8541
8542{ (exit 0); exit 0; }
8543_ACEOF
8544chmod +x $CONFIG_STATUS
8545ac_clean_files=$ac_clean_files_save
8546
8547
8548# configure is writing to config.log, and then calls config.status.
8549# config.status does its own redirection, appending to config.log.
8550# Unfortunately, on DOS this fails, as config.log is still kept open
8551# by configure, so config.status won't be able to write to it; its
8552# output is simply discarded.  So we exec the FD to /dev/null,
8553# effectively closing config.log, so it can be properly (re)opened and
8554# appended to by config.status.  When coming back to configure, we
8555# need to make the FD available again.
8556if test "$no_create" != yes; then
8557  ac_cs_success=:
8558  ac_config_status_args=
8559  test "$silent" = yes &&
8560    ac_config_status_args="$ac_config_status_args --quiet"
8561  exec 5>/dev/null
8562  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
8563  exec 5>>config.log
8564  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
8565  # would make configure fail if this is the last instruction.
8566  $ac_cs_success || { (exit 1); exit 1; }
8567fi
8568
Note: See TracBrowser for help on using the repository browser.