source: trunk/configure @ 501

Last change on this file since 501 was 501, checked in by MatthewWhiting, 16 years ago

Updating the Local Volume reference in README, and improving the X libraries searching bit in configure.

  • Property svn:executable set to *
File size: 244.6 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.6.
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.6'
273PACKAGE_STRING='Duchamp 1.1.6'
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.6 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.6:";;
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.6
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.6, 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
3498for ac_header in unistd.h time.h math.h iostream fstream sstream iomanip vector string algorithm functional
3499do
3500as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3501if eval "test \"\${$as_ac_Header+set}\" = set"; then
3502  echo "$as_me:$LINENO: checking for $ac_header" >&5
3503echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3504if eval "test \"\${$as_ac_Header+set}\" = set"; then
3505  echo $ECHO_N "(cached) $ECHO_C" >&6
3506fi
3507echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3508echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3509else
3510  # Is the header compilable?
3511echo "$as_me:$LINENO: checking $ac_header usability" >&5
3512echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3513cat >conftest.$ac_ext <<_ACEOF
3514/* confdefs.h.  */
3515_ACEOF
3516cat confdefs.h >>conftest.$ac_ext
3517cat >>conftest.$ac_ext <<_ACEOF
3518/* end confdefs.h.  */
3519$ac_includes_default
3520#include <$ac_header>
3521_ACEOF
3522rm -f conftest.$ac_objext
3523if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3524  (eval $ac_compile) 2>conftest.er1
3525  ac_status=$?
3526  grep -v '^ *+' conftest.er1 >conftest.err
3527  rm -f conftest.er1
3528  cat conftest.err >&5
3529  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3530  (exit $ac_status); } &&
3531         { ac_try='test -z "$ac_c_werror_flag"
3532                         || test ! -s conftest.err'
3533  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3534  (eval $ac_try) 2>&5
3535  ac_status=$?
3536  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3537  (exit $ac_status); }; } &&
3538         { ac_try='test -s conftest.$ac_objext'
3539  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3540  (eval $ac_try) 2>&5
3541  ac_status=$?
3542  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3543  (exit $ac_status); }; }; then
3544  ac_header_compiler=yes
3545else
3546  echo "$as_me: failed program was:" >&5
3547sed 's/^/| /' conftest.$ac_ext >&5
3548
3549ac_header_compiler=no
3550fi
3551rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3552echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3553echo "${ECHO_T}$ac_header_compiler" >&6
3554
3555# Is the header present?
3556echo "$as_me:$LINENO: checking $ac_header presence" >&5
3557echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3558cat >conftest.$ac_ext <<_ACEOF
3559/* confdefs.h.  */
3560_ACEOF
3561cat confdefs.h >>conftest.$ac_ext
3562cat >>conftest.$ac_ext <<_ACEOF
3563/* end confdefs.h.  */
3564#include <$ac_header>
3565_ACEOF
3566if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3567  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3568  ac_status=$?
3569  grep -v '^ *+' conftest.er1 >conftest.err
3570  rm -f conftest.er1
3571  cat conftest.err >&5
3572  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3573  (exit $ac_status); } >/dev/null; then
3574  if test -s conftest.err; then
3575    ac_cpp_err=$ac_c_preproc_warn_flag
3576    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3577  else
3578    ac_cpp_err=
3579  fi
3580else
3581  ac_cpp_err=yes
3582fi
3583if test -z "$ac_cpp_err"; then
3584  ac_header_preproc=yes
3585else
3586  echo "$as_me: failed program was:" >&5
3587sed 's/^/| /' conftest.$ac_ext >&5
3588
3589  ac_header_preproc=no
3590fi
3591rm -f conftest.err conftest.$ac_ext
3592echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3593echo "${ECHO_T}$ac_header_preproc" >&6
3594
3595# So?  What about this header?
3596case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
3597  yes:no: )
3598    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3599echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3600    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
3601echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
3602    ac_header_preproc=yes
3603    ;;
3604  no:yes:* )
3605    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3606echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3607    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
3608echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
3609    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
3610echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
3611    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
3612echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
3613    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3614echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3615    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
3616echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
3617    (
3618      cat <<\_ASBOX
3619## --------------------------------------- ##
3620## Report this to Matthew.Whiting@csiro.au ##
3621## --------------------------------------- ##
3622_ASBOX
3623    ) |
3624      sed "s/^/$as_me: WARNING:     /" >&2
3625    ;;
3626esac
3627echo "$as_me:$LINENO: checking for $ac_header" >&5
3628echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3629if eval "test \"\${$as_ac_Header+set}\" = set"; then
3630  echo $ECHO_N "(cached) $ECHO_C" >&6
3631else
3632  eval "$as_ac_Header=\$ac_header_preproc"
3633fi
3634echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3635echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3636
3637fi
3638if test `eval echo '${'$as_ac_Header'}'` = yes; then
3639  cat >>confdefs.h <<_ACEOF
3640#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3641_ACEOF
3642
3643fi
3644
3645done
3646
3647if test "x$ac_cv_header_stdc" = xno; then
3648  { { echo "$as_me:$LINENO: error:
3649    -------------------------------------------------------------------
3650    An ANSI standard C library is required to build Duchamp.
3651    One of the ANSI C header files it requires is missing or unusable.
3652
3653    ERROR: Duchamp configuration failure.
3654    -------------------------------------------------------------------" >&5
3655echo "$as_me: error:
3656    -------------------------------------------------------------------
3657    An ANSI standard C library is required to build Duchamp.
3658    One of the ANSI C header files it requires is missing or unusable.
3659
3660    ERROR: Duchamp configuration failure.
3661    -------------------------------------------------------------------" >&2;}
3662   { (exit 1); exit 1; }; }
3663fi
3664
3665# Checks for typedefs, structures, and compiler characteristics.
3666echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
3667echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
3668if test "${ac_cv_header_stdbool_h+set}" = set; then
3669  echo $ECHO_N "(cached) $ECHO_C" >&6
3670else
3671  cat >conftest.$ac_ext <<_ACEOF
3672/* confdefs.h.  */
3673_ACEOF
3674cat confdefs.h >>conftest.$ac_ext
3675cat >>conftest.$ac_ext <<_ACEOF
3676/* end confdefs.h.  */
3677
3678#include <stdbool.h>
3679#ifndef bool
3680# error bool is not defined
3681#endif
3682#ifndef false
3683# error false is not defined
3684#endif
3685#if false
3686# error false is not 0
3687#endif
3688#ifndef true
3689# error true is not defined
3690#endif
3691#if true != 1
3692# error true is not 1
3693#endif
3694#ifndef __bool_true_false_are_defined
3695# error __bool_true_false_are_defined is not defined
3696#endif
3697
3698        struct s { _Bool s: 1; _Bool t; } s;
3699
3700        char a[true == 1 ? 1 : -1];
3701        char b[false == 0 ? 1 : -1];
3702        char c[__bool_true_false_are_defined == 1 ? 1 : -1];
3703        char d[(bool) -0.5 == true ? 1 : -1];
3704        bool e = &s;
3705        char f[(_Bool) -0.0 == false ? 1 : -1];
3706        char g[true];
3707        char h[sizeof (_Bool)];
3708        char i[sizeof s.t];
3709
3710int
3711main ()
3712{
3713 return !a + !b + !c + !d + !e + !f + !g + !h + !i;
3714  ;
3715  return 0;
3716}
3717_ACEOF
3718rm -f conftest.$ac_objext
3719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3720  (eval $ac_compile) 2>conftest.er1
3721  ac_status=$?
3722  grep -v '^ *+' conftest.er1 >conftest.err
3723  rm -f conftest.er1
3724  cat conftest.err >&5
3725  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3726  (exit $ac_status); } &&
3727         { ac_try='test -z "$ac_c_werror_flag"
3728                         || test ! -s conftest.err'
3729  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3730  (eval $ac_try) 2>&5
3731  ac_status=$?
3732  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3733  (exit $ac_status); }; } &&
3734         { ac_try='test -s conftest.$ac_objext'
3735  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3736  (eval $ac_try) 2>&5
3737  ac_status=$?
3738  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3739  (exit $ac_status); }; }; then
3740  ac_cv_header_stdbool_h=yes
3741else
3742  echo "$as_me: failed program was:" >&5
3743sed 's/^/| /' conftest.$ac_ext >&5
3744
3745ac_cv_header_stdbool_h=no
3746fi
3747rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3748fi
3749echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
3750echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
3751echo "$as_me:$LINENO: checking for _Bool" >&5
3752echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
3753if test "${ac_cv_type__Bool+set}" = set; then
3754  echo $ECHO_N "(cached) $ECHO_C" >&6
3755else
3756  cat >conftest.$ac_ext <<_ACEOF
3757/* confdefs.h.  */
3758_ACEOF
3759cat confdefs.h >>conftest.$ac_ext
3760cat >>conftest.$ac_ext <<_ACEOF
3761/* end confdefs.h.  */
3762$ac_includes_default
3763int
3764main ()
3765{
3766if ((_Bool *) 0)
3767  return 0;
3768if (sizeof (_Bool))
3769  return 0;
3770  ;
3771  return 0;
3772}
3773_ACEOF
3774rm -f conftest.$ac_objext
3775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3776  (eval $ac_compile) 2>conftest.er1
3777  ac_status=$?
3778  grep -v '^ *+' conftest.er1 >conftest.err
3779  rm -f conftest.er1
3780  cat conftest.err >&5
3781  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3782  (exit $ac_status); } &&
3783         { ac_try='test -z "$ac_c_werror_flag"
3784                         || test ! -s conftest.err'
3785  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3786  (eval $ac_try) 2>&5
3787  ac_status=$?
3788  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3789  (exit $ac_status); }; } &&
3790         { ac_try='test -s conftest.$ac_objext'
3791  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3792  (eval $ac_try) 2>&5
3793  ac_status=$?
3794  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3795  (exit $ac_status); }; }; then
3796  ac_cv_type__Bool=yes
3797else
3798  echo "$as_me: failed program was:" >&5
3799sed 's/^/| /' conftest.$ac_ext >&5
3800
3801ac_cv_type__Bool=no
3802fi
3803rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3804fi
3805echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
3806echo "${ECHO_T}$ac_cv_type__Bool" >&6
3807if test $ac_cv_type__Bool = yes; then
3808
3809cat >>confdefs.h <<_ACEOF
3810#define HAVE__BOOL 1
3811_ACEOF
3812
3813
3814fi
3815
3816if test $ac_cv_header_stdbool_h = yes; then
3817
3818cat >>confdefs.h <<\_ACEOF
3819#define HAVE_STDBOOL_H 1
3820_ACEOF
3821
3822fi
3823
3824echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3825echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3826if test "${ac_cv_c_const+set}" = set; then
3827  echo $ECHO_N "(cached) $ECHO_C" >&6
3828else
3829  cat >conftest.$ac_ext <<_ACEOF
3830/* confdefs.h.  */
3831_ACEOF
3832cat confdefs.h >>conftest.$ac_ext
3833cat >>conftest.$ac_ext <<_ACEOF
3834/* end confdefs.h.  */
3835
3836int
3837main ()
3838{
3839/* FIXME: Include the comments suggested by Paul. */
3840#ifndef __cplusplus
3841  /* Ultrix mips cc rejects this.  */
3842  typedef int charset[2];
3843  const charset x;
3844  /* SunOS 4.1.1 cc rejects this.  */
3845  char const *const *ccp;
3846  char **p;
3847  /* NEC SVR4.0.2 mips cc rejects this.  */
3848  struct point {int x, y;};
3849  static struct point const zero = {0,0};
3850  /* AIX XL C 1.02.0.0 rejects this.
3851     It does not let you subtract one const X* pointer from another in
3852     an arm of an if-expression whose if-part is not a constant
3853     expression */
3854  const char *g = "string";
3855  ccp = &g + (g ? g-g : 0);
3856  /* HPUX 7.0 cc rejects these. */
3857  ++ccp;
3858  p = (char**) ccp;
3859  ccp = (char const *const *) p;
3860  { /* SCO 3.2v4 cc rejects this.  */
3861    char *t;
3862    char const *s = 0 ? (char *) 0 : (char const *) 0;
3863
3864    *t++ = 0;
3865  }
3866  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3867    int x[] = {25, 17};
3868    const int *foo = &x[0];
3869    ++foo;
3870  }
3871  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3872    typedef const int *iptr;
3873    iptr p = 0;
3874    ++p;
3875  }
3876  { /* AIX XL C 1.02.0.0 rejects this saying
3877       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3878    struct s { int j; const int *ap[3]; };
3879    struct s *b; b->j = 5;
3880  }
3881  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3882    const int foo = 10;
3883  }
3884#endif
3885
3886  ;
3887  return 0;
3888}
3889_ACEOF
3890rm -f conftest.$ac_objext
3891if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3892  (eval $ac_compile) 2>conftest.er1
3893  ac_status=$?
3894  grep -v '^ *+' conftest.er1 >conftest.err
3895  rm -f conftest.er1
3896  cat conftest.err >&5
3897  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3898  (exit $ac_status); } &&
3899         { ac_try='test -z "$ac_c_werror_flag"
3900                         || test ! -s conftest.err'
3901  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3902  (eval $ac_try) 2>&5
3903  ac_status=$?
3904  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3905  (exit $ac_status); }; } &&
3906         { ac_try='test -s conftest.$ac_objext'
3907  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3908  (eval $ac_try) 2>&5
3909  ac_status=$?
3910  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3911  (exit $ac_status); }; }; then
3912  ac_cv_c_const=yes
3913else
3914  echo "$as_me: failed program was:" >&5
3915sed 's/^/| /' conftest.$ac_ext >&5
3916
3917ac_cv_c_const=no
3918fi
3919rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3920fi
3921echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3922echo "${ECHO_T}$ac_cv_c_const" >&6
3923if test $ac_cv_c_const = no; then
3924
3925cat >>confdefs.h <<\_ACEOF
3926#define const
3927_ACEOF
3928
3929fi
3930
3931echo "$as_me:$LINENO: checking for inline" >&5
3932echo $ECHO_N "checking for inline... $ECHO_C" >&6
3933if test "${ac_cv_c_inline+set}" = set; then
3934  echo $ECHO_N "(cached) $ECHO_C" >&6
3935else
3936  ac_cv_c_inline=no
3937for ac_kw in inline __inline__ __inline; do
3938  cat >conftest.$ac_ext <<_ACEOF
3939/* confdefs.h.  */
3940_ACEOF
3941cat confdefs.h >>conftest.$ac_ext
3942cat >>conftest.$ac_ext <<_ACEOF
3943/* end confdefs.h.  */
3944#ifndef __cplusplus
3945typedef int foo_t;
3946static $ac_kw foo_t static_foo () {return 0; }
3947$ac_kw foo_t foo () {return 0; }
3948#endif
3949
3950_ACEOF
3951rm -f conftest.$ac_objext
3952if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3953  (eval $ac_compile) 2>conftest.er1
3954  ac_status=$?
3955  grep -v '^ *+' conftest.er1 >conftest.err
3956  rm -f conftest.er1
3957  cat conftest.err >&5
3958  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3959  (exit $ac_status); } &&
3960         { ac_try='test -z "$ac_c_werror_flag"
3961                         || test ! -s conftest.err'
3962  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3963  (eval $ac_try) 2>&5
3964  ac_status=$?
3965  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3966  (exit $ac_status); }; } &&
3967         { ac_try='test -s conftest.$ac_objext'
3968  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3969  (eval $ac_try) 2>&5
3970  ac_status=$?
3971  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3972  (exit $ac_status); }; }; then
3973  ac_cv_c_inline=$ac_kw; break
3974else
3975  echo "$as_me: failed program was:" >&5
3976sed 's/^/| /' conftest.$ac_ext >&5
3977
3978fi
3979rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3980done
3981
3982fi
3983echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3984echo "${ECHO_T}$ac_cv_c_inline" >&6
3985
3986
3987case $ac_cv_c_inline in
3988  inline | yes) ;;
3989  *)
3990    case $ac_cv_c_inline in
3991      no) ac_val=;;
3992      *) ac_val=$ac_cv_c_inline;;
3993    esac
3994    cat >>confdefs.h <<_ACEOF
3995#ifndef __cplusplus
3996#define inline $ac_val
3997#endif
3998_ACEOF
3999    ;;
4000esac
4001
4002
4003# Utilities.
4004if test -n "$ac_tool_prefix"; then
4005  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4006set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4007echo "$as_me:$LINENO: checking for $ac_word" >&5
4008echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4009if test "${ac_cv_prog_RANLIB+set}" = set; then
4010  echo $ECHO_N "(cached) $ECHO_C" >&6
4011else
4012  if test -n "$RANLIB"; then
4013  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4014else
4015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4016for as_dir in $PATH
4017do
4018  IFS=$as_save_IFS
4019  test -z "$as_dir" && as_dir=.
4020  for ac_exec_ext in '' $ac_executable_extensions; do
4021  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4022    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4023    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4024    break 2
4025  fi
4026done
4027done
4028
4029fi
4030fi
4031RANLIB=$ac_cv_prog_RANLIB
4032if test -n "$RANLIB"; then
4033  echo "$as_me:$LINENO: result: $RANLIB" >&5
4034echo "${ECHO_T}$RANLIB" >&6
4035else
4036  echo "$as_me:$LINENO: result: no" >&5
4037echo "${ECHO_T}no" >&6
4038fi
4039
4040fi
4041if test -z "$ac_cv_prog_RANLIB"; then
4042  ac_ct_RANLIB=$RANLIB
4043  # Extract the first word of "ranlib", so it can be a program name with args.
4044set dummy ranlib; ac_word=$2
4045echo "$as_me:$LINENO: checking for $ac_word" >&5
4046echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4047if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4048  echo $ECHO_N "(cached) $ECHO_C" >&6
4049else
4050  if test -n "$ac_ct_RANLIB"; then
4051  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4052else
4053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4054for as_dir in $PATH
4055do
4056  IFS=$as_save_IFS
4057  test -z "$as_dir" && as_dir=.
4058  for ac_exec_ext in '' $ac_executable_extensions; do
4059  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4060    ac_cv_prog_ac_ct_RANLIB="ranlib"
4061    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4062    break 2
4063  fi
4064done
4065done
4066
4067  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
4068fi
4069fi
4070ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4071if test -n "$ac_ct_RANLIB"; then
4072  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4073echo "${ECHO_T}$ac_ct_RANLIB" >&6
4074else
4075  echo "$as_me:$LINENO: result: no" >&5
4076echo "${ECHO_T}no" >&6
4077fi
4078
4079  RANLIB=$ac_ct_RANLIB
4080else
4081  RANLIB="$ac_cv_prog_RANLIB"
4082fi
4083
4084
4085# Checks for library functions.
4086echo "$as_me:$LINENO: checking for working strtod" >&5
4087echo $ECHO_N "checking for working strtod... $ECHO_C" >&6
4088if test "${ac_cv_func_strtod+set}" = set; then
4089  echo $ECHO_N "(cached) $ECHO_C" >&6
4090else
4091  if test "$cross_compiling" = yes; then
4092  ac_cv_func_strtod=no
4093else
4094  cat >conftest.$ac_ext <<_ACEOF
4095/* confdefs.h.  */
4096_ACEOF
4097cat confdefs.h >>conftest.$ac_ext
4098cat >>conftest.$ac_ext <<_ACEOF
4099/* end confdefs.h.  */
4100
4101double strtod ();
4102int
4103main()
4104{
4105  {
4106    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
4107    char *string = " +69";
4108    char *term;
4109    double value;
4110    value = strtod (string, &term);
4111    if (value != 69 || term != (string + 4))
4112      exit (1);
4113  }
4114
4115  {
4116    /* Under Solaris 2.4, strtod returns the wrong value for the
4117       terminating character under some conditions.  */
4118    char *string = "NaN";
4119    char *term;
4120    strtod (string, &term);
4121    if (term != string && *(term - 1) == 0)
4122      exit (1);
4123  }
4124  exit (0);
4125}
4126
4127_ACEOF
4128rm -f conftest$ac_exeext
4129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4130  (eval $ac_link) 2>&5
4131  ac_status=$?
4132  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4133  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4134  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4135  (eval $ac_try) 2>&5
4136  ac_status=$?
4137  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4138  (exit $ac_status); }; }; then
4139  ac_cv_func_strtod=yes
4140else
4141  echo "$as_me: program exited with status $ac_status" >&5
4142echo "$as_me: failed program was:" >&5
4143sed 's/^/| /' conftest.$ac_ext >&5
4144
4145( exit $ac_status )
4146ac_cv_func_strtod=no
4147fi
4148rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4149fi
4150fi
4151echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
4152echo "${ECHO_T}$ac_cv_func_strtod" >&6
4153if test $ac_cv_func_strtod = no; then
4154  case $LIBOBJS in
4155    "strtod.$ac_objext"   | \
4156  *" strtod.$ac_objext"   | \
4157    "strtod.$ac_objext "* | \
4158  *" strtod.$ac_objext "* ) ;;
4159  *) LIBOBJS="$LIBOBJS strtod.$ac_objext" ;;
4160esac
4161
4162echo "$as_me:$LINENO: checking for pow" >&5
4163echo $ECHO_N "checking for pow... $ECHO_C" >&6
4164if test "${ac_cv_func_pow+set}" = set; then
4165  echo $ECHO_N "(cached) $ECHO_C" >&6
4166else
4167  cat >conftest.$ac_ext <<_ACEOF
4168/* confdefs.h.  */
4169_ACEOF
4170cat confdefs.h >>conftest.$ac_ext
4171cat >>conftest.$ac_ext <<_ACEOF
4172/* end confdefs.h.  */
4173/* Define pow to an innocuous variant, in case <limits.h> declares pow.
4174   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4175#define pow innocuous_pow
4176
4177/* System header to define __stub macros and hopefully few prototypes,
4178    which can conflict with char pow (); below.
4179    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4180    <limits.h> exists even on freestanding compilers.  */
4181
4182#ifdef __STDC__
4183# include <limits.h>
4184#else
4185# include <assert.h>
4186#endif
4187
4188#undef pow
4189
4190/* Override any gcc2 internal prototype to avoid an error.  */
4191#ifdef __cplusplus
4192extern "C"
4193{
4194#endif
4195/* We use char because int might match the return type of a gcc2
4196   builtin and then its argument prototype would still apply.  */
4197char pow ();
4198/* The GNU C library defines this for functions which it implements
4199    to always fail with ENOSYS.  Some functions are actually named
4200    something starting with __ and the normal name is an alias.  */
4201#if defined (__stub_pow) || defined (__stub___pow)
4202choke me
4203#else
4204char (*f) () = pow;
4205#endif
4206#ifdef __cplusplus
4207}
4208#endif
4209
4210int
4211main ()
4212{
4213return f != pow;
4214  ;
4215  return 0;
4216}
4217_ACEOF
4218rm -f conftest.$ac_objext conftest$ac_exeext
4219if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4220  (eval $ac_link) 2>conftest.er1
4221  ac_status=$?
4222  grep -v '^ *+' conftest.er1 >conftest.err
4223  rm -f conftest.er1
4224  cat conftest.err >&5
4225  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4226  (exit $ac_status); } &&
4227         { ac_try='test -z "$ac_c_werror_flag"
4228                         || test ! -s conftest.err'
4229  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4230  (eval $ac_try) 2>&5
4231  ac_status=$?
4232  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4233  (exit $ac_status); }; } &&
4234         { ac_try='test -s conftest$ac_exeext'
4235  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4236  (eval $ac_try) 2>&5
4237  ac_status=$?
4238  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4239  (exit $ac_status); }; }; then
4240  ac_cv_func_pow=yes
4241else
4242  echo "$as_me: failed program was:" >&5
4243sed 's/^/| /' conftest.$ac_ext >&5
4244
4245ac_cv_func_pow=no
4246fi
4247rm -f conftest.err conftest.$ac_objext \
4248      conftest$ac_exeext conftest.$ac_ext
4249fi
4250echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5
4251echo "${ECHO_T}$ac_cv_func_pow" >&6
4252
4253if test $ac_cv_func_pow = no; then
4254  echo "$as_me:$LINENO: checking for pow in -lm" >&5
4255echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6
4256if test "${ac_cv_lib_m_pow+set}" = set; then
4257  echo $ECHO_N "(cached) $ECHO_C" >&6
4258else
4259  ac_check_lib_save_LIBS=$LIBS
4260LIBS="-lm  $LIBS"
4261cat >conftest.$ac_ext <<_ACEOF
4262/* confdefs.h.  */
4263_ACEOF
4264cat confdefs.h >>conftest.$ac_ext
4265cat >>conftest.$ac_ext <<_ACEOF
4266/* end confdefs.h.  */
4267
4268/* Override any gcc2 internal prototype to avoid an error.  */
4269#ifdef __cplusplus
4270extern "C"
4271#endif
4272/* We use char because int might match the return type of a gcc2
4273   builtin and then its argument prototype would still apply.  */
4274char pow ();
4275int
4276main ()
4277{
4278pow ();
4279  ;
4280  return 0;
4281}
4282_ACEOF
4283rm -f conftest.$ac_objext conftest$ac_exeext
4284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4285  (eval $ac_link) 2>conftest.er1
4286  ac_status=$?
4287  grep -v '^ *+' conftest.er1 >conftest.err
4288  rm -f conftest.er1
4289  cat conftest.err >&5
4290  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4291  (exit $ac_status); } &&
4292         { ac_try='test -z "$ac_c_werror_flag"
4293                         || test ! -s conftest.err'
4294  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4295  (eval $ac_try) 2>&5
4296  ac_status=$?
4297  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4298  (exit $ac_status); }; } &&
4299         { ac_try='test -s conftest$ac_exeext'
4300  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4301  (eval $ac_try) 2>&5
4302  ac_status=$?
4303  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4304  (exit $ac_status); }; }; then
4305  ac_cv_lib_m_pow=yes
4306else
4307  echo "$as_me: failed program was:" >&5
4308sed 's/^/| /' conftest.$ac_ext >&5
4309
4310ac_cv_lib_m_pow=no
4311fi
4312rm -f conftest.err conftest.$ac_objext \
4313      conftest$ac_exeext conftest.$ac_ext
4314LIBS=$ac_check_lib_save_LIBS
4315fi
4316echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5
4317echo "${ECHO_T}$ac_cv_lib_m_pow" >&6
4318if test $ac_cv_lib_m_pow = yes; then
4319  POW_LIB=-lm
4320else
4321  { echo "$as_me:$LINENO: WARNING: cannot find library containing definition of pow" >&5
4322echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
4323fi
4324
4325fi
4326
4327fi
4328
4329
4330
4331
4332
4333
4334
4335
4336for ac_func in floor pow sqrt strtol log atan fabs
4337do
4338as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4339echo "$as_me:$LINENO: checking for $ac_func" >&5
4340echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4341if eval "test \"\${$as_ac_var+set}\" = set"; then
4342  echo $ECHO_N "(cached) $ECHO_C" >&6
4343else
4344  cat >conftest.$ac_ext <<_ACEOF
4345/* confdefs.h.  */
4346_ACEOF
4347cat confdefs.h >>conftest.$ac_ext
4348cat >>conftest.$ac_ext <<_ACEOF
4349/* end confdefs.h.  */
4350/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4351   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4352#define $ac_func innocuous_$ac_func
4353
4354/* System header to define __stub macros and hopefully few prototypes,
4355    which can conflict with char $ac_func (); below.
4356    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4357    <limits.h> exists even on freestanding compilers.  */
4358
4359#ifdef __STDC__
4360# include <limits.h>
4361#else
4362# include <assert.h>
4363#endif
4364
4365#undef $ac_func
4366
4367/* Override any gcc2 internal prototype to avoid an error.  */
4368#ifdef __cplusplus
4369extern "C"
4370{
4371#endif
4372/* We use char because int might match the return type of a gcc2
4373   builtin and then its argument prototype would still apply.  */
4374char $ac_func ();
4375/* The GNU C library defines this for functions which it implements
4376    to always fail with ENOSYS.  Some functions are actually named
4377    something starting with __ and the normal name is an alias.  */
4378#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4379choke me
4380#else
4381char (*f) () = $ac_func;
4382#endif
4383#ifdef __cplusplus
4384}
4385#endif
4386
4387int
4388main ()
4389{
4390return f != $ac_func;
4391  ;
4392  return 0;
4393}
4394_ACEOF
4395rm -f conftest.$ac_objext conftest$ac_exeext
4396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4397  (eval $ac_link) 2>conftest.er1
4398  ac_status=$?
4399  grep -v '^ *+' conftest.er1 >conftest.err
4400  rm -f conftest.er1
4401  cat conftest.err >&5
4402  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4403  (exit $ac_status); } &&
4404         { ac_try='test -z "$ac_c_werror_flag"
4405                         || test ! -s conftest.err'
4406  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4407  (eval $ac_try) 2>&5
4408  ac_status=$?
4409  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4410  (exit $ac_status); }; } &&
4411         { ac_try='test -s conftest$ac_exeext'
4412  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4413  (eval $ac_try) 2>&5
4414  ac_status=$?
4415  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4416  (exit $ac_status); }; }; then
4417  eval "$as_ac_var=yes"
4418else
4419  echo "$as_me: failed program was:" >&5
4420sed 's/^/| /' conftest.$ac_ext >&5
4421
4422eval "$as_ac_var=no"
4423fi
4424rm -f conftest.err conftest.$ac_objext \
4425      conftest$ac_exeext conftest.$ac_ext
4426fi
4427echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
4428echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4429if test `eval echo '${'$as_ac_var'}'` = yes; then
4430  cat >>confdefs.h <<_ACEOF
4431#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4432_ACEOF
4433
4434fi
4435done
4436
4437
4438# Extra places to look for third-party include files and libraries.
4439INCDIRS="$INCDIRS           \
4440         /usr/include       \
4441         /usr/local/include \
4442         /usr/local/pgplot  \
4443         /usr/local/cfitsio \
4444         /usr/local/wcslib  \
4445         /local/pgplot      \
4446         /local/cfitsio     \
4447         /opt/local/include"
4448
4449LIBDIRS="$LIBDIRS           \
4450         /usr/lib           \
4451         /usr/local/lib     \
4452         /usr/local/pgplot  \
4453         /usr/local/cfitsio \
4454         /usr/local/wcslib  \
4455         /local/lib         \
4456         /local/pgplot      \
4457         /local/cfitsio     \
4458         /opt/SUNWspro/lib  \
4459         /opt/local/lib"
4460
4461{ echo "$as_me:$LINENO: LIBDIRS" >&5
4462echo "$as_me: LIBDIRS" >&6;}
4463
4464for LIBDIR in $LIBDIRS ; do
4465  as_ac_File=`echo "ac_cv_file_$LIBDIR" | $as_tr_sh`
4466echo "$as_me:$LINENO: checking for $LIBDIR" >&5
4467echo $ECHO_N "checking for $LIBDIR... $ECHO_C" >&6
4468if eval "test \"\${$as_ac_File+set}\" = set"; then
4469  echo $ECHO_N "(cached) $ECHO_C" >&6
4470else
4471  test "$cross_compiling" = yes &&
4472  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4473echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4474   { (exit 1); exit 1; }; }
4475if test -r "$LIBDIR"; then
4476  eval "$as_ac_File=yes"
4477else
4478  eval "$as_ac_File=no"
4479fi
4480fi
4481echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4482echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4483if test `eval echo '${'$as_ac_File'}'` = yes; then
4484  LDFLAGS="$LDFLAGS -L$LIBDIR"
4485else
4486  continue
4487fi
4488
4489done
4490
4491##########################################################################
4492# Search for PGPLOT
4493# use --with-cfitsio=directory to specify a particular PGPLOT directory.
4494# or  --without-pgplot or --with-pgplot=no to do without it
4495# else do the normal searching for libraries.
4496
4497{ echo "$as_me:$LINENO:   -- PGPLOT -- " >&5
4498echo "$as_me:   -- PGPLOT -- " >&6;}
4499
4500# Check whether --with-pgplot or --without-pgplot was given.
4501if test "${with_pgplot+set}" = set; then
4502  withval="$with_pgplot"
4503
4504if test "x$withval" != xno; then
4505{ echo "$as_me:$LINENO: Using directory \"$withval\"" >&5
4506echo "$as_me: Using directory \"$withval\"" >&6;}
4507PGPLOTINCDIRS=$withval
4508PGPLOTLIBDIRS=$withval
4509LDFLAGS="$LDFLAGS -L$withval"
4510fi
4511
4512else
4513
4514PGPLOTINCDIRS=$INCDIRS
4515PGPLOTLIBDIRS=$LIBDIRS
4516
4517fi;
4518
4519if test "x$PGPLOTLIBDIRS" = x; then
4520  #the argument to --with-pgplot was no, so we don't look for it.
4521  { echo "$as_me:$LINENO: Not enabling PGPLOT use." >&5
4522echo "$as_me: Not enabling PGPLOT use." >&6;}
4523  #This is the command to do the linking stage of the compilation
4524  #If no pgplot, we can just link with g++ (or equivalent)
4525  LINKER=$CXX
4526#  AC_CHECK_LIB([stdc++], [main], [PGPLOTLIB="-lstdc++"])
4527#  if test "x$F77" = xgfortran; then
4528#    PGPLOTLIB="$PGPLOTLIB -bind_at_load"
4529#  fi
4530else
4531
4532  #Set up the PGPLOT-related libraries and includes.
4533
4534  for INCDIR in $PGPLOTINCDIRS ; do
4535    as_ac_File=`echo "ac_cv_file_$INCDIR/cpgplot.h" | $as_tr_sh`
4536echo "$as_me:$LINENO: checking for $INCDIR/cpgplot.h" >&5
4537echo $ECHO_N "checking for $INCDIR/cpgplot.h... $ECHO_C" >&6
4538if eval "test \"\${$as_ac_File+set}\" = set"; then
4539  echo $ECHO_N "(cached) $ECHO_C" >&6
4540else
4541  test "$cross_compiling" = yes &&
4542  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4543echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4544   { (exit 1); exit 1; }; }
4545if test -r "$INCDIR/cpgplot.h"; then
4546  eval "$as_ac_File=yes"
4547else
4548  eval "$as_ac_File=no"
4549fi
4550fi
4551echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4552echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4553if test `eval echo '${'$as_ac_File'}'` = yes; then
4554  PGPLOTINC=-I$INCDIR; break
4555fi
4556
4557    INCDIR=$INCDIR/pgplot
4558    as_ac_File=`echo "ac_cv_file_$INCDIR/cpgplot.h" | $as_tr_sh`
4559echo "$as_me:$LINENO: checking for $INCDIR/cpgplot.h" >&5
4560echo $ECHO_N "checking for $INCDIR/cpgplot.h... $ECHO_C" >&6
4561if eval "test \"\${$as_ac_File+set}\" = set"; then
4562  echo $ECHO_N "(cached) $ECHO_C" >&6
4563else
4564  test "$cross_compiling" = yes &&
4565  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4566echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4567   { (exit 1); exit 1; }; }
4568if test -r "$INCDIR/cpgplot.h"; then
4569  eval "$as_ac_File=yes"
4570else
4571  eval "$as_ac_File=no"
4572fi
4573fi
4574echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4575echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4576if test `eval echo '${'$as_ac_File'}'` = yes; then
4577  PGPLOTINC=-I$INCDIR; break
4578fi
4579
4580  done
4581
4582  # PGPLOT compiled with a SUN compiler but linked with something else.
4583  echo "$as_me:$LINENO: checking for cosd in -lsunmath" >&5
4584echo $ECHO_N "checking for cosd in -lsunmath... $ECHO_C" >&6
4585if test "${ac_cv_lib_sunmath_cosd+set}" = set; then
4586  echo $ECHO_N "(cached) $ECHO_C" >&6
4587else
4588  ac_check_lib_save_LIBS=$LIBS
4589LIBS="-lsunmath $EXTRAPGLIB $LIBS $LIBS"
4590cat >conftest.$ac_ext <<_ACEOF
4591/* confdefs.h.  */
4592_ACEOF
4593cat confdefs.h >>conftest.$ac_ext
4594cat >>conftest.$ac_ext <<_ACEOF
4595/* end confdefs.h.  */
4596
4597/* Override any gcc2 internal prototype to avoid an error.  */
4598#ifdef __cplusplus
4599extern "C"
4600#endif
4601/* We use char because int might match the return type of a gcc2
4602   builtin and then its argument prototype would still apply.  */
4603char cosd ();
4604int
4605main ()
4606{
4607cosd ();
4608  ;
4609  return 0;
4610}
4611_ACEOF
4612rm -f conftest.$ac_objext conftest$ac_exeext
4613if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4614  (eval $ac_link) 2>conftest.er1
4615  ac_status=$?
4616  grep -v '^ *+' conftest.er1 >conftest.err
4617  rm -f conftest.er1
4618  cat conftest.err >&5
4619  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4620  (exit $ac_status); } &&
4621         { ac_try='test -z "$ac_c_werror_flag"
4622                         || test ! -s conftest.err'
4623  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4624  (eval $ac_try) 2>&5
4625  ac_status=$?
4626  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4627  (exit $ac_status); }; } &&
4628         { ac_try='test -s conftest$ac_exeext'
4629  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4630  (eval $ac_try) 2>&5
4631  ac_status=$?
4632  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4633  (exit $ac_status); }; }; then
4634  ac_cv_lib_sunmath_cosd=yes
4635else
4636  echo "$as_me: failed program was:" >&5
4637sed 's/^/| /' conftest.$ac_ext >&5
4638
4639ac_cv_lib_sunmath_cosd=no
4640fi
4641rm -f conftest.err conftest.$ac_objext \
4642      conftest$ac_exeext conftest.$ac_ext
4643LIBS=$ac_check_lib_save_LIBS
4644fi
4645echo "$as_me:$LINENO: result: $ac_cv_lib_sunmath_cosd" >&5
4646echo "${ECHO_T}$ac_cv_lib_sunmath_cosd" >&6
4647if test $ac_cv_lib_sunmath_cosd = yes; then
4648  EXTRAPGLIB="-lsunmath $EXTRAPGLIB"
4649fi
4650
4651  echo "$as_me:$LINENO: checking for iand_ in -lM77" >&5
4652echo $ECHO_N "checking for iand_ in -lM77... $ECHO_C" >&6
4653if test "${ac_cv_lib_M77_iand_+set}" = set; then
4654  echo $ECHO_N "(cached) $ECHO_C" >&6
4655else
4656  ac_check_lib_save_LIBS=$LIBS
4657LIBS="-lM77 $EXTRAPGLIB $LIBS $LIBS"
4658cat >conftest.$ac_ext <<_ACEOF
4659/* confdefs.h.  */
4660_ACEOF
4661cat confdefs.h >>conftest.$ac_ext
4662cat >>conftest.$ac_ext <<_ACEOF
4663/* end confdefs.h.  */
4664
4665/* Override any gcc2 internal prototype to avoid an error.  */
4666#ifdef __cplusplus
4667extern "C"
4668#endif
4669/* We use char because int might match the return type of a gcc2
4670   builtin and then its argument prototype would still apply.  */
4671char iand_ ();
4672int
4673main ()
4674{
4675iand_ ();
4676  ;
4677  return 0;
4678}
4679_ACEOF
4680rm -f conftest.$ac_objext conftest$ac_exeext
4681if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4682  (eval $ac_link) 2>conftest.er1
4683  ac_status=$?
4684  grep -v '^ *+' conftest.er1 >conftest.err
4685  rm -f conftest.er1
4686  cat conftest.err >&5
4687  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4688  (exit $ac_status); } &&
4689         { ac_try='test -z "$ac_c_werror_flag"
4690                         || test ! -s conftest.err'
4691  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4692  (eval $ac_try) 2>&5
4693  ac_status=$?
4694  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4695  (exit $ac_status); }; } &&
4696         { ac_try='test -s conftest$ac_exeext'
4697  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4698  (eval $ac_try) 2>&5
4699  ac_status=$?
4700  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4701  (exit $ac_status); }; }; then
4702  ac_cv_lib_M77_iand_=yes
4703else
4704  echo "$as_me: failed program was:" >&5
4705sed 's/^/| /' conftest.$ac_ext >&5
4706
4707ac_cv_lib_M77_iand_=no
4708fi
4709rm -f conftest.err conftest.$ac_objext \
4710      conftest$ac_exeext conftest.$ac_ext
4711LIBS=$ac_check_lib_save_LIBS
4712fi
4713echo "$as_me:$LINENO: result: $ac_cv_lib_M77_iand_" >&5
4714echo "${ECHO_T}$ac_cv_lib_M77_iand_" >&6
4715if test $ac_cv_lib_M77_iand_ = yes; then
4716  EXTRAPGLIB="-lM77 $EXTRAPGLIB"
4717fi
4718
4719  echo "$as_me:$LINENO: checking for f77_init in -lF77" >&5
4720echo $ECHO_N "checking for f77_init in -lF77... $ECHO_C" >&6
4721if test "${ac_cv_lib_F77_f77_init+set}" = set; then
4722  echo $ECHO_N "(cached) $ECHO_C" >&6
4723else
4724  ac_check_lib_save_LIBS=$LIBS
4725LIBS="-lF77 $EXTRAPGLIB $LIBS $LIBS"
4726cat >conftest.$ac_ext <<_ACEOF
4727/* confdefs.h.  */
4728_ACEOF
4729cat confdefs.h >>conftest.$ac_ext
4730cat >>conftest.$ac_ext <<_ACEOF
4731/* end confdefs.h.  */
4732
4733/* Override any gcc2 internal prototype to avoid an error.  */
4734#ifdef __cplusplus
4735extern "C"
4736#endif
4737/* We use char because int might match the return type of a gcc2
4738   builtin and then its argument prototype would still apply.  */
4739char f77_init ();
4740int
4741main ()
4742{
4743f77_init ();
4744  ;
4745  return 0;
4746}
4747_ACEOF
4748rm -f conftest.$ac_objext conftest$ac_exeext
4749if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4750  (eval $ac_link) 2>conftest.er1
4751  ac_status=$?
4752  grep -v '^ *+' conftest.er1 >conftest.err
4753  rm -f conftest.er1
4754  cat conftest.err >&5
4755  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4756  (exit $ac_status); } &&
4757         { ac_try='test -z "$ac_c_werror_flag"
4758                         || test ! -s conftest.err'
4759  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4760  (eval $ac_try) 2>&5
4761  ac_status=$?
4762  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4763  (exit $ac_status); }; } &&
4764         { ac_try='test -s conftest$ac_exeext'
4765  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4766  (eval $ac_try) 2>&5
4767  ac_status=$?
4768  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4769  (exit $ac_status); }; }; then
4770  ac_cv_lib_F77_f77_init=yes
4771else
4772  echo "$as_me: failed program was:" >&5
4773sed 's/^/| /' conftest.$ac_ext >&5
4774
4775ac_cv_lib_F77_f77_init=no
4776fi
4777rm -f conftest.err conftest.$ac_objext \
4778      conftest$ac_exeext conftest.$ac_ext
4779LIBS=$ac_check_lib_save_LIBS
4780fi
4781echo "$as_me:$LINENO: result: $ac_cv_lib_F77_f77_init" >&5
4782echo "${ECHO_T}$ac_cv_lib_F77_f77_init" >&6
4783if test $ac_cv_lib_F77_f77_init = yes; then
4784  EXTRAPGLIB="-lF77 $EXTRAPGLIB"
4785fi
4786
4787
4788  # Search for X11 includes and libraries.
4789  echo "$as_me:$LINENO: checking for X" >&5
4790echo $ECHO_N "checking for X... $ECHO_C" >&6
4791
4792
4793# Check whether --with-x or --without-x was given.
4794if test "${with_x+set}" = set; then
4795  withval="$with_x"
4796
4797fi;
4798# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4799if test "x$with_x" = xno; then
4800  # The user explicitly disabled X.
4801  have_x=disabled
4802else
4803  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4804    # Both variables are already set.
4805    have_x=yes
4806  else
4807    if test "${ac_cv_have_x+set}" = set; then
4808  echo $ECHO_N "(cached) $ECHO_C" >&6
4809else
4810  # One or both of the vars are not set, and there is no cached value.
4811ac_x_includes=no ac_x_libraries=no
4812rm -fr conftest.dir
4813if mkdir conftest.dir; then
4814  cd conftest.dir
4815  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4816  cat >Imakefile <<'_ACEOF'
4817acfindx:
4818        @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4819_ACEOF
4820  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4821    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4822    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4823    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4824    for ac_extension in a so sl; do
4825      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4826         test -f $ac_im_libdir/libX11.$ac_extension; then
4827        ac_im_usrlibdir=$ac_im_libdir; break
4828      fi
4829    done
4830    # Screen out bogus values from the imake configuration.  They are
4831    # bogus both because they are the default anyway, and because
4832    # using them would break gcc on systems where it needs fixed includes.
4833    case $ac_im_incroot in
4834        /usr/include) ;;
4835        *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4836    esac
4837    case $ac_im_usrlibdir in
4838        /usr/lib | /lib) ;;
4839        *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4840    esac
4841  fi
4842  cd ..
4843  rm -fr conftest.dir
4844fi
4845
4846# Standard set of common directories for X headers.
4847# Check X11 before X11Rn because it is often a symlink to the current release.
4848ac_x_header_dirs='
4849/usr/X11/include
4850/usr/X11R6/include
4851/usr/X11R5/include
4852/usr/X11R4/include
4853
4854/usr/include/X11
4855/usr/include/X11R6
4856/usr/include/X11R5
4857/usr/include/X11R4
4858
4859/usr/local/X11/include
4860/usr/local/X11R6/include
4861/usr/local/X11R5/include
4862/usr/local/X11R4/include
4863
4864/usr/local/include/X11
4865/usr/local/include/X11R6
4866/usr/local/include/X11R5
4867/usr/local/include/X11R4
4868
4869/usr/X386/include
4870/usr/x386/include
4871/usr/XFree86/include/X11
4872
4873/usr/include
4874/usr/local/include
4875/usr/unsupported/include
4876/usr/athena/include
4877/usr/local/x11r5/include
4878/usr/lpp/Xamples/include
4879
4880/usr/openwin/include
4881/usr/openwin/share/include'
4882
4883if test "$ac_x_includes" = no; then
4884  # Guess where to find include files, by looking for Intrinsic.h.
4885  # First, try using that file with no special directory specified.
4886  cat >conftest.$ac_ext <<_ACEOF
4887/* confdefs.h.  */
4888_ACEOF
4889cat confdefs.h >>conftest.$ac_ext
4890cat >>conftest.$ac_ext <<_ACEOF
4891/* end confdefs.h.  */
4892#include <X11/Intrinsic.h>
4893_ACEOF
4894if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4895  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4896  ac_status=$?
4897  grep -v '^ *+' conftest.er1 >conftest.err
4898  rm -f conftest.er1
4899  cat conftest.err >&5
4900  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4901  (exit $ac_status); } >/dev/null; then
4902  if test -s conftest.err; then
4903    ac_cpp_err=$ac_c_preproc_warn_flag
4904    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4905  else
4906    ac_cpp_err=
4907  fi
4908else
4909  ac_cpp_err=yes
4910fi
4911if test -z "$ac_cpp_err"; then
4912  # We can compile using X headers with no special include directory.
4913ac_x_includes=
4914else
4915  echo "$as_me: failed program was:" >&5
4916sed 's/^/| /' conftest.$ac_ext >&5
4917
4918  for ac_dir in $ac_x_header_dirs; do
4919  if test -r "$ac_dir/X11/Intrinsic.h"; then
4920    ac_x_includes=$ac_dir
4921    break
4922  fi
4923done
4924fi
4925rm -f conftest.err conftest.$ac_ext
4926fi # $ac_x_includes = no
4927
4928if test "$ac_x_libraries" = no; then
4929  # Check for the libraries.
4930  # See if we find them without any special options.
4931  # Don't add to $LIBS permanently.
4932  ac_save_LIBS=$LIBS
4933  LIBS="-lXt $LIBS"
4934  cat >conftest.$ac_ext <<_ACEOF
4935/* confdefs.h.  */
4936_ACEOF
4937cat confdefs.h >>conftest.$ac_ext
4938cat >>conftest.$ac_ext <<_ACEOF
4939/* end confdefs.h.  */
4940#include <X11/Intrinsic.h>
4941int
4942main ()
4943{
4944XtMalloc (0)
4945  ;
4946  return 0;
4947}
4948_ACEOF
4949rm -f conftest.$ac_objext conftest$ac_exeext
4950if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4951  (eval $ac_link) 2>conftest.er1
4952  ac_status=$?
4953  grep -v '^ *+' conftest.er1 >conftest.err
4954  rm -f conftest.er1
4955  cat conftest.err >&5
4956  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4957  (exit $ac_status); } &&
4958         { ac_try='test -z "$ac_c_werror_flag"
4959                         || test ! -s conftest.err'
4960  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4961  (eval $ac_try) 2>&5
4962  ac_status=$?
4963  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4964  (exit $ac_status); }; } &&
4965         { ac_try='test -s conftest$ac_exeext'
4966  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4967  (eval $ac_try) 2>&5
4968  ac_status=$?
4969  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4970  (exit $ac_status); }; }; then
4971  LIBS=$ac_save_LIBS
4972# We can link X programs with no special library path.
4973ac_x_libraries=
4974else
4975  echo "$as_me: failed program was:" >&5
4976sed 's/^/| /' conftest.$ac_ext >&5
4977
4978LIBS=$ac_save_LIBS
4979for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
4980do
4981  # Don't even attempt the hair of trying to link an X program!
4982  for ac_extension in a so sl; do
4983    if test -r $ac_dir/libXt.$ac_extension; then
4984      ac_x_libraries=$ac_dir
4985      break 2
4986    fi
4987  done
4988done
4989fi
4990rm -f conftest.err conftest.$ac_objext \
4991      conftest$ac_exeext conftest.$ac_ext
4992fi # $ac_x_libraries = no
4993
4994if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
4995  # Didn't find X anywhere.  Cache the known absence of X.
4996  ac_cv_have_x="have_x=no"
4997else
4998  # Record where we found X for the cache.
4999  ac_cv_have_x="have_x=yes \
5000                ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5001fi
5002fi
5003
5004  fi
5005  eval "$ac_cv_have_x"
5006fi # $with_x != no
5007
5008if test "$have_x" != yes; then
5009  echo "$as_me:$LINENO: result: $have_x" >&5
5010echo "${ECHO_T}$have_x" >&6
5011  no_x=yes
5012else
5013  # If each of the values was on the command line, it overrides each guess.
5014  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5015  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5016  # Update the cache value to reflect the command line values.
5017  ac_cv_have_x="have_x=yes \
5018                ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5019  echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
5020echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
5021fi
5022
5023#  if test "x$ac_x_libraries" != x; then
5024#    LDFLAGS="$LDFLAGS -L$ac_x_libraries"
5025#    EXTRAPGLIB="-L$ac_x_libraries -lX11 $EXTRAPGLIB"
5026#  fi
5027
5028  if test "$no_x" = yes; then
5029  # Not all programs may use this symbol, but it does not hurt to define it.
5030
5031cat >>confdefs.h <<\_ACEOF
5032#define X_DISPLAY_MISSING 1
5033_ACEOF
5034
5035  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5036else
5037  if test -n "$x_includes"; then
5038    X_CFLAGS="$X_CFLAGS -I$x_includes"
5039  fi
5040
5041  # It would also be nice to do this for all -L options, not just this one.
5042  if test -n "$x_libraries"; then
5043    X_LIBS="$X_LIBS -L$x_libraries"
5044    # For Solaris; some versions of Sun CC require a space after -R and
5045    # others require no space.  Words are not sufficient . . . .
5046    case `(uname -sr) 2>/dev/null` in
5047    "SunOS 5"*)
5048      echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
5049echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
5050      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
5051      cat >conftest.$ac_ext <<_ACEOF
5052/* confdefs.h.  */
5053_ACEOF
5054cat confdefs.h >>conftest.$ac_ext
5055cat >>conftest.$ac_ext <<_ACEOF
5056/* end confdefs.h.  */
5057
5058int
5059main ()
5060{
5061
5062  ;
5063  return 0;
5064}
5065_ACEOF
5066rm -f conftest.$ac_objext conftest$ac_exeext
5067if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5068  (eval $ac_link) 2>conftest.er1
5069  ac_status=$?
5070  grep -v '^ *+' conftest.er1 >conftest.err
5071  rm -f conftest.er1
5072  cat conftest.err >&5
5073  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5074  (exit $ac_status); } &&
5075         { ac_try='test -z "$ac_c_werror_flag"
5076                         || test ! -s conftest.err'
5077  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5078  (eval $ac_try) 2>&5
5079  ac_status=$?
5080  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5081  (exit $ac_status); }; } &&
5082         { ac_try='test -s conftest$ac_exeext'
5083  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5084  (eval $ac_try) 2>&5
5085  ac_status=$?
5086  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5087  (exit $ac_status); }; }; then
5088  ac_R_nospace=yes
5089else
5090  echo "$as_me: failed program was:" >&5
5091sed 's/^/| /' conftest.$ac_ext >&5
5092
5093ac_R_nospace=no
5094fi
5095rm -f conftest.err conftest.$ac_objext \
5096      conftest$ac_exeext conftest.$ac_ext
5097      if test $ac_R_nospace = yes; then
5098        echo "$as_me:$LINENO: result: no" >&5
5099echo "${ECHO_T}no" >&6
5100        X_LIBS="$X_LIBS -R$x_libraries"
5101      else
5102        LIBS="$ac_xsave_LIBS -R $x_libraries"
5103        cat >conftest.$ac_ext <<_ACEOF
5104/* confdefs.h.  */
5105_ACEOF
5106cat confdefs.h >>conftest.$ac_ext
5107cat >>conftest.$ac_ext <<_ACEOF
5108/* end confdefs.h.  */
5109
5110int
5111main ()
5112{
5113
5114  ;
5115  return 0;
5116}
5117_ACEOF
5118rm -f conftest.$ac_objext conftest$ac_exeext
5119if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5120  (eval $ac_link) 2>conftest.er1
5121  ac_status=$?
5122  grep -v '^ *+' conftest.er1 >conftest.err
5123  rm -f conftest.er1
5124  cat conftest.err >&5
5125  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5126  (exit $ac_status); } &&
5127         { ac_try='test -z "$ac_c_werror_flag"
5128                         || test ! -s conftest.err'
5129  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5130  (eval $ac_try) 2>&5
5131  ac_status=$?
5132  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5133  (exit $ac_status); }; } &&
5134         { ac_try='test -s conftest$ac_exeext'
5135  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5136  (eval $ac_try) 2>&5
5137  ac_status=$?
5138  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5139  (exit $ac_status); }; }; then
5140  ac_R_space=yes
5141else
5142  echo "$as_me: failed program was:" >&5
5143sed 's/^/| /' conftest.$ac_ext >&5
5144
5145ac_R_space=no
5146fi
5147rm -f conftest.err conftest.$ac_objext \
5148      conftest$ac_exeext conftest.$ac_ext
5149        if test $ac_R_space = yes; then
5150          echo "$as_me:$LINENO: result: yes" >&5
5151echo "${ECHO_T}yes" >&6
5152          X_LIBS="$X_LIBS -R $x_libraries"
5153        else
5154          echo "$as_me:$LINENO: result: neither works" >&5
5155echo "${ECHO_T}neither works" >&6
5156        fi
5157      fi
5158      LIBS=$ac_xsave_LIBS
5159    esac
5160  fi
5161
5162  # Check for system-dependent libraries X programs must link with.
5163  # Do this before checking for the system-independent R6 libraries
5164  # (-lICE), since we may need -lsocket or whatever for X linking.
5165
5166  if test "$ISC" = yes; then
5167    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5168  else
5169    # Martyn Johnson says this is needed for Ultrix, if the X
5170    # libraries were built with DECnet support.  And Karl Berry says
5171    # the Alpha needs dnet_stub (dnet does not exist).
5172    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
5173    cat >conftest.$ac_ext <<_ACEOF
5174/* confdefs.h.  */
5175_ACEOF
5176cat confdefs.h >>conftest.$ac_ext
5177cat >>conftest.$ac_ext <<_ACEOF
5178/* end confdefs.h.  */
5179
5180/* Override any gcc2 internal prototype to avoid an error.  */
5181#ifdef __cplusplus
5182extern "C"
5183#endif
5184/* We use char because int might match the return type of a gcc2
5185   builtin and then its argument prototype would still apply.  */
5186char XOpenDisplay ();
5187int
5188main ()
5189{
5190XOpenDisplay ();
5191  ;
5192  return 0;
5193}
5194_ACEOF
5195rm -f conftest.$ac_objext conftest$ac_exeext
5196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5197  (eval $ac_link) 2>conftest.er1
5198  ac_status=$?
5199  grep -v '^ *+' conftest.er1 >conftest.err
5200  rm -f conftest.er1
5201  cat conftest.err >&5
5202  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5203  (exit $ac_status); } &&
5204         { ac_try='test -z "$ac_c_werror_flag"
5205                         || test ! -s conftest.err'
5206  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5207  (eval $ac_try) 2>&5
5208  ac_status=$?
5209  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5210  (exit $ac_status); }; } &&
5211         { ac_try='test -s conftest$ac_exeext'
5212  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5213  (eval $ac_try) 2>&5
5214  ac_status=$?
5215  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5216  (exit $ac_status); }; }; then
5217  :
5218else
5219  echo "$as_me: failed program was:" >&5
5220sed 's/^/| /' conftest.$ac_ext >&5
5221
5222echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
5223echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
5224if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
5225  echo $ECHO_N "(cached) $ECHO_C" >&6
5226else
5227  ac_check_lib_save_LIBS=$LIBS
5228LIBS="-ldnet  $LIBS"
5229cat >conftest.$ac_ext <<_ACEOF
5230/* confdefs.h.  */
5231_ACEOF
5232cat confdefs.h >>conftest.$ac_ext
5233cat >>conftest.$ac_ext <<_ACEOF
5234/* end confdefs.h.  */
5235
5236/* Override any gcc2 internal prototype to avoid an error.  */
5237#ifdef __cplusplus
5238extern "C"
5239#endif
5240/* We use char because int might match the return type of a gcc2
5241   builtin and then its argument prototype would still apply.  */
5242char dnet_ntoa ();
5243int
5244main ()
5245{
5246dnet_ntoa ();
5247  ;
5248  return 0;
5249}
5250_ACEOF
5251rm -f conftest.$ac_objext conftest$ac_exeext
5252if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5253  (eval $ac_link) 2>conftest.er1
5254  ac_status=$?
5255  grep -v '^ *+' conftest.er1 >conftest.err
5256  rm -f conftest.er1
5257  cat conftest.err >&5
5258  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5259  (exit $ac_status); } &&
5260         { ac_try='test -z "$ac_c_werror_flag"
5261                         || test ! -s conftest.err'
5262  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5263  (eval $ac_try) 2>&5
5264  ac_status=$?
5265  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5266  (exit $ac_status); }; } &&
5267         { ac_try='test -s conftest$ac_exeext'
5268  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5269  (eval $ac_try) 2>&5
5270  ac_status=$?
5271  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5272  (exit $ac_status); }; }; then
5273  ac_cv_lib_dnet_dnet_ntoa=yes
5274else
5275  echo "$as_me: failed program was:" >&5
5276sed 's/^/| /' conftest.$ac_ext >&5
5277
5278ac_cv_lib_dnet_dnet_ntoa=no
5279fi
5280rm -f conftest.err conftest.$ac_objext \
5281      conftest$ac_exeext conftest.$ac_ext
5282LIBS=$ac_check_lib_save_LIBS
5283fi
5284echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
5285echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
5286if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
5287  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5288fi
5289
5290    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5291      echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
5292echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
5293if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
5294  echo $ECHO_N "(cached) $ECHO_C" >&6
5295else
5296  ac_check_lib_save_LIBS=$LIBS
5297LIBS="-ldnet_stub  $LIBS"
5298cat >conftest.$ac_ext <<_ACEOF
5299/* confdefs.h.  */
5300_ACEOF
5301cat confdefs.h >>conftest.$ac_ext
5302cat >>conftest.$ac_ext <<_ACEOF
5303/* end confdefs.h.  */
5304
5305/* Override any gcc2 internal prototype to avoid an error.  */
5306#ifdef __cplusplus
5307extern "C"
5308#endif
5309/* We use char because int might match the return type of a gcc2
5310   builtin and then its argument prototype would still apply.  */
5311char dnet_ntoa ();
5312int
5313main ()
5314{
5315dnet_ntoa ();
5316  ;
5317  return 0;
5318}
5319_ACEOF
5320rm -f conftest.$ac_objext conftest$ac_exeext
5321if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5322  (eval $ac_link) 2>conftest.er1
5323  ac_status=$?
5324  grep -v '^ *+' conftest.er1 >conftest.err
5325  rm -f conftest.er1
5326  cat conftest.err >&5
5327  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5328  (exit $ac_status); } &&
5329         { ac_try='test -z "$ac_c_werror_flag"
5330                         || test ! -s conftest.err'
5331  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5332  (eval $ac_try) 2>&5
5333  ac_status=$?
5334  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5335  (exit $ac_status); }; } &&
5336         { ac_try='test -s conftest$ac_exeext'
5337  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5338  (eval $ac_try) 2>&5
5339  ac_status=$?
5340  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5341  (exit $ac_status); }; }; then
5342  ac_cv_lib_dnet_stub_dnet_ntoa=yes
5343else
5344  echo "$as_me: failed program was:" >&5
5345sed 's/^/| /' conftest.$ac_ext >&5
5346
5347ac_cv_lib_dnet_stub_dnet_ntoa=no
5348fi
5349rm -f conftest.err conftest.$ac_objext \
5350      conftest$ac_exeext conftest.$ac_ext
5351LIBS=$ac_check_lib_save_LIBS
5352fi
5353echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
5354echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
5355if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
5356  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5357fi
5358
5359    fi
5360fi
5361rm -f conftest.err conftest.$ac_objext \
5362      conftest$ac_exeext conftest.$ac_ext
5363    LIBS="$ac_xsave_LIBS"
5364
5365    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5366    # to get the SysV transport functions.
5367    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
5368    # needs -lnsl.
5369    # The nsl library prevents programs from opening the X display
5370    # on Irix 5.2, according to T.E. Dickey.
5371    # The functions gethostbyname, getservbyname, and inet_addr are
5372    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
5373    echo "$as_me:$LINENO: checking for gethostbyname" >&5
5374echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
5375if test "${ac_cv_func_gethostbyname+set}" = set; then
5376  echo $ECHO_N "(cached) $ECHO_C" >&6
5377else
5378  cat >conftest.$ac_ext <<_ACEOF
5379/* confdefs.h.  */
5380_ACEOF
5381cat confdefs.h >>conftest.$ac_ext
5382cat >>conftest.$ac_ext <<_ACEOF
5383/* end confdefs.h.  */
5384/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5385   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5386#define gethostbyname innocuous_gethostbyname
5387
5388/* System header to define __stub macros and hopefully few prototypes,
5389    which can conflict with char gethostbyname (); below.
5390    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5391    <limits.h> exists even on freestanding compilers.  */
5392
5393#ifdef __STDC__
5394# include <limits.h>
5395#else
5396# include <assert.h>
5397#endif
5398
5399#undef gethostbyname
5400
5401/* Override any gcc2 internal prototype to avoid an error.  */
5402#ifdef __cplusplus
5403extern "C"
5404{
5405#endif
5406/* We use char because int might match the return type of a gcc2
5407   builtin and then its argument prototype would still apply.  */
5408char gethostbyname ();
5409/* The GNU C library defines this for functions which it implements
5410    to always fail with ENOSYS.  Some functions are actually named
5411    something starting with __ and the normal name is an alias.  */
5412#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5413choke me
5414#else
5415char (*f) () = gethostbyname;
5416#endif
5417#ifdef __cplusplus
5418}
5419#endif
5420
5421int
5422main ()
5423{
5424return f != gethostbyname;
5425  ;
5426  return 0;
5427}
5428_ACEOF
5429rm -f conftest.$ac_objext conftest$ac_exeext
5430if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5431  (eval $ac_link) 2>conftest.er1
5432  ac_status=$?
5433  grep -v '^ *+' conftest.er1 >conftest.err
5434  rm -f conftest.er1
5435  cat conftest.err >&5
5436  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5437  (exit $ac_status); } &&
5438         { ac_try='test -z "$ac_c_werror_flag"
5439                         || test ! -s conftest.err'
5440  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5441  (eval $ac_try) 2>&5
5442  ac_status=$?
5443  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5444  (exit $ac_status); }; } &&
5445         { ac_try='test -s conftest$ac_exeext'
5446  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5447  (eval $ac_try) 2>&5
5448  ac_status=$?
5449  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5450  (exit $ac_status); }; }; then
5451  ac_cv_func_gethostbyname=yes
5452else
5453  echo "$as_me: failed program was:" >&5
5454sed 's/^/| /' conftest.$ac_ext >&5
5455
5456ac_cv_func_gethostbyname=no
5457fi
5458rm -f conftest.err conftest.$ac_objext \
5459      conftest$ac_exeext conftest.$ac_ext
5460fi
5461echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5462echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
5463
5464    if test $ac_cv_func_gethostbyname = no; then
5465      echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5466echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
5467if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5468  echo $ECHO_N "(cached) $ECHO_C" >&6
5469else
5470  ac_check_lib_save_LIBS=$LIBS
5471LIBS="-lnsl  $LIBS"
5472cat >conftest.$ac_ext <<_ACEOF
5473/* confdefs.h.  */
5474_ACEOF
5475cat confdefs.h >>conftest.$ac_ext
5476cat >>conftest.$ac_ext <<_ACEOF
5477/* end confdefs.h.  */
5478
5479/* Override any gcc2 internal prototype to avoid an error.  */
5480#ifdef __cplusplus
5481extern "C"
5482#endif
5483/* We use char because int might match the return type of a gcc2
5484   builtin and then its argument prototype would still apply.  */
5485char gethostbyname ();
5486int
5487main ()
5488{
5489gethostbyname ();
5490  ;
5491  return 0;
5492}
5493_ACEOF
5494rm -f conftest.$ac_objext conftest$ac_exeext
5495if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5496  (eval $ac_link) 2>conftest.er1
5497  ac_status=$?
5498  grep -v '^ *+' conftest.er1 >conftest.err
5499  rm -f conftest.er1
5500  cat conftest.err >&5
5501  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5502  (exit $ac_status); } &&
5503         { ac_try='test -z "$ac_c_werror_flag"
5504                         || test ! -s conftest.err'
5505  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5506  (eval $ac_try) 2>&5
5507  ac_status=$?
5508  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5509  (exit $ac_status); }; } &&
5510         { ac_try='test -s conftest$ac_exeext'
5511  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5512  (eval $ac_try) 2>&5
5513  ac_status=$?
5514  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5515  (exit $ac_status); }; }; then
5516  ac_cv_lib_nsl_gethostbyname=yes
5517else
5518  echo "$as_me: failed program was:" >&5
5519sed 's/^/| /' conftest.$ac_ext >&5
5520
5521ac_cv_lib_nsl_gethostbyname=no
5522fi
5523rm -f conftest.err conftest.$ac_objext \
5524      conftest$ac_exeext conftest.$ac_ext
5525LIBS=$ac_check_lib_save_LIBS
5526fi
5527echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5528echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
5529if test $ac_cv_lib_nsl_gethostbyname = yes; then
5530  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5531fi
5532
5533      if test $ac_cv_lib_nsl_gethostbyname = no; then
5534        echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
5535echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
5536if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
5537  echo $ECHO_N "(cached) $ECHO_C" >&6
5538else
5539  ac_check_lib_save_LIBS=$LIBS
5540LIBS="-lbsd  $LIBS"
5541cat >conftest.$ac_ext <<_ACEOF
5542/* confdefs.h.  */
5543_ACEOF
5544cat confdefs.h >>conftest.$ac_ext
5545cat >>conftest.$ac_ext <<_ACEOF
5546/* end confdefs.h.  */
5547
5548/* Override any gcc2 internal prototype to avoid an error.  */
5549#ifdef __cplusplus
5550extern "C"
5551#endif
5552/* We use char because int might match the return type of a gcc2
5553   builtin and then its argument prototype would still apply.  */
5554char gethostbyname ();
5555int
5556main ()
5557{
5558gethostbyname ();
5559  ;
5560  return 0;
5561}
5562_ACEOF
5563rm -f conftest.$ac_objext conftest$ac_exeext
5564if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5565  (eval $ac_link) 2>conftest.er1
5566  ac_status=$?
5567  grep -v '^ *+' conftest.er1 >conftest.err
5568  rm -f conftest.er1
5569  cat conftest.err >&5
5570  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5571  (exit $ac_status); } &&
5572         { ac_try='test -z "$ac_c_werror_flag"
5573                         || test ! -s conftest.err'
5574  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5575  (eval $ac_try) 2>&5
5576  ac_status=$?
5577  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5578  (exit $ac_status); }; } &&
5579         { ac_try='test -s conftest$ac_exeext'
5580  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5581  (eval $ac_try) 2>&5
5582  ac_status=$?
5583  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5584  (exit $ac_status); }; }; then
5585  ac_cv_lib_bsd_gethostbyname=yes
5586else
5587  echo "$as_me: failed program was:" >&5
5588sed 's/^/| /' conftest.$ac_ext >&5
5589
5590ac_cv_lib_bsd_gethostbyname=no
5591fi
5592rm -f conftest.err conftest.$ac_objext \
5593      conftest$ac_exeext conftest.$ac_ext
5594LIBS=$ac_check_lib_save_LIBS
5595fi
5596echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
5597echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
5598if test $ac_cv_lib_bsd_gethostbyname = yes; then
5599  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
5600fi
5601
5602      fi
5603    fi
5604
5605    # lieder@skyler.mavd.honeywell.com says without -lsocket,
5606    # socket/setsockopt and other routines are undefined under SCO ODT
5607    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5608    # on later versions), says Simon Leinen: it contains gethostby*
5609    # variants that don't use the name server (or something).  -lsocket
5610    # must be given before -lnsl if both are needed.  We assume that
5611    # if connect needs -lnsl, so does gethostbyname.
5612    echo "$as_me:$LINENO: checking for connect" >&5
5613echo $ECHO_N "checking for connect... $ECHO_C" >&6
5614if test "${ac_cv_func_connect+set}" = set; then
5615  echo $ECHO_N "(cached) $ECHO_C" >&6
5616else
5617  cat >conftest.$ac_ext <<_ACEOF
5618/* confdefs.h.  */
5619_ACEOF
5620cat confdefs.h >>conftest.$ac_ext
5621cat >>conftest.$ac_ext <<_ACEOF
5622/* end confdefs.h.  */
5623/* Define connect to an innocuous variant, in case <limits.h> declares connect.
5624   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5625#define connect innocuous_connect
5626
5627/* System header to define __stub macros and hopefully few prototypes,
5628    which can conflict with char connect (); below.
5629    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5630    <limits.h> exists even on freestanding compilers.  */
5631
5632#ifdef __STDC__
5633# include <limits.h>
5634#else
5635# include <assert.h>
5636#endif
5637
5638#undef connect
5639
5640/* Override any gcc2 internal prototype to avoid an error.  */
5641#ifdef __cplusplus
5642extern "C"
5643{
5644#endif
5645/* We use char because int might match the return type of a gcc2
5646   builtin and then its argument prototype would still apply.  */
5647char connect ();
5648/* The GNU C library defines this for functions which it implements
5649    to always fail with ENOSYS.  Some functions are actually named
5650    something starting with __ and the normal name is an alias.  */
5651#if defined (__stub_connect) || defined (__stub___connect)
5652choke me
5653#else
5654char (*f) () = connect;
5655#endif
5656#ifdef __cplusplus
5657}
5658#endif
5659
5660int
5661main ()
5662{
5663return f != connect;
5664  ;
5665  return 0;
5666}
5667_ACEOF
5668rm -f conftest.$ac_objext conftest$ac_exeext
5669if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5670  (eval $ac_link) 2>conftest.er1
5671  ac_status=$?
5672  grep -v '^ *+' conftest.er1 >conftest.err
5673  rm -f conftest.er1
5674  cat conftest.err >&5
5675  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5676  (exit $ac_status); } &&
5677         { ac_try='test -z "$ac_c_werror_flag"
5678                         || test ! -s conftest.err'
5679  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5680  (eval $ac_try) 2>&5
5681  ac_status=$?
5682  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5683  (exit $ac_status); }; } &&
5684         { ac_try='test -s conftest$ac_exeext'
5685  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5686  (eval $ac_try) 2>&5
5687  ac_status=$?
5688  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5689  (exit $ac_status); }; }; then
5690  ac_cv_func_connect=yes
5691else
5692  echo "$as_me: failed program was:" >&5
5693sed 's/^/| /' conftest.$ac_ext >&5
5694
5695ac_cv_func_connect=no
5696fi
5697rm -f conftest.err conftest.$ac_objext \
5698      conftest$ac_exeext conftest.$ac_ext
5699fi
5700echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
5701echo "${ECHO_T}$ac_cv_func_connect" >&6
5702
5703    if test $ac_cv_func_connect = no; then
5704      echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
5705echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
5706if test "${ac_cv_lib_socket_connect+set}" = set; then
5707  echo $ECHO_N "(cached) $ECHO_C" >&6
5708else
5709  ac_check_lib_save_LIBS=$LIBS
5710LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5711cat >conftest.$ac_ext <<_ACEOF
5712/* confdefs.h.  */
5713_ACEOF
5714cat confdefs.h >>conftest.$ac_ext
5715cat >>conftest.$ac_ext <<_ACEOF
5716/* end confdefs.h.  */
5717
5718/* Override any gcc2 internal prototype to avoid an error.  */
5719#ifdef __cplusplus
5720extern "C"
5721#endif
5722/* We use char because int might match the return type of a gcc2
5723   builtin and then its argument prototype would still apply.  */
5724char connect ();
5725int
5726main ()
5727{
5728connect ();
5729  ;
5730  return 0;
5731}
5732_ACEOF
5733rm -f conftest.$ac_objext conftest$ac_exeext
5734if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5735  (eval $ac_link) 2>conftest.er1
5736  ac_status=$?
5737  grep -v '^ *+' conftest.er1 >conftest.err
5738  rm -f conftest.er1
5739  cat conftest.err >&5
5740  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5741  (exit $ac_status); } &&
5742         { ac_try='test -z "$ac_c_werror_flag"
5743                         || test ! -s conftest.err'
5744  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5745  (eval $ac_try) 2>&5
5746  ac_status=$?
5747  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5748  (exit $ac_status); }; } &&
5749         { ac_try='test -s conftest$ac_exeext'
5750  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5751  (eval $ac_try) 2>&5
5752  ac_status=$?
5753  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5754  (exit $ac_status); }; }; then
5755  ac_cv_lib_socket_connect=yes
5756else
5757  echo "$as_me: failed program was:" >&5
5758sed 's/^/| /' conftest.$ac_ext >&5
5759
5760ac_cv_lib_socket_connect=no
5761fi
5762rm -f conftest.err conftest.$ac_objext \
5763      conftest$ac_exeext conftest.$ac_ext
5764LIBS=$ac_check_lib_save_LIBS
5765fi
5766echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
5767echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
5768if test $ac_cv_lib_socket_connect = yes; then
5769  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5770fi
5771
5772    fi
5773
5774    # Guillermo Gomez says -lposix is necessary on A/UX.
5775    echo "$as_me:$LINENO: checking for remove" >&5
5776echo $ECHO_N "checking for remove... $ECHO_C" >&6
5777if test "${ac_cv_func_remove+set}" = set; then
5778  echo $ECHO_N "(cached) $ECHO_C" >&6
5779else
5780  cat >conftest.$ac_ext <<_ACEOF
5781/* confdefs.h.  */
5782_ACEOF
5783cat confdefs.h >>conftest.$ac_ext
5784cat >>conftest.$ac_ext <<_ACEOF
5785/* end confdefs.h.  */
5786/* Define remove to an innocuous variant, in case <limits.h> declares remove.
5787   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5788#define remove innocuous_remove
5789
5790/* System header to define __stub macros and hopefully few prototypes,
5791    which can conflict with char remove (); below.
5792    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5793    <limits.h> exists even on freestanding compilers.  */
5794
5795#ifdef __STDC__
5796# include <limits.h>
5797#else
5798# include <assert.h>
5799#endif
5800
5801#undef remove
5802
5803/* Override any gcc2 internal prototype to avoid an error.  */
5804#ifdef __cplusplus
5805extern "C"
5806{
5807#endif
5808/* We use char because int might match the return type of a gcc2
5809   builtin and then its argument prototype would still apply.  */
5810char remove ();
5811/* The GNU C library defines this for functions which it implements
5812    to always fail with ENOSYS.  Some functions are actually named
5813    something starting with __ and the normal name is an alias.  */
5814#if defined (__stub_remove) || defined (__stub___remove)
5815choke me
5816#else
5817char (*f) () = remove;
5818#endif
5819#ifdef __cplusplus
5820}
5821#endif
5822
5823int
5824main ()
5825{
5826return f != remove;
5827  ;
5828  return 0;
5829}
5830_ACEOF
5831rm -f conftest.$ac_objext conftest$ac_exeext
5832if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5833  (eval $ac_link) 2>conftest.er1
5834  ac_status=$?
5835  grep -v '^ *+' conftest.er1 >conftest.err
5836  rm -f conftest.er1
5837  cat conftest.err >&5
5838  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5839  (exit $ac_status); } &&
5840         { ac_try='test -z "$ac_c_werror_flag"
5841                         || test ! -s conftest.err'
5842  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5843  (eval $ac_try) 2>&5
5844  ac_status=$?
5845  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5846  (exit $ac_status); }; } &&
5847         { ac_try='test -s conftest$ac_exeext'
5848  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5849  (eval $ac_try) 2>&5
5850  ac_status=$?
5851  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5852  (exit $ac_status); }; }; then
5853  ac_cv_func_remove=yes
5854else
5855  echo "$as_me: failed program was:" >&5
5856sed 's/^/| /' conftest.$ac_ext >&5
5857
5858ac_cv_func_remove=no
5859fi
5860rm -f conftest.err conftest.$ac_objext \
5861      conftest$ac_exeext conftest.$ac_ext
5862fi
5863echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
5864echo "${ECHO_T}$ac_cv_func_remove" >&6
5865
5866    if test $ac_cv_func_remove = no; then
5867      echo "$as_me:$LINENO: checking for remove in -lposix" >&5
5868echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
5869if test "${ac_cv_lib_posix_remove+set}" = set; then
5870  echo $ECHO_N "(cached) $ECHO_C" >&6
5871else
5872  ac_check_lib_save_LIBS=$LIBS
5873LIBS="-lposix  $LIBS"
5874cat >conftest.$ac_ext <<_ACEOF
5875/* confdefs.h.  */
5876_ACEOF
5877cat confdefs.h >>conftest.$ac_ext
5878cat >>conftest.$ac_ext <<_ACEOF
5879/* end confdefs.h.  */
5880
5881/* Override any gcc2 internal prototype to avoid an error.  */
5882#ifdef __cplusplus
5883extern "C"
5884#endif
5885/* We use char because int might match the return type of a gcc2
5886   builtin and then its argument prototype would still apply.  */
5887char remove ();
5888int
5889main ()
5890{
5891remove ();
5892  ;
5893  return 0;
5894}
5895_ACEOF
5896rm -f conftest.$ac_objext conftest$ac_exeext
5897if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5898  (eval $ac_link) 2>conftest.er1
5899  ac_status=$?
5900  grep -v '^ *+' conftest.er1 >conftest.err
5901  rm -f conftest.er1
5902  cat conftest.err >&5
5903  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5904  (exit $ac_status); } &&
5905         { ac_try='test -z "$ac_c_werror_flag"
5906                         || test ! -s conftest.err'
5907  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5908  (eval $ac_try) 2>&5
5909  ac_status=$?
5910  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5911  (exit $ac_status); }; } &&
5912         { ac_try='test -s conftest$ac_exeext'
5913  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5914  (eval $ac_try) 2>&5
5915  ac_status=$?
5916  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5917  (exit $ac_status); }; }; then
5918  ac_cv_lib_posix_remove=yes
5919else
5920  echo "$as_me: failed program was:" >&5
5921sed 's/^/| /' conftest.$ac_ext >&5
5922
5923ac_cv_lib_posix_remove=no
5924fi
5925rm -f conftest.err conftest.$ac_objext \
5926      conftest$ac_exeext conftest.$ac_ext
5927LIBS=$ac_check_lib_save_LIBS
5928fi
5929echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
5930echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
5931if test $ac_cv_lib_posix_remove = yes; then
5932  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5933fi
5934
5935    fi
5936
5937    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5938    echo "$as_me:$LINENO: checking for shmat" >&5
5939echo $ECHO_N "checking for shmat... $ECHO_C" >&6
5940if test "${ac_cv_func_shmat+set}" = set; then
5941  echo $ECHO_N "(cached) $ECHO_C" >&6
5942else
5943  cat >conftest.$ac_ext <<_ACEOF
5944/* confdefs.h.  */
5945_ACEOF
5946cat confdefs.h >>conftest.$ac_ext
5947cat >>conftest.$ac_ext <<_ACEOF
5948/* end confdefs.h.  */
5949/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
5950   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5951#define shmat innocuous_shmat
5952
5953/* System header to define __stub macros and hopefully few prototypes,
5954    which can conflict with char shmat (); below.
5955    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5956    <limits.h> exists even on freestanding compilers.  */
5957
5958#ifdef __STDC__
5959# include <limits.h>
5960#else
5961# include <assert.h>
5962#endif
5963
5964#undef shmat
5965
5966/* Override any gcc2 internal prototype to avoid an error.  */
5967#ifdef __cplusplus
5968extern "C"
5969{
5970#endif
5971/* We use char because int might match the return type of a gcc2
5972   builtin and then its argument prototype would still apply.  */
5973char shmat ();
5974/* The GNU C library defines this for functions which it implements
5975    to always fail with ENOSYS.  Some functions are actually named
5976    something starting with __ and the normal name is an alias.  */
5977#if defined (__stub_shmat) || defined (__stub___shmat)
5978choke me
5979#else
5980char (*f) () = shmat;
5981#endif
5982#ifdef __cplusplus
5983}
5984#endif
5985
5986int
5987main ()
5988{
5989return f != shmat;
5990  ;
5991  return 0;
5992}
5993_ACEOF
5994rm -f conftest.$ac_objext conftest$ac_exeext
5995if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5996  (eval $ac_link) 2>conftest.er1
5997  ac_status=$?
5998  grep -v '^ *+' conftest.er1 >conftest.err
5999  rm -f conftest.er1
6000  cat conftest.err >&5
6001  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6002  (exit $ac_status); } &&
6003         { ac_try='test -z "$ac_c_werror_flag"
6004                         || test ! -s conftest.err'
6005  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6006  (eval $ac_try) 2>&5
6007  ac_status=$?
6008  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6009  (exit $ac_status); }; } &&
6010         { ac_try='test -s conftest$ac_exeext'
6011  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6012  (eval $ac_try) 2>&5
6013  ac_status=$?
6014  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6015  (exit $ac_status); }; }; then
6016  ac_cv_func_shmat=yes
6017else
6018  echo "$as_me: failed program was:" >&5
6019sed 's/^/| /' conftest.$ac_ext >&5
6020
6021ac_cv_func_shmat=no
6022fi
6023rm -f conftest.err conftest.$ac_objext \
6024      conftest$ac_exeext conftest.$ac_ext
6025fi
6026echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
6027echo "${ECHO_T}$ac_cv_func_shmat" >&6
6028
6029    if test $ac_cv_func_shmat = no; then
6030      echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
6031echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
6032if test "${ac_cv_lib_ipc_shmat+set}" = set; then
6033  echo $ECHO_N "(cached) $ECHO_C" >&6
6034else
6035  ac_check_lib_save_LIBS=$LIBS
6036LIBS="-lipc  $LIBS"
6037cat >conftest.$ac_ext <<_ACEOF
6038/* confdefs.h.  */
6039_ACEOF
6040cat confdefs.h >>conftest.$ac_ext
6041cat >>conftest.$ac_ext <<_ACEOF
6042/* end confdefs.h.  */
6043
6044/* Override any gcc2 internal prototype to avoid an error.  */
6045#ifdef __cplusplus
6046extern "C"
6047#endif
6048/* We use char because int might match the return type of a gcc2
6049   builtin and then its argument prototype would still apply.  */
6050char shmat ();
6051int
6052main ()
6053{
6054shmat ();
6055  ;
6056  return 0;
6057}
6058_ACEOF
6059rm -f conftest.$ac_objext conftest$ac_exeext
6060if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6061  (eval $ac_link) 2>conftest.er1
6062  ac_status=$?
6063  grep -v '^ *+' conftest.er1 >conftest.err
6064  rm -f conftest.er1
6065  cat conftest.err >&5
6066  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6067  (exit $ac_status); } &&
6068         { ac_try='test -z "$ac_c_werror_flag"
6069                         || test ! -s conftest.err'
6070  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6071  (eval $ac_try) 2>&5
6072  ac_status=$?
6073  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6074  (exit $ac_status); }; } &&
6075         { ac_try='test -s conftest$ac_exeext'
6076  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6077  (eval $ac_try) 2>&5
6078  ac_status=$?
6079  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6080  (exit $ac_status); }; }; then
6081  ac_cv_lib_ipc_shmat=yes
6082else
6083  echo "$as_me: failed program was:" >&5
6084sed 's/^/| /' conftest.$ac_ext >&5
6085
6086ac_cv_lib_ipc_shmat=no
6087fi
6088rm -f conftest.err conftest.$ac_objext \
6089      conftest$ac_exeext conftest.$ac_ext
6090LIBS=$ac_check_lib_save_LIBS
6091fi
6092echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
6093echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
6094if test $ac_cv_lib_ipc_shmat = yes; then
6095  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6096fi
6097
6098    fi
6099  fi
6100
6101  # Check for libraries that X11R6 Xt/Xaw programs need.
6102  ac_save_LDFLAGS=$LDFLAGS
6103  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6104  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6105  # check for ICE first), but we must link in the order -lSM -lICE or
6106  # we get undefined symbols.  So assume we have SM if we have ICE.
6107  # These have to be linked with before -lX11, unlike the other
6108  # libraries we check for below, so use a different variable.
6109  # John Interrante, Karl Berry
6110  echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
6111echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
6112if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
6113  echo $ECHO_N "(cached) $ECHO_C" >&6
6114else
6115  ac_check_lib_save_LIBS=$LIBS
6116LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6117cat >conftest.$ac_ext <<_ACEOF
6118/* confdefs.h.  */
6119_ACEOF
6120cat confdefs.h >>conftest.$ac_ext
6121cat >>conftest.$ac_ext <<_ACEOF
6122/* end confdefs.h.  */
6123
6124/* Override any gcc2 internal prototype to avoid an error.  */
6125#ifdef __cplusplus
6126extern "C"
6127#endif
6128/* We use char because int might match the return type of a gcc2
6129   builtin and then its argument prototype would still apply.  */
6130char IceConnectionNumber ();
6131int
6132main ()
6133{
6134IceConnectionNumber ();
6135  ;
6136  return 0;
6137}
6138_ACEOF
6139rm -f conftest.$ac_objext conftest$ac_exeext
6140if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6141  (eval $ac_link) 2>conftest.er1
6142  ac_status=$?
6143  grep -v '^ *+' conftest.er1 >conftest.err
6144  rm -f conftest.er1
6145  cat conftest.err >&5
6146  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6147  (exit $ac_status); } &&
6148         { ac_try='test -z "$ac_c_werror_flag"
6149                         || test ! -s conftest.err'
6150  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6151  (eval $ac_try) 2>&5
6152  ac_status=$?
6153  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6154  (exit $ac_status); }; } &&
6155         { ac_try='test -s conftest$ac_exeext'
6156  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6157  (eval $ac_try) 2>&5
6158  ac_status=$?
6159  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6160  (exit $ac_status); }; }; then
6161  ac_cv_lib_ICE_IceConnectionNumber=yes
6162else
6163  echo "$as_me: failed program was:" >&5
6164sed 's/^/| /' conftest.$ac_ext >&5
6165
6166ac_cv_lib_ICE_IceConnectionNumber=no
6167fi
6168rm -f conftest.err conftest.$ac_objext \
6169      conftest$ac_exeext conftest.$ac_ext
6170LIBS=$ac_check_lib_save_LIBS
6171fi
6172echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
6173echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
6174if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
6175  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6176fi
6177
6178  LDFLAGS=$ac_save_LDFLAGS
6179
6180fi
6181
6182  { echo "$as_me:$LINENO: This is X_CFLAGS: $X_CFLAGS" >&5
6183echo "$as_me: This is X_CFLAGS: $X_CFLAGS" >&6;}
6184  { echo "$as_me:$LINENO: This is X_LIBS: $X_LIBS" >&5
6185echo "$as_me: This is X_LIBS: $X_LIBS" >&6;}
6186  if test "x$X_LIBS" != x; then
6187    LDFLAGS="$LDFLAGS $X_LIBS"
6188    EXTRAPGLIB="$X_LIBS -lX11 $EXTRAPGLIB"
6189  fi
6190
6191#  # Add pgplot libraries, if they exist to the lib path
6192#  for LIBDIR in $PGPLOTLIBDIRS ; do
6193#    AC_CHECK_FILE([$LIBDIR/libcpgplot.a], [PGPLOTLIB="-L$LIBDIR $PGPLOTLIB"; break])
6194#  done
6195
6196  # It is possible that other libraries may be required depending on what
6197  # graphics drivers were installed with PGPLOT.
6198  echo "$as_me:$LINENO: checking for deflate in -lz" >&5
6199echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
6200if test "${ac_cv_lib_z_deflate+set}" = set; then
6201  echo $ECHO_N "(cached) $ECHO_C" >&6
6202else
6203  ac_check_lib_save_LIBS=$LIBS
6204LIBS="-lz $EXTRAPGLIB $LIBS $LIBS"
6205cat >conftest.$ac_ext <<_ACEOF
6206/* confdefs.h.  */
6207_ACEOF
6208cat confdefs.h >>conftest.$ac_ext
6209cat >>conftest.$ac_ext <<_ACEOF
6210/* end confdefs.h.  */
6211
6212/* Override any gcc2 internal prototype to avoid an error.  */
6213#ifdef __cplusplus
6214extern "C"
6215#endif
6216/* We use char because int might match the return type of a gcc2
6217   builtin and then its argument prototype would still apply.  */
6218char deflate ();
6219int
6220main ()
6221{
6222deflate ();
6223  ;
6224  return 0;
6225}
6226_ACEOF
6227rm -f conftest.$ac_objext conftest$ac_exeext
6228if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6229  (eval $ac_link) 2>conftest.er1
6230  ac_status=$?
6231  grep -v '^ *+' conftest.er1 >conftest.err
6232  rm -f conftest.er1
6233  cat conftest.err >&5
6234  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6235  (exit $ac_status); } &&
6236         { ac_try='test -z "$ac_c_werror_flag"
6237                         || test ! -s conftest.err'
6238  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6239  (eval $ac_try) 2>&5
6240  ac_status=$?
6241  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6242  (exit $ac_status); }; } &&
6243         { ac_try='test -s conftest$ac_exeext'
6244  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6245  (eval $ac_try) 2>&5
6246  ac_status=$?
6247  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6248  (exit $ac_status); }; }; then
6249  ac_cv_lib_z_deflate=yes
6250else
6251  echo "$as_me: failed program was:" >&5
6252sed 's/^/| /' conftest.$ac_ext >&5
6253
6254ac_cv_lib_z_deflate=no
6255fi
6256rm -f conftest.err conftest.$ac_objext \
6257      conftest$ac_exeext conftest.$ac_ext
6258LIBS=$ac_check_lib_save_LIBS
6259fi
6260echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
6261echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
6262if test $ac_cv_lib_z_deflate = yes; then
6263  EXTRAPGLIB="$EXTRAPGLIB -lz"
6264fi
6265
6266  echo "$as_me:$LINENO: checking for png_error in -lpng" >&5
6267echo $ECHO_N "checking for png_error in -lpng... $ECHO_C" >&6
6268if test "${ac_cv_lib_png_png_error+set}" = set; then
6269  echo $ECHO_N "(cached) $ECHO_C" >&6
6270else
6271  ac_check_lib_save_LIBS=$LIBS
6272LIBS="-lpng $EXTRAPGLIB $LIBS $LIBS"
6273cat >conftest.$ac_ext <<_ACEOF
6274/* confdefs.h.  */
6275_ACEOF
6276cat confdefs.h >>conftest.$ac_ext
6277cat >>conftest.$ac_ext <<_ACEOF
6278/* end confdefs.h.  */
6279
6280/* Override any gcc2 internal prototype to avoid an error.  */
6281#ifdef __cplusplus
6282extern "C"
6283#endif
6284/* We use char because int might match the return type of a gcc2
6285   builtin and then its argument prototype would still apply.  */
6286char png_error ();
6287int
6288main ()
6289{
6290png_error ();
6291  ;
6292  return 0;
6293}
6294_ACEOF
6295rm -f conftest.$ac_objext conftest$ac_exeext
6296if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6297  (eval $ac_link) 2>conftest.er1
6298  ac_status=$?
6299  grep -v '^ *+' conftest.er1 >conftest.err
6300  rm -f conftest.er1
6301  cat conftest.err >&5
6302  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6303  (exit $ac_status); } &&
6304         { ac_try='test -z "$ac_c_werror_flag"
6305                         || test ! -s conftest.err'
6306  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6307  (eval $ac_try) 2>&5
6308  ac_status=$?
6309  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6310  (exit $ac_status); }; } &&
6311         { ac_try='test -s conftest$ac_exeext'
6312  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6313  (eval $ac_try) 2>&5
6314  ac_status=$?
6315  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6316  (exit $ac_status); }; }; then
6317  ac_cv_lib_png_png_error=yes
6318else
6319  echo "$as_me: failed program was:" >&5
6320sed 's/^/| /' conftest.$ac_ext >&5
6321
6322ac_cv_lib_png_png_error=no
6323fi
6324rm -f conftest.err conftest.$ac_objext \
6325      conftest$ac_exeext conftest.$ac_ext
6326LIBS=$ac_check_lib_save_LIBS
6327fi
6328echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_error" >&5
6329echo "${ECHO_T}$ac_cv_lib_png_png_error" >&6
6330if test $ac_cv_lib_png_png_error = yes; then
6331  EXTRAPGLIB="$EXTRAPGLIB -lpng"
6332fi
6333
6334
6335  ac_ext=f
6336ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
6337ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6338ac_compiler_gnu=$ac_cv_f77_compiler_gnu
6339
6340
6341echo "$as_me:$LINENO: checking for pgopen in -lpgplot" >&5
6342echo $ECHO_N "checking for pgopen in -lpgplot... $ECHO_C" >&6
6343if test "${ac_cv_lib_pgplot_pgopen+set}" = set; then
6344  echo $ECHO_N "(cached) $ECHO_C" >&6
6345else
6346  ac_check_lib_save_LIBS=$LIBS
6347LIBS="-lpgplot $PGPLOTLIB $EXTRAPGLIB $LIBS"
6348cat >conftest.$ac_ext <<_ACEOF
6349      program main
6350      call pgopen
6351      end
6352_ACEOF
6353rm -f conftest.$ac_objext conftest$ac_exeext
6354if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6355  (eval $ac_link) 2>conftest.er1
6356  ac_status=$?
6357  grep -v '^ *+' conftest.er1 >conftest.err
6358  rm -f conftest.er1
6359  cat conftest.err >&5
6360  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6361  (exit $ac_status); } &&
6362         { ac_try='test -z "$ac_f77_werror_flag"
6363                         || test ! -s conftest.err'
6364  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6365  (eval $ac_try) 2>&5
6366  ac_status=$?
6367  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6368  (exit $ac_status); }; } &&
6369         { ac_try='test -s conftest$ac_exeext'
6370  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6371  (eval $ac_try) 2>&5
6372  ac_status=$?
6373  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6374  (exit $ac_status); }; }; then
6375  ac_cv_lib_pgplot_pgopen=yes
6376else
6377  echo "$as_me: failed program was:" >&5
6378sed 's/^/| /' conftest.$ac_ext >&5
6379
6380ac_cv_lib_pgplot_pgopen=no
6381fi
6382rm -f conftest.err conftest.$ac_objext \
6383      conftest$ac_exeext conftest.$ac_ext
6384LIBS=$ac_check_lib_save_LIBS
6385fi
6386echo "$as_me:$LINENO: result: $ac_cv_lib_pgplot_pgopen" >&5
6387echo "${ECHO_T}$ac_cv_lib_pgplot_pgopen" >&6
6388if test $ac_cv_lib_pgplot_pgopen = yes; then
6389  PGPLOTLIB="-lpgplot"
6390fi
6391
6392  ac_ext=c
6393ac_cpp='$CPP $CPPFLAGS'
6394ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6395ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6396ac_compiler_gnu=$ac_cv_c_compiler_gnu
6397
6398  # Checks for extra libraries needed by PGPLOT -- will add -lg2c -lstdc++ to $LIBS
6399
6400echo "$as_me:$LINENO: checking for gerror_ in -lg2c" >&5
6401echo $ECHO_N "checking for gerror_ in -lg2c... $ECHO_C" >&6
6402if test "${ac_cv_lib_g2c_gerror_+set}" = set; then
6403  echo $ECHO_N "(cached) $ECHO_C" >&6
6404else
6405  ac_check_lib_save_LIBS=$LIBS
6406LIBS="-lg2c  $LIBS"
6407cat >conftest.$ac_ext <<_ACEOF
6408/* confdefs.h.  */
6409_ACEOF
6410cat confdefs.h >>conftest.$ac_ext
6411cat >>conftest.$ac_ext <<_ACEOF
6412/* end confdefs.h.  */
6413
6414/* Override any gcc2 internal prototype to avoid an error.  */
6415#ifdef __cplusplus
6416extern "C"
6417#endif
6418/* We use char because int might match the return type of a gcc2
6419   builtin and then its argument prototype would still apply.  */
6420char gerror_ ();
6421int
6422main ()
6423{
6424gerror_ ();
6425  ;
6426  return 0;
6427}
6428_ACEOF
6429rm -f conftest.$ac_objext conftest$ac_exeext
6430if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6431  (eval $ac_link) 2>conftest.er1
6432  ac_status=$?
6433  grep -v '^ *+' conftest.er1 >conftest.err
6434  rm -f conftest.er1
6435  cat conftest.err >&5
6436  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6437  (exit $ac_status); } &&
6438         { ac_try='test -z "$ac_c_werror_flag"
6439                         || test ! -s conftest.err'
6440  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6441  (eval $ac_try) 2>&5
6442  ac_status=$?
6443  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6444  (exit $ac_status); }; } &&
6445         { ac_try='test -s conftest$ac_exeext'
6446  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6447  (eval $ac_try) 2>&5
6448  ac_status=$?
6449  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6450  (exit $ac_status); }; }; then
6451  ac_cv_lib_g2c_gerror_=yes
6452else
6453  echo "$as_me: failed program was:" >&5
6454sed 's/^/| /' conftest.$ac_ext >&5
6455
6456ac_cv_lib_g2c_gerror_=no
6457fi
6458rm -f conftest.err conftest.$ac_objext \
6459      conftest$ac_exeext conftest.$ac_ext
6460LIBS=$ac_check_lib_save_LIBS
6461fi
6462echo "$as_me:$LINENO: result: $ac_cv_lib_g2c_gerror_" >&5
6463echo "${ECHO_T}$ac_cv_lib_g2c_gerror_" >&6
6464if test $ac_cv_lib_g2c_gerror_ = yes; then
6465  cat >>confdefs.h <<_ACEOF
6466#define HAVE_LIBG2C 1
6467_ACEOF
6468
6469  LIBS="-lg2c $LIBS"
6470
6471fi
6472
6473
6474echo "$as_me:$LINENO: checking for main in -lstdc++" >&5
6475echo $ECHO_N "checking for main in -lstdc++... $ECHO_C" >&6
6476if test "${ac_cv_lib_stdcpp_main+set}" = set; then
6477  echo $ECHO_N "(cached) $ECHO_C" >&6
6478else
6479  ac_check_lib_save_LIBS=$LIBS
6480LIBS="-lstdc++  $LIBS"
6481cat >conftest.$ac_ext <<_ACEOF
6482/* confdefs.h.  */
6483_ACEOF
6484cat confdefs.h >>conftest.$ac_ext
6485cat >>conftest.$ac_ext <<_ACEOF
6486/* end confdefs.h.  */
6487
6488
6489int
6490main ()
6491{
6492main ();
6493  ;
6494  return 0;
6495}
6496_ACEOF
6497rm -f conftest.$ac_objext conftest$ac_exeext
6498if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6499  (eval $ac_link) 2>conftest.er1
6500  ac_status=$?
6501  grep -v '^ *+' conftest.er1 >conftest.err
6502  rm -f conftest.er1
6503  cat conftest.err >&5
6504  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6505  (exit $ac_status); } &&
6506         { ac_try='test -z "$ac_c_werror_flag"
6507                         || test ! -s conftest.err'
6508  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6509  (eval $ac_try) 2>&5
6510  ac_status=$?
6511  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6512  (exit $ac_status); }; } &&
6513         { ac_try='test -s conftest$ac_exeext'
6514  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6515  (eval $ac_try) 2>&5
6516  ac_status=$?
6517  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6518  (exit $ac_status); }; }; then
6519  ac_cv_lib_stdcpp_main=yes
6520else
6521  echo "$as_me: failed program was:" >&5
6522sed 's/^/| /' conftest.$ac_ext >&5
6523
6524ac_cv_lib_stdcpp_main=no
6525fi
6526rm -f conftest.err conftest.$ac_objext \
6527      conftest$ac_exeext conftest.$ac_ext
6528LIBS=$ac_check_lib_save_LIBS
6529fi
6530echo "$as_me:$LINENO: result: $ac_cv_lib_stdcpp_main" >&5
6531echo "${ECHO_T}$ac_cv_lib_stdcpp_main" >&6
6532if test $ac_cv_lib_stdcpp_main = yes; then
6533  cat >>confdefs.h <<_ACEOF
6534#define HAVE_LIBSTDC__ 1
6535_ACEOF
6536
6537  LIBS="-lstdc++ $LIBS"
6538
6539fi
6540
6541  if test "x$F77" = xgfortran; then
6542    PGPLOTLIB="-lcpgplot $PGPLOTLIB"
6543    { echo "$as_me:$LINENO:  Using gfortran, so manually adding -lcpgplot to PGPLOTLIB string." >&5
6544echo "$as_me:  Using gfortran, so manually adding -lcpgplot to PGPLOTLIB string." >&6;}
6545  else
6546    echo "$as_me:$LINENO: checking for cpgopen in -lcpgplot" >&5
6547echo $ECHO_N "checking for cpgopen in -lcpgplot... $ECHO_C" >&6
6548if test "${ac_cv_lib_cpgplot_cpgopen+set}" = set; then
6549  echo $ECHO_N "(cached) $ECHO_C" >&6
6550else
6551  ac_check_lib_save_LIBS=$LIBS
6552LIBS="-lcpgplot $PGPLOTLIB $LIBS $EXTRAPGLIB $LIBS"
6553cat >conftest.$ac_ext <<_ACEOF
6554/* confdefs.h.  */
6555_ACEOF
6556cat confdefs.h >>conftest.$ac_ext
6557cat >>conftest.$ac_ext <<_ACEOF
6558/* end confdefs.h.  */
6559
6560/* Override any gcc2 internal prototype to avoid an error.  */
6561#ifdef __cplusplus
6562extern "C"
6563#endif
6564/* We use char because int might match the return type of a gcc2
6565   builtin and then its argument prototype would still apply.  */
6566char cpgopen ();
6567int
6568main ()
6569{
6570cpgopen ();
6571  ;
6572  return 0;
6573}
6574_ACEOF
6575rm -f conftest.$ac_objext conftest$ac_exeext
6576if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6577  (eval $ac_link) 2>conftest.er1
6578  ac_status=$?
6579  grep -v '^ *+' conftest.er1 >conftest.err
6580  rm -f conftest.er1
6581  cat conftest.err >&5
6582  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6583  (exit $ac_status); } &&
6584         { ac_try='test -z "$ac_c_werror_flag"
6585                         || test ! -s conftest.err'
6586  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6587  (eval $ac_try) 2>&5
6588  ac_status=$?
6589  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6590  (exit $ac_status); }; } &&
6591         { ac_try='test -s conftest$ac_exeext'
6592  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6593  (eval $ac_try) 2>&5
6594  ac_status=$?
6595  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6596  (exit $ac_status); }; }; then
6597  ac_cv_lib_cpgplot_cpgopen=yes
6598else
6599  echo "$as_me: failed program was:" >&5
6600sed 's/^/| /' conftest.$ac_ext >&5
6601
6602ac_cv_lib_cpgplot_cpgopen=no
6603fi
6604rm -f conftest.err conftest.$ac_objext \
6605      conftest$ac_exeext conftest.$ac_ext
6606LIBS=$ac_check_lib_save_LIBS
6607fi
6608echo "$as_me:$LINENO: result: $ac_cv_lib_cpgplot_cpgopen" >&5
6609echo "${ECHO_T}$ac_cv_lib_cpgplot_cpgopen" >&6
6610if test $ac_cv_lib_cpgplot_cpgopen = yes; then
6611  PGPLOTLIB="-lcpgplot $PGPLOTLIB"
6612fi
6613
6614  fi
6615
6616  # If PGPLOT is not present, we give a warning message but still continue.
6617  # The compilation is able to work without the PGPLOT-dependent files.
6618  if test "x$PGPLOTLIB" = x; then
6619    { echo "$as_me:$LINENO:
6620      -------------------------------------------------------
6621      WARNING! PGPLOT could not be found.
6622      Compiling Duchamp without graphics capabilities.
6623      -------------------------------------------------------" >&5
6624echo "$as_me:
6625      -------------------------------------------------------
6626      WARNING! PGPLOT could not be found.
6627      Compiling Duchamp without graphics capabilities.
6628      -------------------------------------------------------" >&6;}
6629    #We have no pgplot, so we just link with g++ (or equivalent)
6630    LINKER=$CXX
6631  else
6632    #We are using pgplot, so link with the fortran compiler.
6633    LINKER=$F77
6634    PGPLOTLIB="$PGPLOTLIB $EXTRAPGLIB $LIBS"
6635    { echo "$as_me:$LINENO: PGPLOT appears to be available." >&5
6636echo "$as_me: PGPLOT appears to be available." >&6;}
6637
6638cat >>confdefs.h <<\_ACEOF
6639#define HAVE_PGPLOT 1
6640_ACEOF
6641
6642    for LIBDIR in $PGPLOTLIBDIRS ; do
6643     as_ac_File=`echo "ac_cv_file_$LIBDIR/libcpgplot.a" | $as_tr_sh`
6644echo "$as_me:$LINENO: checking for $LIBDIR/libcpgplot.a" >&5
6645echo $ECHO_N "checking for $LIBDIR/libcpgplot.a... $ECHO_C" >&6
6646if eval "test \"\${$as_ac_File+set}\" = set"; then
6647  echo $ECHO_N "(cached) $ECHO_C" >&6
6648else
6649  test "$cross_compiling" = yes &&
6650  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
6651echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
6652   { (exit 1); exit 1; }; }
6653if test -r "$LIBDIR/libcpgplot.a"; then
6654  eval "$as_ac_File=yes"
6655else
6656  eval "$as_ac_File=no"
6657fi
6658fi
6659echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
6660echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
6661if test `eval echo '${'$as_ac_File'}'` = yes; then
6662  PGPLOTLIB="-L$LIBDIR $PGPLOTLIB"; break
6663fi
6664
6665    done
6666    if test "x$F77" = xgfortran; then
6667      PGPLOTLIB="$PGPLOTLIB -bind_at_load"
6668    fi
6669  fi
6670
6671fi
6672
6673
6674
6675
6676##########################################################################
6677
6678##########################################################################
6679# Search for CFITSIO.
6680# use --with-cfitsio=directory to specify a particular CFITSIO directory.
6681# else do the normal searching for libraries.
6682
6683{ echo "$as_me:$LINENO:   -- CFITSIO -- " >&5
6684echo "$as_me:   -- CFITSIO -- " >&6;}
6685
6686# Check whether --with-cfitsio or --without-cfitsio was given.
6687if test "${with_cfitsio+set}" = set; then
6688  withval="$with_cfitsio"
6689   #if we specify a directory...
6690if test "x$withval" = xno; then
6691  { echo "$as_me:$LINENO:
6692    The CFITSIO library is required.
6693    Ignoring the \"--with-cfitsio=no\" and searching for the library." >&5
6694echo "$as_me:
6695    The CFITSIO library is required.
6696    Ignoring the \"--with-cfitsio=no\" and searching for the library." >&1;}
6697  CFITSIOINCDIRS=$INCDIRS
6698  CFITSIOLIBDIRS=$LIBDIRS
6699else
6700  { echo "$as_me:$LINENO: Using directory \"$withval\"" >&5
6701echo "$as_me: Using directory \"$withval\"" >&6;}
6702  CFITSIOINCDIRS="$withval \
6703              $withval/include"
6704  CFITSIOLIBDIRS="$withval \
6705              $withval/lib"
6706  for LIBDIR in $CFITSIOLIBDIRS ; do
6707    as_ac_File=`echo "ac_cv_file_$LIBDIR" | $as_tr_sh`
6708echo "$as_me:$LINENO: checking for $LIBDIR" >&5
6709echo $ECHO_N "checking for $LIBDIR... $ECHO_C" >&6
6710if eval "test \"\${$as_ac_File+set}\" = set"; then
6711  echo $ECHO_N "(cached) $ECHO_C" >&6
6712else
6713  test "$cross_compiling" = yes &&
6714  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
6715echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
6716   { (exit 1); exit 1; }; }
6717if test -r "$LIBDIR"; then
6718  eval "$as_ac_File=yes"
6719else
6720  eval "$as_ac_File=no"
6721fi
6722fi
6723echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
6724echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
6725if test `eval echo '${'$as_ac_File'}'` = yes; then
6726  LDFLAGS="$LDFLAGS -L$LIBDIR"
6727else
6728  continue
6729fi
6730
6731  done
6732  for INCDIR in $CFITSIOINCDIRS ; do
6733    as_ac_File=`echo "ac_cv_file_$INCDIR" | $as_tr_sh`
6734echo "$as_me:$LINENO: checking for $INCDIR" >&5
6735echo $ECHO_N "checking for $INCDIR... $ECHO_C" >&6
6736if eval "test \"\${$as_ac_File+set}\" = set"; then
6737  echo $ECHO_N "(cached) $ECHO_C" >&6
6738else
6739  test "$cross_compiling" = yes &&
6740  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
6741echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
6742   { (exit 1); exit 1; }; }
6743if test -r "$INCDIR"; then
6744  eval "$as_ac_File=yes"
6745else
6746  eval "$as_ac_File=no"
6747fi
6748fi
6749echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
6750echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
6751if test `eval echo '${'$as_ac_File'}'` = yes; then
6752  CPPFLAGS="$CPPFLAGS -I$INCDIR"
6753else
6754  continue
6755fi
6756
6757  done
6758fi
6759
6760else
6761   # if directory not specified, go searching.
6762CFITSIOINCDIRS=$INCDIRS
6763CFITSIOLIBDIRS=$LIBDIRS
6764
6765fi;
6766
6767for INCDIR in $CFITSIOINCDIRS ; do
6768  as_ac_File=`echo "ac_cv_file_$INCDIR/fitsio.h" | $as_tr_sh`
6769echo "$as_me:$LINENO: checking for $INCDIR/fitsio.h" >&5
6770echo $ECHO_N "checking for $INCDIR/fitsio.h... $ECHO_C" >&6
6771if eval "test \"\${$as_ac_File+set}\" = set"; then
6772  echo $ECHO_N "(cached) $ECHO_C" >&6
6773else
6774  test "$cross_compiling" = yes &&
6775  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
6776echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
6777   { (exit 1); exit 1; }; }
6778if test -r "$INCDIR/fitsio.h"; then
6779  eval "$as_ac_File=yes"
6780else
6781  eval "$as_ac_File=no"
6782fi
6783fi
6784echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
6785echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
6786if test `eval echo '${'$as_ac_File'}'` = yes; then
6787  CFITSIOINC=-I$INCDIR; break
6788fi
6789
6790  INCDIR=$INCDIR/cfitsio
6791  as_ac_File=`echo "ac_cv_file_$INCDIR/fitsio.h" | $as_tr_sh`
6792echo "$as_me:$LINENO: checking for $INCDIR/fitsio.h" >&5
6793echo $ECHO_N "checking for $INCDIR/fitsio.h... $ECHO_C" >&6
6794if eval "test \"\${$as_ac_File+set}\" = set"; then
6795  echo $ECHO_N "(cached) $ECHO_C" >&6
6796else
6797  test "$cross_compiling" = yes &&
6798  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
6799echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
6800   { (exit 1); exit 1; }; }
6801if test -r "$INCDIR/fitsio.h"; then
6802  eval "$as_ac_File=yes"
6803else
6804  eval "$as_ac_File=no"
6805fi
6806fi
6807echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
6808echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
6809if test `eval echo '${'$as_ac_File'}'` = yes; then
6810  CFITSIOINC=-I$INCDIR; break
6811fi
6812
6813done
6814
6815echo "$as_me:$LINENO: checking for recv in -lsocket" >&5
6816echo $ECHO_N "checking for recv in -lsocket... $ECHO_C" >&6
6817if test "${ac_cv_lib_socket_recv+set}" = set; then
6818  echo $ECHO_N "(cached) $ECHO_C" >&6
6819else
6820  ac_check_lib_save_LIBS=$LIBS
6821LIBS="-lsocket $LIBS $LIBS"
6822cat >conftest.$ac_ext <<_ACEOF
6823/* confdefs.h.  */
6824_ACEOF
6825cat confdefs.h >>conftest.$ac_ext
6826cat >>conftest.$ac_ext <<_ACEOF
6827/* end confdefs.h.  */
6828
6829/* Override any gcc2 internal prototype to avoid an error.  */
6830#ifdef __cplusplus
6831extern "C"
6832#endif
6833/* We use char because int might match the return type of a gcc2
6834   builtin and then its argument prototype would still apply.  */
6835char recv ();
6836int
6837main ()
6838{
6839recv ();
6840  ;
6841  return 0;
6842}
6843_ACEOF
6844rm -f conftest.$ac_objext conftest$ac_exeext
6845if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6846  (eval $ac_link) 2>conftest.er1
6847  ac_status=$?
6848  grep -v '^ *+' conftest.er1 >conftest.err
6849  rm -f conftest.er1
6850  cat conftest.err >&5
6851  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6852  (exit $ac_status); } &&
6853         { ac_try='test -z "$ac_c_werror_flag"
6854                         || test ! -s conftest.err'
6855  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6856  (eval $ac_try) 2>&5
6857  ac_status=$?
6858  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6859  (exit $ac_status); }; } &&
6860         { ac_try='test -s conftest$ac_exeext'
6861  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6862  (eval $ac_try) 2>&5
6863  ac_status=$?
6864  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6865  (exit $ac_status); }; }; then
6866  ac_cv_lib_socket_recv=yes
6867else
6868  echo "$as_me: failed program was:" >&5
6869sed 's/^/| /' conftest.$ac_ext >&5
6870
6871ac_cv_lib_socket_recv=no
6872fi
6873rm -f conftest.err conftest.$ac_objext \
6874      conftest$ac_exeext conftest.$ac_ext
6875LIBS=$ac_check_lib_save_LIBS
6876fi
6877echo "$as_me:$LINENO: result: $ac_cv_lib_socket_recv" >&5
6878echo "${ECHO_T}$ac_cv_lib_socket_recv" >&6
6879if test $ac_cv_lib_socket_recv = yes; then
6880  CFITSIOLIB="$CFITSIOLIB -lsocket"
6881fi
6882
6883echo "$as_me:$LINENO: checking for ffopen in -lcfitsio" >&5
6884echo $ECHO_N "checking for ffopen in -lcfitsio... $ECHO_C" >&6
6885if test "${ac_cv_lib_cfitsio_ffopen+set}" = set; then
6886  echo $ECHO_N "(cached) $ECHO_C" >&6
6887else
6888  ac_check_lib_save_LIBS=$LIBS
6889LIBS="-lcfitsio $CFITSIOLIB $LIBS $LIBS"
6890cat >conftest.$ac_ext <<_ACEOF
6891/* confdefs.h.  */
6892_ACEOF
6893cat confdefs.h >>conftest.$ac_ext
6894cat >>conftest.$ac_ext <<_ACEOF
6895/* end confdefs.h.  */
6896
6897/* Override any gcc2 internal prototype to avoid an error.  */
6898#ifdef __cplusplus
6899extern "C"
6900#endif
6901/* We use char because int might match the return type of a gcc2
6902   builtin and then its argument prototype would still apply.  */
6903char ffopen ();
6904int
6905main ()
6906{
6907ffopen ();
6908  ;
6909  return 0;
6910}
6911_ACEOF
6912rm -f conftest.$ac_objext conftest$ac_exeext
6913if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6914  (eval $ac_link) 2>conftest.er1
6915  ac_status=$?
6916  grep -v '^ *+' conftest.er1 >conftest.err
6917  rm -f conftest.er1
6918  cat conftest.err >&5
6919  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6920  (exit $ac_status); } &&
6921         { ac_try='test -z "$ac_c_werror_flag"
6922                         || test ! -s conftest.err'
6923  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6924  (eval $ac_try) 2>&5
6925  ac_status=$?
6926  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6927  (exit $ac_status); }; } &&
6928         { ac_try='test -s conftest$ac_exeext'
6929  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6930  (eval $ac_try) 2>&5
6931  ac_status=$?
6932  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6933  (exit $ac_status); }; }; then
6934  ac_cv_lib_cfitsio_ffopen=yes
6935else
6936  echo "$as_me: failed program was:" >&5
6937sed 's/^/| /' conftest.$ac_ext >&5
6938
6939ac_cv_lib_cfitsio_ffopen=no
6940fi
6941rm -f conftest.err conftest.$ac_objext \
6942      conftest$ac_exeext conftest.$ac_ext
6943LIBS=$ac_check_lib_save_LIBS
6944fi
6945echo "$as_me:$LINENO: result: $ac_cv_lib_cfitsio_ffopen" >&5
6946echo "${ECHO_T}$ac_cv_lib_cfitsio_ffopen" >&6
6947if test $ac_cv_lib_cfitsio_ffopen = yes; then
6948  CFITSIOLIB="$CFITSIOLIB -lcfitsio"
6949fi
6950
6951
6952# CFITSIO is essential for Duchamp, so exit with error message if it
6953#   is not present.
6954if test "x$CFITSIOINC" = x -o "x$CFITSIOLIB" = x; then
6955  { { echo "$as_me:$LINENO: error:
6956    -------------------------------------------------------
6957    Could not find the CFITSIO library.
6958
6959    ERROR: Duchamp configuration failure.
6960    -------------------------------------------------------" >&5
6961echo "$as_me: error:
6962    -------------------------------------------------------
6963    Could not find the CFITSIO library.
6964
6965    ERROR: Duchamp configuration failure.
6966    -------------------------------------------------------" >&2;}
6967   { (exit 1); exit 1; }; }
6968else
6969  { echo "$as_me:$LINENO: CFITSIO appears to be available." >&5
6970echo "$as_me: CFITSIO appears to be available." >&6;}
6971
6972cat >>confdefs.h <<\_ACEOF
6973#define HAVE_CFITSIO 1
6974_ACEOF
6975
6976for LIBDIR in $CFITSIOLIBDIRS ; do
6977  as_ac_File=`echo "ac_cv_file_$LIBDIR/libcfitsio.a" | $as_tr_sh`
6978echo "$as_me:$LINENO: checking for $LIBDIR/libcfitsio.a" >&5
6979echo $ECHO_N "checking for $LIBDIR/libcfitsio.a... $ECHO_C" >&6
6980if eval "test \"\${$as_ac_File+set}\" = set"; then
6981  echo $ECHO_N "(cached) $ECHO_C" >&6
6982else
6983  test "$cross_compiling" = yes &&
6984  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
6985echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
6986   { (exit 1); exit 1; }; }
6987if test -r "$LIBDIR/libcfitsio.a"; then
6988  eval "$as_ac_File=yes"
6989else
6990  eval "$as_ac_File=no"
6991fi
6992fi
6993echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
6994echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
6995if test `eval echo '${'$as_ac_File'}'` = yes; then
6996  CFITSIOLIB="-L$LIBDIR $CFITSIOLIB"; break
6997fi
6998
6999  LIBDIR=$LIBDIR/cfitsio
7000  as_ac_File=`echo "ac_cv_file_$LIBDIR/libcfitsio.a" | $as_tr_sh`
7001echo "$as_me:$LINENO: checking for $LIBDIR/libcfitsio.a" >&5
7002echo $ECHO_N "checking for $LIBDIR/libcfitsio.a... $ECHO_C" >&6
7003if eval "test \"\${$as_ac_File+set}\" = set"; then
7004  echo $ECHO_N "(cached) $ECHO_C" >&6
7005else
7006  test "$cross_compiling" = yes &&
7007  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7008echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7009   { (exit 1); exit 1; }; }
7010if test -r "$LIBDIR/libcfitsio.a"; then
7011  eval "$as_ac_File=yes"
7012else
7013  eval "$as_ac_File=no"
7014fi
7015fi
7016echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7017echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7018if test `eval echo '${'$as_ac_File'}'` = yes; then
7019  CFITSIOLIB="-L$LIBDIR $CFITSIOLIB"; break
7020fi
7021
7022done
7023
7024fi
7025
7026
7027
7028##########################################################################
7029
7030##########################################################################
7031# Search for WCSLIB.
7032# use --with-wcslib=directory to specify a particular WCSLIB directory.
7033# else do the normal searching for libraries.
7034
7035{ echo "$as_me:$LINENO:   -- WCSLIB -- " >&5
7036echo "$as_me:   -- WCSLIB -- " >&6;}
7037WCSINCDIR=""
7038
7039# Check whether --with-wcslib or --without-wcslib was given.
7040if test "${with_wcslib+set}" = set; then
7041  withval="$with_wcslib"
7042   #if we specify a directory...
7043if test "x$withval" = xno; then
7044  { echo "$as_me:$LINENO:
7045    The WCSLIB library is required.
7046    Ignoring the \"--with-wcslib=no\" and searching for the library." >&5
7047echo "$as_me:
7048    The WCSLIB library is required.
7049    Ignoring the \"--with-wcslib=no\" and searching for the library." >&1;}
7050  WCSINCDIRS=$INCDIRS
7051  WCSLIBDIRS=$LIBDIRS
7052else
7053  { echo "$as_me:$LINENO: Using directory \"$withval\"" >&5
7054echo "$as_me: Using directory \"$withval\"" >&6;}
7055  WCSINCDIRS="$withval \
7056              $withval/include"
7057  WCSLIBDIRS="$withval \
7058              $withval/lib"
7059  for LIBDIR in $WCSLIBDIRS ; do
7060    as_ac_File=`echo "ac_cv_file_$LIBDIR" | $as_tr_sh`
7061echo "$as_me:$LINENO: checking for $LIBDIR" >&5
7062echo $ECHO_N "checking for $LIBDIR... $ECHO_C" >&6
7063if eval "test \"\${$as_ac_File+set}\" = set"; then
7064  echo $ECHO_N "(cached) $ECHO_C" >&6
7065else
7066  test "$cross_compiling" = yes &&
7067  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7068echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7069   { (exit 1); exit 1; }; }
7070if test -r "$LIBDIR"; then
7071  eval "$as_ac_File=yes"
7072else
7073  eval "$as_ac_File=no"
7074fi
7075fi
7076echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7077echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7078if test `eval echo '${'$as_ac_File'}'` = yes; then
7079  LDFLAGS="$LDFLAGS -L$LIBDIR"
7080else
7081  continue
7082fi
7083
7084  done
7085  for INCDIR in $WCSINCDIRS ; do
7086    as_ac_File=`echo "ac_cv_file_$INCDIR/wcslib" | $as_tr_sh`
7087echo "$as_me:$LINENO: checking for $INCDIR/wcslib" >&5
7088echo $ECHO_N "checking for $INCDIR/wcslib... $ECHO_C" >&6
7089if eval "test \"\${$as_ac_File+set}\" = set"; then
7090  echo $ECHO_N "(cached) $ECHO_C" >&6
7091else
7092  test "$cross_compiling" = yes &&
7093  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7094echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7095   { (exit 1); exit 1; }; }
7096if test -r "$INCDIR/wcslib"; then
7097  eval "$as_ac_File=yes"
7098else
7099  eval "$as_ac_File=no"
7100fi
7101fi
7102echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7103echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7104if test `eval echo '${'$as_ac_File'}'` = yes; then
7105  CPPFLAGS="$CPPFLAGS -I$INCDIR"; WCSINCDIR=$INCDIR; break
7106else
7107  continue
7108fi
7109
7110  done
7111fi
7112
7113else
7114   # if directory not specified, go searching.
7115WCSINCDIRS=$INCDIRS
7116WCSLIBDIRS=$LIBDIRS
7117
7118fi;
7119
7120
7121if test "x$WCSINCDIR" = x; then
7122  for INCBASE in $WCSINCDIRS ; do
7123    as_ac_File=`echo "ac_cv_file_$INCBASE/wcslib/wcs.h" | $as_tr_sh`
7124echo "$as_me:$LINENO: checking for $INCBASE/wcslib/wcs.h" >&5
7125echo $ECHO_N "checking for $INCBASE/wcslib/wcs.h... $ECHO_C" >&6
7126if eval "test \"\${$as_ac_File+set}\" = set"; then
7127  echo $ECHO_N "(cached) $ECHO_C" >&6
7128else
7129  test "$cross_compiling" = yes &&
7130  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7131echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7132   { (exit 1); exit 1; }; }
7133if test -r "$INCBASE/wcslib/wcs.h"; then
7134  eval "$as_ac_File=yes"
7135else
7136  eval "$as_ac_File=no"
7137fi
7138fi
7139echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7140echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7141if test `eval echo '${'$as_ac_File'}'` = yes; then
7142  WCSINC="-I$INCBASE -I$INCBASE/wcslib $WCSINC"; break
7143fi
7144
7145  done
7146else
7147  as_ac_File=`echo "ac_cv_file_$WCSINCDIR/wcslib/wcs.h" | $as_tr_sh`
7148echo "$as_me:$LINENO: checking for $WCSINCDIR/wcslib/wcs.h" >&5
7149echo $ECHO_N "checking for $WCSINCDIR/wcslib/wcs.h... $ECHO_C" >&6
7150if eval "test \"\${$as_ac_File+set}\" = set"; then
7151  echo $ECHO_N "(cached) $ECHO_C" >&6
7152else
7153  test "$cross_compiling" = yes &&
7154  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7155echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7156   { (exit 1); exit 1; }; }
7157if test -r "$WCSINCDIR/wcslib/wcs.h"; then
7158  eval "$as_ac_File=yes"
7159else
7160  eval "$as_ac_File=no"
7161fi
7162fi
7163echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7164echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7165if test `eval echo '${'$as_ac_File'}'` = yes; then
7166  WCSINC="-I$WCSINCDIR -I$WCSINCDIR/wcslib $WCSINC"
7167fi
7168
7169fi
7170
7171
7172# Look for libwcs.a, and libpgsbox.a
7173echo "$as_me:$LINENO: checking for wcss2p in -lwcs" >&5
7174echo $ECHO_N "checking for wcss2p in -lwcs... $ECHO_C" >&6
7175if test "${ac_cv_lib_wcs_wcss2p+set}" = set; then
7176  echo $ECHO_N "(cached) $ECHO_C" >&6
7177else
7178  ac_check_lib_save_LIBS=$LIBS
7179LIBS="-lwcs $WCSLIB $LIBS $CFITSIOLIB $PGPLOTLIB $LIBS"
7180cat >conftest.$ac_ext <<_ACEOF
7181/* confdefs.h.  */
7182_ACEOF
7183cat confdefs.h >>conftest.$ac_ext
7184cat >>conftest.$ac_ext <<_ACEOF
7185/* end confdefs.h.  */
7186
7187/* Override any gcc2 internal prototype to avoid an error.  */
7188#ifdef __cplusplus
7189extern "C"
7190#endif
7191/* We use char because int might match the return type of a gcc2
7192   builtin and then its argument prototype would still apply.  */
7193char wcss2p ();
7194int
7195main ()
7196{
7197wcss2p ();
7198  ;
7199  return 0;
7200}
7201_ACEOF
7202rm -f conftest.$ac_objext conftest$ac_exeext
7203if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7204  (eval $ac_link) 2>conftest.er1
7205  ac_status=$?
7206  grep -v '^ *+' conftest.er1 >conftest.err
7207  rm -f conftest.er1
7208  cat conftest.err >&5
7209  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7210  (exit $ac_status); } &&
7211         { ac_try='test -z "$ac_c_werror_flag"
7212                         || test ! -s conftest.err'
7213  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7214  (eval $ac_try) 2>&5
7215  ac_status=$?
7216  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7217  (exit $ac_status); }; } &&
7218         { ac_try='test -s conftest$ac_exeext'
7219  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7220  (eval $ac_try) 2>&5
7221  ac_status=$?
7222  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7223  (exit $ac_status); }; }; then
7224  ac_cv_lib_wcs_wcss2p=yes
7225else
7226  echo "$as_me: failed program was:" >&5
7227sed 's/^/| /' conftest.$ac_ext >&5
7228
7229ac_cv_lib_wcs_wcss2p=no
7230fi
7231rm -f conftest.err conftest.$ac_objext \
7232      conftest$ac_exeext conftest.$ac_ext
7233LIBS=$ac_check_lib_save_LIBS
7234fi
7235echo "$as_me:$LINENO: result: $ac_cv_lib_wcs_wcss2p" >&5
7236echo "${ECHO_T}$ac_cv_lib_wcs_wcss2p" >&6
7237if test $ac_cv_lib_wcs_wcss2p = yes; then
7238  WCSLIB="$WCSLIB -lwcs"
7239fi
7240
7241if test "x$F77" = xgfortran; then
7242  WCSLIB="$WCSLIB -lpgsbox"
7243  { echo "$as_me:$LINENO:  Using gfortran, so manually adding -lpgsbox to WCSLIB string." >&5
7244echo "$as_me:  Using gfortran, so manually adding -lpgsbox to WCSLIB string." >&6;}
7245else
7246  echo "$as_me:$LINENO: checking for cpgsbox in -lpgsbox" >&5
7247echo $ECHO_N "checking for cpgsbox in -lpgsbox... $ECHO_C" >&6
7248if test "${ac_cv_lib_pgsbox_cpgsbox+set}" = set; then
7249  echo $ECHO_N "(cached) $ECHO_C" >&6
7250else
7251  ac_check_lib_save_LIBS=$LIBS
7252LIBS="-lpgsbox $WCSLIB $LIBS $CFITSIOLIB $PGPLOTLIB $LIBS"
7253cat >conftest.$ac_ext <<_ACEOF
7254/* confdefs.h.  */
7255_ACEOF
7256cat confdefs.h >>conftest.$ac_ext
7257cat >>conftest.$ac_ext <<_ACEOF
7258/* end confdefs.h.  */
7259
7260/* Override any gcc2 internal prototype to avoid an error.  */
7261#ifdef __cplusplus
7262extern "C"
7263#endif
7264/* We use char because int might match the return type of a gcc2
7265   builtin and then its argument prototype would still apply.  */
7266char cpgsbox ();
7267int
7268main ()
7269{
7270cpgsbox ();
7271  ;
7272  return 0;
7273}
7274_ACEOF
7275rm -f conftest.$ac_objext conftest$ac_exeext
7276if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7277  (eval $ac_link) 2>conftest.er1
7278  ac_status=$?
7279  grep -v '^ *+' conftest.er1 >conftest.err
7280  rm -f conftest.er1
7281  cat conftest.err >&5
7282  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7283  (exit $ac_status); } &&
7284         { ac_try='test -z "$ac_c_werror_flag"
7285                         || test ! -s conftest.err'
7286  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7287  (eval $ac_try) 2>&5
7288  ac_status=$?
7289  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7290  (exit $ac_status); }; } &&
7291         { ac_try='test -s conftest$ac_exeext'
7292  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7293  (eval $ac_try) 2>&5
7294  ac_status=$?
7295  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7296  (exit $ac_status); }; }; then
7297  ac_cv_lib_pgsbox_cpgsbox=yes
7298else
7299  echo "$as_me: failed program was:" >&5
7300sed 's/^/| /' conftest.$ac_ext >&5
7301
7302ac_cv_lib_pgsbox_cpgsbox=no
7303fi
7304rm -f conftest.err conftest.$ac_objext \
7305      conftest$ac_exeext conftest.$ac_ext
7306LIBS=$ac_check_lib_save_LIBS
7307fi
7308echo "$as_me:$LINENO: result: $ac_cv_lib_pgsbox_cpgsbox" >&5
7309echo "${ECHO_T}$ac_cv_lib_pgsbox_cpgsbox" >&6
7310if test $ac_cv_lib_pgsbox_cpgsbox = yes; then
7311  WCSLIB="$WCSLIB -lpgsbox"
7312fi
7313
7314fi
7315
7316# WCSLIB is essential for Duchamp, so exit with error message if it
7317#   is not present. Need at least libwcs to be available -- libpgsbox will
7318#   depend on PGPLOT being available, but is not critical.
7319if test "x$WCSINC" = x -o "x$WCSLIB" = x; then
7320  { { echo "$as_me:$LINENO: error:
7321    -------------------------------------------------------
7322    Could not find the WCSLIB library.
7323
7324    ERROR: Duchamp configuration failure.
7325    -------------------------------------------------------" >&5
7326echo "$as_me: error:
7327    -------------------------------------------------------
7328    Could not find the WCSLIB library.
7329
7330    ERROR: Duchamp configuration failure.
7331    -------------------------------------------------------" >&2;}
7332   { (exit 1); exit 1; }; }
7333else
7334  { echo "$as_me:$LINENO: WCSLIB appears to be available." >&5
7335echo "$as_me: WCSLIB appears to be available." >&6;}
7336
7337cat >>confdefs.h <<\_ACEOF
7338#define HAVE_WCSLIB 1
7339_ACEOF
7340
7341# Now add the -L statements to start of WCSLIB.
7342# Search for libwcs.a, and, if we find it, search for libpgsbox in same directory and
7343#   then in other directories, keeping the appropriate order of -L calls.
7344
7345  DIRLIST=". \
7346           wcs \
7347           wcslib"
7348
7349  for LIBBASE in $WCSLIBDIRS ; do
7350    for DIR in $DIRLIST; do
7351      if test "x$DIR" = x.; then
7352       LIBDIR=$LIBBASE
7353      else
7354       LIBDIR="$LIBBASE/$DIR"
7355      fi
7356      as_ac_File=`echo "ac_cv_file_$LIBDIR/libwcs.a" | $as_tr_sh`
7357echo "$as_me:$LINENO: checking for $LIBDIR/libwcs.a" >&5
7358echo $ECHO_N "checking for $LIBDIR/libwcs.a... $ECHO_C" >&6
7359if eval "test \"\${$as_ac_File+set}\" = set"; then
7360  echo $ECHO_N "(cached) $ECHO_C" >&6
7361else
7362  test "$cross_compiling" = yes &&
7363  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7364echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7365   { (exit 1); exit 1; }; }
7366if test -r "$LIBDIR/libwcs.a"; then
7367  eval "$as_ac_File=yes"
7368else
7369  eval "$as_ac_File=no"
7370fi
7371fi
7372echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7373echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7374if test `eval echo '${'$as_ac_File'}'` = yes; then
7375  WCSLIBFRONT="-L$LIBDIR";
7376             as_ac_File=`echo "ac_cv_file_$LIBDIR/libpgsbox.a" | $as_tr_sh`
7377echo "$as_me:$LINENO: checking for $LIBDIR/libpgsbox.a" >&5
7378echo $ECHO_N "checking for $LIBDIR/libpgsbox.a... $ECHO_C" >&6
7379if eval "test \"\${$as_ac_File+set}\" = set"; then
7380  echo $ECHO_N "(cached) $ECHO_C" >&6
7381else
7382  test "$cross_compiling" = yes &&
7383  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7384echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7385   { (exit 1); exit 1; }; }
7386if test -r "$LIBDIR/libpgsbox.a"; then
7387  eval "$as_ac_File=yes"
7388else
7389  eval "$as_ac_File=no"
7390fi
7391fi
7392echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7393echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7394if test `eval echo '${'$as_ac_File'}'` = yes; then
7395  :
7396else
7397
7398               for LIBBASE2 in $WCSLIBDIRS ; do
7399                for DIR2 in $DIRLIST; do
7400                 if test "x$DIR" = x.; then
7401                  LIBDIR=$LIBBASE
7402                 else
7403                  LIBDIR="$LIBBASE/$DIR"
7404                 fi
7405                 as_ac_File=`echo "ac_cv_file_$LIBDIR2/libpgsbox.a" | $as_tr_sh`
7406echo "$as_me:$LINENO: checking for $LIBDIR2/libpgsbox.a" >&5
7407echo $ECHO_N "checking for $LIBDIR2/libpgsbox.a... $ECHO_C" >&6
7408if eval "test \"\${$as_ac_File+set}\" = set"; then
7409  echo $ECHO_N "(cached) $ECHO_C" >&6
7410else
7411  test "$cross_compiling" = yes &&
7412  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
7413echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
7414   { (exit 1); exit 1; }; }
7415if test -r "$LIBDIR2/libpgsbox.a"; then
7416  eval "$as_ac_File=yes"
7417else
7418  eval "$as_ac_File=no"
7419fi
7420fi
7421echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
7422echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
7423if test `eval echo '${'$as_ac_File'}'` = yes; then
7424  WCSLIBFRONT="$WCSLIB -L$LIBDIR2"; break
7425fi
7426
7427                done
7428               done
7429fi
7430
7431              break
7432fi
7433
7434    done
7435  done
7436  WCSLIB="$WCSLIBFRONT $WCSLIB"
7437fi
7438
7439
7440
7441##########################################################################
7442
7443
7444
7445          ac_config_files="$ac_config_files Makefile"
7446
7447cat >confcache <<\_ACEOF
7448# This file is a shell script that caches the results of configure
7449# tests run on this system so they can be shared between configure
7450# scripts and configure runs, see configure's option --config-cache.
7451# It is not useful on other systems.  If it contains results you don't
7452# want to keep, you may remove or edit it.
7453#
7454# config.status only pays attention to the cache file if you give it
7455# the --recheck option to rerun configure.
7456#
7457# `ac_cv_env_foo' variables (set or unset) will be overridden when
7458# loading this file, other *unset* `ac_cv_foo' will be assigned the
7459# following values.
7460
7461_ACEOF
7462
7463# The following way of writing the cache mishandles newlines in values,
7464# but we know of no workaround that is simple, portable, and efficient.
7465# So, don't put newlines in cache variables' values.
7466# Ultrix sh set writes to stderr and can't be redirected directly,
7467# and sets the high bit in the cache file unless we assign to the vars.
7468{
7469  (set) 2>&1 |
7470    case `(ac_space=' '; set | grep ac_space) 2>&1` in
7471    *ac_space=\ *)
7472      # `set' does not quote correctly, so add quotes (double-quote
7473      # substitution turns \\\\ into \\, and sed turns \\ into \).
7474      sed -n \
7475        "s/'/'\\\\''/g;
7476          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
7477      ;;
7478    *)
7479      # `set' quotes correctly as required by POSIX, so do not add quotes.
7480      sed -n \
7481        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
7482      ;;
7483    esac;
7484} |
7485  sed '
7486     t clear
7487     : clear
7488     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
7489     t end
7490     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
7491     : end' >>confcache
7492if diff $cache_file confcache >/dev/null 2>&1; then :; else
7493  if test -w $cache_file; then
7494    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
7495    cat confcache >$cache_file
7496  else
7497    echo "not updating unwritable cache $cache_file"
7498  fi
7499fi
7500rm -f confcache
7501
7502test "x$prefix" = xNONE && prefix=$ac_default_prefix
7503# Let make expand exec_prefix.
7504test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7505
7506# VPATH may cause trouble with some makes, so we remove $(srcdir),
7507# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
7508# trailing colons and then remove the whole line if VPATH becomes empty
7509# (actually we leave an empty line to preserve line numbers).
7510if test "x$srcdir" = x.; then
7511  ac_vpsub='/^[  ]*VPATH[        ]*=/{
7512s/:*\$(srcdir):*/:/;
7513s/:*\${srcdir}:*/:/;
7514s/:*@srcdir@:*/:/;
7515s/^\([^=]*=[     ]*\):*/\1/;
7516s/:*$//;
7517s/^[^=]*=[       ]*$//;
7518}'
7519fi
7520
7521DEFS=-DHAVE_CONFIG_H
7522
7523ac_libobjs=
7524ac_ltlibobjs=
7525for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
7526  # 1. Remove the extension, and $U if already installed.
7527  ac_i=`echo "$ac_i" |
7528         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
7529  # 2. Add them.
7530  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
7531  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
7532done
7533LIBOBJS=$ac_libobjs
7534
7535LTLIBOBJS=$ac_ltlibobjs
7536
7537
7538
7539: ${CONFIG_STATUS=./config.status}
7540ac_clean_files_save=$ac_clean_files
7541ac_clean_files="$ac_clean_files $CONFIG_STATUS"
7542{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
7543echo "$as_me: creating $CONFIG_STATUS" >&6;}
7544cat >$CONFIG_STATUS <<_ACEOF
7545#! $SHELL
7546# Generated by $as_me.
7547# Run this file to recreate the current configuration.
7548# Compiler output produced by configure, useful for debugging
7549# configure, is in config.log if it exists.
7550
7551debug=false
7552ac_cs_recheck=false
7553ac_cs_silent=false
7554SHELL=\${CONFIG_SHELL-$SHELL}
7555_ACEOF
7556
7557cat >>$CONFIG_STATUS <<\_ACEOF
7558## --------------------- ##
7559## M4sh Initialization.  ##
7560## --------------------- ##
7561
7562# Be Bourne compatible
7563if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
7564  emulate sh
7565  NULLCMD=:
7566  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
7567  # is contrary to our usage.  Disable this feature.
7568  alias -g '${1+"$@"}'='"$@"'
7569elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
7570  set -o posix
7571fi
7572DUALCASE=1; export DUALCASE # for MKS sh
7573
7574# Support unset when possible.
7575if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7576  as_unset=unset
7577else
7578  as_unset=false
7579fi
7580
7581
7582# Work around bugs in pre-3.0 UWIN ksh.
7583$as_unset ENV MAIL MAILPATH
7584PS1='$ '
7585PS2='> '
7586PS4='+ '
7587
7588# NLS nuisances.
7589for as_var in \
7590  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
7591  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
7592  LC_TELEPHONE LC_TIME
7593do
7594  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
7595    eval $as_var=C; export $as_var
7596  else
7597    $as_unset $as_var
7598  fi
7599done
7600
7601# Required to use basename.
7602if expr a : '\(a\)' >/dev/null 2>&1; then
7603  as_expr=expr
7604else
7605  as_expr=false
7606fi
7607
7608if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
7609  as_basename=basename
7610else
7611  as_basename=false
7612fi
7613
7614
7615# Name of the executable.
7616as_me=`$as_basename "$0" ||
7617$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
7618         X"$0" : 'X\(//\)$' \| \
7619         X"$0" : 'X\(/\)$' \| \
7620         .     : '\(.\)' 2>/dev/null ||
7621echo X/"$0" |
7622    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
7623          /^X\/\(\/\/\)$/{ s//\1/; q; }
7624          /^X\/\(\/\).*/{ s//\1/; q; }
7625          s/.*/./; q'`
7626
7627
7628# PATH needs CR, and LINENO needs CR and PATH.
7629# Avoid depending upon Character Ranges.
7630as_cr_letters='abcdefghijklmnopqrstuvwxyz'
7631as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
7632as_cr_Letters=$as_cr_letters$as_cr_LETTERS
7633as_cr_digits='0123456789'
7634as_cr_alnum=$as_cr_Letters$as_cr_digits
7635
7636# The user is always right.
7637if test "${PATH_SEPARATOR+set}" != set; then
7638  echo "#! /bin/sh" >conf$$.sh
7639  echo  "exit 0"   >>conf$$.sh
7640  chmod +x conf$$.sh
7641  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
7642    PATH_SEPARATOR=';'
7643  else
7644    PATH_SEPARATOR=:
7645  fi
7646  rm -f conf$$.sh
7647fi
7648
7649
7650  as_lineno_1=$LINENO
7651  as_lineno_2=$LINENO
7652  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
7653  test "x$as_lineno_1" != "x$as_lineno_2" &&
7654  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
7655  # Find who we are.  Look in the path if we contain no path at all
7656  # relative or not.
7657  case $0 in
7658    *[\\/]* ) as_myself=$0 ;;
7659    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7660for as_dir in $PATH
7661do
7662  IFS=$as_save_IFS
7663  test -z "$as_dir" && as_dir=.
7664  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
7665done
7666
7667       ;;
7668  esac
7669  # We did not find ourselves, most probably we were run as `sh COMMAND'
7670  # in which case we are not to be found in the path.
7671  if test "x$as_myself" = x; then
7672    as_myself=$0
7673  fi
7674  if test ! -f "$as_myself"; then
7675    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
7676echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
7677   { (exit 1); exit 1; }; }
7678  fi
7679  case $CONFIG_SHELL in
7680  '')
7681    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7682for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
7683do
7684  IFS=$as_save_IFS
7685  test -z "$as_dir" && as_dir=.
7686  for as_base in sh bash ksh sh5; do
7687         case $as_dir in
7688         /*)
7689           if ("$as_dir/$as_base" -c '
7690  as_lineno_1=$LINENO
7691  as_lineno_2=$LINENO
7692  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
7693  test "x$as_lineno_1" != "x$as_lineno_2" &&
7694  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
7695             $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
7696             $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
7697             CONFIG_SHELL=$as_dir/$as_base
7698             export CONFIG_SHELL
7699             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
7700           fi;;
7701         esac
7702       done
7703done
7704;;
7705  esac
7706
7707  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
7708  # uniformly replaced by the line number.  The first 'sed' inserts a
7709  # line-number line before each line; the second 'sed' does the real
7710  # work.  The second script uses 'N' to pair each line-number line
7711  # with the numbered line, and appends trailing '-' during
7712  # substitution so that $LINENO is not a special case at line end.
7713  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
7714  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
7715  sed '=' <$as_myself |
7716    sed '
7717      N
7718      s,$,-,
7719      : loop
7720      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
7721      t loop
7722      s,-$,,
7723      s,^['$as_cr_digits']*\n,,
7724    ' >$as_me.lineno &&
7725  chmod +x $as_me.lineno ||
7726    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
7727echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
7728   { (exit 1); exit 1; }; }
7729
7730  # Don't try to exec as it changes $[0], causing all sort of problems
7731  # (the dirname of $[0] is not the place where we might find the
7732  # original and so on.  Autoconf is especially sensible to this).
7733  . ./$as_me.lineno
7734  # Exit status is that of the last command.
7735  exit
7736}
7737
7738
7739case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
7740  *c*,-n*) ECHO_N= ECHO_C='
7741' ECHO_T='      ' ;;
7742  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
7743  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
7744esac
7745
7746if expr a : '\(a\)' >/dev/null 2>&1; then
7747  as_expr=expr
7748else
7749  as_expr=false
7750fi
7751
7752rm -f conf$$ conf$$.exe conf$$.file
7753echo >conf$$.file
7754if ln -s conf$$.file conf$$ 2>/dev/null; then
7755  # We could just check for DJGPP; but this test a) works b) is more generic
7756  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
7757  if test -f conf$$.exe; then
7758    # Don't use ln at all; we don't have any links
7759    as_ln_s='cp -p'
7760  else
7761    as_ln_s='ln -s'
7762  fi
7763elif ln conf$$.file conf$$ 2>/dev/null; then
7764  as_ln_s=ln
7765else
7766  as_ln_s='cp -p'
7767fi
7768rm -f conf$$ conf$$.exe conf$$.file
7769
7770if mkdir -p . 2>/dev/null; then
7771  as_mkdir_p=:
7772else
7773  test -d ./-p && rmdir ./-p
7774  as_mkdir_p=false
7775fi
7776
7777as_executable_p="test -f"
7778
7779# Sed expression to map a string onto a valid CPP name.
7780as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
7781
7782# Sed expression to map a string onto a valid variable name.
7783as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
7784
7785
7786# IFS
7787# We need space, tab and new line, in precisely that order.
7788as_nl='
7789'
7790IFS="   $as_nl"
7791
7792# CDPATH.
7793$as_unset CDPATH
7794
7795exec 6>&1
7796
7797# Open the log real soon, to keep \$[0] and so on meaningful, and to
7798# report actual input values of CONFIG_FILES etc. instead of their
7799# values after options handling.  Logging --version etc. is OK.
7800exec 5>>config.log
7801{
7802  echo
7803  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
7804## Running $as_me. ##
7805_ASBOX
7806} >&5
7807cat >&5 <<_CSEOF
7808
7809This file was extended by Duchamp $as_me 1.1.6, which was
7810generated by GNU Autoconf 2.59.  Invocation command line was
7811
7812  CONFIG_FILES    = $CONFIG_FILES
7813  CONFIG_HEADERS  = $CONFIG_HEADERS
7814  CONFIG_LINKS    = $CONFIG_LINKS
7815  CONFIG_COMMANDS = $CONFIG_COMMANDS
7816  $ $0 $@
7817
7818_CSEOF
7819echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
7820echo >&5
7821_ACEOF
7822
7823# Files that config.status was made for.
7824if test -n "$ac_config_files"; then
7825  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
7826fi
7827
7828if test -n "$ac_config_headers"; then
7829  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
7830fi
7831
7832if test -n "$ac_config_links"; then
7833  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
7834fi
7835
7836if test -n "$ac_config_commands"; then
7837  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
7838fi
7839
7840cat >>$CONFIG_STATUS <<\_ACEOF
7841
7842ac_cs_usage="\
7843\`$as_me' instantiates files from templates according to the
7844current configuration.
7845
7846Usage: $0 [OPTIONS] [FILE]...
7847
7848  -h, --help       print this help, then exit
7849  -V, --version    print version number, then exit
7850  -q, --quiet      do not print progress messages
7851  -d, --debug      don't remove temporary files
7852      --recheck    update $as_me by reconfiguring in the same conditions
7853  --file=FILE[:TEMPLATE]
7854                   instantiate the configuration file FILE
7855  --header=FILE[:TEMPLATE]
7856                   instantiate the configuration header FILE
7857
7858Configuration files:
7859$config_files
7860
7861Configuration headers:
7862$config_headers
7863
7864Report bugs to <bug-autoconf@gnu.org>."
7865_ACEOF
7866
7867cat >>$CONFIG_STATUS <<_ACEOF
7868ac_cs_version="\\
7869Duchamp config.status 1.1.6
7870configured by $0, generated by GNU Autoconf 2.59,
7871  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
7872
7873Copyright (C) 2003 Free Software Foundation, Inc.
7874This config.status script is free software; the Free Software Foundation
7875gives unlimited permission to copy, distribute and modify it."
7876srcdir=$srcdir
7877_ACEOF
7878
7879cat >>$CONFIG_STATUS <<\_ACEOF
7880# If no file are specified by the user, then we need to provide default
7881# value.  By we need to know if files were specified by the user.
7882ac_need_defaults=:
7883while test $# != 0
7884do
7885  case $1 in
7886  --*=*)
7887    ac_option=`expr "x$1" : 'x\([^=]*\)='`
7888    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
7889    ac_shift=:
7890    ;;
7891  -*)
7892    ac_option=$1
7893    ac_optarg=$2
7894    ac_shift=shift
7895    ;;
7896  *) # This is not an option, so the user has probably given explicit
7897     # arguments.
7898     ac_option=$1
7899     ac_need_defaults=false;;
7900  esac
7901
7902  case $ac_option in
7903  # Handling of the options.
7904_ACEOF
7905cat >>$CONFIG_STATUS <<\_ACEOF
7906  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7907    ac_cs_recheck=: ;;
7908  --version | --vers* | -V )
7909    echo "$ac_cs_version"; exit 0 ;;
7910  --he | --h)
7911    # Conflict between --help and --header
7912    { { echo "$as_me:$LINENO: error: ambiguous option: $1
7913Try \`$0 --help' for more information." >&5
7914echo "$as_me: error: ambiguous option: $1
7915Try \`$0 --help' for more information." >&2;}
7916   { (exit 1); exit 1; }; };;
7917  --help | --hel | -h )
7918    echo "$ac_cs_usage"; exit 0 ;;
7919  --debug | --d* | -d )
7920    debug=: ;;
7921  --file | --fil | --fi | --f )
7922    $ac_shift
7923    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
7924    ac_need_defaults=false;;
7925  --header | --heade | --head | --hea )
7926    $ac_shift
7927    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
7928    ac_need_defaults=false;;
7929  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
7930  | -silent | --silent | --silen | --sile | --sil | --si | --s)
7931    ac_cs_silent=: ;;
7932
7933  # This is an error.
7934  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
7935Try \`$0 --help' for more information." >&5
7936echo "$as_me: error: unrecognized option: $1
7937Try \`$0 --help' for more information." >&2;}
7938   { (exit 1); exit 1; }; } ;;
7939
7940  *) ac_config_targets="$ac_config_targets $1" ;;
7941
7942  esac
7943  shift
7944done
7945
7946ac_configure_extra_args=
7947
7948if $ac_cs_silent; then
7949  exec 6>/dev/null
7950  ac_configure_extra_args="$ac_configure_extra_args --silent"
7951fi
7952
7953_ACEOF
7954cat >>$CONFIG_STATUS <<_ACEOF
7955if \$ac_cs_recheck; then
7956  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
7957  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
7958fi
7959
7960_ACEOF
7961
7962
7963
7964
7965
7966cat >>$CONFIG_STATUS <<\_ACEOF
7967for ac_config_target in $ac_config_targets
7968do
7969  case "$ac_config_target" in
7970  # Handling of arguments.
7971  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
7972  "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
7973  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
7974echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
7975   { (exit 1); exit 1; }; };;
7976  esac
7977done
7978
7979# If the user did not use the arguments to specify the items to instantiate,
7980# then the envvar interface is used.  Set only those that are not.
7981# We use the long form for the default assignment because of an extremely
7982# bizarre bug on SunOS 4.1.3.
7983if $ac_need_defaults; then
7984  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
7985  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
7986fi
7987
7988# Have a temporary directory for convenience.  Make it in the build tree
7989# simply because there is no reason to put it here, and in addition,
7990# creating and moving files from /tmp can sometimes cause problems.
7991# Create a temporary directory, and hook for its removal unless debugging.
7992$debug ||
7993{
7994  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
7995  trap '{ (exit 1); exit 1; }' 1 2 13 15
7996}
7997
7998# Create a (secure) tmp directory for tmp files.
7999
8000{
8001  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
8002  test -n "$tmp" && test -d "$tmp"
8003}  ||
8004{
8005  tmp=./confstat$$-$RANDOM
8006  (umask 077 && mkdir $tmp)
8007} ||
8008{
8009   echo "$me: cannot create a temporary directory in ." >&2
8010   { (exit 1); exit 1; }
8011}
8012
8013_ACEOF
8014
8015cat >>$CONFIG_STATUS <<_ACEOF
8016
8017#
8018# CONFIG_FILES section.
8019#
8020
8021# No need to generate the scripts if there are no CONFIG_FILES.
8022# This happens for instance when ./config.status config.h
8023if test -n "\$CONFIG_FILES"; then
8024  # Protect against being on the right side of a sed subst in config.status.
8025  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
8026   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
8027s,@SHELL@,$SHELL,;t t
8028s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
8029s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
8030s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
8031s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
8032s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
8033s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
8034s,@exec_prefix@,$exec_prefix,;t t
8035s,@prefix@,$prefix,;t t
8036s,@program_transform_name@,$program_transform_name,;t t
8037s,@bindir@,$bindir,;t t
8038s,@sbindir@,$sbindir,;t t
8039s,@libexecdir@,$libexecdir,;t t
8040s,@datadir@,$datadir,;t t
8041s,@sysconfdir@,$sysconfdir,;t t
8042s,@sharedstatedir@,$sharedstatedir,;t t
8043s,@localstatedir@,$localstatedir,;t t
8044s,@libdir@,$libdir,;t t
8045s,@includedir@,$includedir,;t t
8046s,@oldincludedir@,$oldincludedir,;t t
8047s,@infodir@,$infodir,;t t
8048s,@mandir@,$mandir,;t t
8049s,@build_alias@,$build_alias,;t t
8050s,@host_alias@,$host_alias,;t t
8051s,@target_alias@,$target_alias,;t t
8052s,@DEFS@,$DEFS,;t t
8053s,@ECHO_C@,$ECHO_C,;t t
8054s,@ECHO_N@,$ECHO_N,;t t
8055s,@ECHO_T@,$ECHO_T,;t t
8056s,@LIBS@,$LIBS,;t t
8057s,@CXX@,$CXX,;t t
8058s,@CXXFLAGS@,$CXXFLAGS,;t t
8059s,@LDFLAGS@,$LDFLAGS,;t t
8060s,@CPPFLAGS@,$CPPFLAGS,;t t
8061s,@ac_ct_CXX@,$ac_ct_CXX,;t t
8062s,@EXEEXT@,$EXEEXT,;t t
8063s,@OBJEXT@,$OBJEXT,;t t
8064s,@CC@,$CC,;t t
8065s,@CFLAGS@,$CFLAGS,;t t
8066s,@ac_ct_CC@,$ac_ct_CC,;t t
8067s,@CPP@,$CPP,;t t
8068s,@F77@,$F77,;t t
8069s,@FFLAGS@,$FFLAGS,;t t
8070s,@ac_ct_F77@,$ac_ct_F77,;t t
8071s,@LN_S@,$LN_S,;t t
8072s,@INSTALL@,$INSTALL,;t t
8073s,@EGREP@,$EGREP,;t t
8074s,@RANLIB@,$RANLIB,;t t
8075s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
8076s,@POW_LIB@,$POW_LIB,;t t
8077s,@LIBOBJS@,$LIBOBJS,;t t
8078s,@X_CFLAGS@,$X_CFLAGS,;t t
8079s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
8080s,@X_LIBS@,$X_LIBS,;t t
8081s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
8082s,@LINKER@,$LINKER,;t t
8083s,@PGPLOTINC@,$PGPLOTINC,;t t
8084s,@PGPLOTLIB@,$PGPLOTLIB,;t t
8085s,@CFITSIOINC@,$CFITSIOINC,;t t
8086s,@CFITSIOLIB@,$CFITSIOLIB,;t t
8087s,@WCSINC@,$WCSINC,;t t
8088s,@WCSLIB@,$WCSLIB,;t t
8089s,@LTLIBOBJS@,$LTLIBOBJS,;t t
8090CEOF
8091
8092_ACEOF
8093
8094  cat >>$CONFIG_STATUS <<\_ACEOF
8095  # Split the substitutions into bite-sized pieces for seds with
8096  # small command number limits, like on Digital OSF/1 and HP-UX.
8097  ac_max_sed_lines=48
8098  ac_sed_frag=1 # Number of current file.
8099  ac_beg=1 # First line for current file.
8100  ac_end=$ac_max_sed_lines # Line after last line for current file.
8101  ac_more_lines=:
8102  ac_sed_cmds=
8103  while $ac_more_lines; do
8104    if test $ac_beg -gt 1; then
8105      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
8106    else
8107      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
8108    fi
8109    if test ! -s $tmp/subs.frag; then
8110      ac_more_lines=false
8111    else
8112      # The purpose of the label and of the branching condition is to
8113      # speed up the sed processing (if there are no `@' at all, there
8114      # is no need to browse any of the substitutions).
8115      # These are the two extra sed commands mentioned above.
8116      (echo ':t
8117  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
8118      if test -z "$ac_sed_cmds"; then
8119        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
8120      else
8121        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
8122      fi
8123      ac_sed_frag=`expr $ac_sed_frag + 1`
8124      ac_beg=$ac_end
8125      ac_end=`expr $ac_end + $ac_max_sed_lines`
8126    fi
8127  done
8128  if test -z "$ac_sed_cmds"; then
8129    ac_sed_cmds=cat
8130  fi
8131fi # test -n "$CONFIG_FILES"
8132
8133_ACEOF
8134cat >>$CONFIG_STATUS <<\_ACEOF
8135for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
8136  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8137  case $ac_file in
8138  - | *:- | *:-:* ) # input from stdin
8139        cat >$tmp/stdin
8140        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8141        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8142  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8143        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8144  * )   ac_file_in=$ac_file.in ;;
8145  esac
8146
8147  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
8148  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
8149$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8150         X"$ac_file" : 'X\(//\)[^/]' \| \
8151         X"$ac_file" : 'X\(//\)$' \| \
8152         X"$ac_file" : 'X\(/\)' \| \
8153         .     : '\(.\)' 2>/dev/null ||
8154echo X"$ac_file" |
8155    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8156          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8157          /^X\(\/\/\)$/{ s//\1/; q; }
8158          /^X\(\/\).*/{ s//\1/; q; }
8159          s/.*/./; q'`
8160  { if $as_mkdir_p; then
8161    mkdir -p "$ac_dir"
8162  else
8163    as_dir="$ac_dir"
8164    as_dirs=
8165    while test ! -d "$as_dir"; do
8166      as_dirs="$as_dir $as_dirs"
8167      as_dir=`(dirname "$as_dir") 2>/dev/null ||
8168$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8169         X"$as_dir" : 'X\(//\)[^/]' \| \
8170         X"$as_dir" : 'X\(//\)$' \| \
8171         X"$as_dir" : 'X\(/\)' \| \
8172         .     : '\(.\)' 2>/dev/null ||
8173echo X"$as_dir" |
8174    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8175          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8176          /^X\(\/\/\)$/{ s//\1/; q; }
8177          /^X\(\/\).*/{ s//\1/; q; }
8178          s/.*/./; q'`
8179    done
8180    test ! -n "$as_dirs" || mkdir $as_dirs
8181  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
8182echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
8183   { (exit 1); exit 1; }; }; }
8184
8185  ac_builddir=.
8186
8187if test "$ac_dir" != .; then
8188  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
8189  # A "../" for each directory in $ac_dir_suffix.
8190  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
8191else
8192  ac_dir_suffix= ac_top_builddir=
8193fi
8194
8195case $srcdir in
8196  .)  # No --srcdir option.  We are building in place.
8197    ac_srcdir=.
8198    if test -z "$ac_top_builddir"; then
8199       ac_top_srcdir=.
8200    else
8201       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
8202    fi ;;
8203  [\\/]* | ?:[\\/]* )  # Absolute path.
8204    ac_srcdir=$srcdir$ac_dir_suffix;
8205    ac_top_srcdir=$srcdir ;;
8206  *) # Relative path.
8207    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
8208    ac_top_srcdir=$ac_top_builddir$srcdir ;;
8209esac
8210
8211# Do not use `cd foo && pwd` to compute absolute paths, because
8212# the directories may not exist.
8213case `pwd` in
8214.) ac_abs_builddir="$ac_dir";;
8215*)
8216  case "$ac_dir" in
8217  .) ac_abs_builddir=`pwd`;;
8218  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
8219  *) ac_abs_builddir=`pwd`/"$ac_dir";;
8220  esac;;
8221esac
8222case $ac_abs_builddir in
8223.) ac_abs_top_builddir=${ac_top_builddir}.;;
8224*)
8225  case ${ac_top_builddir}. in
8226  .) ac_abs_top_builddir=$ac_abs_builddir;;
8227  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
8228  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
8229  esac;;
8230esac
8231case $ac_abs_builddir in
8232.) ac_abs_srcdir=$ac_srcdir;;
8233*)
8234  case $ac_srcdir in
8235  .) ac_abs_srcdir=$ac_abs_builddir;;
8236  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
8237  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
8238  esac;;
8239esac
8240case $ac_abs_builddir in
8241.) ac_abs_top_srcdir=$ac_top_srcdir;;
8242*)
8243  case $ac_top_srcdir in
8244  .) ac_abs_top_srcdir=$ac_abs_builddir;;
8245  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
8246  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
8247  esac;;
8248esac
8249
8250
8251
8252  if test x"$ac_file" != x-; then
8253    { echo "$as_me:$LINENO: creating $ac_file" >&5
8254echo "$as_me: creating $ac_file" >&6;}
8255    rm -f "$ac_file"
8256  fi
8257  # Let's still pretend it is `configure' which instantiates (i.e., don't
8258  # use $as_me), people would be surprised to read:
8259  #    /* config.h.  Generated by config.status.  */
8260  if test x"$ac_file" = x-; then
8261    configure_input=
8262  else
8263    configure_input="$ac_file.  "
8264  fi
8265  configure_input=$configure_input"Generated from `echo $ac_file_in |
8266                                     sed 's,.*/,,'` by configure."
8267
8268  # First look for the input files in the build tree, otherwise in the
8269  # src tree.
8270  ac_file_inputs=`IFS=:
8271    for f in $ac_file_in; do
8272      case $f in
8273      -) echo $tmp/stdin ;;
8274      [\\/$]*)
8275         # Absolute (can't be DOS-style, as IFS=:)
8276         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8277echo "$as_me: error: cannot find input file: $f" >&2;}
8278   { (exit 1); exit 1; }; }
8279         echo "$f";;
8280      *) # Relative
8281         if test -f "$f"; then
8282           # Build tree
8283           echo "$f"
8284         elif test -f "$srcdir/$f"; then
8285           # Source tree
8286           echo "$srcdir/$f"
8287         else
8288           # /dev/null tree
8289           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8290echo "$as_me: error: cannot find input file: $f" >&2;}
8291   { (exit 1); exit 1; }; }
8292         fi;;
8293      esac
8294    done` || { (exit 1); exit 1; }
8295_ACEOF
8296cat >>$CONFIG_STATUS <<_ACEOF
8297  sed "$ac_vpsub
8298$extrasub
8299_ACEOF
8300cat >>$CONFIG_STATUS <<\_ACEOF
8301:t
8302/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
8303s,@configure_input@,$configure_input,;t t
8304s,@srcdir@,$ac_srcdir,;t t
8305s,@abs_srcdir@,$ac_abs_srcdir,;t t
8306s,@top_srcdir@,$ac_top_srcdir,;t t
8307s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
8308s,@builddir@,$ac_builddir,;t t
8309s,@abs_builddir@,$ac_abs_builddir,;t t
8310s,@top_builddir@,$ac_top_builddir,;t t
8311s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
8312" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
8313  rm -f $tmp/stdin
8314  if test x"$ac_file" != x-; then
8315    mv $tmp/out $ac_file
8316  else
8317    cat $tmp/out
8318    rm -f $tmp/out
8319  fi
8320
8321done
8322_ACEOF
8323cat >>$CONFIG_STATUS <<\_ACEOF
8324
8325#
8326# CONFIG_HEADER section.
8327#
8328
8329# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8330# NAME is the cpp macro being defined and VALUE is the value it is being given.
8331#
8332# ac_d sets the value in "#define NAME VALUE" lines.
8333ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
8334ac_dB='[         ].*$,\1#\2'
8335ac_dC=' '
8336ac_dD=',;t'
8337# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8338ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8339ac_uB='$,\1#\2define\3'
8340ac_uC=' '
8341ac_uD=',;t'
8342
8343for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
8344  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8345  case $ac_file in
8346  - | *:- | *:-:* ) # input from stdin
8347        cat >$tmp/stdin
8348        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8349        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8350  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
8351        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
8352  * )   ac_file_in=$ac_file.in ;;
8353  esac
8354
8355  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
8356echo "$as_me: creating $ac_file" >&6;}
8357
8358  # First look for the input files in the build tree, otherwise in the
8359  # src tree.
8360  ac_file_inputs=`IFS=:
8361    for f in $ac_file_in; do
8362      case $f in
8363      -) echo $tmp/stdin ;;
8364      [\\/$]*)
8365         # Absolute (can't be DOS-style, as IFS=:)
8366         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8367echo "$as_me: error: cannot find input file: $f" >&2;}
8368   { (exit 1); exit 1; }; }
8369         # Do quote $f, to prevent DOS paths from being IFS'd.
8370         echo "$f";;
8371      *) # Relative
8372         if test -f "$f"; then
8373           # Build tree
8374           echo "$f"
8375         elif test -f "$srcdir/$f"; then
8376           # Source tree
8377           echo "$srcdir/$f"
8378         else
8379           # /dev/null tree
8380           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
8381echo "$as_me: error: cannot find input file: $f" >&2;}
8382   { (exit 1); exit 1; }; }
8383         fi;;
8384      esac
8385    done` || { (exit 1); exit 1; }
8386  # Remove the trailing spaces.
8387  sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
8388
8389_ACEOF
8390
8391# Transform confdefs.h into two sed scripts, `conftest.defines' and
8392# `conftest.undefs', that substitutes the proper values into
8393# config.h.in to produce config.h.  The first handles `#define'
8394# templates, and the second `#undef' templates.
8395# And first: Protect against being on the right side of a sed subst in
8396# config.status.  Protect against being in an unquoted here document
8397# in config.status.
8398rm -f conftest.defines conftest.undefs
8399# Using a here document instead of a string reduces the quoting nightmare.
8400# Putting comments in sed scripts is not portable.
8401#
8402# `end' is used to avoid that the second main sed command (meant for
8403# 0-ary CPP macros) applies to n-ary macro definitions.
8404# See the Autoconf documentation for `clear'.
8405cat >confdef2sed.sed <<\_ACEOF
8406s/[\\&,]/\\&/g
8407s,[\\$`],\\&,g
8408t clear
8409: clear
8410s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
8411t end
8412s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
8413: end
8414_ACEOF
8415# If some macros were called several times there might be several times
8416# the same #defines, which is useless.  Nevertheless, we may not want to
8417# sort them, since we want the *last* AC-DEFINE to be honored.
8418uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
8419sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
8420rm -f confdef2sed.sed
8421
8422# This sed command replaces #undef with comments.  This is necessary, for
8423# example, in the case of _POSIX_SOURCE, which is predefined and required
8424# on some systems where configure will not decide to define it.
8425cat >>conftest.undefs <<\_ACEOF
8426s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
8427_ACEOF
8428
8429# Break up conftest.defines because some shells have a limit on the size
8430# of here documents, and old seds have small limits too (100 cmds).
8431echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
8432echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
8433echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
8434echo '  :' >>$CONFIG_STATUS
8435rm -f conftest.tail
8436while grep . conftest.defines >/dev/null
8437do
8438  # Write a limited-size here document to $tmp/defines.sed.
8439  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
8440  # Speed up: don't consider the non `#define' lines.
8441  echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
8442  # Work around the forget-to-reset-the-flag bug.
8443  echo 't clr' >>$CONFIG_STATUS
8444  echo ': clr' >>$CONFIG_STATUS
8445  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
8446  echo 'CEOF
8447  sed -f $tmp/defines.sed $tmp/in >$tmp/out
8448  rm -f $tmp/in
8449  mv $tmp/out $tmp/in
8450' >>$CONFIG_STATUS
8451  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
8452  rm -f conftest.defines
8453  mv conftest.tail conftest.defines
8454done
8455rm -f conftest.defines
8456echo '  fi # grep' >>$CONFIG_STATUS
8457echo >>$CONFIG_STATUS
8458
8459# Break up conftest.undefs because some shells have a limit on the size
8460# of here documents, and old seds have small limits too (100 cmds).
8461echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
8462rm -f conftest.tail
8463while grep . conftest.undefs >/dev/null
8464do
8465  # Write a limited-size here document to $tmp/undefs.sed.
8466  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
8467  # Speed up: don't consider the non `#undef'
8468  echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
8469  # Work around the forget-to-reset-the-flag bug.
8470  echo 't clr' >>$CONFIG_STATUS
8471  echo ': clr' >>$CONFIG_STATUS
8472  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
8473  echo 'CEOF
8474  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
8475  rm -f $tmp/in
8476  mv $tmp/out $tmp/in
8477' >>$CONFIG_STATUS
8478  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
8479  rm -f conftest.undefs
8480  mv conftest.tail conftest.undefs
8481done
8482rm -f conftest.undefs
8483
8484cat >>$CONFIG_STATUS <<\_ACEOF
8485  # Let's still pretend it is `configure' which instantiates (i.e., don't
8486  # use $as_me), people would be surprised to read:
8487  #    /* config.h.  Generated by config.status.  */
8488  if test x"$ac_file" = x-; then
8489    echo "/* Generated by configure.  */" >$tmp/config.h
8490  else
8491    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
8492  fi
8493  cat $tmp/in >>$tmp/config.h
8494  rm -f $tmp/in
8495  if test x"$ac_file" != x-; then
8496    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
8497      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
8498echo "$as_me: $ac_file is unchanged" >&6;}
8499    else
8500      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
8501$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8502         X"$ac_file" : 'X\(//\)[^/]' \| \
8503         X"$ac_file" : 'X\(//\)$' \| \
8504         X"$ac_file" : 'X\(/\)' \| \
8505         .     : '\(.\)' 2>/dev/null ||
8506echo X"$ac_file" |
8507    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8508          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8509          /^X\(\/\/\)$/{ s//\1/; q; }
8510          /^X\(\/\).*/{ s//\1/; q; }
8511          s/.*/./; q'`
8512      { if $as_mkdir_p; then
8513    mkdir -p "$ac_dir"
8514  else
8515    as_dir="$ac_dir"
8516    as_dirs=
8517    while test ! -d "$as_dir"; do
8518      as_dirs="$as_dir $as_dirs"
8519      as_dir=`(dirname "$as_dir") 2>/dev/null ||
8520$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8521         X"$as_dir" : 'X\(//\)[^/]' \| \
8522         X"$as_dir" : 'X\(//\)$' \| \
8523         X"$as_dir" : 'X\(/\)' \| \
8524         .     : '\(.\)' 2>/dev/null ||
8525echo X"$as_dir" |
8526    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
8527          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
8528          /^X\(\/\/\)$/{ s//\1/; q; }
8529          /^X\(\/\).*/{ s//\1/; q; }
8530          s/.*/./; q'`
8531    done
8532    test ! -n "$as_dirs" || mkdir $as_dirs
8533  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
8534echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
8535   { (exit 1); exit 1; }; }; }
8536
8537      rm -f $ac_file
8538      mv $tmp/config.h $ac_file
8539    fi
8540  else
8541    cat $tmp/config.h
8542    rm -f $tmp/config.h
8543  fi
8544done
8545_ACEOF
8546
8547cat >>$CONFIG_STATUS <<\_ACEOF
8548
8549{ (exit 0); exit 0; }
8550_ACEOF
8551chmod +x $CONFIG_STATUS
8552ac_clean_files=$ac_clean_files_save
8553
8554
8555# configure is writing to config.log, and then calls config.status.
8556# config.status does its own redirection, appending to config.log.
8557# Unfortunately, on DOS this fails, as config.log is still kept open
8558# by configure, so config.status won't be able to write to it; its
8559# output is simply discarded.  So we exec the FD to /dev/null,
8560# effectively closing config.log, so it can be properly (re)opened and
8561# appended to by config.status.  When coming back to configure, we
8562# need to make the FD available again.
8563if test "$no_create" != yes; then
8564  ac_cs_success=:
8565  ac_config_status_args=
8566  test "$silent" = yes &&
8567    ac_config_status_args="$ac_config_status_args --quiet"
8568  exec 5>/dev/null
8569  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
8570  exec 5>>config.log
8571  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
8572  # would make configure fail if this is the last instruction.
8573  $ac_cs_success || { (exit 1); exit 1; }
8574fi
8575
Note: See TracBrowser for help on using the repository browser.