source: trunk/configure @ 168

Last change on this file since 168 was 168, checked in by Matthew Whiting, 18 years ago

A couple of changes:

  • Removed the Fortran search in the configure script -- we don't use it.
  • Cleaned up some of the fits-I/O tasks, adding some functions that check for the existence of the FITS file (fits_file_exists).
  • This task is only in v2.5+ of cfitsio, so added notes to this effect in README and the Guide.
  • Improved the exiting and warning messages in mainDuchamp.cc.
  • Property svn:executable set to *
File size: 184.0 KB
Line 
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.57 for Duchamp 1.0.5.
4#
5# Report bugs to <Matthew.Whiting@csiro.au>.
6#
7# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
8# Free Software Foundation, Inc.
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11## --------------------- ##
12## M4sh Initialization.  ##
13## --------------------- ##
14
15# Be Bourne compatible
16if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17  emulate sh
18  NULLCMD=:
19  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20  # is contrary to our usage.  Disable this feature.
21  alias -g '${1+"$@"}'='"$@"'
22elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23  set -o posix
24fi
25
26# Support unset when possible.
27if (FOO=FOO; unset FOO) >/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 -n "`(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  as_mkdir_p=false
224fi
225
226as_executable_p="test -f"
227
228# Sed expression to map a string onto a valid CPP name.
229as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
230
231# Sed expression to map a string onto a valid variable name.
232as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
233
234
235# IFS
236# We need space, tab and new line, in precisely that order.
237as_nl='
238'
239IFS="   $as_nl"
240
241# CDPATH.
242$as_unset CDPATH
243
244
245# Name of the host.
246# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
247# so uname gets run too.
248ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
249
250exec 6>&1
251
252#
253# Initializations.
254#
255ac_default_prefix=/usr/local
256ac_config_libobj_dir=.
257cross_compiling=no
258subdirs=
259MFLAGS=
260MAKEFLAGS=
261SHELL=${CONFIG_SHELL-/bin/sh}
262
263# Maximum number of lines to put in a shell here document.
264# This variable seems obsolete.  It should probably be removed, and
265# only ac_max_sed_lines should be used.
266: ${ac_max_here_lines=38}
267
268# Identity of this package.
269PACKAGE_NAME='Duchamp'
270PACKAGE_TARNAME='duchamp'
271PACKAGE_VERSION='1.0.5'
272PACKAGE_STRING='Duchamp 1.0.5'
273PACKAGE_BUGREPORT='Matthew.Whiting@csiro.au'
274
275ac_unique_file="src/duchamp.hh"
276# Factoring default headers for most tests.
277ac_includes_default="\
278#include <stdio.h>
279#if HAVE_SYS_TYPES_H
280# include <sys/types.h>
281#endif
282#if HAVE_SYS_STAT_H
283# include <sys/stat.h>
284#endif
285#if STDC_HEADERS
286# include <stdlib.h>
287# include <stddef.h>
288#else
289# if HAVE_STDLIB_H
290#  include <stdlib.h>
291# endif
292#endif
293#if HAVE_STRING_H
294# if !STDC_HEADERS && HAVE_MEMORY_H
295#  include <memory.h>
296# endif
297# include <string.h>
298#endif
299#if HAVE_STRINGS_H
300# include <strings.h>
301#endif
302#if HAVE_INTTYPES_H
303# include <inttypes.h>
304#else
305# if HAVE_STDINT_H
306#  include <stdint.h>
307# endif
308#endif
309#if HAVE_UNISTD_H
310# include <unistd.h>
311#endif"
312
313ac_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 EGREP RANLIB ac_ct_RANLIB POW_LIB LIBOBJS PGPLOTINC PGPLOTLIB CFITSIOINC CFITSIOLIB WCSINC WCSLIB LTLIBOBJS'
314ac_subst_files=''
315
316# Initialize some variables set by options.
317ac_init_help=
318ac_init_version=false
319# The variables have the same names as the options, with
320# dashes changed to underlines.
321cache_file=/dev/null
322exec_prefix=NONE
323no_create=
324no_recursion=
325prefix=NONE
326program_prefix=NONE
327program_suffix=NONE
328program_transform_name=s,x,x,
329silent=
330site=
331srcdir=
332verbose=
333x_includes=NONE
334x_libraries=NONE
335
336# Installation directory options.
337# These are left unexpanded so users can "make install exec_prefix=/foo"
338# and all the variables that are supposed to be based on exec_prefix
339# by default will actually change.
340# Use braces instead of parens because sh, perl, etc. also accept them.
341bindir='${exec_prefix}/bin'
342sbindir='${exec_prefix}/sbin'
343libexecdir='${exec_prefix}/libexec'
344datadir='${prefix}/share'
345sysconfdir='${prefix}/etc'
346sharedstatedir='${prefix}/com'
347localstatedir='${prefix}/var'
348libdir='${exec_prefix}/lib'
349includedir='${prefix}/include'
350oldincludedir='/usr/include'
351infodir='${prefix}/info'
352mandir='${prefix}/man'
353
354ac_prev=
355for ac_option
356do
357  # If the previous option needs an argument, assign it.
358  if test -n "$ac_prev"; then
359    eval "$ac_prev=\$ac_option"
360    ac_prev=
361    continue
362  fi
363
364  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
365
366  # Accept the important Cygnus configure options, so we can diagnose typos.
367
368  case $ac_option in
369
370  -bindir | --bindir | --bindi | --bind | --bin | --bi)
371    ac_prev=bindir ;;
372  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
373    bindir=$ac_optarg ;;
374
375  -build | --build | --buil | --bui | --bu)
376    ac_prev=build_alias ;;
377  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
378    build_alias=$ac_optarg ;;
379
380  -cache-file | --cache-file | --cache-fil | --cache-fi \
381  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
382    ac_prev=cache_file ;;
383  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
384  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
385    cache_file=$ac_optarg ;;
386
387  --config-cache | -C)
388    cache_file=config.cache ;;
389
390  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
391    ac_prev=datadir ;;
392  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
393  | --da=*)
394    datadir=$ac_optarg ;;
395
396  -disable-* | --disable-*)
397    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
398    # Reject names that are not valid shell variable names.
399    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
401   { (exit 1); exit 1; }; }
402    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
403    eval "enable_$ac_feature=no" ;;
404
405  -enable-* | --enable-*)
406    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
407    # Reject names that are not valid shell variable names.
408    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
409      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
410   { (exit 1); exit 1; }; }
411    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
412    case $ac_option in
413      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
414      *) ac_optarg=yes ;;
415    esac
416    eval "enable_$ac_feature='$ac_optarg'" ;;
417
418  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
419  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
420  | --exec | --exe | --ex)
421    ac_prev=exec_prefix ;;
422  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
423  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
424  | --exec=* | --exe=* | --ex=*)
425    exec_prefix=$ac_optarg ;;
426
427  -gas | --gas | --ga | --g)
428    # Obsolete; use --with-gas.
429    with_gas=yes ;;
430
431  -help | --help | --hel | --he | -h)
432    ac_init_help=long ;;
433  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
434    ac_init_help=recursive ;;
435  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
436    ac_init_help=short ;;
437
438  -host | --host | --hos | --ho)
439    ac_prev=host_alias ;;
440  -host=* | --host=* | --hos=* | --ho=*)
441    host_alias=$ac_optarg ;;
442
443  -includedir | --includedir | --includedi | --included | --include \
444  | --includ | --inclu | --incl | --inc)
445    ac_prev=includedir ;;
446  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
447  | --includ=* | --inclu=* | --incl=* | --inc=*)
448    includedir=$ac_optarg ;;
449
450  -infodir | --infodir | --infodi | --infod | --info | --inf)
451    ac_prev=infodir ;;
452  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
453    infodir=$ac_optarg ;;
454
455  -libdir | --libdir | --libdi | --libd)
456    ac_prev=libdir ;;
457  -libdir=* | --libdir=* | --libdi=* | --libd=*)
458    libdir=$ac_optarg ;;
459
460  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
461  | --libexe | --libex | --libe)
462    ac_prev=libexecdir ;;
463  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
464  | --libexe=* | --libex=* | --libe=*)
465    libexecdir=$ac_optarg ;;
466
467  -localstatedir | --localstatedir | --localstatedi | --localstated \
468  | --localstate | --localstat | --localsta | --localst \
469  | --locals | --local | --loca | --loc | --lo)
470    ac_prev=localstatedir ;;
471  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
472  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
473  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
474    localstatedir=$ac_optarg ;;
475
476  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
477    ac_prev=mandir ;;
478  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
479    mandir=$ac_optarg ;;
480
481  -nfp | --nfp | --nf)
482    # Obsolete; use --without-fp.
483    with_fp=no ;;
484
485  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486  | --no-cr | --no-c | -n)
487    no_create=yes ;;
488
489  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
490  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
491    no_recursion=yes ;;
492
493  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
494  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
495  | --oldin | --oldi | --old | --ol | --o)
496    ac_prev=oldincludedir ;;
497  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
498  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
499  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
500    oldincludedir=$ac_optarg ;;
501
502  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
503    ac_prev=prefix ;;
504  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
505    prefix=$ac_optarg ;;
506
507  -program-prefix | --program-prefix | --program-prefi | --program-pref \
508  | --program-pre | --program-pr | --program-p)
509    ac_prev=program_prefix ;;
510  -program-prefix=* | --program-prefix=* | --program-prefi=* \
511  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
512    program_prefix=$ac_optarg ;;
513
514  -program-suffix | --program-suffix | --program-suffi | --program-suff \
515  | --program-suf | --program-su | --program-s)
516    ac_prev=program_suffix ;;
517  -program-suffix=* | --program-suffix=* | --program-suffi=* \
518  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
519    program_suffix=$ac_optarg ;;
520
521  -program-transform-name | --program-transform-name \
522  | --program-transform-nam | --program-transform-na \
523  | --program-transform-n | --program-transform- \
524  | --program-transform | --program-transfor \
525  | --program-transfo | --program-transf \
526  | --program-trans | --program-tran \
527  | --progr-tra | --program-tr | --program-t)
528    ac_prev=program_transform_name ;;
529  -program-transform-name=* | --program-transform-name=* \
530  | --program-transform-nam=* | --program-transform-na=* \
531  | --program-transform-n=* | --program-transform-=* \
532  | --program-transform=* | --program-transfor=* \
533  | --program-transfo=* | --program-transf=* \
534  | --program-trans=* | --program-tran=* \
535  | --progr-tra=* | --program-tr=* | --program-t=*)
536    program_transform_name=$ac_optarg ;;
537
538  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
539  | -silent | --silent | --silen | --sile | --sil)
540    silent=yes ;;
541
542  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
543    ac_prev=sbindir ;;
544  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
545  | --sbi=* | --sb=*)
546    sbindir=$ac_optarg ;;
547
548  -sharedstatedir | --sharedstatedir | --sharedstatedi \
549  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
550  | --sharedst | --shareds | --shared | --share | --shar \
551  | --sha | --sh)
552    ac_prev=sharedstatedir ;;
553  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
554  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
555  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
556  | --sha=* | --sh=*)
557    sharedstatedir=$ac_optarg ;;
558
559  -site | --site | --sit)
560    ac_prev=site ;;
561  -site=* | --site=* | --sit=*)
562    site=$ac_optarg ;;
563
564  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
565    ac_prev=srcdir ;;
566  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
567    srcdir=$ac_optarg ;;
568
569  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
570  | --syscon | --sysco | --sysc | --sys | --sy)
571    ac_prev=sysconfdir ;;
572  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
573  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
574    sysconfdir=$ac_optarg ;;
575
576  -target | --target | --targe | --targ | --tar | --ta | --t)
577    ac_prev=target_alias ;;
578  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
579    target_alias=$ac_optarg ;;
580
581  -v | -verbose | --verbose | --verbos | --verbo | --verb)
582    verbose=yes ;;
583
584  -version | --version | --versio | --versi | --vers | -V)
585    ac_init_version=: ;;
586
587  -with-* | --with-*)
588    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
589    # Reject names that are not valid shell variable names.
590    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
591      { echo "$as_me: error: invalid package name: $ac_package" >&2
592   { (exit 1); exit 1; }; }
593    ac_package=`echo $ac_package| sed 's/-/_/g'`
594    case $ac_option in
595      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
596      *) ac_optarg=yes ;;
597    esac
598    eval "with_$ac_package='$ac_optarg'" ;;
599
600  -without-* | --without-*)
601    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
602    # Reject names that are not valid shell variable names.
603    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
604      { echo "$as_me: error: invalid package name: $ac_package" >&2
605   { (exit 1); exit 1; }; }
606    ac_package=`echo $ac_package | sed 's/-/_/g'`
607    eval "with_$ac_package=no" ;;
608
609  --x)
610    # Obsolete; use --with-x.
611    with_x=yes ;;
612
613  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
614  | --x-incl | --x-inc | --x-in | --x-i)
615    ac_prev=x_includes ;;
616  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
617  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
618    x_includes=$ac_optarg ;;
619
620  -x-libraries | --x-libraries | --x-librarie | --x-librari \
621  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
622    ac_prev=x_libraries ;;
623  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
624  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
625    x_libraries=$ac_optarg ;;
626
627  -*) { echo "$as_me: error: unrecognized option: $ac_option
628Try \`$0 --help' for more information." >&2
629   { (exit 1); exit 1; }; }
630    ;;
631
632  *=*)
633    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
634    # Reject names that are not valid shell variable names.
635    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
636      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
637   { (exit 1); exit 1; }; }
638    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
639    eval "$ac_envvar='$ac_optarg'"
640    export $ac_envvar ;;
641
642  *)
643    # FIXME: should be removed in autoconf 3.0.
644    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
645    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
646      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
647    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
648    ;;
649
650  esac
651done
652
653if test -n "$ac_prev"; then
654  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
655  { echo "$as_me: error: missing argument to $ac_option" >&2
656   { (exit 1); exit 1; }; }
657fi
658
659# Be sure to have absolute paths.
660for ac_var in exec_prefix prefix
661do
662  eval ac_val=$`echo $ac_var`
663  case $ac_val in
664    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
665    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
666   { (exit 1); exit 1; }; };;
667  esac
668done
669
670# Be sure to have absolute paths.
671for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
672              localstatedir libdir includedir oldincludedir infodir mandir
673do
674  eval ac_val=$`echo $ac_var`
675  case $ac_val in
676    [\\/$]* | ?:[\\/]* ) ;;
677    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
678   { (exit 1); exit 1; }; };;
679  esac
680done
681
682# There might be people who depend on the old broken behavior: `$host'
683# used to hold the argument of --host etc.
684# FIXME: To remove some day.
685build=$build_alias
686host=$host_alias
687target=$target_alias
688
689# FIXME: To remove some day.
690if test "x$host_alias" != x; then
691  if test "x$build_alias" = x; then
692    cross_compiling=maybe
693    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
694    If a cross compiler is detected then cross compile mode will be used." >&2
695  elif test "x$build_alias" != "x$host_alias"; then
696    cross_compiling=yes
697  fi
698fi
699
700ac_tool_prefix=
701test -n "$host_alias" && ac_tool_prefix=$host_alias-
702
703test "$silent" = yes && exec 6>/dev/null
704
705
706# Find the source files, if location was not specified.
707if test -z "$srcdir"; then
708  ac_srcdir_defaulted=yes
709  # Try the directory containing this script, then its parent.
710  ac_confdir=`(dirname "$0") 2>/dev/null ||
711$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
712         X"$0" : 'X\(//\)[^/]' \| \
713         X"$0" : 'X\(//\)$' \| \
714         X"$0" : 'X\(/\)' \| \
715         .     : '\(.\)' 2>/dev/null ||
716echo X"$0" |
717    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
718          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
719          /^X\(\/\/\)$/{ s//\1/; q; }
720          /^X\(\/\).*/{ s//\1/; q; }
721          s/.*/./; q'`
722  srcdir=$ac_confdir
723  if test ! -r $srcdir/$ac_unique_file; then
724    srcdir=..
725  fi
726else
727  ac_srcdir_defaulted=no
728fi
729if test ! -r $srcdir/$ac_unique_file; then
730  if test "$ac_srcdir_defaulted" = yes; then
731    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
732   { (exit 1); exit 1; }; }
733  else
734    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
735   { (exit 1); exit 1; }; }
736  fi
737fi
738(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
739  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
740   { (exit 1); exit 1; }; }
741srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
742ac_env_build_alias_set=${build_alias+set}
743ac_env_build_alias_value=$build_alias
744ac_cv_env_build_alias_set=${build_alias+set}
745ac_cv_env_build_alias_value=$build_alias
746ac_env_host_alias_set=${host_alias+set}
747ac_env_host_alias_value=$host_alias
748ac_cv_env_host_alias_set=${host_alias+set}
749ac_cv_env_host_alias_value=$host_alias
750ac_env_target_alias_set=${target_alias+set}
751ac_env_target_alias_value=$target_alias
752ac_cv_env_target_alias_set=${target_alias+set}
753ac_cv_env_target_alias_value=$target_alias
754ac_env_CXX_set=${CXX+set}
755ac_env_CXX_value=$CXX
756ac_cv_env_CXX_set=${CXX+set}
757ac_cv_env_CXX_value=$CXX
758ac_env_CXXFLAGS_set=${CXXFLAGS+set}
759ac_env_CXXFLAGS_value=$CXXFLAGS
760ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
761ac_cv_env_CXXFLAGS_value=$CXXFLAGS
762ac_env_LDFLAGS_set=${LDFLAGS+set}
763ac_env_LDFLAGS_value=$LDFLAGS
764ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
765ac_cv_env_LDFLAGS_value=$LDFLAGS
766ac_env_CPPFLAGS_set=${CPPFLAGS+set}
767ac_env_CPPFLAGS_value=$CPPFLAGS
768ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_cv_env_CPPFLAGS_value=$CPPFLAGS
770ac_env_CC_set=${CC+set}
771ac_env_CC_value=$CC
772ac_cv_env_CC_set=${CC+set}
773ac_cv_env_CC_value=$CC
774ac_env_CFLAGS_set=${CFLAGS+set}
775ac_env_CFLAGS_value=$CFLAGS
776ac_cv_env_CFLAGS_set=${CFLAGS+set}
777ac_cv_env_CFLAGS_value=$CFLAGS
778ac_env_CPP_set=${CPP+set}
779ac_env_CPP_value=$CPP
780ac_cv_env_CPP_set=${CPP+set}
781ac_cv_env_CPP_value=$CPP
782
783#
784# Report the --help message.
785#
786if test "$ac_init_help" = "long"; then
787  # Omit some internal or obsolete options to make the list less imposing.
788  # This message is too long to be a string in the A/UX 3.1 sh.
789  cat <<_ACEOF
790\`configure' configures Duchamp 1.0.5 to adapt to many kinds of systems.
791
792Usage: $0 [OPTION]... [VAR=VALUE]...
793
794To assign environment variables (e.g., CC, CFLAGS...), specify them as
795VAR=VALUE.  See below for descriptions of some of the useful variables.
796
797Defaults for the options are specified in brackets.
798
799Configuration:
800  -h, --help              display this help and exit
801      --help=short        display options specific to this package
802      --help=recursive    display the short help of all the included packages
803  -V, --version           display version information and exit
804  -q, --quiet, --silent   do not print \`checking...' messages
805      --cache-file=FILE   cache test results in FILE [disabled]
806  -C, --config-cache      alias for \`--cache-file=config.cache'
807  -n, --no-create         do not create output files
808      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
809
810_ACEOF
811
812  cat <<_ACEOF
813Installation directories:
814  --prefix=PREFIX         install architecture-independent files in PREFIX
815                          [$ac_default_prefix]
816  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
817                          [PREFIX]
818
819By default, \`make install' will install all the files in
820\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
821an installation prefix other than \`$ac_default_prefix' using \`--prefix',
822for instance \`--prefix=\$HOME'.
823
824For better control, use the options below.
825
826Fine tuning of the installation directories:
827  --bindir=DIR           user executables [EPREFIX/bin]
828  --sbindir=DIR          system admin executables [EPREFIX/sbin]
829  --libexecdir=DIR       program executables [EPREFIX/libexec]
830  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
831  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
832  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
833  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
834  --libdir=DIR           object code libraries [EPREFIX/lib]
835  --includedir=DIR       C header files [PREFIX/include]
836  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
837  --infodir=DIR          info documentation [PREFIX/info]
838  --mandir=DIR           man documentation [PREFIX/man]
839_ACEOF
840
841  cat <<\_ACEOF
842
843X features:
844  --x-includes=DIR    X include files are in DIR
845  --x-libraries=DIR   X library files are in DIR
846_ACEOF
847fi
848
849if test -n "$ac_init_help"; then
850  case $ac_init_help in
851     short | recursive ) echo "Configuration of Duchamp 1.0.5:";;
852   esac
853  cat <<\_ACEOF
854
855Optional Packages:
856  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
857  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
858  --with-x                use the X Window System
859
860Some influential environment variables:
861  CXX         C++ compiler command
862  CXXFLAGS    C++ compiler flags
863  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
864              nonstandard directory <lib dir>
865  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
866              headers in a nonstandard directory <include dir>
867  CC          C compiler command
868  CFLAGS      C compiler flags
869  CPP         C preprocessor
870
871Use these variables to override the choices made by `configure' or to help
872it to find libraries and programs with nonstandard names/locations.
873
874Report bugs to <Matthew.Whiting@csiro.au>.
875_ACEOF
876fi
877
878if test "$ac_init_help" = "recursive"; then
879  # If there are subdirs, report their specific --help.
880  ac_popdir=`pwd`
881  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
882    test -d $ac_dir || continue
883    ac_builddir=.
884
885if test "$ac_dir" != .; then
886  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
887  # A "../" for each directory in $ac_dir_suffix.
888  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
889else
890  ac_dir_suffix= ac_top_builddir=
891fi
892
893case $srcdir in
894  .)  # No --srcdir option.  We are building in place.
895    ac_srcdir=.
896    if test -z "$ac_top_builddir"; then
897       ac_top_srcdir=.
898    else
899       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
900    fi ;;
901  [\\/]* | ?:[\\/]* )  # Absolute path.
902    ac_srcdir=$srcdir$ac_dir_suffix;
903    ac_top_srcdir=$srcdir ;;
904  *) # Relative path.
905    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
906    ac_top_srcdir=$ac_top_builddir$srcdir ;;
907esac
908# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
909# absolute.
910ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
911ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
912ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
913ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
914
915    cd $ac_dir
916    # Check for guested configure; otherwise get Cygnus style configure.
917    if test -f $ac_srcdir/configure.gnu; then
918      echo
919      $SHELL $ac_srcdir/configure.gnu  --help=recursive
920    elif test -f $ac_srcdir/configure; then
921      echo
922      $SHELL $ac_srcdir/configure  --help=recursive
923    elif test -f $ac_srcdir/configure.ac ||
924           test -f $ac_srcdir/configure.in; then
925      echo
926      $ac_configure --help
927    else
928      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
929    fi
930    cd $ac_popdir
931  done
932fi
933
934test -n "$ac_init_help" && exit 0
935if $ac_init_version; then
936  cat <<\_ACEOF
937Duchamp configure 1.0.5
938generated by GNU Autoconf 2.57
939
940Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
941Free Software Foundation, Inc.
942This configure script is free software; the Free Software Foundation
943gives unlimited permission to copy, distribute and modify it.
944_ACEOF
945  exit 0
946fi
947exec 5>config.log
948cat >&5 <<_ACEOF
949This file contains any messages produced by compilers while
950running configure, to aid debugging if configure makes a mistake.
951
952It was created by Duchamp $as_me 1.0.5, which was
953generated by GNU Autoconf 2.57.  Invocation command line was
954
955  $ $0 $@
956
957_ACEOF
958{
959cat <<_ASUNAME
960## --------- ##
961## Platform. ##
962## --------- ##
963
964hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
965uname -m = `(uname -m) 2>/dev/null || echo unknown`
966uname -r = `(uname -r) 2>/dev/null || echo unknown`
967uname -s = `(uname -s) 2>/dev/null || echo unknown`
968uname -v = `(uname -v) 2>/dev/null || echo unknown`
969
970/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
971/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
972
973/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
974/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
975/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
976hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
977/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
978/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
979/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
980
981_ASUNAME
982
983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
984for as_dir in $PATH
985do
986  IFS=$as_save_IFS
987  test -z "$as_dir" && as_dir=.
988  echo "PATH: $as_dir"
989done
990
991} >&5
992
993cat >&5 <<_ACEOF
994
995
996## ----------- ##
997## Core tests. ##
998## ----------- ##
999
1000_ACEOF
1001
1002
1003# Keep a trace of the command line.
1004# Strip out --no-create and --no-recursion so they do not pile up.
1005# Strip out --silent because we don't want to record it for future runs.
1006# Also quote any args containing shell meta-characters.
1007# Make two passes to allow for proper duplicate-argument suppression.
1008ac_configure_args=
1009ac_configure_args0=
1010ac_configure_args1=
1011ac_sep=
1012ac_must_keep_next=false
1013for ac_pass in 1 2
1014do
1015  for ac_arg
1016  do
1017    case $ac_arg in
1018    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1019    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020    | -silent | --silent | --silen | --sile | --sil)
1021      continue ;;
1022    *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1023      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1024    esac
1025    case $ac_pass in
1026    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1027    2)
1028      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1029      if test $ac_must_keep_next = true; then
1030        ac_must_keep_next=false # Got value, back to normal.
1031      else
1032        case $ac_arg in
1033          *=* | --config-cache | -C | -disable-* | --disable-* \
1034          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1035          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1036          | -with-* | --with-* | -without-* | --without-* | --x)
1037            case "$ac_configure_args0 " in
1038              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1039            esac
1040            ;;
1041          -* ) ac_must_keep_next=true ;;
1042        esac
1043      fi
1044      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1045      # Get rid of the leading space.
1046      ac_sep=" "
1047      ;;
1048    esac
1049  done
1050done
1051$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1052$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1053
1054# When interrupted or exit'd, cleanup temporary files, and complete
1055# config.log.  We remove comments because anyway the quotes in there
1056# would cause problems or look ugly.
1057# WARNING: Be sure not to use single quotes in there, as some shells,
1058# such as our DU 5.0 friend, will then `close' the trap.
1059trap 'exit_status=$?
1060  # Save into config.log some information that might help in debugging.
1061  {
1062    echo
1063
1064    cat <<\_ASBOX
1065## ---------------- ##
1066## Cache variables. ##
1067## ---------------- ##
1068_ASBOX
1069    echo
1070    # The following way of writing the cache mishandles newlines in values,
1071{
1072  (set) 2>&1 |
1073    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1074    *ac_space=\ *)
1075      sed -n \
1076        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1077          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1078      ;;
1079    *)
1080      sed -n \
1081        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1082      ;;
1083    esac;
1084}
1085    echo
1086
1087    cat <<\_ASBOX
1088## ----------------- ##
1089## Output variables. ##
1090## ----------------- ##
1091_ASBOX
1092    echo
1093    for ac_var in $ac_subst_vars
1094    do
1095      eval ac_val=$`echo $ac_var`
1096      echo "$ac_var='"'"'$ac_val'"'"'"
1097    done | sort
1098    echo
1099
1100    if test -n "$ac_subst_files"; then
1101      cat <<\_ASBOX
1102## ------------- ##
1103## Output files. ##
1104## ------------- ##
1105_ASBOX
1106      echo
1107      for ac_var in $ac_subst_files
1108      do
1109        eval ac_val=$`echo $ac_var`
1110        echo "$ac_var='"'"'$ac_val'"'"'"
1111      done | sort
1112      echo
1113    fi
1114
1115    if test -s confdefs.h; then
1116      cat <<\_ASBOX
1117## ----------- ##
1118## confdefs.h. ##
1119## ----------- ##
1120_ASBOX
1121      echo
1122      sed "/^$/d" confdefs.h | sort
1123      echo
1124    fi
1125    test "$ac_signal" != 0 &&
1126      echo "$as_me: caught signal $ac_signal"
1127    echo "$as_me: exit $exit_status"
1128  } >&5
1129  rm -f core core.* *.core &&
1130  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1131    exit $exit_status
1132     ' 0
1133for ac_signal in 1 2 13 15; do
1134  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1135done
1136ac_signal=0
1137
1138# confdefs.h avoids OS command line length limits that DEFS can exceed.
1139rm -rf conftest* confdefs.h
1140# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1141echo >confdefs.h
1142
1143# Predefined preprocessor variables.
1144
1145cat >>confdefs.h <<_ACEOF
1146#define PACKAGE_NAME "$PACKAGE_NAME"
1147_ACEOF
1148
1149
1150cat >>confdefs.h <<_ACEOF
1151#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1152_ACEOF
1153
1154
1155cat >>confdefs.h <<_ACEOF
1156#define PACKAGE_VERSION "$PACKAGE_VERSION"
1157_ACEOF
1158
1159
1160cat >>confdefs.h <<_ACEOF
1161#define PACKAGE_STRING "$PACKAGE_STRING"
1162_ACEOF
1163
1164
1165cat >>confdefs.h <<_ACEOF
1166#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1167_ACEOF
1168
1169
1170# Let the site file select an alternate cache file if it wants to.
1171# Prefer explicitly selected file to automatically selected ones.
1172if test -z "$CONFIG_SITE"; then
1173  if test "x$prefix" != xNONE; then
1174    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1175  else
1176    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1177  fi
1178fi
1179for ac_site_file in $CONFIG_SITE; do
1180  if test -r "$ac_site_file"; then
1181    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1182echo "$as_me: loading site script $ac_site_file" >&6;}
1183    sed 's/^/| /' "$ac_site_file" >&5
1184    . "$ac_site_file"
1185  fi
1186done
1187
1188if test -r "$cache_file"; then
1189  # Some versions of bash will fail to source /dev/null (special
1190  # files actually), so we avoid doing that.
1191  if test -f "$cache_file"; then
1192    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1193echo "$as_me: loading cache $cache_file" >&6;}
1194    case $cache_file in
1195      [\\/]* | ?:[\\/]* ) . $cache_file;;
1196      *)                      . ./$cache_file;;
1197    esac
1198  fi
1199else
1200  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1201echo "$as_me: creating cache $cache_file" >&6;}
1202  >$cache_file
1203fi
1204
1205# Check that the precious variables saved in the cache have kept the same
1206# value.
1207ac_cache_corrupted=false
1208for ac_var in `(set) 2>&1 |
1209               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1210  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1211  eval ac_new_set=\$ac_env_${ac_var}_set
1212  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1213  eval ac_new_val="\$ac_env_${ac_var}_value"
1214  case $ac_old_set,$ac_new_set in
1215    set,)
1216      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1217echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1218      ac_cache_corrupted=: ;;
1219    ,set)
1220      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1221echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1222      ac_cache_corrupted=: ;;
1223    ,);;
1224    *)
1225      if test "x$ac_old_val" != "x$ac_new_val"; then
1226        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1227echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1228        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1229echo "$as_me:   former value:  $ac_old_val" >&2;}
1230        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1231echo "$as_me:   current value: $ac_new_val" >&2;}
1232        ac_cache_corrupted=:
1233      fi;;
1234  esac
1235  # Pass precious variables to config.status.
1236  if test "$ac_new_set" = set; then
1237    case $ac_new_val in
1238    *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1239      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1240    *) ac_arg=$ac_var=$ac_new_val ;;
1241    esac
1242    case " $ac_configure_args " in
1243      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1244      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1245    esac
1246  fi
1247done
1248if $ac_cache_corrupted; then
1249  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1250echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1251  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1252echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1253   { (exit 1); exit 1; }; }
1254fi
1255
1256ac_ext=c
1257ac_cpp='$CPP $CPPFLAGS'
1258ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1259ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1260ac_compiler_gnu=$ac_cv_c_compiler_gnu
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289          ac_config_headers="$ac_config_headers src/config.h"
1290
1291
1292# Checks for programs.
1293ac_ext=cc
1294ac_cpp='$CXXCPP $CPPFLAGS'
1295ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1296ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1297ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1298if test -n "$ac_tool_prefix"; then
1299  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
1300  do
1301    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1302set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1303echo "$as_me:$LINENO: checking for $ac_word" >&5
1304echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1305if test "${ac_cv_prog_CXX+set}" = set; then
1306  echo $ECHO_N "(cached) $ECHO_C" >&6
1307else
1308  if test -n "$CXX"; then
1309  ac_cv_prog_CXX="$CXX" # Let the user override the test.
1310else
1311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1312for as_dir in $PATH
1313do
1314  IFS=$as_save_IFS
1315  test -z "$as_dir" && as_dir=.
1316  for ac_exec_ext in '' $ac_executable_extensions; do
1317  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1318    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
1319    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1320    break 2
1321  fi
1322done
1323done
1324
1325fi
1326fi
1327CXX=$ac_cv_prog_CXX
1328if test -n "$CXX"; then
1329  echo "$as_me:$LINENO: result: $CXX" >&5
1330echo "${ECHO_T}$CXX" >&6
1331else
1332  echo "$as_me:$LINENO: result: no" >&5
1333echo "${ECHO_T}no" >&6
1334fi
1335
1336    test -n "$CXX" && break
1337  done
1338fi
1339if test -z "$CXX"; then
1340  ac_ct_CXX=$CXX
1341  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
1342do
1343  # Extract the first word of "$ac_prog", so it can be a program name with args.
1344set dummy $ac_prog; ac_word=$2
1345echo "$as_me:$LINENO: checking for $ac_word" >&5
1346echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1347if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
1348  echo $ECHO_N "(cached) $ECHO_C" >&6
1349else
1350  if test -n "$ac_ct_CXX"; then
1351  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
1352else
1353as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1354for as_dir in $PATH
1355do
1356  IFS=$as_save_IFS
1357  test -z "$as_dir" && as_dir=.
1358  for ac_exec_ext in '' $ac_executable_extensions; do
1359  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1360    ac_cv_prog_ac_ct_CXX="$ac_prog"
1361    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1362    break 2
1363  fi
1364done
1365done
1366
1367fi
1368fi
1369ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
1370if test -n "$ac_ct_CXX"; then
1371  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
1372echo "${ECHO_T}$ac_ct_CXX" >&6
1373else
1374  echo "$as_me:$LINENO: result: no" >&5
1375echo "${ECHO_T}no" >&6
1376fi
1377
1378  test -n "$ac_ct_CXX" && break
1379done
1380test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
1381
1382  CXX=$ac_ct_CXX
1383fi
1384
1385
1386# Provide some information about the compiler.
1387echo "$as_me:$LINENO:" \
1388     "checking for C++ compiler version" >&5
1389ac_compiler=`set X $ac_compile; echo $2`
1390{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1391  (eval $ac_compiler --version </dev/null >&5) 2>&5
1392  ac_status=$?
1393  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1394  (exit $ac_status); }
1395{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1396  (eval $ac_compiler -v </dev/null >&5) 2>&5
1397  ac_status=$?
1398  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1399  (exit $ac_status); }
1400{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1401  (eval $ac_compiler -V </dev/null >&5) 2>&5
1402  ac_status=$?
1403  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1404  (exit $ac_status); }
1405
1406cat >conftest.$ac_ext <<_ACEOF
1407#line $LINENO "configure"
1408/* confdefs.h.  */
1409_ACEOF
1410cat confdefs.h >>conftest.$ac_ext
1411cat >>conftest.$ac_ext <<_ACEOF
1412/* end confdefs.h.  */
1413
1414int
1415main ()
1416{
1417
1418  ;
1419  return 0;
1420}
1421_ACEOF
1422ac_clean_files_save=$ac_clean_files
1423ac_clean_files="$ac_clean_files a.out a.exe b.out"
1424# Try to create an executable without -o first, disregard a.out.
1425# It will help us diagnose broken compilers, and finding out an intuition
1426# of exeext.
1427echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1428echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
1429ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1430if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1431  (eval $ac_link_default) 2>&5
1432  ac_status=$?
1433  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1434  (exit $ac_status); }; then
1435  # Find the output, starting from the most likely.  This scheme is
1436# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1437# resort.
1438
1439# Be careful to initialize this variable, since it used to be cached.
1440# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1441ac_cv_exeext=
1442# b.out is created by i960 compilers.
1443for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1444do
1445  test -f "$ac_file" || continue
1446  case $ac_file in
1447    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1448        ;;
1449    conftest.$ac_ext )
1450        # This is the source file.
1451        ;;
1452    [ab].out )
1453        # We found the default executable, but exeext='' is most
1454        # certainly right.
1455        break;;
1456    *.* )
1457        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1458        # FIXME: I believe we export ac_cv_exeext for Libtool,
1459        # but it would be cool to find out if it's true.  Does anybody
1460        # maintain Libtool? --akim.
1461        export ac_cv_exeext
1462        break;;
1463    * )
1464        break;;
1465  esac
1466done
1467else
1468  echo "$as_me: failed program was:" >&5
1469sed 's/^/| /' conftest.$ac_ext >&5
1470
1471{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1472See \`config.log' for more details." >&5
1473echo "$as_me: error: C++ compiler cannot create executables
1474See \`config.log' for more details." >&2;}
1475   { (exit 77); exit 77; }; }
1476fi
1477
1478ac_exeext=$ac_cv_exeext
1479echo "$as_me:$LINENO: result: $ac_file" >&5
1480echo "${ECHO_T}$ac_file" >&6
1481
1482# Check the compiler produces executables we can run.  If not, either
1483# the compiler is broken, or we cross compile.
1484echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1485echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1486# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1487# If not cross compiling, check that we can run a simple program.
1488if test "$cross_compiling" != yes; then
1489  if { ac_try='./$ac_file'
1490  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1491  (eval $ac_try) 2>&5
1492  ac_status=$?
1493  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1494  (exit $ac_status); }; }; then
1495    cross_compiling=no
1496  else
1497    if test "$cross_compiling" = maybe; then
1498        cross_compiling=yes
1499    else
1500        { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
1501If you meant to cross compile, use \`--host'.
1502See \`config.log' for more details." >&5
1503echo "$as_me: error: cannot run C++ compiled programs.
1504If you meant to cross compile, use \`--host'.
1505See \`config.log' for more details." >&2;}
1506   { (exit 1); exit 1; }; }
1507    fi
1508  fi
1509fi
1510echo "$as_me:$LINENO: result: yes" >&5
1511echo "${ECHO_T}yes" >&6
1512
1513rm -f a.out a.exe conftest$ac_cv_exeext b.out
1514ac_clean_files=$ac_clean_files_save
1515# Check the compiler produces executables we can run.  If not, either
1516# the compiler is broken, or we cross compile.
1517echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1518echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1519echo "$as_me:$LINENO: result: $cross_compiling" >&5
1520echo "${ECHO_T}$cross_compiling" >&6
1521
1522echo "$as_me:$LINENO: checking for suffix of executables" >&5
1523echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1524if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1525  (eval $ac_link) 2>&5
1526  ac_status=$?
1527  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1528  (exit $ac_status); }; then
1529  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1530# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1531# work properly (i.e., refer to `conftest.exe'), while it won't with
1532# `rm'.
1533for ac_file in conftest.exe conftest conftest.*; do
1534  test -f "$ac_file" || continue
1535  case $ac_file in
1536    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1537    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1538          export ac_cv_exeext
1539          break;;
1540    * ) break;;
1541  esac
1542done
1543else
1544  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1545See \`config.log' for more details." >&5
1546echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1547See \`config.log' for more details." >&2;}
1548   { (exit 1); exit 1; }; }
1549fi
1550
1551rm -f conftest$ac_cv_exeext
1552echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1553echo "${ECHO_T}$ac_cv_exeext" >&6
1554
1555rm -f conftest.$ac_ext
1556EXEEXT=$ac_cv_exeext
1557ac_exeext=$EXEEXT
1558echo "$as_me:$LINENO: checking for suffix of object files" >&5
1559echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1560if test "${ac_cv_objext+set}" = set; then
1561  echo $ECHO_N "(cached) $ECHO_C" >&6
1562else
1563  cat >conftest.$ac_ext <<_ACEOF
1564#line $LINENO "configure"
1565/* confdefs.h.  */
1566_ACEOF
1567cat confdefs.h >>conftest.$ac_ext
1568cat >>conftest.$ac_ext <<_ACEOF
1569/* end confdefs.h.  */
1570
1571int
1572main ()
1573{
1574
1575  ;
1576  return 0;
1577}
1578_ACEOF
1579rm -f conftest.o conftest.obj
1580if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1581  (eval $ac_compile) 2>&5
1582  ac_status=$?
1583  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1584  (exit $ac_status); }; then
1585  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1586  case $ac_file in
1587    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1588    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1589       break;;
1590  esac
1591done
1592else
1593  echo "$as_me: failed program was:" >&5
1594sed 's/^/| /' conftest.$ac_ext >&5
1595
1596{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1597See \`config.log' for more details." >&5
1598echo "$as_me: error: cannot compute suffix of object files: cannot compile
1599See \`config.log' for more details." >&2;}
1600   { (exit 1); exit 1; }; }
1601fi
1602
1603rm -f conftest.$ac_cv_objext conftest.$ac_ext
1604fi
1605echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1606echo "${ECHO_T}$ac_cv_objext" >&6
1607OBJEXT=$ac_cv_objext
1608ac_objext=$OBJEXT
1609echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
1610echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
1611if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
1612  echo $ECHO_N "(cached) $ECHO_C" >&6
1613else
1614  cat >conftest.$ac_ext <<_ACEOF
1615#line $LINENO "configure"
1616/* confdefs.h.  */
1617_ACEOF
1618cat confdefs.h >>conftest.$ac_ext
1619cat >>conftest.$ac_ext <<_ACEOF
1620/* end confdefs.h.  */
1621
1622int
1623main ()
1624{
1625#ifndef __GNUC__
1626       choke me
1627#endif
1628
1629  ;
1630  return 0;
1631}
1632_ACEOF
1633rm -f conftest.$ac_objext
1634if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1635  (eval $ac_compile) 2>&5
1636  ac_status=$?
1637  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1638  (exit $ac_status); } &&
1639         { ac_try='test -s conftest.$ac_objext'
1640  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1641  (eval $ac_try) 2>&5
1642  ac_status=$?
1643  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1644  (exit $ac_status); }; }; then
1645  ac_compiler_gnu=yes
1646else
1647  echo "$as_me: failed program was:" >&5
1648sed 's/^/| /' conftest.$ac_ext >&5
1649
1650ac_compiler_gnu=no
1651fi
1652rm -f conftest.$ac_objext conftest.$ac_ext
1653ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
1654
1655fi
1656echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
1657echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
1658GXX=`test $ac_compiler_gnu = yes && echo yes`
1659ac_test_CXXFLAGS=${CXXFLAGS+set}
1660ac_save_CXXFLAGS=$CXXFLAGS
1661CXXFLAGS="-g"
1662echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
1663echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
1664if test "${ac_cv_prog_cxx_g+set}" = set; then
1665  echo $ECHO_N "(cached) $ECHO_C" >&6
1666else
1667  cat >conftest.$ac_ext <<_ACEOF
1668#line $LINENO "configure"
1669/* confdefs.h.  */
1670_ACEOF
1671cat confdefs.h >>conftest.$ac_ext
1672cat >>conftest.$ac_ext <<_ACEOF
1673/* end confdefs.h.  */
1674
1675int
1676main ()
1677{
1678
1679  ;
1680  return 0;
1681}
1682_ACEOF
1683rm -f conftest.$ac_objext
1684if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1685  (eval $ac_compile) 2>&5
1686  ac_status=$?
1687  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1688  (exit $ac_status); } &&
1689         { ac_try='test -s conftest.$ac_objext'
1690  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1691  (eval $ac_try) 2>&5
1692  ac_status=$?
1693  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1694  (exit $ac_status); }; }; then
1695  ac_cv_prog_cxx_g=yes
1696else
1697  echo "$as_me: failed program was:" >&5
1698sed 's/^/| /' conftest.$ac_ext >&5
1699
1700ac_cv_prog_cxx_g=no
1701fi
1702rm -f conftest.$ac_objext conftest.$ac_ext
1703fi
1704echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
1705echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
1706if test "$ac_test_CXXFLAGS" = set; then
1707  CXXFLAGS=$ac_save_CXXFLAGS
1708elif test $ac_cv_prog_cxx_g = yes; then
1709  if test "$GXX" = yes; then
1710    CXXFLAGS="-g -O2"
1711  else
1712    CXXFLAGS="-g"
1713  fi
1714else
1715  if test "$GXX" = yes; then
1716    CXXFLAGS="-O2"
1717  else
1718    CXXFLAGS=
1719  fi
1720fi
1721for ac_declaration in \
1722   ''\
1723   '#include <stdlib.h>' \
1724   'extern "C" void std::exit (int) throw (); using std::exit;' \
1725   'extern "C" void std::exit (int); using std::exit;' \
1726   'extern "C" void exit (int) throw ();' \
1727   'extern "C" void exit (int);' \
1728   'void exit (int);'
1729do
1730  cat >conftest.$ac_ext <<_ACEOF
1731#line $LINENO "configure"
1732/* confdefs.h.  */
1733_ACEOF
1734cat confdefs.h >>conftest.$ac_ext
1735cat >>conftest.$ac_ext <<_ACEOF
1736/* end confdefs.h.  */
1737#include <stdlib.h>
1738$ac_declaration
1739int
1740main ()
1741{
1742exit (42);
1743  ;
1744  return 0;
1745}
1746_ACEOF
1747rm -f conftest.$ac_objext
1748if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1749  (eval $ac_compile) 2>&5
1750  ac_status=$?
1751  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1752  (exit $ac_status); } &&
1753         { ac_try='test -s conftest.$ac_objext'
1754  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1755  (eval $ac_try) 2>&5
1756  ac_status=$?
1757  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1758  (exit $ac_status); }; }; then
1759  :
1760else
1761  echo "$as_me: failed program was:" >&5
1762sed 's/^/| /' conftest.$ac_ext >&5
1763
1764continue
1765fi
1766rm -f conftest.$ac_objext conftest.$ac_ext
1767  cat >conftest.$ac_ext <<_ACEOF
1768#line $LINENO "configure"
1769/* confdefs.h.  */
1770_ACEOF
1771cat confdefs.h >>conftest.$ac_ext
1772cat >>conftest.$ac_ext <<_ACEOF
1773/* end confdefs.h.  */
1774$ac_declaration
1775int
1776main ()
1777{
1778exit (42);
1779  ;
1780  return 0;
1781}
1782_ACEOF
1783rm -f conftest.$ac_objext
1784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1785  (eval $ac_compile) 2>&5
1786  ac_status=$?
1787  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1788  (exit $ac_status); } &&
1789         { ac_try='test -s conftest.$ac_objext'
1790  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1791  (eval $ac_try) 2>&5
1792  ac_status=$?
1793  echo "$as_me:$LINENO: \$? = $ac_status" >&5
1794  (exit $ac_status); }; }; then
1795  break
1796else
1797  echo "$as_me: failed program was:" >&5
1798sed 's/^/| /' conftest.$ac_ext >&5
1799
1800fi
1801rm -f conftest.$ac_objext conftest.$ac_ext
1802done
1803rm -f conftest*
1804if test -n "$ac_declaration"; then
1805  echo '#ifdef __cplusplus' >>confdefs.h
1806  echo $ac_declaration      >>confdefs.h
1807  echo '#endif'             >>confdefs.h
1808fi
1809
1810ac_ext=c
1811ac_cpp='$CPP $CPPFLAGS'
1812ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1813ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1814ac_compiler_gnu=$ac_cv_c_compiler_gnu
1815
1816ac_ext=c
1817ac_cpp='$CPP $CPPFLAGS'
1818ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1819ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1820ac_compiler_gnu=$ac_cv_c_compiler_gnu
1821if test -n "$ac_tool_prefix"; then
1822  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1823set dummy ${ac_tool_prefix}gcc; ac_word=$2
1824echo "$as_me:$LINENO: checking for $ac_word" >&5
1825echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1826if test "${ac_cv_prog_CC+set}" = set; then
1827  echo $ECHO_N "(cached) $ECHO_C" >&6
1828else
1829  if test -n "$CC"; then
1830  ac_cv_prog_CC="$CC" # Let the user override the test.
1831else
1832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1833for as_dir in $PATH
1834do
1835  IFS=$as_save_IFS
1836  test -z "$as_dir" && as_dir=.
1837  for ac_exec_ext in '' $ac_executable_extensions; do
1838  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1839    ac_cv_prog_CC="${ac_tool_prefix}gcc"
1840    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1841    break 2
1842  fi
1843done
1844done
1845
1846fi
1847fi
1848CC=$ac_cv_prog_CC
1849if test -n "$CC"; then
1850  echo "$as_me:$LINENO: result: $CC" >&5
1851echo "${ECHO_T}$CC" >&6
1852else
1853  echo "$as_me:$LINENO: result: no" >&5
1854echo "${ECHO_T}no" >&6
1855fi
1856
1857fi
1858if test -z "$ac_cv_prog_CC"; then
1859  ac_ct_CC=$CC
1860  # Extract the first word of "gcc", so it can be a program name with args.
1861set dummy gcc; ac_word=$2
1862echo "$as_me:$LINENO: checking for $ac_word" >&5
1863echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1864if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1865  echo $ECHO_N "(cached) $ECHO_C" >&6
1866else
1867  if test -n "$ac_ct_CC"; then
1868  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1869else
1870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1871for as_dir in $PATH
1872do
1873  IFS=$as_save_IFS
1874  test -z "$as_dir" && as_dir=.
1875  for ac_exec_ext in '' $ac_executable_extensions; do
1876  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1877    ac_cv_prog_ac_ct_CC="gcc"
1878    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1879    break 2
1880  fi
1881done
1882done
1883
1884fi
1885fi
1886ac_ct_CC=$ac_cv_prog_ac_ct_CC
1887if test -n "$ac_ct_CC"; then
1888  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1889echo "${ECHO_T}$ac_ct_CC" >&6
1890else
1891  echo "$as_me:$LINENO: result: no" >&5
1892echo "${ECHO_T}no" >&6
1893fi
1894
1895  CC=$ac_ct_CC
1896else
1897  CC="$ac_cv_prog_CC"
1898fi
1899
1900if test -z "$CC"; then
1901  if test -n "$ac_tool_prefix"; then
1902  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1903set dummy ${ac_tool_prefix}cc; ac_word=$2
1904echo "$as_me:$LINENO: checking for $ac_word" >&5
1905echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1906if test "${ac_cv_prog_CC+set}" = set; then
1907  echo $ECHO_N "(cached) $ECHO_C" >&6
1908else
1909  if test -n "$CC"; then
1910  ac_cv_prog_CC="$CC" # Let the user override the test.
1911else
1912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1913for as_dir in $PATH
1914do
1915  IFS=$as_save_IFS
1916  test -z "$as_dir" && as_dir=.
1917  for ac_exec_ext in '' $ac_executable_extensions; do
1918  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1919    ac_cv_prog_CC="${ac_tool_prefix}cc"
1920    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1921    break 2
1922  fi
1923done
1924done
1925
1926fi
1927fi
1928CC=$ac_cv_prog_CC
1929if test -n "$CC"; then
1930  echo "$as_me:$LINENO: result: $CC" >&5
1931echo "${ECHO_T}$CC" >&6
1932else
1933  echo "$as_me:$LINENO: result: no" >&5
1934echo "${ECHO_T}no" >&6
1935fi
1936
1937fi
1938if test -z "$ac_cv_prog_CC"; then
1939  ac_ct_CC=$CC
1940  # Extract the first word of "cc", so it can be a program name with args.
1941set dummy cc; ac_word=$2
1942echo "$as_me:$LINENO: checking for $ac_word" >&5
1943echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1944if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1945  echo $ECHO_N "(cached) $ECHO_C" >&6
1946else
1947  if test -n "$ac_ct_CC"; then
1948  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1949else
1950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1951for as_dir in $PATH
1952do
1953  IFS=$as_save_IFS
1954  test -z "$as_dir" && as_dir=.
1955  for ac_exec_ext in '' $ac_executable_extensions; do
1956  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1957    ac_cv_prog_ac_ct_CC="cc"
1958    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1959    break 2
1960  fi
1961done
1962done
1963
1964fi
1965fi
1966ac_ct_CC=$ac_cv_prog_ac_ct_CC
1967if test -n "$ac_ct_CC"; then
1968  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1969echo "${ECHO_T}$ac_ct_CC" >&6
1970else
1971  echo "$as_me:$LINENO: result: no" >&5
1972echo "${ECHO_T}no" >&6
1973fi
1974
1975  CC=$ac_ct_CC
1976else
1977  CC="$ac_cv_prog_CC"
1978fi
1979
1980fi
1981if test -z "$CC"; then
1982  # Extract the first word of "cc", so it can be a program name with args.
1983set dummy cc; ac_word=$2
1984echo "$as_me:$LINENO: checking for $ac_word" >&5
1985echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1986if test "${ac_cv_prog_CC+set}" = set; then
1987  echo $ECHO_N "(cached) $ECHO_C" >&6
1988else
1989  if test -n "$CC"; then
1990  ac_cv_prog_CC="$CC" # Let the user override the test.
1991else
1992  ac_prog_rejected=no
1993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1994for as_dir in $PATH
1995do
1996  IFS=$as_save_IFS
1997  test -z "$as_dir" && as_dir=.
1998  for ac_exec_ext in '' $ac_executable_extensions; do
1999  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2000    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2001       ac_prog_rejected=yes
2002       continue
2003     fi
2004    ac_cv_prog_CC="cc"
2005    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2006    break 2
2007  fi
2008done
2009done
2010
2011if test $ac_prog_rejected = yes; then
2012  # We found a bogon in the path, so make sure we never use it.
2013  set dummy $ac_cv_prog_CC
2014  shift
2015  if test $# != 0; then
2016    # We chose a different compiler from the bogus one.
2017    # However, it has the same basename, so the bogon will be chosen
2018    # first if we set CC to just the basename; use the full file name.
2019    shift
2020    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2021  fi
2022fi
2023fi
2024fi
2025CC=$ac_cv_prog_CC
2026if test -n "$CC"; then
2027  echo "$as_me:$LINENO: result: $CC" >&5
2028echo "${ECHO_T}$CC" >&6
2029else
2030  echo "$as_me:$LINENO: result: no" >&5
2031echo "${ECHO_T}no" >&6
2032fi
2033
2034fi
2035if test -z "$CC"; then
2036  if test -n "$ac_tool_prefix"; then
2037  for ac_prog in cl
2038  do
2039    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2040set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2041echo "$as_me:$LINENO: checking for $ac_word" >&5
2042echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2043if test "${ac_cv_prog_CC+set}" = set; then
2044  echo $ECHO_N "(cached) $ECHO_C" >&6
2045else
2046  if test -n "$CC"; then
2047  ac_cv_prog_CC="$CC" # Let the user override the test.
2048else
2049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2050for as_dir in $PATH
2051do
2052  IFS=$as_save_IFS
2053  test -z "$as_dir" && as_dir=.
2054  for ac_exec_ext in '' $ac_executable_extensions; do
2055  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2056    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2057    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2058    break 2
2059  fi
2060done
2061done
2062
2063fi
2064fi
2065CC=$ac_cv_prog_CC
2066if test -n "$CC"; then
2067  echo "$as_me:$LINENO: result: $CC" >&5
2068echo "${ECHO_T}$CC" >&6
2069else
2070  echo "$as_me:$LINENO: result: no" >&5
2071echo "${ECHO_T}no" >&6
2072fi
2073
2074    test -n "$CC" && break
2075  done
2076fi
2077if test -z "$CC"; then
2078  ac_ct_CC=$CC
2079  for ac_prog in cl
2080do
2081  # Extract the first word of "$ac_prog", so it can be a program name with args.
2082set dummy $ac_prog; ac_word=$2
2083echo "$as_me:$LINENO: checking for $ac_word" >&5
2084echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2085if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2086  echo $ECHO_N "(cached) $ECHO_C" >&6
2087else
2088  if test -n "$ac_ct_CC"; then
2089  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2090else
2091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2092for as_dir in $PATH
2093do
2094  IFS=$as_save_IFS
2095  test -z "$as_dir" && as_dir=.
2096  for ac_exec_ext in '' $ac_executable_extensions; do
2097  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2098    ac_cv_prog_ac_ct_CC="$ac_prog"
2099    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2100    break 2
2101  fi
2102done
2103done
2104
2105fi
2106fi
2107ac_ct_CC=$ac_cv_prog_ac_ct_CC
2108if test -n "$ac_ct_CC"; then
2109  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2110echo "${ECHO_T}$ac_ct_CC" >&6
2111else
2112  echo "$as_me:$LINENO: result: no" >&5
2113echo "${ECHO_T}no" >&6
2114fi
2115
2116  test -n "$ac_ct_CC" && break
2117done
2118
2119  CC=$ac_ct_CC
2120fi
2121
2122fi
2123
2124
2125test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2126See \`config.log' for more details." >&5
2127echo "$as_me: error: no acceptable C compiler found in \$PATH
2128See \`config.log' for more details." >&2;}
2129   { (exit 1); exit 1; }; }
2130
2131# Provide some information about the compiler.
2132echo "$as_me:$LINENO:" \
2133     "checking for C compiler version" >&5
2134ac_compiler=`set X $ac_compile; echo $2`
2135{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2136  (eval $ac_compiler --version </dev/null >&5) 2>&5
2137  ac_status=$?
2138  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2139  (exit $ac_status); }
2140{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2141  (eval $ac_compiler -v </dev/null >&5) 2>&5
2142  ac_status=$?
2143  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2144  (exit $ac_status); }
2145{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2146  (eval $ac_compiler -V </dev/null >&5) 2>&5
2147  ac_status=$?
2148  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2149  (exit $ac_status); }
2150
2151echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2152echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2153if test "${ac_cv_c_compiler_gnu+set}" = set; then
2154  echo $ECHO_N "(cached) $ECHO_C" >&6
2155else
2156  cat >conftest.$ac_ext <<_ACEOF
2157#line $LINENO "configure"
2158/* confdefs.h.  */
2159_ACEOF
2160cat confdefs.h >>conftest.$ac_ext
2161cat >>conftest.$ac_ext <<_ACEOF
2162/* end confdefs.h.  */
2163
2164int
2165main ()
2166{
2167#ifndef __GNUC__
2168       choke me
2169#endif
2170
2171  ;
2172  return 0;
2173}
2174_ACEOF
2175rm -f conftest.$ac_objext
2176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2177  (eval $ac_compile) 2>&5
2178  ac_status=$?
2179  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2180  (exit $ac_status); } &&
2181         { ac_try='test -s conftest.$ac_objext'
2182  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2183  (eval $ac_try) 2>&5
2184  ac_status=$?
2185  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2186  (exit $ac_status); }; }; then
2187  ac_compiler_gnu=yes
2188else
2189  echo "$as_me: failed program was:" >&5
2190sed 's/^/| /' conftest.$ac_ext >&5
2191
2192ac_compiler_gnu=no
2193fi
2194rm -f conftest.$ac_objext conftest.$ac_ext
2195ac_cv_c_compiler_gnu=$ac_compiler_gnu
2196
2197fi
2198echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2199echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2200GCC=`test $ac_compiler_gnu = yes && echo yes`
2201ac_test_CFLAGS=${CFLAGS+set}
2202ac_save_CFLAGS=$CFLAGS
2203CFLAGS="-g"
2204echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2205echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2206if test "${ac_cv_prog_cc_g+set}" = set; then
2207  echo $ECHO_N "(cached) $ECHO_C" >&6
2208else
2209  cat >conftest.$ac_ext <<_ACEOF
2210#line $LINENO "configure"
2211/* confdefs.h.  */
2212_ACEOF
2213cat confdefs.h >>conftest.$ac_ext
2214cat >>conftest.$ac_ext <<_ACEOF
2215/* end confdefs.h.  */
2216
2217int
2218main ()
2219{
2220
2221  ;
2222  return 0;
2223}
2224_ACEOF
2225rm -f conftest.$ac_objext
2226if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2227  (eval $ac_compile) 2>&5
2228  ac_status=$?
2229  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2230  (exit $ac_status); } &&
2231         { ac_try='test -s conftest.$ac_objext'
2232  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2233  (eval $ac_try) 2>&5
2234  ac_status=$?
2235  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2236  (exit $ac_status); }; }; then
2237  ac_cv_prog_cc_g=yes
2238else
2239  echo "$as_me: failed program was:" >&5
2240sed 's/^/| /' conftest.$ac_ext >&5
2241
2242ac_cv_prog_cc_g=no
2243fi
2244rm -f conftest.$ac_objext conftest.$ac_ext
2245fi
2246echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2247echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2248if test "$ac_test_CFLAGS" = set; then
2249  CFLAGS=$ac_save_CFLAGS
2250elif test $ac_cv_prog_cc_g = yes; then
2251  if test "$GCC" = yes; then
2252    CFLAGS="-g -O2"
2253  else
2254    CFLAGS="-g"
2255  fi
2256else
2257  if test "$GCC" = yes; then
2258    CFLAGS="-O2"
2259  else
2260    CFLAGS=
2261  fi
2262fi
2263echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2264echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2265if test "${ac_cv_prog_cc_stdc+set}" = set; then
2266  echo $ECHO_N "(cached) $ECHO_C" >&6
2267else
2268  ac_cv_prog_cc_stdc=no
2269ac_save_CC=$CC
2270cat >conftest.$ac_ext <<_ACEOF
2271#line $LINENO "configure"
2272/* confdefs.h.  */
2273_ACEOF
2274cat confdefs.h >>conftest.$ac_ext
2275cat >>conftest.$ac_ext <<_ACEOF
2276/* end confdefs.h.  */
2277#include <stdarg.h>
2278#include <stdio.h>
2279#include <sys/types.h>
2280#include <sys/stat.h>
2281/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2282struct buf { int x; };
2283FILE * (*rcsopen) (struct buf *, struct stat *, int);
2284static char *e (p, i)
2285     char **p;
2286     int i;
2287{
2288  return p[i];
2289}
2290static char *f (char * (*g) (char **, int), char **p, ...)
2291{
2292  char *s;
2293  va_list v;
2294  va_start (v,p);
2295  s = g (p, va_arg (v,int));
2296  va_end (v);
2297  return s;
2298}
2299int test (int i, double x);
2300struct s1 {int (*f) (int a);};
2301struct s2 {int (*f) (double a);};
2302int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2303int argc;
2304char **argv;
2305int
2306main ()
2307{
2308return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2309  ;
2310  return 0;
2311}
2312_ACEOF
2313# Don't try gcc -ansi; that turns off useful extensions and
2314# breaks some systems' header files.
2315# AIX                   -qlanglvl=ansi
2316# Ultrix and OSF/1      -std1
2317# HP-UX 10.20 and later -Ae
2318# HP-UX older versions  -Aa -D_HPUX_SOURCE
2319# SVR4                  -Xc -D__EXTENSIONS__
2320for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2321do
2322  CC="$ac_save_CC $ac_arg"
2323  rm -f conftest.$ac_objext
2324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2325  (eval $ac_compile) 2>&5
2326  ac_status=$?
2327  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2328  (exit $ac_status); } &&
2329         { ac_try='test -s conftest.$ac_objext'
2330  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2331  (eval $ac_try) 2>&5
2332  ac_status=$?
2333  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2334  (exit $ac_status); }; }; then
2335  ac_cv_prog_cc_stdc=$ac_arg
2336break
2337else
2338  echo "$as_me: failed program was:" >&5
2339sed 's/^/| /' conftest.$ac_ext >&5
2340
2341fi
2342rm -f conftest.$ac_objext
2343done
2344rm -f conftest.$ac_ext conftest.$ac_objext
2345CC=$ac_save_CC
2346
2347fi
2348
2349case "x$ac_cv_prog_cc_stdc" in
2350  x|xno)
2351    echo "$as_me:$LINENO: result: none needed" >&5
2352echo "${ECHO_T}none needed" >&6 ;;
2353  *)
2354    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2355echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2356    CC="$CC $ac_cv_prog_cc_stdc" ;;
2357esac
2358
2359# Some people use a C++ compiler to compile C.  Since we use `exit',
2360# in C++ we need to declare it.  In case someone uses the same compiler
2361# for both compiling C and C++ we need to have the C++ compiler decide
2362# the declaration of exit, since it's the most demanding environment.
2363cat >conftest.$ac_ext <<_ACEOF
2364#ifndef __cplusplus
2365  choke me
2366#endif
2367_ACEOF
2368rm -f conftest.$ac_objext
2369if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2370  (eval $ac_compile) 2>&5
2371  ac_status=$?
2372  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2373  (exit $ac_status); } &&
2374         { ac_try='test -s conftest.$ac_objext'
2375  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2376  (eval $ac_try) 2>&5
2377  ac_status=$?
2378  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2379  (exit $ac_status); }; }; then
2380  for ac_declaration in \
2381   ''\
2382   '#include <stdlib.h>' \
2383   'extern "C" void std::exit (int) throw (); using std::exit;' \
2384   'extern "C" void std::exit (int); using std::exit;' \
2385   'extern "C" void exit (int) throw ();' \
2386   'extern "C" void exit (int);' \
2387   'void exit (int);'
2388do
2389  cat >conftest.$ac_ext <<_ACEOF
2390#line $LINENO "configure"
2391/* confdefs.h.  */
2392_ACEOF
2393cat confdefs.h >>conftest.$ac_ext
2394cat >>conftest.$ac_ext <<_ACEOF
2395/* end confdefs.h.  */
2396#include <stdlib.h>
2397$ac_declaration
2398int
2399main ()
2400{
2401exit (42);
2402  ;
2403  return 0;
2404}
2405_ACEOF
2406rm -f conftest.$ac_objext
2407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2408  (eval $ac_compile) 2>&5
2409  ac_status=$?
2410  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2411  (exit $ac_status); } &&
2412         { ac_try='test -s conftest.$ac_objext'
2413  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2414  (eval $ac_try) 2>&5
2415  ac_status=$?
2416  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2417  (exit $ac_status); }; }; then
2418  :
2419else
2420  echo "$as_me: failed program was:" >&5
2421sed 's/^/| /' conftest.$ac_ext >&5
2422
2423continue
2424fi
2425rm -f conftest.$ac_objext conftest.$ac_ext
2426  cat >conftest.$ac_ext <<_ACEOF
2427#line $LINENO "configure"
2428/* confdefs.h.  */
2429_ACEOF
2430cat confdefs.h >>conftest.$ac_ext
2431cat >>conftest.$ac_ext <<_ACEOF
2432/* end confdefs.h.  */
2433$ac_declaration
2434int
2435main ()
2436{
2437exit (42);
2438  ;
2439  return 0;
2440}
2441_ACEOF
2442rm -f conftest.$ac_objext
2443if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2444  (eval $ac_compile) 2>&5
2445  ac_status=$?
2446  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2447  (exit $ac_status); } &&
2448         { ac_try='test -s conftest.$ac_objext'
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); }; }; then
2454  break
2455else
2456  echo "$as_me: failed program was:" >&5
2457sed 's/^/| /' conftest.$ac_ext >&5
2458
2459fi
2460rm -f conftest.$ac_objext conftest.$ac_ext
2461done
2462rm -f conftest*
2463if test -n "$ac_declaration"; then
2464  echo '#ifdef __cplusplus' >>confdefs.h
2465  echo $ac_declaration      >>confdefs.h
2466  echo '#endif'             >>confdefs.h
2467fi
2468
2469else
2470  echo "$as_me: failed program was:" >&5
2471sed 's/^/| /' conftest.$ac_ext >&5
2472
2473fi
2474rm -f conftest.$ac_objext conftest.$ac_ext
2475ac_ext=c
2476ac_cpp='$CPP $CPPFLAGS'
2477ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2478ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2479ac_compiler_gnu=$ac_cv_c_compiler_gnu
2480
2481ac_ext=c
2482ac_cpp='$CPP $CPPFLAGS'
2483ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2484ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2485ac_compiler_gnu=$ac_cv_c_compiler_gnu
2486echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2487echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2488# On Suns, sometimes $CPP names a directory.
2489if test -n "$CPP" && test -d "$CPP"; then
2490  CPP=
2491fi
2492if test -z "$CPP"; then
2493  if test "${ac_cv_prog_CPP+set}" = set; then
2494  echo $ECHO_N "(cached) $ECHO_C" >&6
2495else
2496      # Double quotes because CPP needs to be expanded
2497    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2498    do
2499      ac_preproc_ok=false
2500for ac_c_preproc_warn_flag in '' yes
2501do
2502  # Use a header file that comes with gcc, so configuring glibc
2503  # with a fresh cross-compiler works.
2504  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2505  # <limits.h> exists even on freestanding compilers.
2506  # On the NeXT, cc -E runs the code through the compiler's parser,
2507  # not just through cpp. "Syntax error" is here to catch this case.
2508  cat >conftest.$ac_ext <<_ACEOF
2509#line $LINENO "configure"
2510/* confdefs.h.  */
2511_ACEOF
2512cat confdefs.h >>conftest.$ac_ext
2513cat >>conftest.$ac_ext <<_ACEOF
2514/* end confdefs.h.  */
2515#ifdef __STDC__
2516# include <limits.h>
2517#else
2518# include <assert.h>
2519#endif
2520                     Syntax error
2521_ACEOF
2522if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2523  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2524  ac_status=$?
2525  grep -v '^ *+' conftest.er1 >conftest.err
2526  rm -f conftest.er1
2527  cat conftest.err >&5
2528  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2529  (exit $ac_status); } >/dev/null; then
2530  if test -s conftest.err; then
2531    ac_cpp_err=$ac_c_preproc_warn_flag
2532  else
2533    ac_cpp_err=
2534  fi
2535else
2536  ac_cpp_err=yes
2537fi
2538if test -z "$ac_cpp_err"; then
2539  :
2540else
2541  echo "$as_me: failed program was:" >&5
2542sed 's/^/| /' conftest.$ac_ext >&5
2543
2544  # Broken: fails on valid input.
2545continue
2546fi
2547rm -f conftest.err conftest.$ac_ext
2548
2549  # OK, works on sane cases.  Now check whether non-existent headers
2550  # can be detected and how.
2551  cat >conftest.$ac_ext <<_ACEOF
2552#line $LINENO "configure"
2553/* confdefs.h.  */
2554_ACEOF
2555cat confdefs.h >>conftest.$ac_ext
2556cat >>conftest.$ac_ext <<_ACEOF
2557/* end confdefs.h.  */
2558#include <ac_nonexistent.h>
2559_ACEOF
2560if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2561  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2562  ac_status=$?
2563  grep -v '^ *+' conftest.er1 >conftest.err
2564  rm -f conftest.er1
2565  cat conftest.err >&5
2566  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2567  (exit $ac_status); } >/dev/null; then
2568  if test -s conftest.err; then
2569    ac_cpp_err=$ac_c_preproc_warn_flag
2570  else
2571    ac_cpp_err=
2572  fi
2573else
2574  ac_cpp_err=yes
2575fi
2576if test -z "$ac_cpp_err"; then
2577  # Broken: success on invalid input.
2578continue
2579else
2580  echo "$as_me: failed program was:" >&5
2581sed 's/^/| /' conftest.$ac_ext >&5
2582
2583  # Passes both tests.
2584ac_preproc_ok=:
2585break
2586fi
2587rm -f conftest.err conftest.$ac_ext
2588
2589done
2590# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2591rm -f conftest.err conftest.$ac_ext
2592if $ac_preproc_ok; then
2593  break
2594fi
2595
2596    done
2597    ac_cv_prog_CPP=$CPP
2598
2599fi
2600  CPP=$ac_cv_prog_CPP
2601else
2602  ac_cv_prog_CPP=$CPP
2603fi
2604echo "$as_me:$LINENO: result: $CPP" >&5
2605echo "${ECHO_T}$CPP" >&6
2606ac_preproc_ok=false
2607for ac_c_preproc_warn_flag in '' yes
2608do
2609  # Use a header file that comes with gcc, so configuring glibc
2610  # with a fresh cross-compiler works.
2611  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2612  # <limits.h> exists even on freestanding compilers.
2613  # On the NeXT, cc -E runs the code through the compiler's parser,
2614  # not just through cpp. "Syntax error" is here to catch this case.
2615  cat >conftest.$ac_ext <<_ACEOF
2616#line $LINENO "configure"
2617/* confdefs.h.  */
2618_ACEOF
2619cat confdefs.h >>conftest.$ac_ext
2620cat >>conftest.$ac_ext <<_ACEOF
2621/* end confdefs.h.  */
2622#ifdef __STDC__
2623# include <limits.h>
2624#else
2625# include <assert.h>
2626#endif
2627                     Syntax error
2628_ACEOF
2629if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2630  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2631  ac_status=$?
2632  grep -v '^ *+' conftest.er1 >conftest.err
2633  rm -f conftest.er1
2634  cat conftest.err >&5
2635  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2636  (exit $ac_status); } >/dev/null; then
2637  if test -s conftest.err; then
2638    ac_cpp_err=$ac_c_preproc_warn_flag
2639  else
2640    ac_cpp_err=
2641  fi
2642else
2643  ac_cpp_err=yes
2644fi
2645if test -z "$ac_cpp_err"; then
2646  :
2647else
2648  echo "$as_me: failed program was:" >&5
2649sed 's/^/| /' conftest.$ac_ext >&5
2650
2651  # Broken: fails on valid input.
2652continue
2653fi
2654rm -f conftest.err conftest.$ac_ext
2655
2656  # OK, works on sane cases.  Now check whether non-existent headers
2657  # can be detected and how.
2658  cat >conftest.$ac_ext <<_ACEOF
2659#line $LINENO "configure"
2660/* confdefs.h.  */
2661_ACEOF
2662cat confdefs.h >>conftest.$ac_ext
2663cat >>conftest.$ac_ext <<_ACEOF
2664/* end confdefs.h.  */
2665#include <ac_nonexistent.h>
2666_ACEOF
2667if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2668  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2669  ac_status=$?
2670  grep -v '^ *+' conftest.er1 >conftest.err
2671  rm -f conftest.er1
2672  cat conftest.err >&5
2673  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2674  (exit $ac_status); } >/dev/null; then
2675  if test -s conftest.err; then
2676    ac_cpp_err=$ac_c_preproc_warn_flag
2677  else
2678    ac_cpp_err=
2679  fi
2680else
2681  ac_cpp_err=yes
2682fi
2683if test -z "$ac_cpp_err"; then
2684  # Broken: success on invalid input.
2685continue
2686else
2687  echo "$as_me: failed program was:" >&5
2688sed 's/^/| /' conftest.$ac_ext >&5
2689
2690  # Passes both tests.
2691ac_preproc_ok=:
2692break
2693fi
2694rm -f conftest.err conftest.$ac_ext
2695
2696done
2697# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2698rm -f conftest.err conftest.$ac_ext
2699if $ac_preproc_ok; then
2700  :
2701else
2702  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2703See \`config.log' for more details." >&5
2704echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2705See \`config.log' for more details." >&2;}
2706   { (exit 1); exit 1; }; }
2707fi
2708
2709ac_ext=c
2710ac_cpp='$CPP $CPPFLAGS'
2711ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2712ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2713ac_compiler_gnu=$ac_cv_c_compiler_gnu
2714
2715
2716# Checks for libraries.
2717
2718
2719echo "$as_me:$LINENO: checking for gerror_ in -lg2c" >&5
2720echo $ECHO_N "checking for gerror_ in -lg2c... $ECHO_C" >&6
2721if test "${ac_cv_lib_g2c_gerror_+set}" = set; then
2722  echo $ECHO_N "(cached) $ECHO_C" >&6
2723else
2724  ac_check_lib_save_LIBS=$LIBS
2725LIBS="-lg2c  $LIBS"
2726cat >conftest.$ac_ext <<_ACEOF
2727#line $LINENO "configure"
2728/* confdefs.h.  */
2729_ACEOF
2730cat confdefs.h >>conftest.$ac_ext
2731cat >>conftest.$ac_ext <<_ACEOF
2732/* end confdefs.h.  */
2733
2734/* Override any gcc2 internal prototype to avoid an error.  */
2735#ifdef __cplusplus
2736extern "C"
2737#endif
2738/* We use char because int might match the return type of a gcc2
2739   builtin and then its argument prototype would still apply.  */
2740char gerror_ ();
2741int
2742main ()
2743{
2744gerror_ ();
2745  ;
2746  return 0;
2747}
2748_ACEOF
2749rm -f conftest.$ac_objext conftest$ac_exeext
2750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2751  (eval $ac_link) 2>&5
2752  ac_status=$?
2753  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2754  (exit $ac_status); } &&
2755         { ac_try='test -s conftest$ac_exeext'
2756  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2757  (eval $ac_try) 2>&5
2758  ac_status=$?
2759  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2760  (exit $ac_status); }; }; then
2761  ac_cv_lib_g2c_gerror_=yes
2762else
2763  echo "$as_me: failed program was:" >&5
2764sed 's/^/| /' conftest.$ac_ext >&5
2765
2766ac_cv_lib_g2c_gerror_=no
2767fi
2768rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2769LIBS=$ac_check_lib_save_LIBS
2770fi
2771echo "$as_me:$LINENO: result: $ac_cv_lib_g2c_gerror_" >&5
2772echo "${ECHO_T}$ac_cv_lib_g2c_gerror_" >&6
2773if test $ac_cv_lib_g2c_gerror_ = yes; then
2774  cat >>confdefs.h <<_ACEOF
2775#define HAVE_LIBG2C 1
2776_ACEOF
2777
2778  LIBS="-lg2c $LIBS"
2779
2780fi
2781
2782
2783echo "$as_me:$LINENO: checking for log in -lm" >&5
2784echo $ECHO_N "checking for log in -lm... $ECHO_C" >&6
2785if test "${ac_cv_lib_m_log+set}" = set; then
2786  echo $ECHO_N "(cached) $ECHO_C" >&6
2787else
2788  ac_check_lib_save_LIBS=$LIBS
2789LIBS="-lm  $LIBS"
2790cat >conftest.$ac_ext <<_ACEOF
2791#line $LINENO "configure"
2792/* confdefs.h.  */
2793_ACEOF
2794cat confdefs.h >>conftest.$ac_ext
2795cat >>conftest.$ac_ext <<_ACEOF
2796/* end confdefs.h.  */
2797
2798/* Override any gcc2 internal prototype to avoid an error.  */
2799#ifdef __cplusplus
2800extern "C"
2801#endif
2802/* We use char because int might match the return type of a gcc2
2803   builtin and then its argument prototype would still apply.  */
2804char log ();
2805int
2806main ()
2807{
2808log ();
2809  ;
2810  return 0;
2811}
2812_ACEOF
2813rm -f conftest.$ac_objext conftest$ac_exeext
2814if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2815  (eval $ac_link) 2>&5
2816  ac_status=$?
2817  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2818  (exit $ac_status); } &&
2819         { ac_try='test -s conftest$ac_exeext'
2820  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2821  (eval $ac_try) 2>&5
2822  ac_status=$?
2823  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2824  (exit $ac_status); }; }; then
2825  ac_cv_lib_m_log=yes
2826else
2827  echo "$as_me: failed program was:" >&5
2828sed 's/^/| /' conftest.$ac_ext >&5
2829
2830ac_cv_lib_m_log=no
2831fi
2832rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2833LIBS=$ac_check_lib_save_LIBS
2834fi
2835echo "$as_me:$LINENO: result: $ac_cv_lib_m_log" >&5
2836echo "${ECHO_T}$ac_cv_lib_m_log" >&6
2837if test $ac_cv_lib_m_log = yes; then
2838  cat >>confdefs.h <<_ACEOF
2839#define HAVE_LIBM 1
2840_ACEOF
2841
2842  LIBS="-lm $LIBS"
2843
2844fi
2845
2846
2847# Checks for header files.
2848
2849echo "$as_me:$LINENO: checking for egrep" >&5
2850echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2851if test "${ac_cv_prog_egrep+set}" = set; then
2852  echo $ECHO_N "(cached) $ECHO_C" >&6
2853else
2854  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2855    then ac_cv_prog_egrep='grep -E'
2856    else ac_cv_prog_egrep='egrep'
2857    fi
2858fi
2859echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2860echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2861 EGREP=$ac_cv_prog_egrep
2862
2863
2864echo "$as_me:$LINENO: checking for ANSI C header files" >&5
2865echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
2866if test "${ac_cv_header_stdc+set}" = set; then
2867  echo $ECHO_N "(cached) $ECHO_C" >&6
2868else
2869  cat >conftest.$ac_ext <<_ACEOF
2870#line $LINENO "configure"
2871/* confdefs.h.  */
2872_ACEOF
2873cat confdefs.h >>conftest.$ac_ext
2874cat >>conftest.$ac_ext <<_ACEOF
2875/* end confdefs.h.  */
2876#include <stdlib.h>
2877#include <stdarg.h>
2878#include <string.h>
2879#include <float.h>
2880
2881int
2882main ()
2883{
2884
2885  ;
2886  return 0;
2887}
2888_ACEOF
2889rm -f conftest.$ac_objext
2890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2891  (eval $ac_compile) 2>&5
2892  ac_status=$?
2893  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2894  (exit $ac_status); } &&
2895         { ac_try='test -s conftest.$ac_objext'
2896  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2897  (eval $ac_try) 2>&5
2898  ac_status=$?
2899  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2900  (exit $ac_status); }; }; then
2901  ac_cv_header_stdc=yes
2902else
2903  echo "$as_me: failed program was:" >&5
2904sed 's/^/| /' conftest.$ac_ext >&5
2905
2906ac_cv_header_stdc=no
2907fi
2908rm -f conftest.$ac_objext conftest.$ac_ext
2909
2910if test $ac_cv_header_stdc = yes; then
2911  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2912  cat >conftest.$ac_ext <<_ACEOF
2913#line $LINENO "configure"
2914/* confdefs.h.  */
2915_ACEOF
2916cat confdefs.h >>conftest.$ac_ext
2917cat >>conftest.$ac_ext <<_ACEOF
2918/* end confdefs.h.  */
2919#include <string.h>
2920
2921_ACEOF
2922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2923  $EGREP "memchr" >/dev/null 2>&1; then
2924  :
2925else
2926  ac_cv_header_stdc=no
2927fi
2928rm -f conftest*
2929
2930fi
2931
2932if test $ac_cv_header_stdc = yes; then
2933  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2934  cat >conftest.$ac_ext <<_ACEOF
2935#line $LINENO "configure"
2936/* confdefs.h.  */
2937_ACEOF
2938cat confdefs.h >>conftest.$ac_ext
2939cat >>conftest.$ac_ext <<_ACEOF
2940/* end confdefs.h.  */
2941#include <stdlib.h>
2942
2943_ACEOF
2944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2945  $EGREP "free" >/dev/null 2>&1; then
2946  :
2947else
2948  ac_cv_header_stdc=no
2949fi
2950rm -f conftest*
2951
2952fi
2953
2954if test $ac_cv_header_stdc = yes; then
2955  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2956  if test "$cross_compiling" = yes; then
2957  :
2958else
2959  cat >conftest.$ac_ext <<_ACEOF
2960#line $LINENO "configure"
2961/* confdefs.h.  */
2962_ACEOF
2963cat confdefs.h >>conftest.$ac_ext
2964cat >>conftest.$ac_ext <<_ACEOF
2965/* end confdefs.h.  */
2966#include <ctype.h>
2967#if ((' ' & 0x0FF) == 0x020)
2968# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2969# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2970#else
2971# define ISLOWER(c) \
2972                   (('a' <= (c) && (c) <= 'i') \
2973                     || ('j' <= (c) && (c) <= 'r') \
2974                     || ('s' <= (c) && (c) <= 'z'))
2975# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
2976#endif
2977
2978#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2979int
2980main ()
2981{
2982  int i;
2983  for (i = 0; i < 256; i++)
2984    if (XOR (islower (i), ISLOWER (i))
2985        || toupper (i) != TOUPPER (i))
2986      exit(2);
2987  exit (0);
2988}
2989_ACEOF
2990rm -f conftest$ac_exeext
2991if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2992  (eval $ac_link) 2>&5
2993  ac_status=$?
2994  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2995  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
2996  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2997  (eval $ac_try) 2>&5
2998  ac_status=$?
2999  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3000  (exit $ac_status); }; }; then
3001  :
3002else
3003  echo "$as_me: program exited with status $ac_status" >&5
3004echo "$as_me: failed program was:" >&5
3005sed 's/^/| /' conftest.$ac_ext >&5
3006
3007( exit $ac_status )
3008ac_cv_header_stdc=no
3009fi
3010rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3011fi
3012fi
3013fi
3014echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3015echo "${ECHO_T}$ac_cv_header_stdc" >&6
3016if test $ac_cv_header_stdc = yes; then
3017
3018cat >>confdefs.h <<\_ACEOF
3019#define STDC_HEADERS 1
3020_ACEOF
3021
3022fi
3023
3024# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3035                  inttypes.h stdint.h unistd.h
3036do
3037as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3038echo "$as_me:$LINENO: checking for $ac_header" >&5
3039echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3040if eval "test \"\${$as_ac_Header+set}\" = set"; then
3041  echo $ECHO_N "(cached) $ECHO_C" >&6
3042else
3043  cat >conftest.$ac_ext <<_ACEOF
3044#line $LINENO "configure"
3045/* confdefs.h.  */
3046_ACEOF
3047cat confdefs.h >>conftest.$ac_ext
3048cat >>conftest.$ac_ext <<_ACEOF
3049/* end confdefs.h.  */
3050$ac_includes_default
3051
3052#include <$ac_header>
3053_ACEOF
3054rm -f conftest.$ac_objext
3055if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3056  (eval $ac_compile) 2>&5
3057  ac_status=$?
3058  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3059  (exit $ac_status); } &&
3060         { ac_try='test -s conftest.$ac_objext'
3061  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3062  (eval $ac_try) 2>&5
3063  ac_status=$?
3064  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3065  (exit $ac_status); }; }; then
3066  eval "$as_ac_Header=yes"
3067else
3068  echo "$as_me: failed program was:" >&5
3069sed 's/^/| /' conftest.$ac_ext >&5
3070
3071eval "$as_ac_Header=no"
3072fi
3073rm -f conftest.$ac_objext conftest.$ac_ext
3074fi
3075echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3076echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3077if test `eval echo '${'$as_ac_Header'}'` = yes; then
3078  cat >>confdefs.h <<_ACEOF
3079#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3080_ACEOF
3081
3082fi
3083
3084done
3085
3086
3087
3088
3089
3090
3091
3092for ac_header in stdlib.h string.h unistd.h time.h math.h
3093do
3094as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3095if eval "test \"\${$as_ac_Header+set}\" = set"; then
3096  echo "$as_me:$LINENO: checking for $ac_header" >&5
3097echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3098if eval "test \"\${$as_ac_Header+set}\" = set"; then
3099  echo $ECHO_N "(cached) $ECHO_C" >&6
3100fi
3101echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3102echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3103else
3104  # Is the header compilable?
3105echo "$as_me:$LINENO: checking $ac_header usability" >&5
3106echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3107cat >conftest.$ac_ext <<_ACEOF
3108#line $LINENO "configure"
3109/* confdefs.h.  */
3110_ACEOF
3111cat confdefs.h >>conftest.$ac_ext
3112cat >>conftest.$ac_ext <<_ACEOF
3113/* end confdefs.h.  */
3114$ac_includes_default
3115#include <$ac_header>
3116_ACEOF
3117rm -f conftest.$ac_objext
3118if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3119  (eval $ac_compile) 2>&5
3120  ac_status=$?
3121  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3122  (exit $ac_status); } &&
3123         { ac_try='test -s conftest.$ac_objext'
3124  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3125  (eval $ac_try) 2>&5
3126  ac_status=$?
3127  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3128  (exit $ac_status); }; }; then
3129  ac_header_compiler=yes
3130else
3131  echo "$as_me: failed program was:" >&5
3132sed 's/^/| /' conftest.$ac_ext >&5
3133
3134ac_header_compiler=no
3135fi
3136rm -f conftest.$ac_objext conftest.$ac_ext
3137echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3138echo "${ECHO_T}$ac_header_compiler" >&6
3139
3140# Is the header present?
3141echo "$as_me:$LINENO: checking $ac_header presence" >&5
3142echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3143cat >conftest.$ac_ext <<_ACEOF
3144#line $LINENO "configure"
3145/* confdefs.h.  */
3146_ACEOF
3147cat confdefs.h >>conftest.$ac_ext
3148cat >>conftest.$ac_ext <<_ACEOF
3149/* end confdefs.h.  */
3150#include <$ac_header>
3151_ACEOF
3152if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3153  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3154  ac_status=$?
3155  grep -v '^ *+' conftest.er1 >conftest.err
3156  rm -f conftest.er1
3157  cat conftest.err >&5
3158  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3159  (exit $ac_status); } >/dev/null; then
3160  if test -s conftest.err; then
3161    ac_cpp_err=$ac_c_preproc_warn_flag
3162  else
3163    ac_cpp_err=
3164  fi
3165else
3166  ac_cpp_err=yes
3167fi
3168if test -z "$ac_cpp_err"; then
3169  ac_header_preproc=yes
3170else
3171  echo "$as_me: failed program was:" >&5
3172sed 's/^/| /' conftest.$ac_ext >&5
3173
3174  ac_header_preproc=no
3175fi
3176rm -f conftest.err conftest.$ac_ext
3177echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3178echo "${ECHO_T}$ac_header_preproc" >&6
3179
3180# So?  What about this header?
3181case $ac_header_compiler:$ac_header_preproc in
3182  yes:no )
3183    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3184echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3185    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3186echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3187    (
3188      cat <<\_ASBOX
3189## ------------------------------------ ##
3190## Report this to bug-autoconf@gnu.org. ##
3191## ------------------------------------ ##
3192_ASBOX
3193    ) |
3194      sed "s/^/$as_me: WARNING:     /" >&2
3195    ;;
3196  no:yes )
3197    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3198echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3199    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3200echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3201    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3202echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3203    (
3204      cat <<\_ASBOX
3205## ------------------------------------ ##
3206## Report this to bug-autoconf@gnu.org. ##
3207## ------------------------------------ ##
3208_ASBOX
3209    ) |
3210      sed "s/^/$as_me: WARNING:     /" >&2
3211    ;;
3212esac
3213echo "$as_me:$LINENO: checking for $ac_header" >&5
3214echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3215if eval "test \"\${$as_ac_Header+set}\" = set"; then
3216  echo $ECHO_N "(cached) $ECHO_C" >&6
3217else
3218  eval "$as_ac_Header=$ac_header_preproc"
3219fi
3220echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3221echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3222
3223fi
3224if test `eval echo '${'$as_ac_Header'}'` = yes; then
3225  cat >>confdefs.h <<_ACEOF
3226#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3227_ACEOF
3228
3229fi
3230
3231done
3232
3233if test "x$ac_cv_header_stdc" = xno; then
3234  { { echo "$as_me:$LINENO: error:
3235    -------------------------------------------------------------------
3236    An ANSI standard C library is required to build Duchamp.
3237    One of the ANSI C header files it requires is missing or unusable.
3238
3239    ERROR: Duchamp configuration failure.
3240    -------------------------------------------------------------------" >&5
3241echo "$as_me: error:
3242    -------------------------------------------------------------------
3243    An ANSI standard C library is required to build Duchamp.
3244    One of the ANSI C header files it requires is missing or unusable.
3245
3246    ERROR: Duchamp configuration failure.
3247    -------------------------------------------------------------------" >&2;}
3248   { (exit 1); exit 1; }; }
3249fi
3250
3251# Checks for typedefs, structures, and compiler characteristics.
3252echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
3253echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
3254if test "${ac_cv_header_stdbool_h+set}" = set; then
3255  echo $ECHO_N "(cached) $ECHO_C" >&6
3256else
3257  cat >conftest.$ac_ext <<_ACEOF
3258#line $LINENO "configure"
3259/* confdefs.h.  */
3260_ACEOF
3261cat confdefs.h >>conftest.$ac_ext
3262cat >>conftest.$ac_ext <<_ACEOF
3263/* end confdefs.h.  */
3264
3265#include <stdbool.h>
3266#ifndef bool
3267# error bool is not defined
3268#endif
3269#ifndef false
3270# error false is not defined
3271#endif
3272#if false
3273# error false is not 0
3274#endif
3275#ifndef true
3276# error true is not defined
3277#endif
3278#if true != 1
3279# error true is not 1
3280#endif
3281#ifndef __bool_true_false_are_defined
3282# error __bool_true_false_are_defined is not defined
3283#endif
3284
3285        struct s { _Bool s: 1; _Bool t; } s;
3286
3287        char a[true == 1 ? 1 : -1];
3288        char b[false == 0 ? 1 : -1];
3289        char c[__bool_true_false_are_defined == 1 ? 1 : -1];
3290        char d[(bool) -0.5 == true ? 1 : -1];
3291        bool e = &s;
3292        char f[(_Bool) -0.0 == false ? 1 : -1];
3293        char g[true];
3294        char h[sizeof (_Bool)];
3295        char i[sizeof s.t];
3296
3297int
3298main ()
3299{
3300 return !a + !b + !c + !d + !e + !f + !g + !h + !i;
3301  ;
3302  return 0;
3303}
3304_ACEOF
3305rm -f conftest.$ac_objext
3306if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3307  (eval $ac_compile) 2>&5
3308  ac_status=$?
3309  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3310  (exit $ac_status); } &&
3311         { ac_try='test -s conftest.$ac_objext'
3312  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3313  (eval $ac_try) 2>&5
3314  ac_status=$?
3315  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3316  (exit $ac_status); }; }; then
3317  ac_cv_header_stdbool_h=yes
3318else
3319  echo "$as_me: failed program was:" >&5
3320sed 's/^/| /' conftest.$ac_ext >&5
3321
3322ac_cv_header_stdbool_h=no
3323fi
3324rm -f conftest.$ac_objext conftest.$ac_ext
3325fi
3326echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
3327echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
3328echo "$as_me:$LINENO: checking for _Bool" >&5
3329echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
3330if test "${ac_cv_type__Bool+set}" = set; then
3331  echo $ECHO_N "(cached) $ECHO_C" >&6
3332else
3333  cat >conftest.$ac_ext <<_ACEOF
3334#line $LINENO "configure"
3335/* confdefs.h.  */
3336_ACEOF
3337cat confdefs.h >>conftest.$ac_ext
3338cat >>conftest.$ac_ext <<_ACEOF
3339/* end confdefs.h.  */
3340$ac_includes_default
3341int
3342main ()
3343{
3344if ((_Bool *) 0)
3345  return 0;
3346if (sizeof (_Bool))
3347  return 0;
3348  ;
3349  return 0;
3350}
3351_ACEOF
3352rm -f conftest.$ac_objext
3353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3354  (eval $ac_compile) 2>&5
3355  ac_status=$?
3356  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3357  (exit $ac_status); } &&
3358         { ac_try='test -s conftest.$ac_objext'
3359  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3360  (eval $ac_try) 2>&5
3361  ac_status=$?
3362  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3363  (exit $ac_status); }; }; then
3364  ac_cv_type__Bool=yes
3365else
3366  echo "$as_me: failed program was:" >&5
3367sed 's/^/| /' conftest.$ac_ext >&5
3368
3369ac_cv_type__Bool=no
3370fi
3371rm -f conftest.$ac_objext conftest.$ac_ext
3372fi
3373echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
3374echo "${ECHO_T}$ac_cv_type__Bool" >&6
3375if test $ac_cv_type__Bool = yes; then
3376
3377cat >>confdefs.h <<_ACEOF
3378#define HAVE__BOOL 1
3379_ACEOF
3380
3381
3382fi
3383
3384if test $ac_cv_header_stdbool_h = yes; then
3385
3386cat >>confdefs.h <<\_ACEOF
3387#define HAVE_STDBOOL_H 1
3388_ACEOF
3389
3390fi
3391
3392echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3393echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3394if test "${ac_cv_c_const+set}" = set; then
3395  echo $ECHO_N "(cached) $ECHO_C" >&6
3396else
3397  cat >conftest.$ac_ext <<_ACEOF
3398#line $LINENO "configure"
3399/* confdefs.h.  */
3400_ACEOF
3401cat confdefs.h >>conftest.$ac_ext
3402cat >>conftest.$ac_ext <<_ACEOF
3403/* end confdefs.h.  */
3404
3405int
3406main ()
3407{
3408/* FIXME: Include the comments suggested by Paul. */
3409#ifndef __cplusplus
3410  /* Ultrix mips cc rejects this.  */
3411  typedef int charset[2];
3412  const charset x;
3413  /* SunOS 4.1.1 cc rejects this.  */
3414  char const *const *ccp;
3415  char **p;
3416  /* NEC SVR4.0.2 mips cc rejects this.  */
3417  struct point {int x, y;};
3418  static struct point const zero = {0,0};
3419  /* AIX XL C 1.02.0.0 rejects this.
3420     It does not let you subtract one const X* pointer from another in
3421     an arm of an if-expression whose if-part is not a constant
3422     expression */
3423  const char *g = "string";
3424  ccp = &g + (g ? g-g : 0);
3425  /* HPUX 7.0 cc rejects these. */
3426  ++ccp;
3427  p = (char**) ccp;
3428  ccp = (char const *const *) p;
3429  { /* SCO 3.2v4 cc rejects this.  */
3430    char *t;
3431    char const *s = 0 ? (char *) 0 : (char const *) 0;
3432
3433    *t++ = 0;
3434  }
3435  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3436    int x[] = {25, 17};
3437    const int *foo = &x[0];
3438    ++foo;
3439  }
3440  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3441    typedef const int *iptr;
3442    iptr p = 0;
3443    ++p;
3444  }
3445  { /* AIX XL C 1.02.0.0 rejects this saying
3446       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3447    struct s { int j; const int *ap[3]; };
3448    struct s *b; b->j = 5;
3449  }
3450  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3451    const int foo = 10;
3452  }
3453#endif
3454
3455  ;
3456  return 0;
3457}
3458_ACEOF
3459rm -f conftest.$ac_objext
3460if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3461  (eval $ac_compile) 2>&5
3462  ac_status=$?
3463  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3464  (exit $ac_status); } &&
3465         { ac_try='test -s conftest.$ac_objext'
3466  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3467  (eval $ac_try) 2>&5
3468  ac_status=$?
3469  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3470  (exit $ac_status); }; }; then
3471  ac_cv_c_const=yes
3472else
3473  echo "$as_me: failed program was:" >&5
3474sed 's/^/| /' conftest.$ac_ext >&5
3475
3476ac_cv_c_const=no
3477fi
3478rm -f conftest.$ac_objext conftest.$ac_ext
3479fi
3480echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3481echo "${ECHO_T}$ac_cv_c_const" >&6
3482if test $ac_cv_c_const = no; then
3483
3484cat >>confdefs.h <<\_ACEOF
3485#define const
3486_ACEOF
3487
3488fi
3489
3490echo "$as_me:$LINENO: checking for inline" >&5
3491echo $ECHO_N "checking for inline... $ECHO_C" >&6
3492if test "${ac_cv_c_inline+set}" = set; then
3493  echo $ECHO_N "(cached) $ECHO_C" >&6
3494else
3495  ac_cv_c_inline=no
3496for ac_kw in inline __inline__ __inline; do
3497  cat >conftest.$ac_ext <<_ACEOF
3498#line $LINENO "configure"
3499/* confdefs.h.  */
3500_ACEOF
3501cat confdefs.h >>conftest.$ac_ext
3502cat >>conftest.$ac_ext <<_ACEOF
3503/* end confdefs.h.  */
3504#ifndef __cplusplus
3505typedef int foo_t;
3506static $ac_kw foo_t static_foo () {return 0; }
3507$ac_kw foo_t foo () {return 0; }
3508#endif
3509
3510_ACEOF
3511rm -f conftest.$ac_objext
3512if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3513  (eval $ac_compile) 2>&5
3514  ac_status=$?
3515  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3516  (exit $ac_status); } &&
3517         { ac_try='test -s conftest.$ac_objext'
3518  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3519  (eval $ac_try) 2>&5
3520  ac_status=$?
3521  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3522  (exit $ac_status); }; }; then
3523  ac_cv_c_inline=$ac_kw; break
3524else
3525  echo "$as_me: failed program was:" >&5
3526sed 's/^/| /' conftest.$ac_ext >&5
3527
3528fi
3529rm -f conftest.$ac_objext conftest.$ac_ext
3530done
3531
3532fi
3533echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3534echo "${ECHO_T}$ac_cv_c_inline" >&6
3535case $ac_cv_c_inline in
3536  inline | yes) ;;
3537  no)
3538cat >>confdefs.h <<\_ACEOF
3539#define inline
3540_ACEOF
3541 ;;
3542  *)  cat >>confdefs.h <<_ACEOF
3543#define inline $ac_cv_c_inline
3544_ACEOF
3545 ;;
3546esac
3547
3548
3549# Utilities.
3550if test -n "$ac_tool_prefix"; then
3551  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3552set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3553echo "$as_me:$LINENO: checking for $ac_word" >&5
3554echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3555if test "${ac_cv_prog_RANLIB+set}" = set; then
3556  echo $ECHO_N "(cached) $ECHO_C" >&6
3557else
3558  if test -n "$RANLIB"; then
3559  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3560else
3561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3562for as_dir in $PATH
3563do
3564  IFS=$as_save_IFS
3565  test -z "$as_dir" && as_dir=.
3566  for ac_exec_ext in '' $ac_executable_extensions; do
3567  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3568    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3569    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3570    break 2
3571  fi
3572done
3573done
3574
3575fi
3576fi
3577RANLIB=$ac_cv_prog_RANLIB
3578if test -n "$RANLIB"; then
3579  echo "$as_me:$LINENO: result: $RANLIB" >&5
3580echo "${ECHO_T}$RANLIB" >&6
3581else
3582  echo "$as_me:$LINENO: result: no" >&5
3583echo "${ECHO_T}no" >&6
3584fi
3585
3586fi
3587if test -z "$ac_cv_prog_RANLIB"; then
3588  ac_ct_RANLIB=$RANLIB
3589  # Extract the first word of "ranlib", so it can be a program name with args.
3590set dummy ranlib; ac_word=$2
3591echo "$as_me:$LINENO: checking for $ac_word" >&5
3592echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3593if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3594  echo $ECHO_N "(cached) $ECHO_C" >&6
3595else
3596  if test -n "$ac_ct_RANLIB"; then
3597  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3598else
3599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3600for as_dir in $PATH
3601do
3602  IFS=$as_save_IFS
3603  test -z "$as_dir" && as_dir=.
3604  for ac_exec_ext in '' $ac_executable_extensions; do
3605  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3606    ac_cv_prog_ac_ct_RANLIB="ranlib"
3607    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3608    break 2
3609  fi
3610done
3611done
3612
3613  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3614fi
3615fi
3616ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3617if test -n "$ac_ct_RANLIB"; then
3618  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3619echo "${ECHO_T}$ac_ct_RANLIB" >&6
3620else
3621  echo "$as_me:$LINENO: result: no" >&5
3622echo "${ECHO_T}no" >&6
3623fi
3624
3625  RANLIB=$ac_ct_RANLIB
3626else
3627  RANLIB="$ac_cv_prog_RANLIB"
3628fi
3629
3630
3631# Checks for library functions.
3632echo "$as_me:$LINENO: checking for working strtod" >&5
3633echo $ECHO_N "checking for working strtod... $ECHO_C" >&6
3634if test "${ac_cv_func_strtod+set}" = set; then
3635  echo $ECHO_N "(cached) $ECHO_C" >&6
3636else
3637  if test "$cross_compiling" = yes; then
3638  ac_cv_func_strtod=no
3639else
3640  cat >conftest.$ac_ext <<_ACEOF
3641#line $LINENO "configure"
3642/* confdefs.h.  */
3643_ACEOF
3644cat confdefs.h >>conftest.$ac_ext
3645cat >>conftest.$ac_ext <<_ACEOF
3646/* end confdefs.h.  */
3647
3648double strtod ();
3649int
3650main()
3651{
3652  {
3653    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
3654    char *string = " +69";
3655    char *term;
3656    double value;
3657    value = strtod (string, &term);
3658    if (value != 69 || term != (string + 4))
3659      exit (1);
3660  }
3661
3662  {
3663    /* Under Solaris 2.4, strtod returns the wrong value for the
3664       terminating character under some conditions.  */
3665    char *string = "NaN";
3666    char *term;
3667    strtod (string, &term);
3668    if (term != string && *(term - 1) == 0)
3669      exit (1);
3670  }
3671  exit (0);
3672}
3673
3674_ACEOF
3675rm -f conftest$ac_exeext
3676if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3677  (eval $ac_link) 2>&5
3678  ac_status=$?
3679  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3680  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3681  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3682  (eval $ac_try) 2>&5
3683  ac_status=$?
3684  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3685  (exit $ac_status); }; }; then
3686  ac_cv_func_strtod=yes
3687else
3688  echo "$as_me: program exited with status $ac_status" >&5
3689echo "$as_me: failed program was:" >&5
3690sed 's/^/| /' conftest.$ac_ext >&5
3691
3692( exit $ac_status )
3693ac_cv_func_strtod=no
3694fi
3695rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3696fi
3697fi
3698echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
3699echo "${ECHO_T}$ac_cv_func_strtod" >&6
3700if test $ac_cv_func_strtod = no; then
3701  LIBOBJS="$LIBOBJS strtod.$ac_objext"
3702echo "$as_me:$LINENO: checking for pow" >&5
3703echo $ECHO_N "checking for pow... $ECHO_C" >&6
3704if test "${ac_cv_func_pow+set}" = set; then
3705  echo $ECHO_N "(cached) $ECHO_C" >&6
3706else
3707  cat >conftest.$ac_ext <<_ACEOF
3708#line $LINENO "configure"
3709/* confdefs.h.  */
3710_ACEOF
3711cat confdefs.h >>conftest.$ac_ext
3712cat >>conftest.$ac_ext <<_ACEOF
3713/* end confdefs.h.  */
3714/* System header to define __stub macros and hopefully few prototypes,
3715    which can conflict with char pow (); below.
3716    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3717    <limits.h> exists even on freestanding compilers.  */
3718#ifdef __STDC__
3719# include <limits.h>
3720#else
3721# include <assert.h>
3722#endif
3723/* Override any gcc2 internal prototype to avoid an error.  */
3724#ifdef __cplusplus
3725extern "C"
3726{
3727#endif
3728/* We use char because int might match the return type of a gcc2
3729   builtin and then its argument prototype would still apply.  */
3730char pow ();
3731/* The GNU C library defines this for functions which it implements
3732    to always fail with ENOSYS.  Some functions are actually named
3733    something starting with __ and the normal name is an alias.  */
3734#if defined (__stub_pow) || defined (__stub___pow)
3735choke me
3736#else
3737char (*f) () = pow;
3738#endif
3739#ifdef __cplusplus
3740}
3741#endif
3742
3743int
3744main ()
3745{
3746return f != pow;
3747  ;
3748  return 0;
3749}
3750_ACEOF
3751rm -f conftest.$ac_objext conftest$ac_exeext
3752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3753  (eval $ac_link) 2>&5
3754  ac_status=$?
3755  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3756  (exit $ac_status); } &&
3757         { ac_try='test -s conftest$ac_exeext'
3758  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3759  (eval $ac_try) 2>&5
3760  ac_status=$?
3761  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3762  (exit $ac_status); }; }; then
3763  ac_cv_func_pow=yes
3764else
3765  echo "$as_me: failed program was:" >&5
3766sed 's/^/| /' conftest.$ac_ext >&5
3767
3768ac_cv_func_pow=no
3769fi
3770rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3771fi
3772echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5
3773echo "${ECHO_T}$ac_cv_func_pow" >&6
3774
3775if test $ac_cv_func_pow = no; then
3776  echo "$as_me:$LINENO: checking for pow in -lm" >&5
3777echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6
3778if test "${ac_cv_lib_m_pow+set}" = set; then
3779  echo $ECHO_N "(cached) $ECHO_C" >&6
3780else
3781  ac_check_lib_save_LIBS=$LIBS
3782LIBS="-lm  $LIBS"
3783cat >conftest.$ac_ext <<_ACEOF
3784#line $LINENO "configure"
3785/* confdefs.h.  */
3786_ACEOF
3787cat confdefs.h >>conftest.$ac_ext
3788cat >>conftest.$ac_ext <<_ACEOF
3789/* end confdefs.h.  */
3790
3791/* Override any gcc2 internal prototype to avoid an error.  */
3792#ifdef __cplusplus
3793extern "C"
3794#endif
3795/* We use char because int might match the return type of a gcc2
3796   builtin and then its argument prototype would still apply.  */
3797char pow ();
3798int
3799main ()
3800{
3801pow ();
3802  ;
3803  return 0;
3804}
3805_ACEOF
3806rm -f conftest.$ac_objext conftest$ac_exeext
3807if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3808  (eval $ac_link) 2>&5
3809  ac_status=$?
3810  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3811  (exit $ac_status); } &&
3812         { ac_try='test -s conftest$ac_exeext'
3813  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3814  (eval $ac_try) 2>&5
3815  ac_status=$?
3816  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3817  (exit $ac_status); }; }; then
3818  ac_cv_lib_m_pow=yes
3819else
3820  echo "$as_me: failed program was:" >&5
3821sed 's/^/| /' conftest.$ac_ext >&5
3822
3823ac_cv_lib_m_pow=no
3824fi
3825rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3826LIBS=$ac_check_lib_save_LIBS
3827fi
3828echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5
3829echo "${ECHO_T}$ac_cv_lib_m_pow" >&6
3830if test $ac_cv_lib_m_pow = yes; then
3831  POW_LIB=-lm
3832else
3833  { echo "$as_me:$LINENO: WARNING: cannot find library containing definition of pow" >&5
3834echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
3835fi
3836
3837fi
3838
3839fi
3840
3841
3842
3843
3844
3845
3846
3847
3848for ac_func in floor pow sqrt strtol log atan fabs
3849do
3850as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3851echo "$as_me:$LINENO: checking for $ac_func" >&5
3852echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3853if eval "test \"\${$as_ac_var+set}\" = set"; then
3854  echo $ECHO_N "(cached) $ECHO_C" >&6
3855else
3856  cat >conftest.$ac_ext <<_ACEOF
3857#line $LINENO "configure"
3858/* confdefs.h.  */
3859_ACEOF
3860cat confdefs.h >>conftest.$ac_ext
3861cat >>conftest.$ac_ext <<_ACEOF
3862/* end confdefs.h.  */
3863/* System header to define __stub macros and hopefully few prototypes,
3864    which can conflict with char $ac_func (); below.
3865    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3866    <limits.h> exists even on freestanding compilers.  */
3867#ifdef __STDC__
3868# include <limits.h>
3869#else
3870# include <assert.h>
3871#endif
3872/* Override any gcc2 internal prototype to avoid an error.  */
3873#ifdef __cplusplus
3874extern "C"
3875{
3876#endif
3877/* We use char because int might match the return type of a gcc2
3878   builtin and then its argument prototype would still apply.  */
3879char $ac_func ();
3880/* The GNU C library defines this for functions which it implements
3881    to always fail with ENOSYS.  Some functions are actually named
3882    something starting with __ and the normal name is an alias.  */
3883#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3884choke me
3885#else
3886char (*f) () = $ac_func;
3887#endif
3888#ifdef __cplusplus
3889}
3890#endif
3891
3892int
3893main ()
3894{
3895return f != $ac_func;
3896  ;
3897  return 0;
3898}
3899_ACEOF
3900rm -f conftest.$ac_objext conftest$ac_exeext
3901if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3902  (eval $ac_link) 2>&5
3903  ac_status=$?
3904  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3905  (exit $ac_status); } &&
3906         { ac_try='test -s conftest$ac_exeext'
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  eval "$as_ac_var=yes"
3913else
3914  echo "$as_me: failed program was:" >&5
3915sed 's/^/| /' conftest.$ac_ext >&5
3916
3917eval "$as_ac_var=no"
3918fi
3919rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3920fi
3921echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
3922echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3923if test `eval echo '${'$as_ac_var'}'` = yes; then
3924  cat >>confdefs.h <<_ACEOF
3925#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3926_ACEOF
3927
3928fi
3929done
3930
3931
3932# Extra places to look for third-party include files and libraries.
3933INCDIRS="$INCDIRS           \
3934         /usr/include       \
3935         /usr/local/include \
3936         /usr/local/pgplot  \
3937         /usr/local/cfitsio \
3938         /usr/local/wcslib  \
3939         /local/pgplot      \
3940         /local/cfitsio     \
3941         /opt/local/include"
3942
3943LIBDIRS="$LIBDIRS           \
3944         /usr/lib           \
3945         /usr/local/lib     \
3946         /usr/local/pgplot  \
3947         /usr/local/cfitsio \
3948         /usr/local/wcslib  \
3949         /local/lib         \
3950         /local/pgplot      \
3951         /local/cfitsio     \
3952         /opt/SUNWspro/lib  \
3953         /opt/local/lib"
3954
3955{ echo "$as_me:$LINENO: LIBDIRS" >&5
3956echo "$as_me: LIBDIRS" >&6;}
3957
3958for LIBDIR in $LIBDIRS ; do
3959  as_ac_File=`echo "ac_cv_file_$LIBDIR" | $as_tr_sh`
3960echo "$as_me:$LINENO: checking for $LIBDIR" >&5
3961echo $ECHO_N "checking for $LIBDIR... $ECHO_C" >&6
3962if eval "test \"\${$as_ac_File+set}\" = set"; then
3963  echo $ECHO_N "(cached) $ECHO_C" >&6
3964else
3965  test "$cross_compiling" = yes &&
3966  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
3967echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
3968   { (exit 1); exit 1; }; }
3969if test -r "$LIBDIR"; then
3970  eval "$as_ac_File=yes"
3971else
3972  eval "$as_ac_File=no"
3973fi
3974fi
3975echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
3976echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
3977if test `eval echo '${'$as_ac_File'}'` = yes; then
3978  LDFLAGS="$LDFLAGS -L$LIBDIR"
3979else
3980  continue
3981fi
3982
3983done
3984
3985##########################################################################
3986# Search for PGPLOT
3987
3988for INCDIR in $INCDIRS ; do
3989  as_ac_File=`echo "ac_cv_file_$INCDIR/cpgplot.h" | $as_tr_sh`
3990echo "$as_me:$LINENO: checking for $INCDIR/cpgplot.h" >&5
3991echo $ECHO_N "checking for $INCDIR/cpgplot.h... $ECHO_C" >&6
3992if eval "test \"\${$as_ac_File+set}\" = set"; then
3993  echo $ECHO_N "(cached) $ECHO_C" >&6
3994else
3995  test "$cross_compiling" = yes &&
3996  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
3997echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
3998   { (exit 1); exit 1; }; }
3999if test -r "$INCDIR/cpgplot.h"; then
4000  eval "$as_ac_File=yes"
4001else
4002  eval "$as_ac_File=no"
4003fi
4004fi
4005echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4006echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4007if test `eval echo '${'$as_ac_File'}'` = yes; then
4008  PGPLOTINC=-I$INCDIR; break
4009fi
4010
4011  INCDIR=$INCDIR/pgplot
4012  as_ac_File=`echo "ac_cv_file_$INCDIR/cpgplot.h" | $as_tr_sh`
4013echo "$as_me:$LINENO: checking for $INCDIR/cpgplot.h" >&5
4014echo $ECHO_N "checking for $INCDIR/cpgplot.h... $ECHO_C" >&6
4015if eval "test \"\${$as_ac_File+set}\" = set"; then
4016  echo $ECHO_N "(cached) $ECHO_C" >&6
4017else
4018  test "$cross_compiling" = yes &&
4019  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4020echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4021   { (exit 1); exit 1; }; }
4022if test -r "$INCDIR/cpgplot.h"; then
4023  eval "$as_ac_File=yes"
4024else
4025  eval "$as_ac_File=no"
4026fi
4027fi
4028echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4029echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4030if test `eval echo '${'$as_ac_File'}'` = yes; then
4031  PGPLOTINC=-I$INCDIR; break
4032fi
4033
4034done
4035
4036# PGPLOT compiled with a SUN compiler but linked with something else.
4037echo "$as_me:$LINENO: checking for cosd in -lsunmath" >&5
4038echo $ECHO_N "checking for cosd in -lsunmath... $ECHO_C" >&6
4039if test "${ac_cv_lib_sunmath_cosd+set}" = set; then
4040  echo $ECHO_N "(cached) $ECHO_C" >&6
4041else
4042  ac_check_lib_save_LIBS=$LIBS
4043LIBS="-lsunmath $PGPLOTLIB $LIBS $LIBS"
4044cat >conftest.$ac_ext <<_ACEOF
4045#line $LINENO "configure"
4046/* confdefs.h.  */
4047_ACEOF
4048cat confdefs.h >>conftest.$ac_ext
4049cat >>conftest.$ac_ext <<_ACEOF
4050/* end confdefs.h.  */
4051
4052/* Override any gcc2 internal prototype to avoid an error.  */
4053#ifdef __cplusplus
4054extern "C"
4055#endif
4056/* We use char because int might match the return type of a gcc2
4057   builtin and then its argument prototype would still apply.  */
4058char cosd ();
4059int
4060main ()
4061{
4062cosd ();
4063  ;
4064  return 0;
4065}
4066_ACEOF
4067rm -f conftest.$ac_objext conftest$ac_exeext
4068if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4069  (eval $ac_link) 2>&5
4070  ac_status=$?
4071  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4072  (exit $ac_status); } &&
4073         { ac_try='test -s conftest$ac_exeext'
4074  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4075  (eval $ac_try) 2>&5
4076  ac_status=$?
4077  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4078  (exit $ac_status); }; }; then
4079  ac_cv_lib_sunmath_cosd=yes
4080else
4081  echo "$as_me: failed program was:" >&5
4082sed 's/^/| /' conftest.$ac_ext >&5
4083
4084ac_cv_lib_sunmath_cosd=no
4085fi
4086rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4087LIBS=$ac_check_lib_save_LIBS
4088fi
4089echo "$as_me:$LINENO: result: $ac_cv_lib_sunmath_cosd" >&5
4090echo "${ECHO_T}$ac_cv_lib_sunmath_cosd" >&6
4091if test $ac_cv_lib_sunmath_cosd = yes; then
4092  PGPLOTLIB="-lsunmath $PGPLOTLIB"
4093fi
4094
4095echo "$as_me:$LINENO: checking for iand_ in -lM77" >&5
4096echo $ECHO_N "checking for iand_ in -lM77... $ECHO_C" >&6
4097if test "${ac_cv_lib_M77_iand_+set}" = set; then
4098  echo $ECHO_N "(cached) $ECHO_C" >&6
4099else
4100  ac_check_lib_save_LIBS=$LIBS
4101LIBS="-lM77 $PGPLOTLIB $LIBS $LIBS"
4102cat >conftest.$ac_ext <<_ACEOF
4103#line $LINENO "configure"
4104/* confdefs.h.  */
4105_ACEOF
4106cat confdefs.h >>conftest.$ac_ext
4107cat >>conftest.$ac_ext <<_ACEOF
4108/* end confdefs.h.  */
4109
4110/* Override any gcc2 internal prototype to avoid an error.  */
4111#ifdef __cplusplus
4112extern "C"
4113#endif
4114/* We use char because int might match the return type of a gcc2
4115   builtin and then its argument prototype would still apply.  */
4116char iand_ ();
4117int
4118main ()
4119{
4120iand_ ();
4121  ;
4122  return 0;
4123}
4124_ACEOF
4125rm -f conftest.$ac_objext conftest$ac_exeext
4126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4127  (eval $ac_link) 2>&5
4128  ac_status=$?
4129  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4130  (exit $ac_status); } &&
4131         { ac_try='test -s conftest$ac_exeext'
4132  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4133  (eval $ac_try) 2>&5
4134  ac_status=$?
4135  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4136  (exit $ac_status); }; }; then
4137  ac_cv_lib_M77_iand_=yes
4138else
4139  echo "$as_me: failed program was:" >&5
4140sed 's/^/| /' conftest.$ac_ext >&5
4141
4142ac_cv_lib_M77_iand_=no
4143fi
4144rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4145LIBS=$ac_check_lib_save_LIBS
4146fi
4147echo "$as_me:$LINENO: result: $ac_cv_lib_M77_iand_" >&5
4148echo "${ECHO_T}$ac_cv_lib_M77_iand_" >&6
4149if test $ac_cv_lib_M77_iand_ = yes; then
4150  PGPLOTLIB="-lM77 $PGPLOTLIB"
4151fi
4152
4153echo "$as_me:$LINENO: checking for f77_init in -lF77" >&5
4154echo $ECHO_N "checking for f77_init in -lF77... $ECHO_C" >&6
4155if test "${ac_cv_lib_F77_f77_init+set}" = set; then
4156  echo $ECHO_N "(cached) $ECHO_C" >&6
4157else
4158  ac_check_lib_save_LIBS=$LIBS
4159LIBS="-lF77 $PGPLOTLIB $LIBS $LIBS"
4160cat >conftest.$ac_ext <<_ACEOF
4161#line $LINENO "configure"
4162/* confdefs.h.  */
4163_ACEOF
4164cat confdefs.h >>conftest.$ac_ext
4165cat >>conftest.$ac_ext <<_ACEOF
4166/* end confdefs.h.  */
4167
4168/* Override any gcc2 internal prototype to avoid an error.  */
4169#ifdef __cplusplus
4170extern "C"
4171#endif
4172/* We use char because int might match the return type of a gcc2
4173   builtin and then its argument prototype would still apply.  */
4174char f77_init ();
4175int
4176main ()
4177{
4178f77_init ();
4179  ;
4180  return 0;
4181}
4182_ACEOF
4183rm -f conftest.$ac_objext conftest$ac_exeext
4184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4185  (eval $ac_link) 2>&5
4186  ac_status=$?
4187  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4188  (exit $ac_status); } &&
4189         { ac_try='test -s conftest$ac_exeext'
4190  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4191  (eval $ac_try) 2>&5
4192  ac_status=$?
4193  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4194  (exit $ac_status); }; }; then
4195  ac_cv_lib_F77_f77_init=yes
4196else
4197  echo "$as_me: failed program was:" >&5
4198sed 's/^/| /' conftest.$ac_ext >&5
4199
4200ac_cv_lib_F77_f77_init=no
4201fi
4202rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4203LIBS=$ac_check_lib_save_LIBS
4204fi
4205echo "$as_me:$LINENO: result: $ac_cv_lib_F77_f77_init" >&5
4206echo "${ECHO_T}$ac_cv_lib_F77_f77_init" >&6
4207if test $ac_cv_lib_F77_f77_init = yes; then
4208  PGPLOTLIB="-lF77 $PGPLOTLIB"
4209fi
4210
4211# PGPLOT compiled with a GNU compiler but linked with something else.
4212echo "$as_me:$LINENO: checking for log in -lm" >&5
4213echo $ECHO_N "checking for log in -lm... $ECHO_C" >&6
4214if test "${ac_cv_lib_m_log+set}" = set; then
4215  echo $ECHO_N "(cached) $ECHO_C" >&6
4216else
4217  ac_check_lib_save_LIBS=$LIBS
4218LIBS="-lm  $LIBS"
4219cat >conftest.$ac_ext <<_ACEOF
4220#line $LINENO "configure"
4221/* confdefs.h.  */
4222_ACEOF
4223cat confdefs.h >>conftest.$ac_ext
4224cat >>conftest.$ac_ext <<_ACEOF
4225/* end confdefs.h.  */
4226
4227/* Override any gcc2 internal prototype to avoid an error.  */
4228#ifdef __cplusplus
4229extern "C"
4230#endif
4231/* We use char because int might match the return type of a gcc2
4232   builtin and then its argument prototype would still apply.  */
4233char log ();
4234int
4235main ()
4236{
4237log ();
4238  ;
4239  return 0;
4240}
4241_ACEOF
4242rm -f conftest.$ac_objext conftest$ac_exeext
4243if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4244  (eval $ac_link) 2>&5
4245  ac_status=$?
4246  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4247  (exit $ac_status); } &&
4248         { ac_try='test -s conftest$ac_exeext'
4249  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4250  (eval $ac_try) 2>&5
4251  ac_status=$?
4252  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4253  (exit $ac_status); }; }; then
4254  ac_cv_lib_m_log=yes
4255else
4256  echo "$as_me: failed program was:" >&5
4257sed 's/^/| /' conftest.$ac_ext >&5
4258
4259ac_cv_lib_m_log=no
4260fi
4261rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4262LIBS=$ac_check_lib_save_LIBS
4263fi
4264echo "$as_me:$LINENO: result: $ac_cv_lib_m_log" >&5
4265echo "${ECHO_T}$ac_cv_lib_m_log" >&6
4266if test $ac_cv_lib_m_log = yes; then
4267  PGPLOTLIB="-lm $PGPLOTLIB"
4268fi
4269
4270echo "$as_me:$LINENO: checking for gerror_ in -lg2c" >&5
4271echo $ECHO_N "checking for gerror_ in -lg2c... $ECHO_C" >&6
4272if test "${ac_cv_lib_g2c_gerror_+set}" = set; then
4273  echo $ECHO_N "(cached) $ECHO_C" >&6
4274else
4275  ac_check_lib_save_LIBS=$LIBS
4276LIBS="-lg2c $PGPLOTLIB $LIBS $LIBS"
4277cat >conftest.$ac_ext <<_ACEOF
4278#line $LINENO "configure"
4279/* confdefs.h.  */
4280_ACEOF
4281cat confdefs.h >>conftest.$ac_ext
4282cat >>conftest.$ac_ext <<_ACEOF
4283/* end confdefs.h.  */
4284
4285/* Override any gcc2 internal prototype to avoid an error.  */
4286#ifdef __cplusplus
4287extern "C"
4288#endif
4289/* We use char because int might match the return type of a gcc2
4290   builtin and then its argument prototype would still apply.  */
4291char gerror_ ();
4292int
4293main ()
4294{
4295gerror_ ();
4296  ;
4297  return 0;
4298}
4299_ACEOF
4300rm -f conftest.$ac_objext conftest$ac_exeext
4301if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4302  (eval $ac_link) 2>&5
4303  ac_status=$?
4304  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4305  (exit $ac_status); } &&
4306         { ac_try='test -s conftest$ac_exeext'
4307  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4308  (eval $ac_try) 2>&5
4309  ac_status=$?
4310  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4311  (exit $ac_status); }; }; then
4312  ac_cv_lib_g2c_gerror_=yes
4313else
4314  echo "$as_me: failed program was:" >&5
4315sed 's/^/| /' conftest.$ac_ext >&5
4316
4317ac_cv_lib_g2c_gerror_=no
4318fi
4319rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4320LIBS=$ac_check_lib_save_LIBS
4321fi
4322echo "$as_me:$LINENO: result: $ac_cv_lib_g2c_gerror_" >&5
4323echo "${ECHO_T}$ac_cv_lib_g2c_gerror_" >&6
4324if test $ac_cv_lib_g2c_gerror_ = yes; then
4325  PGPLOTLIB="-lg2c $PGPLOTLIB"
4326fi
4327
4328
4329# Search for X11 includes and libraries.
4330echo "$as_me:$LINENO: checking for X" >&5
4331echo $ECHO_N "checking for X... $ECHO_C" >&6
4332
4333
4334# Check whether --with-x or --without-x was given.
4335if test "${with_x+set}" = set; then
4336  withval="$with_x"
4337
4338fi;
4339# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4340if test "x$with_x" = xno; then
4341  # The user explicitly disabled X.
4342  have_x=disabled
4343else
4344  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4345    # Both variables are already set.
4346    have_x=yes
4347  else
4348    if test "${ac_cv_have_x+set}" = set; then
4349  echo $ECHO_N "(cached) $ECHO_C" >&6
4350else
4351  # One or both of the vars are not set, and there is no cached value.
4352ac_x_includes=no ac_x_libraries=no
4353rm -fr conftest.dir
4354if mkdir conftest.dir; then
4355  cd conftest.dir
4356  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4357  cat >Imakefile <<'_ACEOF'
4358acfindx:
4359        @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4360_ACEOF
4361  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4362    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4363    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4364    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4365    for ac_extension in a so sl; do
4366      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4367         test -f $ac_im_libdir/libX11.$ac_extension; then
4368        ac_im_usrlibdir=$ac_im_libdir; break
4369      fi
4370    done
4371    # Screen out bogus values from the imake configuration.  They are
4372    # bogus both because they are the default anyway, and because
4373    # using them would break gcc on systems where it needs fixed includes.
4374    case $ac_im_incroot in
4375        /usr/include) ;;
4376        *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4377    esac
4378    case $ac_im_usrlibdir in
4379        /usr/lib | /lib) ;;
4380        *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4381    esac
4382  fi
4383  cd ..
4384  rm -fr conftest.dir
4385fi
4386
4387# Standard set of common directories for X headers.
4388# Check X11 before X11Rn because it is often a symlink to the current release.
4389ac_x_header_dirs='
4390/usr/X11/include
4391/usr/X11R6/include
4392/usr/X11R5/include
4393/usr/X11R4/include
4394
4395/usr/include/X11
4396/usr/include/X11R6
4397/usr/include/X11R5
4398/usr/include/X11R4
4399
4400/usr/local/X11/include
4401/usr/local/X11R6/include
4402/usr/local/X11R5/include
4403/usr/local/X11R4/include
4404
4405/usr/local/include/X11
4406/usr/local/include/X11R6
4407/usr/local/include/X11R5
4408/usr/local/include/X11R4
4409
4410/usr/X386/include
4411/usr/x386/include
4412/usr/XFree86/include/X11
4413
4414/usr/include
4415/usr/local/include
4416/usr/unsupported/include
4417/usr/athena/include
4418/usr/local/x11r5/include
4419/usr/lpp/Xamples/include
4420
4421/usr/openwin/include
4422/usr/openwin/share/include'
4423
4424if test "$ac_x_includes" = no; then
4425  # Guess where to find include files, by looking for Intrinsic.h.
4426  # First, try using that file with no special directory specified.
4427  cat >conftest.$ac_ext <<_ACEOF
4428#line $LINENO "configure"
4429/* confdefs.h.  */
4430_ACEOF
4431cat confdefs.h >>conftest.$ac_ext
4432cat >>conftest.$ac_ext <<_ACEOF
4433/* end confdefs.h.  */
4434#include <X11/Intrinsic.h>
4435_ACEOF
4436if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4437  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4438  ac_status=$?
4439  grep -v '^ *+' conftest.er1 >conftest.err
4440  rm -f conftest.er1
4441  cat conftest.err >&5
4442  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4443  (exit $ac_status); } >/dev/null; then
4444  if test -s conftest.err; then
4445    ac_cpp_err=$ac_c_preproc_warn_flag
4446  else
4447    ac_cpp_err=
4448  fi
4449else
4450  ac_cpp_err=yes
4451fi
4452if test -z "$ac_cpp_err"; then
4453  # We can compile using X headers with no special include directory.
4454ac_x_includes=
4455else
4456  echo "$as_me: failed program was:" >&5
4457sed 's/^/| /' conftest.$ac_ext >&5
4458
4459  for ac_dir in $ac_x_header_dirs; do
4460  if test -r "$ac_dir/X11/Intrinsic.h"; then
4461    ac_x_includes=$ac_dir
4462    break
4463  fi
4464done
4465fi
4466rm -f conftest.err conftest.$ac_ext
4467fi # $ac_x_includes = no
4468
4469if test "$ac_x_libraries" = no; then
4470  # Check for the libraries.
4471  # See if we find them without any special options.
4472  # Don't add to $LIBS permanently.
4473  ac_save_LIBS=$LIBS
4474  LIBS="-lXt $LIBS"
4475  cat >conftest.$ac_ext <<_ACEOF
4476#line $LINENO "configure"
4477/* confdefs.h.  */
4478_ACEOF
4479cat confdefs.h >>conftest.$ac_ext
4480cat >>conftest.$ac_ext <<_ACEOF
4481/* end confdefs.h.  */
4482#include <X11/Intrinsic.h>
4483int
4484main ()
4485{
4486XtMalloc (0)
4487  ;
4488  return 0;
4489}
4490_ACEOF
4491rm -f conftest.$ac_objext conftest$ac_exeext
4492if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4493  (eval $ac_link) 2>&5
4494  ac_status=$?
4495  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4496  (exit $ac_status); } &&
4497         { ac_try='test -s conftest$ac_exeext'
4498  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4499  (eval $ac_try) 2>&5
4500  ac_status=$?
4501  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4502  (exit $ac_status); }; }; then
4503  LIBS=$ac_save_LIBS
4504# We can link X programs with no special library path.
4505ac_x_libraries=
4506else
4507  echo "$as_me: failed program was:" >&5
4508sed 's/^/| /' conftest.$ac_ext >&5
4509
4510LIBS=$ac_save_LIBS
4511for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
4512do
4513  # Don't even attempt the hair of trying to link an X program!
4514  for ac_extension in a so sl; do
4515    if test -r $ac_dir/libXt.$ac_extension; then
4516      ac_x_libraries=$ac_dir
4517      break 2
4518    fi
4519  done
4520done
4521fi
4522rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4523fi # $ac_x_libraries = no
4524
4525if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
4526  # Didn't find X anywhere.  Cache the known absence of X.
4527  ac_cv_have_x="have_x=no"
4528else
4529  # Record where we found X for the cache.
4530  ac_cv_have_x="have_x=yes \
4531                ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4532fi
4533fi
4534
4535  fi
4536  eval "$ac_cv_have_x"
4537fi # $with_x != no
4538
4539if test "$have_x" != yes; then
4540  echo "$as_me:$LINENO: result: $have_x" >&5
4541echo "${ECHO_T}$have_x" >&6
4542  no_x=yes
4543else
4544  # If each of the values was on the command line, it overrides each guess.
4545  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4546  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4547  # Update the cache value to reflect the command line values.
4548  ac_cv_have_x="have_x=yes \
4549                ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4550  echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
4551echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
4552fi
4553
4554if test "x$ac_x_libraries" != x; then
4555  LDFLAGS="$LDFLAGS -L$ac_x_libraries"
4556  PGPLOTLIB="-lX11 $PGPLOTLIB"
4557fi
4558
4559# It is possible that other libraries may be required depending on what
4560# graphics drivers were installed with PGPLOT.
4561echo "$as_me:$LINENO: checking for deflate in -lz" >&5
4562echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
4563if test "${ac_cv_lib_z_deflate+set}" = set; then
4564  echo $ECHO_N "(cached) $ECHO_C" >&6
4565else
4566  ac_check_lib_save_LIBS=$LIBS
4567LIBS="-lz $PGPLOTLIB $LIBS $LIBS"
4568cat >conftest.$ac_ext <<_ACEOF
4569#line $LINENO "configure"
4570/* confdefs.h.  */
4571_ACEOF
4572cat confdefs.h >>conftest.$ac_ext
4573cat >>conftest.$ac_ext <<_ACEOF
4574/* end confdefs.h.  */
4575
4576/* Override any gcc2 internal prototype to avoid an error.  */
4577#ifdef __cplusplus
4578extern "C"
4579#endif
4580/* We use char because int might match the return type of a gcc2
4581   builtin and then its argument prototype would still apply.  */
4582char deflate ();
4583int
4584main ()
4585{
4586deflate ();
4587  ;
4588  return 0;
4589}
4590_ACEOF
4591rm -f conftest.$ac_objext conftest$ac_exeext
4592if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4593  (eval $ac_link) 2>&5
4594  ac_status=$?
4595  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4596  (exit $ac_status); } &&
4597         { ac_try='test -s conftest$ac_exeext'
4598  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4599  (eval $ac_try) 2>&5
4600  ac_status=$?
4601  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602  (exit $ac_status); }; }; then
4603  ac_cv_lib_z_deflate=yes
4604else
4605  echo "$as_me: failed program was:" >&5
4606sed 's/^/| /' conftest.$ac_ext >&5
4607
4608ac_cv_lib_z_deflate=no
4609fi
4610rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4611LIBS=$ac_check_lib_save_LIBS
4612fi
4613echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
4614echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
4615if test $ac_cv_lib_z_deflate = yes; then
4616  PGPLOTLIB="-lz $PGPLOTLIB"
4617fi
4618
4619echo "$as_me:$LINENO: checking for png_error in -lpng" >&5
4620echo $ECHO_N "checking for png_error in -lpng... $ECHO_C" >&6
4621if test "${ac_cv_lib_png_png_error+set}" = set; then
4622  echo $ECHO_N "(cached) $ECHO_C" >&6
4623else
4624  ac_check_lib_save_LIBS=$LIBS
4625LIBS="-lpng $PGPLOTLIB $LIBS $LIBS"
4626cat >conftest.$ac_ext <<_ACEOF
4627#line $LINENO "configure"
4628/* confdefs.h.  */
4629_ACEOF
4630cat confdefs.h >>conftest.$ac_ext
4631cat >>conftest.$ac_ext <<_ACEOF
4632/* end confdefs.h.  */
4633
4634/* Override any gcc2 internal prototype to avoid an error.  */
4635#ifdef __cplusplus
4636extern "C"
4637#endif
4638/* We use char because int might match the return type of a gcc2
4639   builtin and then its argument prototype would still apply.  */
4640char png_error ();
4641int
4642main ()
4643{
4644png_error ();
4645  ;
4646  return 0;
4647}
4648_ACEOF
4649rm -f conftest.$ac_objext conftest$ac_exeext
4650if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4651  (eval $ac_link) 2>&5
4652  ac_status=$?
4653  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4654  (exit $ac_status); } &&
4655         { ac_try='test -s conftest$ac_exeext'
4656  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4657  (eval $ac_try) 2>&5
4658  ac_status=$?
4659  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4660  (exit $ac_status); }; }; then
4661  ac_cv_lib_png_png_error=yes
4662else
4663  echo "$as_me: failed program was:" >&5
4664sed 's/^/| /' conftest.$ac_ext >&5
4665
4666ac_cv_lib_png_png_error=no
4667fi
4668rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4669LIBS=$ac_check_lib_save_LIBS
4670fi
4671echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_error" >&5
4672echo "${ECHO_T}$ac_cv_lib_png_png_error" >&6
4673if test $ac_cv_lib_png_png_error = yes; then
4674  PGPLOTLIB="-lpng $PGPLOTLIB"
4675fi
4676
4677echo "$as_me:$LINENO: checking for pgbeg_ in -lpgplot" >&5
4678echo $ECHO_N "checking for pgbeg_ in -lpgplot... $ECHO_C" >&6
4679if test "${ac_cv_lib_pgplot_pgbeg_+set}" = set; then
4680  echo $ECHO_N "(cached) $ECHO_C" >&6
4681else
4682  ac_check_lib_save_LIBS=$LIBS
4683LIBS="-lpgplot $PGPLOTLIB $LIBS $LIBS"
4684cat >conftest.$ac_ext <<_ACEOF
4685#line $LINENO "configure"
4686/* confdefs.h.  */
4687_ACEOF
4688cat confdefs.h >>conftest.$ac_ext
4689cat >>conftest.$ac_ext <<_ACEOF
4690/* end confdefs.h.  */
4691
4692/* Override any gcc2 internal prototype to avoid an error.  */
4693#ifdef __cplusplus
4694extern "C"
4695#endif
4696/* We use char because int might match the return type of a gcc2
4697   builtin and then its argument prototype would still apply.  */
4698char pgbeg_ ();
4699int
4700main ()
4701{
4702pgbeg_ ();
4703  ;
4704  return 0;
4705}
4706_ACEOF
4707rm -f conftest.$ac_objext conftest$ac_exeext
4708if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4709  (eval $ac_link) 2>&5
4710  ac_status=$?
4711  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4712  (exit $ac_status); } &&
4713         { ac_try='test -s conftest$ac_exeext'
4714  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4715  (eval $ac_try) 2>&5
4716  ac_status=$?
4717  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4718  (exit $ac_status); }; }; then
4719  ac_cv_lib_pgplot_pgbeg_=yes
4720else
4721  echo "$as_me: failed program was:" >&5
4722sed 's/^/| /' conftest.$ac_ext >&5
4723
4724ac_cv_lib_pgplot_pgbeg_=no
4725fi
4726rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4727LIBS=$ac_check_lib_save_LIBS
4728fi
4729echo "$as_me:$LINENO: result: $ac_cv_lib_pgplot_pgbeg_" >&5
4730echo "${ECHO_T}$ac_cv_lib_pgplot_pgbeg_" >&6
4731if test $ac_cv_lib_pgplot_pgbeg_ = yes; then
4732  PGPLOTLIB="-lpgplot $PGPLOTLIB"
4733fi
4734
4735echo "$as_me:$LINENO: checking for cpgopen in -lcpgplot" >&5
4736echo $ECHO_N "checking for cpgopen in -lcpgplot... $ECHO_C" >&6
4737if test "${ac_cv_lib_cpgplot_cpgopen+set}" = set; then
4738  echo $ECHO_N "(cached) $ECHO_C" >&6
4739else
4740  ac_check_lib_save_LIBS=$LIBS
4741LIBS="-lcpgplot $PGPLOTLIB $LIBS $LIBS"
4742cat >conftest.$ac_ext <<_ACEOF
4743#line $LINENO "configure"
4744/* confdefs.h.  */
4745_ACEOF
4746cat confdefs.h >>conftest.$ac_ext
4747cat >>conftest.$ac_ext <<_ACEOF
4748/* end confdefs.h.  */
4749
4750/* Override any gcc2 internal prototype to avoid an error.  */
4751#ifdef __cplusplus
4752extern "C"
4753#endif
4754/* We use char because int might match the return type of a gcc2
4755   builtin and then its argument prototype would still apply.  */
4756char cpgopen ();
4757int
4758main ()
4759{
4760cpgopen ();
4761  ;
4762  return 0;
4763}
4764_ACEOF
4765rm -f conftest.$ac_objext conftest$ac_exeext
4766if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4767  (eval $ac_link) 2>&5
4768  ac_status=$?
4769  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4770  (exit $ac_status); } &&
4771         { ac_try='test -s conftest$ac_exeext'
4772  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4773  (eval $ac_try) 2>&5
4774  ac_status=$?
4775  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4776  (exit $ac_status); }; }; then
4777  ac_cv_lib_cpgplot_cpgopen=yes
4778else
4779  echo "$as_me: failed program was:" >&5
4780sed 's/^/| /' conftest.$ac_ext >&5
4781
4782ac_cv_lib_cpgplot_cpgopen=no
4783fi
4784rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4785LIBS=$ac_check_lib_save_LIBS
4786fi
4787echo "$as_me:$LINENO: result: $ac_cv_lib_cpgplot_cpgopen" >&5
4788echo "${ECHO_T}$ac_cv_lib_cpgplot_cpgopen" >&6
4789if test $ac_cv_lib_cpgplot_cpgopen = yes; then
4790  PGPLOTLIB="-lcpgplot $PGPLOTLIB"
4791else
4792  PGPLOTLIB=
4793fi
4794
4795
4796if test "x$PGPLOTLIB" = x; then
4797  { { echo "$as_me:$LINENO: error:
4798    -------------------------------------------------------
4799    Could not find the PGPLOT library.
4800
4801    ERROR: Duchamp configuration failure.
4802    -------------------------------------------------------" >&5
4803echo "$as_me: error:
4804    -------------------------------------------------------
4805    Could not find the PGPLOT library.
4806
4807    ERROR: Duchamp configuration failure.
4808    -------------------------------------------------------" >&2;}
4809   { (exit 1); exit 1; }; }
4810else
4811  { echo "$as_me:$LINENO: PGPLOT appears to be available." >&5
4812echo "$as_me: PGPLOT appears to be available." >&6;}
4813
4814cat >>confdefs.h <<\_ACEOF
4815#define HAVE_PGPLOT 1
4816_ACEOF
4817
4818fi
4819
4820
4821
4822##########################################################################
4823
4824##########################################################################
4825# Search for CFITSIO.
4826for INCDIR in $INCDIRS ; do
4827  as_ac_File=`echo "ac_cv_file_$INCDIR/fitsio.h" | $as_tr_sh`
4828echo "$as_me:$LINENO: checking for $INCDIR/fitsio.h" >&5
4829echo $ECHO_N "checking for $INCDIR/fitsio.h... $ECHO_C" >&6
4830if eval "test \"\${$as_ac_File+set}\" = set"; then
4831  echo $ECHO_N "(cached) $ECHO_C" >&6
4832else
4833  test "$cross_compiling" = yes &&
4834  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4835echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4836   { (exit 1); exit 1; }; }
4837if test -r "$INCDIR/fitsio.h"; then
4838  eval "$as_ac_File=yes"
4839else
4840  eval "$as_ac_File=no"
4841fi
4842fi
4843echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4844echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4845if test `eval echo '${'$as_ac_File'}'` = yes; then
4846  CFITSIOINC=-I$INCDIR; break
4847fi
4848
4849  INCDIR=$INCDIR/cfitsio
4850  as_ac_File=`echo "ac_cv_file_$INCDIR/fitsio.h" | $as_tr_sh`
4851echo "$as_me:$LINENO: checking for $INCDIR/fitsio.h" >&5
4852echo $ECHO_N "checking for $INCDIR/fitsio.h... $ECHO_C" >&6
4853if eval "test \"\${$as_ac_File+set}\" = set"; then
4854  echo $ECHO_N "(cached) $ECHO_C" >&6
4855else
4856  test "$cross_compiling" = yes &&
4857  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4858echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4859   { (exit 1); exit 1; }; }
4860if test -r "$INCDIR/fitsio.h"; then
4861  eval "$as_ac_File=yes"
4862else
4863  eval "$as_ac_File=no"
4864fi
4865fi
4866echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4867echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4868if test `eval echo '${'$as_ac_File'}'` = yes; then
4869  CFITSIOINC=-I$INCDIR; break
4870fi
4871
4872done
4873
4874echo "$as_me:$LINENO: checking for recv in -lsocket" >&5
4875echo $ECHO_N "checking for recv in -lsocket... $ECHO_C" >&6
4876if test "${ac_cv_lib_socket_recv+set}" = set; then
4877  echo $ECHO_N "(cached) $ECHO_C" >&6
4878else
4879  ac_check_lib_save_LIBS=$LIBS
4880LIBS="-lsocket $LIBS $LIBS"
4881cat >conftest.$ac_ext <<_ACEOF
4882#line $LINENO "configure"
4883/* confdefs.h.  */
4884_ACEOF
4885cat confdefs.h >>conftest.$ac_ext
4886cat >>conftest.$ac_ext <<_ACEOF
4887/* end confdefs.h.  */
4888
4889/* Override any gcc2 internal prototype to avoid an error.  */
4890#ifdef __cplusplus
4891extern "C"
4892#endif
4893/* We use char because int might match the return type of a gcc2
4894   builtin and then its argument prototype would still apply.  */
4895char recv ();
4896int
4897main ()
4898{
4899recv ();
4900  ;
4901  return 0;
4902}
4903_ACEOF
4904rm -f conftest.$ac_objext conftest$ac_exeext
4905if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4906  (eval $ac_link) 2>&5
4907  ac_status=$?
4908  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4909  (exit $ac_status); } &&
4910         { ac_try='test -s conftest$ac_exeext'
4911  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4912  (eval $ac_try) 2>&5
4913  ac_status=$?
4914  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4915  (exit $ac_status); }; }; then
4916  ac_cv_lib_socket_recv=yes
4917else
4918  echo "$as_me: failed program was:" >&5
4919sed 's/^/| /' conftest.$ac_ext >&5
4920
4921ac_cv_lib_socket_recv=no
4922fi
4923rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4924LIBS=$ac_check_lib_save_LIBS
4925fi
4926echo "$as_me:$LINENO: result: $ac_cv_lib_socket_recv" >&5
4927echo "${ECHO_T}$ac_cv_lib_socket_recv" >&6
4928if test $ac_cv_lib_socket_recv = yes; then
4929  CFITSIOLIB="-lsocket"
4930fi
4931
4932echo "$as_me:$LINENO: checking for ffopen in -lcfitsio" >&5
4933echo $ECHO_N "checking for ffopen in -lcfitsio... $ECHO_C" >&6
4934if test "${ac_cv_lib_cfitsio_ffopen+set}" = set; then
4935  echo $ECHO_N "(cached) $ECHO_C" >&6
4936else
4937  ac_check_lib_save_LIBS=$LIBS
4938LIBS="-lcfitsio $CFITSIOLIB $LIBS $LIBS"
4939cat >conftest.$ac_ext <<_ACEOF
4940#line $LINENO "configure"
4941/* confdefs.h.  */
4942_ACEOF
4943cat confdefs.h >>conftest.$ac_ext
4944cat >>conftest.$ac_ext <<_ACEOF
4945/* end confdefs.h.  */
4946
4947/* Override any gcc2 internal prototype to avoid an error.  */
4948#ifdef __cplusplus
4949extern "C"
4950#endif
4951/* We use char because int might match the return type of a gcc2
4952   builtin and then its argument prototype would still apply.  */
4953char ffopen ();
4954int
4955main ()
4956{
4957ffopen ();
4958  ;
4959  return 0;
4960}
4961_ACEOF
4962rm -f conftest.$ac_objext conftest$ac_exeext
4963if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4964  (eval $ac_link) 2>&5
4965  ac_status=$?
4966  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4967  (exit $ac_status); } &&
4968         { ac_try='test -s conftest$ac_exeext'
4969  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4970  (eval $ac_try) 2>&5
4971  ac_status=$?
4972  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4973  (exit $ac_status); }; }; then
4974  ac_cv_lib_cfitsio_ffopen=yes
4975else
4976  echo "$as_me: failed program was:" >&5
4977sed 's/^/| /' conftest.$ac_ext >&5
4978
4979ac_cv_lib_cfitsio_ffopen=no
4980fi
4981rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4982LIBS=$ac_check_lib_save_LIBS
4983fi
4984echo "$as_me:$LINENO: result: $ac_cv_lib_cfitsio_ffopen" >&5
4985echo "${ECHO_T}$ac_cv_lib_cfitsio_ffopen" >&6
4986if test $ac_cv_lib_cfitsio_ffopen = yes; then
4987  CFITSIOLIB="-lcfitsio $CFITSIOLIB"
4988fi
4989
4990
4991if test "x$CFITSIOINC" = x -o "x$CFITSIOLIB" = x; then
4992  { { echo "$as_me:$LINENO: error:
4993    -------------------------------------------------------
4994    Could not find the CFITSIO library.
4995
4996    ERROR: Duchamp configuration failure.
4997    -------------------------------------------------------" >&5
4998echo "$as_me: error:
4999    -------------------------------------------------------
5000    Could not find the CFITSIO library.
5001
5002    ERROR: Duchamp configuration failure.
5003    -------------------------------------------------------" >&2;}
5004   { (exit 1); exit 1; }; }
5005else
5006  for LIBDIR in $LIBDIRS ; do
5007    as_ac_File=`echo "ac_cv_file_$LIBDIR/libcfitsio.a" | $as_tr_sh`
5008echo "$as_me:$LINENO: checking for $LIBDIR/libcfitsio.a" >&5
5009echo $ECHO_N "checking for $LIBDIR/libcfitsio.a... $ECHO_C" >&6
5010if eval "test \"\${$as_ac_File+set}\" = set"; then
5011  echo $ECHO_N "(cached) $ECHO_C" >&6
5012else
5013  test "$cross_compiling" = yes &&
5014  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5015echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5016   { (exit 1); exit 1; }; }
5017if test -r "$LIBDIR/libcfitsio.a"; then
5018  eval "$as_ac_File=yes"
5019else
5020  eval "$as_ac_File=no"
5021fi
5022fi
5023echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5024echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5025if test `eval echo '${'$as_ac_File'}'` = yes; then
5026  CFITSIOLIB="-L$LIBDIR $CFITSIOLIB"; break
5027fi
5028
5029    LIBDIR=$LIBDIR/cfitsio
5030    as_ac_File=`echo "ac_cv_file_$LIBDIR/libcfitsio.a" | $as_tr_sh`
5031echo "$as_me:$LINENO: checking for $LIBDIR/libcfitsio.a" >&5
5032echo $ECHO_N "checking for $LIBDIR/libcfitsio.a... $ECHO_C" >&6
5033if eval "test \"\${$as_ac_File+set}\" = set"; then
5034  echo $ECHO_N "(cached) $ECHO_C" >&6
5035else
5036  test "$cross_compiling" = yes &&
5037  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5038echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5039   { (exit 1); exit 1; }; }
5040if test -r "$LIBDIR/libcfitsio.a"; then
5041  eval "$as_ac_File=yes"
5042else
5043  eval "$as_ac_File=no"
5044fi
5045fi
5046echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5047echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5048if test `eval echo '${'$as_ac_File'}'` = yes; then
5049  CFITSIOLIB="-L$LIBDIR $CFITSIOLIB"; break
5050fi
5051
5052  done
5053  { echo "$as_me:$LINENO: CFITSIO appears to be available." >&5
5054echo "$as_me: CFITSIO appears to be available." >&6;}
5055
5056cat >>confdefs.h <<\_ACEOF
5057#define HAVE_CFITSIO 1
5058_ACEOF
5059
5060fi
5061
5062
5063
5064##########################################################################
5065
5066##########################################################################
5067# Search for WCSLIB.
5068for INCDIR in $INCDIRS ; do
5069  as_ac_File=`echo "ac_cv_file_$INCDIR/wcs.h" | $as_tr_sh`
5070echo "$as_me:$LINENO: checking for $INCDIR/wcs.h" >&5
5071echo $ECHO_N "checking for $INCDIR/wcs.h... $ECHO_C" >&6
5072if eval "test \"\${$as_ac_File+set}\" = set"; then
5073  echo $ECHO_N "(cached) $ECHO_C" >&6
5074else
5075  test "$cross_compiling" = yes &&
5076  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5077echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5078   { (exit 1); exit 1; }; }
5079if test -r "$INCDIR/wcs.h"; then
5080  eval "$as_ac_File=yes"
5081else
5082  eval "$as_ac_File=no"
5083fi
5084fi
5085echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5086echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5087if test `eval echo '${'$as_ac_File'}'` = yes; then
5088  WCSINC="-I$INCDIR $WCSINC"; break
5089fi
5090
5091  INCDIR=$INCDIR/wcslib
5092  as_ac_File=`echo "ac_cv_file_$INCDIR/wcs.h" | $as_tr_sh`
5093echo "$as_me:$LINENO: checking for $INCDIR/wcs.h" >&5
5094echo $ECHO_N "checking for $INCDIR/wcs.h... $ECHO_C" >&6
5095if eval "test \"\${$as_ac_File+set}\" = set"; then
5096  echo $ECHO_N "(cached) $ECHO_C" >&6
5097else
5098  test "$cross_compiling" = yes &&
5099  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5100echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5101   { (exit 1); exit 1; }; }
5102if test -r "$INCDIR/wcs.h"; then
5103  eval "$as_ac_File=yes"
5104else
5105  eval "$as_ac_File=no"
5106fi
5107fi
5108echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5109echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5110if test `eval echo '${'$as_ac_File'}'` = yes; then
5111  WCSINC="-I$INCDIR $WCSINC"; break
5112fi
5113
5114done
5115for INCDIR in $INCDIRS ; do
5116  as_ac_File=`echo "ac_cv_file_$INCDIR/cpgsbox.h" | $as_tr_sh`
5117echo "$as_me:$LINENO: checking for $INCDIR/cpgsbox.h" >&5
5118echo $ECHO_N "checking for $INCDIR/cpgsbox.h... $ECHO_C" >&6
5119if eval "test \"\${$as_ac_File+set}\" = set"; then
5120  echo $ECHO_N "(cached) $ECHO_C" >&6
5121else
5122  test "$cross_compiling" = yes &&
5123  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5124echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5125   { (exit 1); exit 1; }; }
5126if test -r "$INCDIR/cpgsbox.h"; then
5127  eval "$as_ac_File=yes"
5128else
5129  eval "$as_ac_File=no"
5130fi
5131fi
5132echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5133echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5134if test `eval echo '${'$as_ac_File'}'` = yes; then
5135  WCSINC="-I$INCDIR $WCSINC"; break
5136fi
5137
5138  INCDIR=$INCDIR/wcslib
5139  as_ac_File=`echo "ac_cv_file_$INCDIR/cpgsbox.h" | $as_tr_sh`
5140echo "$as_me:$LINENO: checking for $INCDIR/cpgsbox.h" >&5
5141echo $ECHO_N "checking for $INCDIR/cpgsbox.h... $ECHO_C" >&6
5142if eval "test \"\${$as_ac_File+set}\" = set"; then
5143  echo $ECHO_N "(cached) $ECHO_C" >&6
5144else
5145  test "$cross_compiling" = yes &&
5146  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5147echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5148   { (exit 1); exit 1; }; }
5149if test -r "$INCDIR/cpgsbox.h"; then
5150  eval "$as_ac_File=yes"
5151else
5152  eval "$as_ac_File=no"
5153fi
5154fi
5155echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5156echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5157if test `eval echo '${'$as_ac_File'}'` = yes; then
5158  WCSINC="-I$INCDIR $WCSINC"; break
5159fi
5160
5161done
5162
5163echo "$as_me:$LINENO: checking for wcss2p in -lwcs" >&5
5164echo $ECHO_N "checking for wcss2p in -lwcs... $ECHO_C" >&6
5165if test "${ac_cv_lib_wcs_wcss2p+set}" = set; then
5166  echo $ECHO_N "(cached) $ECHO_C" >&6
5167else
5168  ac_check_lib_save_LIBS=$LIBS
5169LIBS="-lwcs $WCSLIB $LIBS $CFITSIOLIB $PGPLOTLIB $LIBS"
5170cat >conftest.$ac_ext <<_ACEOF
5171#line $LINENO "configure"
5172/* confdefs.h.  */
5173_ACEOF
5174cat confdefs.h >>conftest.$ac_ext
5175cat >>conftest.$ac_ext <<_ACEOF
5176/* end confdefs.h.  */
5177
5178/* Override any gcc2 internal prototype to avoid an error.  */
5179#ifdef __cplusplus
5180extern "C"
5181#endif
5182/* We use char because int might match the return type of a gcc2
5183   builtin and then its argument prototype would still apply.  */
5184char wcss2p ();
5185int
5186main ()
5187{
5188wcss2p ();
5189  ;
5190  return 0;
5191}
5192_ACEOF
5193rm -f conftest.$ac_objext conftest$ac_exeext
5194if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5195  (eval $ac_link) 2>&5
5196  ac_status=$?
5197  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5198  (exit $ac_status); } &&
5199         { ac_try='test -s conftest$ac_exeext'
5200  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5201  (eval $ac_try) 2>&5
5202  ac_status=$?
5203  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5204  (exit $ac_status); }; }; then
5205  ac_cv_lib_wcs_wcss2p=yes
5206else
5207  echo "$as_me: failed program was:" >&5
5208sed 's/^/| /' conftest.$ac_ext >&5
5209
5210ac_cv_lib_wcs_wcss2p=no
5211fi
5212rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5213LIBS=$ac_check_lib_save_LIBS
5214fi
5215echo "$as_me:$LINENO: result: $ac_cv_lib_wcs_wcss2p" >&5
5216echo "${ECHO_T}$ac_cv_lib_wcs_wcss2p" >&6
5217if test $ac_cv_lib_wcs_wcss2p = yes; then
5218  WCSLIB="-lwcs $WCSLIB"
5219fi
5220
5221echo "$as_me:$LINENO: checking for cpgsbox in -lpgsbox" >&5
5222echo $ECHO_N "checking for cpgsbox in -lpgsbox... $ECHO_C" >&6
5223if test "${ac_cv_lib_pgsbox_cpgsbox+set}" = set; then
5224  echo $ECHO_N "(cached) $ECHO_C" >&6
5225else
5226  ac_check_lib_save_LIBS=$LIBS
5227LIBS="-lpgsbox $WCSLIB $LIBS $CFITSIOLIB $PGPLOTLIB $LIBS"
5228cat >conftest.$ac_ext <<_ACEOF
5229#line $LINENO "configure"
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 cpgsbox ();
5243int
5244main ()
5245{
5246cpgsbox ();
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>&5
5254  ac_status=$?
5255  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5256  (exit $ac_status); } &&
5257         { ac_try='test -s conftest$ac_exeext'
5258  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5259  (eval $ac_try) 2>&5
5260  ac_status=$?
5261  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5262  (exit $ac_status); }; }; then
5263  ac_cv_lib_pgsbox_cpgsbox=yes
5264else
5265  echo "$as_me: failed program was:" >&5
5266sed 's/^/| /' conftest.$ac_ext >&5
5267
5268ac_cv_lib_pgsbox_cpgsbox=no
5269fi
5270rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5271LIBS=$ac_check_lib_save_LIBS
5272fi
5273echo "$as_me:$LINENO: result: $ac_cv_lib_pgsbox_cpgsbox" >&5
5274echo "${ECHO_T}$ac_cv_lib_pgsbox_cpgsbox" >&6
5275if test $ac_cv_lib_pgsbox_cpgsbox = yes; then
5276  WCSLIB="-lpgsbox $WCSLIB"
5277fi
5278
5279
5280if test "x$WCSINC" = x -o "x$WCSLIB" = x; then
5281  { { echo "$as_me:$LINENO: error:
5282    -------------------------------------------------------
5283    Could not find the WCSLIB library.
5284
5285    ERROR: Duchamp configuration failure.
5286    -------------------------------------------------------" >&5
5287echo "$as_me: error:
5288    -------------------------------------------------------
5289    Could not find the WCSLIB library.
5290
5291    ERROR: Duchamp configuration failure.
5292    -------------------------------------------------------" >&2;}
5293   { (exit 1); exit 1; }; }
5294else
5295  for LIBDIR in $LIBDIRS ; do
5296    as_ac_File=`echo "ac_cv_file_$LIBDIR/libwcs.a" | $as_tr_sh`
5297echo "$as_me:$LINENO: checking for $LIBDIR/libwcs.a" >&5
5298echo $ECHO_N "checking for $LIBDIR/libwcs.a... $ECHO_C" >&6
5299if eval "test \"\${$as_ac_File+set}\" = set"; then
5300  echo $ECHO_N "(cached) $ECHO_C" >&6
5301else
5302  test "$cross_compiling" = yes &&
5303  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5304echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5305   { (exit 1); exit 1; }; }
5306if test -r "$LIBDIR/libwcs.a"; then
5307  eval "$as_ac_File=yes"
5308else
5309  eval "$as_ac_File=no"
5310fi
5311fi
5312echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5313echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5314if test `eval echo '${'$as_ac_File'}'` = yes; then
5315  WCSLIB="-L$LIBDIR $WCSLIB"; break
5316fi
5317
5318    LIBDIR=$LIBDIR/wcs
5319    as_ac_File=`echo "ac_cv_file_$LIBDIR/libwcs.a" | $as_tr_sh`
5320echo "$as_me:$LINENO: checking for $LIBDIR/libwcs.a" >&5
5321echo $ECHO_N "checking for $LIBDIR/libwcs.a... $ECHO_C" >&6
5322if eval "test \"\${$as_ac_File+set}\" = set"; then
5323  echo $ECHO_N "(cached) $ECHO_C" >&6
5324else
5325  test "$cross_compiling" = yes &&
5326  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5327echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5328   { (exit 1); exit 1; }; }
5329if test -r "$LIBDIR/libwcs.a"; then
5330  eval "$as_ac_File=yes"
5331else
5332  eval "$as_ac_File=no"
5333fi
5334fi
5335echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5336echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5337if test `eval echo '${'$as_ac_File'}'` = yes; then
5338  WCSLIB="-L$LIBDIR $WCSLIB"; break
5339fi
5340
5341  done
5342  for LIBDIR in $LIBDIRS ; do
5343    as_ac_File=`echo "ac_cv_file_$LIBDIR/libpgsbox.a" | $as_tr_sh`
5344echo "$as_me:$LINENO: checking for $LIBDIR/libpgsbox.a" >&5
5345echo $ECHO_N "checking for $LIBDIR/libpgsbox.a... $ECHO_C" >&6
5346if eval "test \"\${$as_ac_File+set}\" = set"; then
5347  echo $ECHO_N "(cached) $ECHO_C" >&6
5348else
5349  test "$cross_compiling" = yes &&
5350  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5351echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5352   { (exit 1); exit 1; }; }
5353if test -r "$LIBDIR/libpgsbox.a"; then
5354  eval "$as_ac_File=yes"
5355else
5356  eval "$as_ac_File=no"
5357fi
5358fi
5359echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5360echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5361if test `eval echo '${'$as_ac_File'}'` = yes; then
5362  WCSLIB="-L$LIBDIR $WCSLIB"; break
5363fi
5364
5365    LIBDIR=$LIBDIR/wcs
5366    as_ac_File=`echo "ac_cv_file_$LIBDIR/libpgsbox.a" | $as_tr_sh`
5367echo "$as_me:$LINENO: checking for $LIBDIR/libpgsbox.a" >&5
5368echo $ECHO_N "checking for $LIBDIR/libpgsbox.a... $ECHO_C" >&6
5369if eval "test \"\${$as_ac_File+set}\" = set"; then
5370  echo $ECHO_N "(cached) $ECHO_C" >&6
5371else
5372  test "$cross_compiling" = yes &&
5373  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5374echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5375   { (exit 1); exit 1; }; }
5376if test -r "$LIBDIR/libpgsbox.a"; then
5377  eval "$as_ac_File=yes"
5378else
5379  eval "$as_ac_File=no"
5380fi
5381fi
5382echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5383echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5384if test `eval echo '${'$as_ac_File'}'` = yes; then
5385  WCSLIB="-L$LIBDIR $WCSLIB"; break
5386fi
5387
5388  done
5389  { echo "$as_me:$LINENO: WCSLIB appears to be available." >&5
5390echo "$as_me: WCSLIB appears to be available." >&6;}
5391
5392cat >>confdefs.h <<\_ACEOF
5393#define HAVE_WCSLIB 1
5394_ACEOF
5395
5396fi
5397
5398
5399
5400##########################################################################
5401
5402
5403
5404          ac_config_files="$ac_config_files Makefile"
5405
5406cat >confcache <<\_ACEOF
5407# This file is a shell script that caches the results of configure
5408# tests run on this system so they can be shared between configure
5409# scripts and configure runs, see configure's option --config-cache.
5410# It is not useful on other systems.  If it contains results you don't
5411# want to keep, you may remove or edit it.
5412#
5413# config.status only pays attention to the cache file if you give it
5414# the --recheck option to rerun configure.
5415#
5416# `ac_cv_env_foo' variables (set or unset) will be overridden when
5417# loading this file, other *unset* `ac_cv_foo' will be assigned the
5418# following values.
5419
5420_ACEOF
5421
5422# The following way of writing the cache mishandles newlines in values,
5423# but we know of no workaround that is simple, portable, and efficient.
5424# So, don't put newlines in cache variables' values.
5425# Ultrix sh set writes to stderr and can't be redirected directly,
5426# and sets the high bit in the cache file unless we assign to the vars.
5427{
5428  (set) 2>&1 |
5429    case `(ac_space=' '; set | grep ac_space) 2>&1` in
5430    *ac_space=\ *)
5431      # `set' does not quote correctly, so add quotes (double-quote
5432      # substitution turns \\\\ into \\, and sed turns \\ into \).
5433      sed -n \
5434        "s/'/'\\\\''/g;
5435          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5436      ;;
5437    *)
5438      # `set' quotes correctly as required by POSIX, so do not add quotes.
5439      sed -n \
5440        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
5441      ;;
5442    esac;
5443} |
5444  sed '
5445     t clear
5446     : clear
5447     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
5448     t end
5449     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
5450     : end' >>confcache
5451if diff $cache_file confcache >/dev/null 2>&1; then :; else
5452  if test -w $cache_file; then
5453    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
5454    cat confcache >$cache_file
5455  else
5456    echo "not updating unwritable cache $cache_file"
5457  fi
5458fi
5459rm -f confcache
5460
5461test "x$prefix" = xNONE && prefix=$ac_default_prefix
5462# Let make expand exec_prefix.
5463test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5464
5465# VPATH may cause trouble with some makes, so we remove $(srcdir),
5466# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
5467# trailing colons and then remove the whole line if VPATH becomes empty
5468# (actually we leave an empty line to preserve line numbers).
5469if test "x$srcdir" = x.; then
5470  ac_vpsub='/^[         ]*VPATH[        ]*=/{
5471s/:*\$(srcdir):*/:/;
5472s/:*\${srcdir}:*/:/;
5473s/:*@srcdir@:*/:/;
5474s/^\([^=]*=[    ]*\):*/\1/;
5475s/:*$//;
5476s/^[^=]*=[      ]*$//;
5477}'
5478fi
5479
5480DEFS=-DHAVE_CONFIG_H
5481
5482ac_libobjs=
5483ac_ltlibobjs=
5484for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
5485  # 1. Remove the extension, and $U if already installed.
5486  ac_i=`echo "$ac_i" |
5487         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
5488  # 2. Add them.
5489  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
5490  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
5491done
5492LIBOBJS=$ac_libobjs
5493
5494LTLIBOBJS=$ac_ltlibobjs
5495
5496
5497
5498: ${CONFIG_STATUS=./config.status}
5499ac_clean_files_save=$ac_clean_files
5500ac_clean_files="$ac_clean_files $CONFIG_STATUS"
5501{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
5502echo "$as_me: creating $CONFIG_STATUS" >&6;}
5503cat >$CONFIG_STATUS <<_ACEOF
5504#! $SHELL
5505# Generated by $as_me.
5506# Run this file to recreate the current configuration.
5507# Compiler output produced by configure, useful for debugging
5508# configure, is in config.log if it exists.
5509
5510debug=false
5511ac_cs_recheck=false
5512ac_cs_silent=false
5513SHELL=\${CONFIG_SHELL-$SHELL}
5514_ACEOF
5515
5516cat >>$CONFIG_STATUS <<\_ACEOF
5517## --------------------- ##
5518## M4sh Initialization.  ##
5519## --------------------- ##
5520
5521# Be Bourne compatible
5522if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
5523  emulate sh
5524  NULLCMD=:
5525  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
5526  # is contrary to our usage.  Disable this feature.
5527  alias -g '${1+"$@"}'='"$@"'
5528elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
5529  set -o posix
5530fi
5531
5532# Support unset when possible.
5533if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
5534  as_unset=unset
5535else
5536  as_unset=false
5537fi
5538
5539
5540# Work around bugs in pre-3.0 UWIN ksh.
5541$as_unset ENV MAIL MAILPATH
5542PS1='$ '
5543PS2='> '
5544PS4='+ '
5545
5546# NLS nuisances.
5547for as_var in \
5548  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
5549  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
5550  LC_TELEPHONE LC_TIME
5551do
5552  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
5553    eval $as_var=C; export $as_var
5554  else
5555    $as_unset $as_var
5556  fi
5557done
5558
5559# Required to use basename.
5560if expr a : '\(a\)' >/dev/null 2>&1; then
5561  as_expr=expr
5562else
5563  as_expr=false
5564fi
5565
5566if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
5567  as_basename=basename
5568else
5569  as_basename=false
5570fi
5571
5572
5573# Name of the executable.
5574as_me=`$as_basename "$0" ||
5575$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
5576         X"$0" : 'X\(//\)$' \| \
5577         X"$0" : 'X\(/\)$' \| \
5578         .     : '\(.\)' 2>/dev/null ||
5579echo X/"$0" |
5580    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
5581          /^X\/\(\/\/\)$/{ s//\1/; q; }
5582          /^X\/\(\/\).*/{ s//\1/; q; }
5583          s/.*/./; q'`
5584
5585
5586# PATH needs CR, and LINENO needs CR and PATH.
5587# Avoid depending upon Character Ranges.
5588as_cr_letters='abcdefghijklmnopqrstuvwxyz'
5589as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
5590as_cr_Letters=$as_cr_letters$as_cr_LETTERS
5591as_cr_digits='0123456789'
5592as_cr_alnum=$as_cr_Letters$as_cr_digits
5593
5594# The user is always right.
5595if test "${PATH_SEPARATOR+set}" != set; then
5596  echo "#! /bin/sh" >conf$$.sh
5597  echo  "exit 0"   >>conf$$.sh
5598  chmod +x conf$$.sh
5599  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
5600    PATH_SEPARATOR=';'
5601  else
5602    PATH_SEPARATOR=:
5603  fi
5604  rm -f conf$$.sh
5605fi
5606
5607
5608  as_lineno_1=$LINENO
5609  as_lineno_2=$LINENO
5610  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
5611  test "x$as_lineno_1" != "x$as_lineno_2" &&
5612  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
5613  # Find who we are.  Look in the path if we contain no path at all
5614  # relative or not.
5615  case $0 in
5616    *[\\/]* ) as_myself=$0 ;;
5617    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5618for as_dir in $PATH
5619do
5620  IFS=$as_save_IFS
5621  test -z "$as_dir" && as_dir=.
5622  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
5623done
5624
5625       ;;
5626  esac
5627  # We did not find ourselves, most probably we were run as `sh COMMAND'
5628  # in which case we are not to be found in the path.
5629  if test "x$as_myself" = x; then
5630    as_myself=$0
5631  fi
5632  if test ! -f "$as_myself"; then
5633    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
5634echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
5635   { (exit 1); exit 1; }; }
5636  fi
5637  case $CONFIG_SHELL in
5638  '')
5639    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5640for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
5641do
5642  IFS=$as_save_IFS
5643  test -z "$as_dir" && as_dir=.
5644  for as_base in sh bash ksh sh5; do
5645         case $as_dir in
5646         /*)
5647           if ("$as_dir/$as_base" -c '
5648  as_lineno_1=$LINENO
5649  as_lineno_2=$LINENO
5650  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
5651  test "x$as_lineno_1" != "x$as_lineno_2" &&
5652  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
5653             $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
5654             $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
5655             CONFIG_SHELL=$as_dir/$as_base
5656             export CONFIG_SHELL
5657             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
5658           fi;;
5659         esac
5660       done
5661done
5662;;
5663  esac
5664
5665  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
5666  # uniformly replaced by the line number.  The first 'sed' inserts a
5667  # line-number line before each line; the second 'sed' does the real
5668  # work.  The second script uses 'N' to pair each line-number line
5669  # with the numbered line, and appends trailing '-' during
5670  # substitution so that $LINENO is not a special case at line end.
5671  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
5672  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
5673  sed '=' <$as_myself |
5674    sed '
5675      N
5676      s,$,-,
5677      : loop
5678      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
5679      t loop
5680      s,-$,,
5681      s,^['$as_cr_digits']*\n,,
5682    ' >$as_me.lineno &&
5683  chmod +x $as_me.lineno ||
5684    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
5685echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
5686   { (exit 1); exit 1; }; }
5687
5688  # Don't try to exec as it changes $[0], causing all sort of problems
5689  # (the dirname of $[0] is not the place where we might find the
5690  # original and so on.  Autoconf is especially sensible to this).
5691  . ./$as_me.lineno
5692  # Exit status is that of the last command.
5693  exit
5694}
5695
5696
5697case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
5698  *c*,-n*) ECHO_N= ECHO_C='
5699' ECHO_T='      ' ;;
5700  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
5701  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
5702esac
5703
5704if expr a : '\(a\)' >/dev/null 2>&1; then
5705  as_expr=expr
5706else
5707  as_expr=false
5708fi
5709
5710rm -f conf$$ conf$$.exe conf$$.file
5711echo >conf$$.file
5712if ln -s conf$$.file conf$$ 2>/dev/null; then
5713  # We could just check for DJGPP; but this test a) works b) is more generic
5714  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
5715  if test -f conf$$.exe; then
5716    # Don't use ln at all; we don't have any links
5717    as_ln_s='cp -p'
5718  else
5719    as_ln_s='ln -s'
5720  fi
5721elif ln conf$$.file conf$$ 2>/dev/null; then
5722  as_ln_s=ln
5723else
5724  as_ln_s='cp -p'
5725fi
5726rm -f conf$$ conf$$.exe conf$$.file
5727
5728if mkdir -p . 2>/dev/null; then
5729  as_mkdir_p=:
5730else
5731  as_mkdir_p=false
5732fi
5733
5734as_executable_p="test -f"
5735
5736# Sed expression to map a string onto a valid CPP name.
5737as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
5738
5739# Sed expression to map a string onto a valid variable name.
5740as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
5741
5742
5743# IFS
5744# We need space, tab and new line, in precisely that order.
5745as_nl='
5746'
5747IFS="   $as_nl"
5748
5749# CDPATH.
5750$as_unset CDPATH
5751
5752exec 6>&1
5753
5754# Open the log real soon, to keep \$[0] and so on meaningful, and to
5755# report actual input values of CONFIG_FILES etc. instead of their
5756# values after options handling.  Logging --version etc. is OK.
5757exec 5>>config.log
5758{
5759  echo
5760  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
5761## Running $as_me. ##
5762_ASBOX
5763} >&5
5764cat >&5 <<_CSEOF
5765
5766This file was extended by Duchamp $as_me 1.0.5, which was
5767generated by GNU Autoconf 2.57.  Invocation command line was
5768
5769  CONFIG_FILES    = $CONFIG_FILES
5770  CONFIG_HEADERS  = $CONFIG_HEADERS
5771  CONFIG_LINKS    = $CONFIG_LINKS
5772  CONFIG_COMMANDS = $CONFIG_COMMANDS
5773  $ $0 $@
5774
5775_CSEOF
5776echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
5777echo >&5
5778_ACEOF
5779
5780# Files that config.status was made for.
5781if test -n "$ac_config_files"; then
5782  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
5783fi
5784
5785if test -n "$ac_config_headers"; then
5786  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
5787fi
5788
5789if test -n "$ac_config_links"; then
5790  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
5791fi
5792
5793if test -n "$ac_config_commands"; then
5794  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
5795fi
5796
5797cat >>$CONFIG_STATUS <<\_ACEOF
5798
5799ac_cs_usage="\
5800\`$as_me' instantiates files from templates according to the
5801current configuration.
5802
5803Usage: $0 [OPTIONS] [FILE]...
5804
5805  -h, --help       print this help, then exit
5806  -V, --version    print version number, then exit
5807  -q, --quiet      do not print progress messages
5808  -d, --debug      don't remove temporary files
5809      --recheck    update $as_me by reconfiguring in the same conditions
5810  --file=FILE[:TEMPLATE]
5811                   instantiate the configuration file FILE
5812  --header=FILE[:TEMPLATE]
5813                   instantiate the configuration header FILE
5814
5815Configuration files:
5816$config_files
5817
5818Configuration headers:
5819$config_headers
5820
5821Report bugs to <bug-autoconf@gnu.org>."
5822_ACEOF
5823
5824cat >>$CONFIG_STATUS <<_ACEOF
5825ac_cs_version="\\
5826Duchamp config.status 1.0.5
5827configured by $0, generated by GNU Autoconf 2.57,
5828  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
5829
5830Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
5831Free Software Foundation, Inc.
5832This config.status script is free software; the Free Software Foundation
5833gives unlimited permission to copy, distribute and modify it."
5834srcdir=$srcdir
5835_ACEOF
5836
5837cat >>$CONFIG_STATUS <<\_ACEOF
5838# If no file are specified by the user, then we need to provide default
5839# value.  By we need to know if files were specified by the user.
5840ac_need_defaults=:
5841while test $# != 0
5842do
5843  case $1 in
5844  --*=*)
5845    ac_option=`expr "x$1" : 'x\([^=]*\)='`
5846    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
5847    ac_shift=:
5848    ;;
5849  -*)
5850    ac_option=$1
5851    ac_optarg=$2
5852    ac_shift=shift
5853    ;;
5854  *) # This is not an option, so the user has probably given explicit
5855     # arguments.
5856     ac_option=$1
5857     ac_need_defaults=false;;
5858  esac
5859
5860  case $ac_option in
5861  # Handling of the options.
5862_ACEOF
5863cat >>$CONFIG_STATUS <<\_ACEOF
5864  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5865    ac_cs_recheck=: ;;
5866  --version | --vers* | -V )
5867    echo "$ac_cs_version"; exit 0 ;;
5868  --he | --h)
5869    # Conflict between --help and --header
5870    { { echo "$as_me:$LINENO: error: ambiguous option: $1
5871Try \`$0 --help' for more information." >&5
5872echo "$as_me: error: ambiguous option: $1
5873Try \`$0 --help' for more information." >&2;}
5874   { (exit 1); exit 1; }; };;
5875  --help | --hel | -h )
5876    echo "$ac_cs_usage"; exit 0 ;;
5877  --debug | --d* | -d )
5878    debug=: ;;
5879  --file | --fil | --fi | --f )
5880    $ac_shift
5881    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
5882    ac_need_defaults=false;;
5883  --header | --heade | --head | --hea )
5884    $ac_shift
5885    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
5886    ac_need_defaults=false;;
5887  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
5888  | -silent | --silent | --silen | --sile | --sil | --si | --s)
5889    ac_cs_silent=: ;;
5890
5891  # This is an error.
5892  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
5893Try \`$0 --help' for more information." >&5
5894echo "$as_me: error: unrecognized option: $1
5895Try \`$0 --help' for more information." >&2;}
5896   { (exit 1); exit 1; }; } ;;
5897
5898  *) ac_config_targets="$ac_config_targets $1" ;;
5899
5900  esac
5901  shift
5902done
5903
5904ac_configure_extra_args=
5905
5906if $ac_cs_silent; then
5907  exec 6>/dev/null
5908  ac_configure_extra_args="$ac_configure_extra_args --silent"
5909fi
5910
5911_ACEOF
5912cat >>$CONFIG_STATUS <<_ACEOF
5913if \$ac_cs_recheck; then
5914  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
5915  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
5916fi
5917
5918_ACEOF
5919
5920
5921
5922
5923
5924cat >>$CONFIG_STATUS <<\_ACEOF
5925for ac_config_target in $ac_config_targets
5926do
5927  case "$ac_config_target" in
5928  # Handling of arguments.
5929  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
5930  "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
5931  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
5932echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
5933   { (exit 1); exit 1; }; };;
5934  esac
5935done
5936
5937# If the user did not use the arguments to specify the items to instantiate,
5938# then the envvar interface is used.  Set only those that are not.
5939# We use the long form for the default assignment because of an extremely
5940# bizarre bug on SunOS 4.1.3.
5941if $ac_need_defaults; then
5942  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
5943  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
5944fi
5945
5946# Have a temporary directory for convenience.  Make it in the build tree
5947# simply because there is no reason to put it here, and in addition,
5948# creating and moving files from /tmp can sometimes cause problems.
5949# Create a temporary directory, and hook for its removal unless debugging.
5950$debug ||
5951{
5952  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
5953  trap '{ (exit 1); exit 1; }' 1 2 13 15
5954}
5955
5956# Create a (secure) tmp directory for tmp files.
5957
5958{
5959  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
5960  test -n "$tmp" && test -d "$tmp"
5961}  ||
5962{
5963  tmp=./confstat$$-$RANDOM
5964  (umask 077 && mkdir $tmp)
5965} ||
5966{
5967   echo "$me: cannot create a temporary directory in ." >&2
5968   { (exit 1); exit 1; }
5969}
5970
5971_ACEOF
5972
5973cat >>$CONFIG_STATUS <<_ACEOF
5974
5975#
5976# CONFIG_FILES section.
5977#
5978
5979# No need to generate the scripts if there are no CONFIG_FILES.
5980# This happens for instance when ./config.status config.h
5981if test -n "\$CONFIG_FILES"; then
5982  # Protect against being on the right side of a sed subst in config.status.
5983  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
5984   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
5985s,@SHELL@,$SHELL,;t t
5986s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
5987s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
5988s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
5989s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
5990s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
5991s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
5992s,@exec_prefix@,$exec_prefix,;t t
5993s,@prefix@,$prefix,;t t
5994s,@program_transform_name@,$program_transform_name,;t t
5995s,@bindir@,$bindir,;t t
5996s,@sbindir@,$sbindir,;t t
5997s,@libexecdir@,$libexecdir,;t t
5998s,@datadir@,$datadir,;t t
5999s,@sysconfdir@,$sysconfdir,;t t
6000s,@sharedstatedir@,$sharedstatedir,;t t
6001s,@localstatedir@,$localstatedir,;t t
6002s,@libdir@,$libdir,;t t
6003s,@includedir@,$includedir,;t t
6004s,@oldincludedir@,$oldincludedir,;t t
6005s,@infodir@,$infodir,;t t
6006s,@mandir@,$mandir,;t t
6007s,@build_alias@,$build_alias,;t t
6008s,@host_alias@,$host_alias,;t t
6009s,@target_alias@,$target_alias,;t t
6010s,@DEFS@,$DEFS,;t t
6011s,@ECHO_C@,$ECHO_C,;t t
6012s,@ECHO_N@,$ECHO_N,;t t
6013s,@ECHO_T@,$ECHO_T,;t t
6014s,@LIBS@,$LIBS,;t t
6015s,@CXX@,$CXX,;t t
6016s,@CXXFLAGS@,$CXXFLAGS,;t t
6017s,@LDFLAGS@,$LDFLAGS,;t t
6018s,@CPPFLAGS@,$CPPFLAGS,;t t
6019s,@ac_ct_CXX@,$ac_ct_CXX,;t t
6020s,@EXEEXT@,$EXEEXT,;t t
6021s,@OBJEXT@,$OBJEXT,;t t
6022s,@CC@,$CC,;t t
6023s,@CFLAGS@,$CFLAGS,;t t
6024s,@ac_ct_CC@,$ac_ct_CC,;t t
6025s,@CPP@,$CPP,;t t
6026s,@EGREP@,$EGREP,;t t
6027s,@RANLIB@,$RANLIB,;t t
6028s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
6029s,@POW_LIB@,$POW_LIB,;t t
6030s,@LIBOBJS@,$LIBOBJS,;t t
6031s,@PGPLOTINC@,$PGPLOTINC,;t t
6032s,@PGPLOTLIB@,$PGPLOTLIB,;t t
6033s,@CFITSIOINC@,$CFITSIOINC,;t t
6034s,@CFITSIOLIB@,$CFITSIOLIB,;t t
6035s,@WCSINC@,$WCSINC,;t t
6036s,@WCSLIB@,$WCSLIB,;t t
6037s,@LTLIBOBJS@,$LTLIBOBJS,;t t
6038CEOF
6039
6040_ACEOF
6041
6042  cat >>$CONFIG_STATUS <<\_ACEOF
6043  # Split the substitutions into bite-sized pieces for seds with
6044  # small command number limits, like on Digital OSF/1 and HP-UX.
6045  ac_max_sed_lines=48
6046  ac_sed_frag=1 # Number of current file.
6047  ac_beg=1 # First line for current file.
6048  ac_end=$ac_max_sed_lines # Line after last line for current file.
6049  ac_more_lines=:
6050  ac_sed_cmds=
6051  while $ac_more_lines; do
6052    if test $ac_beg -gt 1; then
6053      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
6054    else
6055      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
6056    fi
6057    if test ! -s $tmp/subs.frag; then
6058      ac_more_lines=false
6059    else
6060      # The purpose of the label and of the branching condition is to
6061      # speed up the sed processing (if there are no `@' at all, there
6062      # is no need to browse any of the substitutions).
6063      # These are the two extra sed commands mentioned above.
6064      (echo ':t
6065  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
6066      if test -z "$ac_sed_cmds"; then
6067        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
6068      else
6069        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
6070      fi
6071      ac_sed_frag=`expr $ac_sed_frag + 1`
6072      ac_beg=$ac_end
6073      ac_end=`expr $ac_end + $ac_max_sed_lines`
6074    fi
6075  done
6076  if test -z "$ac_sed_cmds"; then
6077    ac_sed_cmds=cat
6078  fi
6079fi # test -n "$CONFIG_FILES"
6080
6081_ACEOF
6082cat >>$CONFIG_STATUS <<\_ACEOF
6083for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
6084  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6085  case $ac_file in
6086  - | *:- | *:-:* ) # input from stdin
6087        cat >$tmp/stdin
6088        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
6089        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
6090  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
6091        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
6092  * )   ac_file_in=$ac_file.in ;;
6093  esac
6094
6095  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
6096  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
6097$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6098         X"$ac_file" : 'X\(//\)[^/]' \| \
6099         X"$ac_file" : 'X\(//\)$' \| \
6100         X"$ac_file" : 'X\(/\)' \| \
6101         .     : '\(.\)' 2>/dev/null ||
6102echo X"$ac_file" |
6103    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
6104          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
6105          /^X\(\/\/\)$/{ s//\1/; q; }
6106          /^X\(\/\).*/{ s//\1/; q; }
6107          s/.*/./; q'`
6108  { if $as_mkdir_p; then
6109    mkdir -p "$ac_dir"
6110  else
6111    as_dir="$ac_dir"
6112    as_dirs=
6113    while test ! -d "$as_dir"; do
6114      as_dirs="$as_dir $as_dirs"
6115      as_dir=`(dirname "$as_dir") 2>/dev/null ||
6116$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6117         X"$as_dir" : 'X\(//\)[^/]' \| \
6118         X"$as_dir" : 'X\(//\)$' \| \
6119         X"$as_dir" : 'X\(/\)' \| \
6120         .     : '\(.\)' 2>/dev/null ||
6121echo X"$as_dir" |
6122    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
6123          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
6124          /^X\(\/\/\)$/{ s//\1/; q; }
6125          /^X\(\/\).*/{ s//\1/; q; }
6126          s/.*/./; q'`
6127    done
6128    test ! -n "$as_dirs" || mkdir $as_dirs
6129  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
6130echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
6131   { (exit 1); exit 1; }; }; }
6132
6133  ac_builddir=.
6134
6135if test "$ac_dir" != .; then
6136  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
6137  # A "../" for each directory in $ac_dir_suffix.
6138  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
6139else
6140  ac_dir_suffix= ac_top_builddir=
6141fi
6142
6143case $srcdir in
6144  .)  # No --srcdir option.  We are building in place.
6145    ac_srcdir=.
6146    if test -z "$ac_top_builddir"; then
6147       ac_top_srcdir=.
6148    else
6149       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
6150    fi ;;
6151  [\\/]* | ?:[\\/]* )  # Absolute path.
6152    ac_srcdir=$srcdir$ac_dir_suffix;
6153    ac_top_srcdir=$srcdir ;;
6154  *) # Relative path.
6155    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
6156    ac_top_srcdir=$ac_top_builddir$srcdir ;;
6157esac
6158# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
6159# absolute.
6160ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6161ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
6162ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
6163ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
6164
6165
6166
6167  if test x"$ac_file" != x-; then
6168    { echo "$as_me:$LINENO: creating $ac_file" >&5
6169echo "$as_me: creating $ac_file" >&6;}
6170    rm -f "$ac_file"
6171  fi
6172  # Let's still pretend it is `configure' which instantiates (i.e., don't
6173  # use $as_me), people would be surprised to read:
6174  #    /* config.h.  Generated by config.status.  */
6175  if test x"$ac_file" = x-; then
6176    configure_input=
6177  else
6178    configure_input="$ac_file.  "
6179  fi
6180  configure_input=$configure_input"Generated from `echo $ac_file_in |
6181                                     sed 's,.*/,,'` by configure."
6182
6183  # First look for the input files in the build tree, otherwise in the
6184  # src tree.
6185  ac_file_inputs=`IFS=:
6186    for f in $ac_file_in; do
6187      case $f in
6188      -) echo $tmp/stdin ;;
6189      [\\/$]*)
6190         # Absolute (can't be DOS-style, as IFS=:)
6191         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
6192echo "$as_me: error: cannot find input file: $f" >&2;}
6193   { (exit 1); exit 1; }; }
6194         echo $f;;
6195      *) # Relative
6196         if test -f "$f"; then
6197           # Build tree
6198           echo $f
6199         elif test -f "$srcdir/$f"; then
6200           # Source tree
6201           echo $srcdir/$f
6202         else
6203           # /dev/null tree
6204           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
6205echo "$as_me: error: cannot find input file: $f" >&2;}
6206   { (exit 1); exit 1; }; }
6207         fi;;
6208      esac
6209    done` || { (exit 1); exit 1; }
6210_ACEOF
6211cat >>$CONFIG_STATUS <<_ACEOF
6212  sed "$ac_vpsub
6213$extrasub
6214_ACEOF
6215cat >>$CONFIG_STATUS <<\_ACEOF
6216:t
6217/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
6218s,@configure_input@,$configure_input,;t t
6219s,@srcdir@,$ac_srcdir,;t t
6220s,@abs_srcdir@,$ac_abs_srcdir,;t t
6221s,@top_srcdir@,$ac_top_srcdir,;t t
6222s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
6223s,@builddir@,$ac_builddir,;t t
6224s,@abs_builddir@,$ac_abs_builddir,;t t
6225s,@top_builddir@,$ac_top_builddir,;t t
6226s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
6227" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
6228  rm -f $tmp/stdin
6229  if test x"$ac_file" != x-; then
6230    mv $tmp/out $ac_file
6231  else
6232    cat $tmp/out
6233    rm -f $tmp/out
6234  fi
6235
6236done
6237_ACEOF
6238cat >>$CONFIG_STATUS <<\_ACEOF
6239
6240#
6241# CONFIG_HEADER section.
6242#
6243
6244# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6245# NAME is the cpp macro being defined and VALUE is the value it is being given.
6246#
6247# ac_d sets the value in "#define NAME VALUE" lines.
6248ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6249ac_dB='[        ].*$,\1#\2'
6250ac_dC=' '
6251ac_dD=',;t'
6252# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6253ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6254ac_uB='$,\1#\2define\3'
6255ac_uC=' '
6256ac_uD=',;t'
6257
6258for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
6259  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6260  case $ac_file in
6261  - | *:- | *:-:* ) # input from stdin
6262        cat >$tmp/stdin
6263        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
6264        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
6265  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
6266        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
6267  * )   ac_file_in=$ac_file.in ;;
6268  esac
6269
6270  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
6271echo "$as_me: creating $ac_file" >&6;}
6272
6273  # First look for the input files in the build tree, otherwise in the
6274  # src tree.
6275  ac_file_inputs=`IFS=:
6276    for f in $ac_file_in; do
6277      case $f in
6278      -) echo $tmp/stdin ;;
6279      [\\/$]*)
6280         # Absolute (can't be DOS-style, as IFS=:)
6281         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
6282echo "$as_me: error: cannot find input file: $f" >&2;}
6283   { (exit 1); exit 1; }; }
6284         echo $f;;
6285      *) # Relative
6286         if test -f "$f"; then
6287           # Build tree
6288           echo $f
6289         elif test -f "$srcdir/$f"; then
6290           # Source tree
6291           echo $srcdir/$f
6292         else
6293           # /dev/null tree
6294           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
6295echo "$as_me: error: cannot find input file: $f" >&2;}
6296   { (exit 1); exit 1; }; }
6297         fi;;
6298      esac
6299    done` || { (exit 1); exit 1; }
6300  # Remove the trailing spaces.
6301  sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
6302
6303_ACEOF
6304
6305# Transform confdefs.h into two sed scripts, `conftest.defines' and
6306# `conftest.undefs', that substitutes the proper values into
6307# config.h.in to produce config.h.  The first handles `#define'
6308# templates, and the second `#undef' templates.
6309# And first: Protect against being on the right side of a sed subst in
6310# config.status.  Protect against being in an unquoted here document
6311# in config.status.
6312rm -f conftest.defines conftest.undefs
6313# Using a here document instead of a string reduces the quoting nightmare.
6314# Putting comments in sed scripts is not portable.
6315#
6316# `end' is used to avoid that the second main sed command (meant for
6317# 0-ary CPP macros) applies to n-ary macro definitions.
6318# See the Autoconf documentation for `clear'.
6319cat >confdef2sed.sed <<\_ACEOF
6320s/[\\&,]/\\&/g
6321s,[\\$`],\\&,g
6322t clear
6323: clear
6324s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
6325t end
6326s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
6327: end
6328_ACEOF
6329# If some macros were called several times there might be several times
6330# the same #defines, which is useless.  Nevertheless, we may not want to
6331# sort them, since we want the *last* AC-DEFINE to be honored.
6332uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
6333sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
6334rm -f confdef2sed.sed
6335
6336# This sed command replaces #undef with comments.  This is necessary, for
6337# example, in the case of _POSIX_SOURCE, which is predefined and required
6338# on some systems where configure will not decide to define it.
6339cat >>conftest.undefs <<\_ACEOF
6340s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
6341_ACEOF
6342
6343# Break up conftest.defines because some shells have a limit on the size
6344# of here documents, and old seds have small limits too (100 cmds).
6345echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
6346echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
6347echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
6348echo '  :' >>$CONFIG_STATUS
6349rm -f conftest.tail
6350while grep . conftest.defines >/dev/null
6351do
6352  # Write a limited-size here document to $tmp/defines.sed.
6353  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
6354  # Speed up: don't consider the non `#define' lines.
6355  echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
6356  # Work around the forget-to-reset-the-flag bug.
6357  echo 't clr' >>$CONFIG_STATUS
6358  echo ': clr' >>$CONFIG_STATUS
6359  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
6360  echo 'CEOF
6361  sed -f $tmp/defines.sed $tmp/in >$tmp/out
6362  rm -f $tmp/in
6363  mv $tmp/out $tmp/in
6364' >>$CONFIG_STATUS
6365  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
6366  rm -f conftest.defines
6367  mv conftest.tail conftest.defines
6368done
6369rm -f conftest.defines
6370echo '  fi # grep' >>$CONFIG_STATUS
6371echo >>$CONFIG_STATUS
6372
6373# Break up conftest.undefs because some shells have a limit on the size
6374# of here documents, and old seds have small limits too (100 cmds).
6375echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
6376rm -f conftest.tail
6377while grep . conftest.undefs >/dev/null
6378do
6379  # Write a limited-size here document to $tmp/undefs.sed.
6380  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
6381  # Speed up: don't consider the non `#undef'
6382  echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
6383  # Work around the forget-to-reset-the-flag bug.
6384  echo 't clr' >>$CONFIG_STATUS
6385  echo ': clr' >>$CONFIG_STATUS
6386  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
6387  echo 'CEOF
6388  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
6389  rm -f $tmp/in
6390  mv $tmp/out $tmp/in
6391' >>$CONFIG_STATUS
6392  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
6393  rm -f conftest.undefs
6394  mv conftest.tail conftest.undefs
6395done
6396rm -f conftest.undefs
6397
6398cat >>$CONFIG_STATUS <<\_ACEOF
6399  # Let's still pretend it is `configure' which instantiates (i.e., don't
6400  # use $as_me), people would be surprised to read:
6401  #    /* config.h.  Generated by config.status.  */
6402  if test x"$ac_file" = x-; then
6403    echo "/* Generated by configure.  */" >$tmp/config.h
6404  else
6405    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
6406  fi
6407  cat $tmp/in >>$tmp/config.h
6408  rm -f $tmp/in
6409  if test x"$ac_file" != x-; then
6410    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
6411      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
6412echo "$as_me: $ac_file is unchanged" >&6;}
6413    else
6414      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
6415$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6416         X"$ac_file" : 'X\(//\)[^/]' \| \
6417         X"$ac_file" : 'X\(//\)$' \| \
6418         X"$ac_file" : 'X\(/\)' \| \
6419         .     : '\(.\)' 2>/dev/null ||
6420echo X"$ac_file" |
6421    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
6422          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
6423          /^X\(\/\/\)$/{ s//\1/; q; }
6424          /^X\(\/\).*/{ s//\1/; q; }
6425          s/.*/./; q'`
6426      { if $as_mkdir_p; then
6427    mkdir -p "$ac_dir"
6428  else
6429    as_dir="$ac_dir"
6430    as_dirs=
6431    while test ! -d "$as_dir"; do
6432      as_dirs="$as_dir $as_dirs"
6433      as_dir=`(dirname "$as_dir") 2>/dev/null ||
6434$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6435         X"$as_dir" : 'X\(//\)[^/]' \| \
6436         X"$as_dir" : 'X\(//\)$' \| \
6437         X"$as_dir" : 'X\(/\)' \| \
6438         .     : '\(.\)' 2>/dev/null ||
6439echo X"$as_dir" |
6440    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
6441          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
6442          /^X\(\/\/\)$/{ s//\1/; q; }
6443          /^X\(\/\).*/{ s//\1/; q; }
6444          s/.*/./; q'`
6445    done
6446    test ! -n "$as_dirs" || mkdir $as_dirs
6447  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
6448echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
6449   { (exit 1); exit 1; }; }; }
6450
6451      rm -f $ac_file
6452      mv $tmp/config.h $ac_file
6453    fi
6454  else
6455    cat $tmp/config.h
6456    rm -f $tmp/config.h
6457  fi
6458done
6459_ACEOF
6460
6461cat >>$CONFIG_STATUS <<\_ACEOF
6462
6463{ (exit 0); exit 0; }
6464_ACEOF
6465chmod +x $CONFIG_STATUS
6466ac_clean_files=$ac_clean_files_save
6467
6468
6469# configure is writing to config.log, and then calls config.status.
6470# config.status does its own redirection, appending to config.log.
6471# Unfortunately, on DOS this fails, as config.log is still kept open
6472# by configure, so config.status won't be able to write to it; its
6473# output is simply discarded.  So we exec the FD to /dev/null,
6474# effectively closing config.log, so it can be properly (re)opened and
6475# appended to by config.status.  When coming back to configure, we
6476# need to make the FD available again.
6477if test "$no_create" != yes; then
6478  ac_cs_success=:
6479  ac_config_status_args=
6480  test "$silent" = yes &&
6481    ac_config_status_args="$ac_config_status_args --quiet"
6482  exec 5>/dev/null
6483  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
6484  exec 5>>config.log
6485  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
6486  # would make configure fail if this is the last instruction.
6487  $ac_cs_success || { (exit 1); exit 1; }
6488fi
6489
Note: See TracBrowser for help on using the repository browser.