source: trunk/configure @ 326

Last change on this file since 326 was 320, checked in by MatthewWhiting, 17 years ago
  • Improved the feedback in configure for when PGPLOT not present.
  • Added text to Guide explaining how one can still compile Duchamp without having PGPLOT present.
  • Property svn:executable set to *
File size: 181.5 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.1.
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.1'
272PACKAGE_STRING='Duchamp 1.1'
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.1 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.1:";;
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.1
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.1, 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
3092
3093
3094
3095
3096
3097
3098for ac_header in unistd.h time.h math.h iostream fstream sstream iomanip vector string algorithm functional
3099do
3100as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3101if eval "test \"\${$as_ac_Header+set}\" = set"; then
3102  echo "$as_me:$LINENO: checking for $ac_header" >&5
3103echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3104if eval "test \"\${$as_ac_Header+set}\" = set"; then
3105  echo $ECHO_N "(cached) $ECHO_C" >&6
3106fi
3107echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3108echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3109else
3110  # Is the header compilable?
3111echo "$as_me:$LINENO: checking $ac_header usability" >&5
3112echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
3113cat >conftest.$ac_ext <<_ACEOF
3114#line $LINENO "configure"
3115/* confdefs.h.  */
3116_ACEOF
3117cat confdefs.h >>conftest.$ac_ext
3118cat >>conftest.$ac_ext <<_ACEOF
3119/* end confdefs.h.  */
3120$ac_includes_default
3121#include <$ac_header>
3122_ACEOF
3123rm -f conftest.$ac_objext
3124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3125  (eval $ac_compile) 2>&5
3126  ac_status=$?
3127  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3128  (exit $ac_status); } &&
3129         { ac_try='test -s conftest.$ac_objext'
3130  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3131  (eval $ac_try) 2>&5
3132  ac_status=$?
3133  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3134  (exit $ac_status); }; }; then
3135  ac_header_compiler=yes
3136else
3137  echo "$as_me: failed program was:" >&5
3138sed 's/^/| /' conftest.$ac_ext >&5
3139
3140ac_header_compiler=no
3141fi
3142rm -f conftest.$ac_objext conftest.$ac_ext
3143echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
3144echo "${ECHO_T}$ac_header_compiler" >&6
3145
3146# Is the header present?
3147echo "$as_me:$LINENO: checking $ac_header presence" >&5
3148echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
3149cat >conftest.$ac_ext <<_ACEOF
3150#line $LINENO "configure"
3151/* confdefs.h.  */
3152_ACEOF
3153cat confdefs.h >>conftest.$ac_ext
3154cat >>conftest.$ac_ext <<_ACEOF
3155/* end confdefs.h.  */
3156#include <$ac_header>
3157_ACEOF
3158if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3159  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3160  ac_status=$?
3161  grep -v '^ *+' conftest.er1 >conftest.err
3162  rm -f conftest.er1
3163  cat conftest.err >&5
3164  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3165  (exit $ac_status); } >/dev/null; then
3166  if test -s conftest.err; then
3167    ac_cpp_err=$ac_c_preproc_warn_flag
3168  else
3169    ac_cpp_err=
3170  fi
3171else
3172  ac_cpp_err=yes
3173fi
3174if test -z "$ac_cpp_err"; then
3175  ac_header_preproc=yes
3176else
3177  echo "$as_me: failed program was:" >&5
3178sed 's/^/| /' conftest.$ac_ext >&5
3179
3180  ac_header_preproc=no
3181fi
3182rm -f conftest.err conftest.$ac_ext
3183echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
3184echo "${ECHO_T}$ac_header_preproc" >&6
3185
3186# So?  What about this header?
3187case $ac_header_compiler:$ac_header_preproc in
3188  yes:no )
3189    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
3190echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
3191    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3192echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3193    (
3194      cat <<\_ASBOX
3195## ------------------------------------ ##
3196## Report this to bug-autoconf@gnu.org. ##
3197## ------------------------------------ ##
3198_ASBOX
3199    ) |
3200      sed "s/^/$as_me: WARNING:     /" >&2
3201    ;;
3202  no:yes )
3203    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
3204echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
3205    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
3206echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
3207    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
3208echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
3209    (
3210      cat <<\_ASBOX
3211## ------------------------------------ ##
3212## Report this to bug-autoconf@gnu.org. ##
3213## ------------------------------------ ##
3214_ASBOX
3215    ) |
3216      sed "s/^/$as_me: WARNING:     /" >&2
3217    ;;
3218esac
3219echo "$as_me:$LINENO: checking for $ac_header" >&5
3220echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3221if eval "test \"\${$as_ac_Header+set}\" = set"; then
3222  echo $ECHO_N "(cached) $ECHO_C" >&6
3223else
3224  eval "$as_ac_Header=$ac_header_preproc"
3225fi
3226echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3227echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3228
3229fi
3230if test `eval echo '${'$as_ac_Header'}'` = yes; then
3231  cat >>confdefs.h <<_ACEOF
3232#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3233_ACEOF
3234
3235fi
3236
3237done
3238
3239if test "x$ac_cv_header_stdc" = xno; then
3240  { { echo "$as_me:$LINENO: error:
3241    -------------------------------------------------------------------
3242    An ANSI standard C library is required to build Duchamp.
3243    One of the ANSI C header files it requires is missing or unusable.
3244
3245    ERROR: Duchamp configuration failure.
3246    -------------------------------------------------------------------" >&5
3247echo "$as_me: error:
3248    -------------------------------------------------------------------
3249    An ANSI standard C library is required to build Duchamp.
3250    One of the ANSI C header files it requires is missing or unusable.
3251
3252    ERROR: Duchamp configuration failure.
3253    -------------------------------------------------------------------" >&2;}
3254   { (exit 1); exit 1; }; }
3255fi
3256
3257# Checks for typedefs, structures, and compiler characteristics.
3258echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
3259echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
3260if test "${ac_cv_header_stdbool_h+set}" = set; then
3261  echo $ECHO_N "(cached) $ECHO_C" >&6
3262else
3263  cat >conftest.$ac_ext <<_ACEOF
3264#line $LINENO "configure"
3265/* confdefs.h.  */
3266_ACEOF
3267cat confdefs.h >>conftest.$ac_ext
3268cat >>conftest.$ac_ext <<_ACEOF
3269/* end confdefs.h.  */
3270
3271#include <stdbool.h>
3272#ifndef bool
3273# error bool is not defined
3274#endif
3275#ifndef false
3276# error false is not defined
3277#endif
3278#if false
3279# error false is not 0
3280#endif
3281#ifndef true
3282# error true is not defined
3283#endif
3284#if true != 1
3285# error true is not 1
3286#endif
3287#ifndef __bool_true_false_are_defined
3288# error __bool_true_false_are_defined is not defined
3289#endif
3290
3291        struct s { _Bool s: 1; _Bool t; } s;
3292
3293        char a[true == 1 ? 1 : -1];
3294        char b[false == 0 ? 1 : -1];
3295        char c[__bool_true_false_are_defined == 1 ? 1 : -1];
3296        char d[(bool) -0.5 == true ? 1 : -1];
3297        bool e = &s;
3298        char f[(_Bool) -0.0 == false ? 1 : -1];
3299        char g[true];
3300        char h[sizeof (_Bool)];
3301        char i[sizeof s.t];
3302
3303int
3304main ()
3305{
3306 return !a + !b + !c + !d + !e + !f + !g + !h + !i;
3307  ;
3308  return 0;
3309}
3310_ACEOF
3311rm -f conftest.$ac_objext
3312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3313  (eval $ac_compile) 2>&5
3314  ac_status=$?
3315  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3316  (exit $ac_status); } &&
3317         { ac_try='test -s conftest.$ac_objext'
3318  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3319  (eval $ac_try) 2>&5
3320  ac_status=$?
3321  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3322  (exit $ac_status); }; }; then
3323  ac_cv_header_stdbool_h=yes
3324else
3325  echo "$as_me: failed program was:" >&5
3326sed 's/^/| /' conftest.$ac_ext >&5
3327
3328ac_cv_header_stdbool_h=no
3329fi
3330rm -f conftest.$ac_objext conftest.$ac_ext
3331fi
3332echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
3333echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
3334echo "$as_me:$LINENO: checking for _Bool" >&5
3335echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
3336if test "${ac_cv_type__Bool+set}" = set; then
3337  echo $ECHO_N "(cached) $ECHO_C" >&6
3338else
3339  cat >conftest.$ac_ext <<_ACEOF
3340#line $LINENO "configure"
3341/* confdefs.h.  */
3342_ACEOF
3343cat confdefs.h >>conftest.$ac_ext
3344cat >>conftest.$ac_ext <<_ACEOF
3345/* end confdefs.h.  */
3346$ac_includes_default
3347int
3348main ()
3349{
3350if ((_Bool *) 0)
3351  return 0;
3352if (sizeof (_Bool))
3353  return 0;
3354  ;
3355  return 0;
3356}
3357_ACEOF
3358rm -f conftest.$ac_objext
3359if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3360  (eval $ac_compile) 2>&5
3361  ac_status=$?
3362  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3363  (exit $ac_status); } &&
3364         { ac_try='test -s conftest.$ac_objext'
3365  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3366  (eval $ac_try) 2>&5
3367  ac_status=$?
3368  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3369  (exit $ac_status); }; }; then
3370  ac_cv_type__Bool=yes
3371else
3372  echo "$as_me: failed program was:" >&5
3373sed 's/^/| /' conftest.$ac_ext >&5
3374
3375ac_cv_type__Bool=no
3376fi
3377rm -f conftest.$ac_objext conftest.$ac_ext
3378fi
3379echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
3380echo "${ECHO_T}$ac_cv_type__Bool" >&6
3381if test $ac_cv_type__Bool = yes; then
3382
3383cat >>confdefs.h <<_ACEOF
3384#define HAVE__BOOL 1
3385_ACEOF
3386
3387
3388fi
3389
3390if test $ac_cv_header_stdbool_h = yes; then
3391
3392cat >>confdefs.h <<\_ACEOF
3393#define HAVE_STDBOOL_H 1
3394_ACEOF
3395
3396fi
3397
3398echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
3399echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3400if test "${ac_cv_c_const+set}" = set; then
3401  echo $ECHO_N "(cached) $ECHO_C" >&6
3402else
3403  cat >conftest.$ac_ext <<_ACEOF
3404#line $LINENO "configure"
3405/* confdefs.h.  */
3406_ACEOF
3407cat confdefs.h >>conftest.$ac_ext
3408cat >>conftest.$ac_ext <<_ACEOF
3409/* end confdefs.h.  */
3410
3411int
3412main ()
3413{
3414/* FIXME: Include the comments suggested by Paul. */
3415#ifndef __cplusplus
3416  /* Ultrix mips cc rejects this.  */
3417  typedef int charset[2];
3418  const charset x;
3419  /* SunOS 4.1.1 cc rejects this.  */
3420  char const *const *ccp;
3421  char **p;
3422  /* NEC SVR4.0.2 mips cc rejects this.  */
3423  struct point {int x, y;};
3424  static struct point const zero = {0,0};
3425  /* AIX XL C 1.02.0.0 rejects this.
3426     It does not let you subtract one const X* pointer from another in
3427     an arm of an if-expression whose if-part is not a constant
3428     expression */
3429  const char *g = "string";
3430  ccp = &g + (g ? g-g : 0);
3431  /* HPUX 7.0 cc rejects these. */
3432  ++ccp;
3433  p = (char**) ccp;
3434  ccp = (char const *const *) p;
3435  { /* SCO 3.2v4 cc rejects this.  */
3436    char *t;
3437    char const *s = 0 ? (char *) 0 : (char const *) 0;
3438
3439    *t++ = 0;
3440  }
3441  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3442    int x[] = {25, 17};
3443    const int *foo = &x[0];
3444    ++foo;
3445  }
3446  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3447    typedef const int *iptr;
3448    iptr p = 0;
3449    ++p;
3450  }
3451  { /* AIX XL C 1.02.0.0 rejects this saying
3452       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3453    struct s { int j; const int *ap[3]; };
3454    struct s *b; b->j = 5;
3455  }
3456  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3457    const int foo = 10;
3458  }
3459#endif
3460
3461  ;
3462  return 0;
3463}
3464_ACEOF
3465rm -f conftest.$ac_objext
3466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3467  (eval $ac_compile) 2>&5
3468  ac_status=$?
3469  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3470  (exit $ac_status); } &&
3471         { ac_try='test -s conftest.$ac_objext'
3472  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3473  (eval $ac_try) 2>&5
3474  ac_status=$?
3475  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3476  (exit $ac_status); }; }; then
3477  ac_cv_c_const=yes
3478else
3479  echo "$as_me: failed program was:" >&5
3480sed 's/^/| /' conftest.$ac_ext >&5
3481
3482ac_cv_c_const=no
3483fi
3484rm -f conftest.$ac_objext conftest.$ac_ext
3485fi
3486echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
3487echo "${ECHO_T}$ac_cv_c_const" >&6
3488if test $ac_cv_c_const = no; then
3489
3490cat >>confdefs.h <<\_ACEOF
3491#define const
3492_ACEOF
3493
3494fi
3495
3496echo "$as_me:$LINENO: checking for inline" >&5
3497echo $ECHO_N "checking for inline... $ECHO_C" >&6
3498if test "${ac_cv_c_inline+set}" = set; then
3499  echo $ECHO_N "(cached) $ECHO_C" >&6
3500else
3501  ac_cv_c_inline=no
3502for ac_kw in inline __inline__ __inline; do
3503  cat >conftest.$ac_ext <<_ACEOF
3504#line $LINENO "configure"
3505/* confdefs.h.  */
3506_ACEOF
3507cat confdefs.h >>conftest.$ac_ext
3508cat >>conftest.$ac_ext <<_ACEOF
3509/* end confdefs.h.  */
3510#ifndef __cplusplus
3511typedef int foo_t;
3512static $ac_kw foo_t static_foo () {return 0; }
3513$ac_kw foo_t foo () {return 0; }
3514#endif
3515
3516_ACEOF
3517rm -f conftest.$ac_objext
3518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3519  (eval $ac_compile) 2>&5
3520  ac_status=$?
3521  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3522  (exit $ac_status); } &&
3523         { ac_try='test -s conftest.$ac_objext'
3524  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3525  (eval $ac_try) 2>&5
3526  ac_status=$?
3527  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3528  (exit $ac_status); }; }; then
3529  ac_cv_c_inline=$ac_kw; break
3530else
3531  echo "$as_me: failed program was:" >&5
3532sed 's/^/| /' conftest.$ac_ext >&5
3533
3534fi
3535rm -f conftest.$ac_objext conftest.$ac_ext
3536done
3537
3538fi
3539echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
3540echo "${ECHO_T}$ac_cv_c_inline" >&6
3541case $ac_cv_c_inline in
3542  inline | yes) ;;
3543  no)
3544cat >>confdefs.h <<\_ACEOF
3545#define inline
3546_ACEOF
3547 ;;
3548  *)  cat >>confdefs.h <<_ACEOF
3549#define inline $ac_cv_c_inline
3550_ACEOF
3551 ;;
3552esac
3553
3554
3555# Utilities.
3556if test -n "$ac_tool_prefix"; then
3557  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3558set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3559echo "$as_me:$LINENO: checking for $ac_word" >&5
3560echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3561if test "${ac_cv_prog_RANLIB+set}" = set; then
3562  echo $ECHO_N "(cached) $ECHO_C" >&6
3563else
3564  if test -n "$RANLIB"; then
3565  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3566else
3567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3568for as_dir in $PATH
3569do
3570  IFS=$as_save_IFS
3571  test -z "$as_dir" && as_dir=.
3572  for ac_exec_ext in '' $ac_executable_extensions; do
3573  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3574    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3575    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3576    break 2
3577  fi
3578done
3579done
3580
3581fi
3582fi
3583RANLIB=$ac_cv_prog_RANLIB
3584if test -n "$RANLIB"; then
3585  echo "$as_me:$LINENO: result: $RANLIB" >&5
3586echo "${ECHO_T}$RANLIB" >&6
3587else
3588  echo "$as_me:$LINENO: result: no" >&5
3589echo "${ECHO_T}no" >&6
3590fi
3591
3592fi
3593if test -z "$ac_cv_prog_RANLIB"; then
3594  ac_ct_RANLIB=$RANLIB
3595  # Extract the first word of "ranlib", so it can be a program name with args.
3596set dummy ranlib; ac_word=$2
3597echo "$as_me:$LINENO: checking for $ac_word" >&5
3598echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3599if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3600  echo $ECHO_N "(cached) $ECHO_C" >&6
3601else
3602  if test -n "$ac_ct_RANLIB"; then
3603  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3604else
3605as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3606for as_dir in $PATH
3607do
3608  IFS=$as_save_IFS
3609  test -z "$as_dir" && as_dir=.
3610  for ac_exec_ext in '' $ac_executable_extensions; do
3611  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3612    ac_cv_prog_ac_ct_RANLIB="ranlib"
3613    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3614    break 2
3615  fi
3616done
3617done
3618
3619  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3620fi
3621fi
3622ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3623if test -n "$ac_ct_RANLIB"; then
3624  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3625echo "${ECHO_T}$ac_ct_RANLIB" >&6
3626else
3627  echo "$as_me:$LINENO: result: no" >&5
3628echo "${ECHO_T}no" >&6
3629fi
3630
3631  RANLIB=$ac_ct_RANLIB
3632else
3633  RANLIB="$ac_cv_prog_RANLIB"
3634fi
3635
3636
3637# Checks for library functions.
3638echo "$as_me:$LINENO: checking for working strtod" >&5
3639echo $ECHO_N "checking for working strtod... $ECHO_C" >&6
3640if test "${ac_cv_func_strtod+set}" = set; then
3641  echo $ECHO_N "(cached) $ECHO_C" >&6
3642else
3643  if test "$cross_compiling" = yes; then
3644  ac_cv_func_strtod=no
3645else
3646  cat >conftest.$ac_ext <<_ACEOF
3647#line $LINENO "configure"
3648/* confdefs.h.  */
3649_ACEOF
3650cat confdefs.h >>conftest.$ac_ext
3651cat >>conftest.$ac_ext <<_ACEOF
3652/* end confdefs.h.  */
3653
3654double strtod ();
3655int
3656main()
3657{
3658  {
3659    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
3660    char *string = " +69";
3661    char *term;
3662    double value;
3663    value = strtod (string, &term);
3664    if (value != 69 || term != (string + 4))
3665      exit (1);
3666  }
3667
3668  {
3669    /* Under Solaris 2.4, strtod returns the wrong value for the
3670       terminating character under some conditions.  */
3671    char *string = "NaN";
3672    char *term;
3673    strtod (string, &term);
3674    if (term != string && *(term - 1) == 0)
3675      exit (1);
3676  }
3677  exit (0);
3678}
3679
3680_ACEOF
3681rm -f conftest$ac_exeext
3682if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3683  (eval $ac_link) 2>&5
3684  ac_status=$?
3685  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3686  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3687  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3688  (eval $ac_try) 2>&5
3689  ac_status=$?
3690  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3691  (exit $ac_status); }; }; then
3692  ac_cv_func_strtod=yes
3693else
3694  echo "$as_me: program exited with status $ac_status" >&5
3695echo "$as_me: failed program was:" >&5
3696sed 's/^/| /' conftest.$ac_ext >&5
3697
3698( exit $ac_status )
3699ac_cv_func_strtod=no
3700fi
3701rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3702fi
3703fi
3704echo "$as_me:$LINENO: result: $ac_cv_func_strtod" >&5
3705echo "${ECHO_T}$ac_cv_func_strtod" >&6
3706if test $ac_cv_func_strtod = no; then
3707  LIBOBJS="$LIBOBJS strtod.$ac_objext"
3708echo "$as_me:$LINENO: checking for pow" >&5
3709echo $ECHO_N "checking for pow... $ECHO_C" >&6
3710if test "${ac_cv_func_pow+set}" = set; then
3711  echo $ECHO_N "(cached) $ECHO_C" >&6
3712else
3713  cat >conftest.$ac_ext <<_ACEOF
3714#line $LINENO "configure"
3715/* confdefs.h.  */
3716_ACEOF
3717cat confdefs.h >>conftest.$ac_ext
3718cat >>conftest.$ac_ext <<_ACEOF
3719/* end confdefs.h.  */
3720/* System header to define __stub macros and hopefully few prototypes,
3721    which can conflict with char pow (); below.
3722    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3723    <limits.h> exists even on freestanding compilers.  */
3724#ifdef __STDC__
3725# include <limits.h>
3726#else
3727# include <assert.h>
3728#endif
3729/* Override any gcc2 internal prototype to avoid an error.  */
3730#ifdef __cplusplus
3731extern "C"
3732{
3733#endif
3734/* We use char because int might match the return type of a gcc2
3735   builtin and then its argument prototype would still apply.  */
3736char pow ();
3737/* The GNU C library defines this for functions which it implements
3738    to always fail with ENOSYS.  Some functions are actually named
3739    something starting with __ and the normal name is an alias.  */
3740#if defined (__stub_pow) || defined (__stub___pow)
3741choke me
3742#else
3743char (*f) () = pow;
3744#endif
3745#ifdef __cplusplus
3746}
3747#endif
3748
3749int
3750main ()
3751{
3752return f != pow;
3753  ;
3754  return 0;
3755}
3756_ACEOF
3757rm -f conftest.$ac_objext conftest$ac_exeext
3758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3759  (eval $ac_link) 2>&5
3760  ac_status=$?
3761  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3762  (exit $ac_status); } &&
3763         { ac_try='test -s conftest$ac_exeext'
3764  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3765  (eval $ac_try) 2>&5
3766  ac_status=$?
3767  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3768  (exit $ac_status); }; }; then
3769  ac_cv_func_pow=yes
3770else
3771  echo "$as_me: failed program was:" >&5
3772sed 's/^/| /' conftest.$ac_ext >&5
3773
3774ac_cv_func_pow=no
3775fi
3776rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3777fi
3778echo "$as_me:$LINENO: result: $ac_cv_func_pow" >&5
3779echo "${ECHO_T}$ac_cv_func_pow" >&6
3780
3781if test $ac_cv_func_pow = no; then
3782  echo "$as_me:$LINENO: checking for pow in -lm" >&5
3783echo $ECHO_N "checking for pow in -lm... $ECHO_C" >&6
3784if test "${ac_cv_lib_m_pow+set}" = set; then
3785  echo $ECHO_N "(cached) $ECHO_C" >&6
3786else
3787  ac_check_lib_save_LIBS=$LIBS
3788LIBS="-lm  $LIBS"
3789cat >conftest.$ac_ext <<_ACEOF
3790#line $LINENO "configure"
3791/* confdefs.h.  */
3792_ACEOF
3793cat confdefs.h >>conftest.$ac_ext
3794cat >>conftest.$ac_ext <<_ACEOF
3795/* end confdefs.h.  */
3796
3797/* Override any gcc2 internal prototype to avoid an error.  */
3798#ifdef __cplusplus
3799extern "C"
3800#endif
3801/* We use char because int might match the return type of a gcc2
3802   builtin and then its argument prototype would still apply.  */
3803char pow ();
3804int
3805main ()
3806{
3807pow ();
3808  ;
3809  return 0;
3810}
3811_ACEOF
3812rm -f conftest.$ac_objext conftest$ac_exeext
3813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3814  (eval $ac_link) 2>&5
3815  ac_status=$?
3816  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3817  (exit $ac_status); } &&
3818         { ac_try='test -s conftest$ac_exeext'
3819  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3820  (eval $ac_try) 2>&5
3821  ac_status=$?
3822  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3823  (exit $ac_status); }; }; then
3824  ac_cv_lib_m_pow=yes
3825else
3826  echo "$as_me: failed program was:" >&5
3827sed 's/^/| /' conftest.$ac_ext >&5
3828
3829ac_cv_lib_m_pow=no
3830fi
3831rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3832LIBS=$ac_check_lib_save_LIBS
3833fi
3834echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5
3835echo "${ECHO_T}$ac_cv_lib_m_pow" >&6
3836if test $ac_cv_lib_m_pow = yes; then
3837  POW_LIB=-lm
3838else
3839  { echo "$as_me:$LINENO: WARNING: cannot find library containing definition of pow" >&5
3840echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
3841fi
3842
3843fi
3844
3845fi
3846
3847
3848
3849
3850
3851
3852
3853
3854for ac_func in floor pow sqrt strtol log atan fabs
3855do
3856as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3857echo "$as_me:$LINENO: checking for $ac_func" >&5
3858echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3859if eval "test \"\${$as_ac_var+set}\" = set"; then
3860  echo $ECHO_N "(cached) $ECHO_C" >&6
3861else
3862  cat >conftest.$ac_ext <<_ACEOF
3863#line $LINENO "configure"
3864/* confdefs.h.  */
3865_ACEOF
3866cat confdefs.h >>conftest.$ac_ext
3867cat >>conftest.$ac_ext <<_ACEOF
3868/* end confdefs.h.  */
3869/* System header to define __stub macros and hopefully few prototypes,
3870    which can conflict with char $ac_func (); below.
3871    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3872    <limits.h> exists even on freestanding compilers.  */
3873#ifdef __STDC__
3874# include <limits.h>
3875#else
3876# include <assert.h>
3877#endif
3878/* Override any gcc2 internal prototype to avoid an error.  */
3879#ifdef __cplusplus
3880extern "C"
3881{
3882#endif
3883/* We use char because int might match the return type of a gcc2
3884   builtin and then its argument prototype would still apply.  */
3885char $ac_func ();
3886/* The GNU C library defines this for functions which it implements
3887    to always fail with ENOSYS.  Some functions are actually named
3888    something starting with __ and the normal name is an alias.  */
3889#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3890choke me
3891#else
3892char (*f) () = $ac_func;
3893#endif
3894#ifdef __cplusplus
3895}
3896#endif
3897
3898int
3899main ()
3900{
3901return f != $ac_func;
3902  ;
3903  return 0;
3904}
3905_ACEOF
3906rm -f conftest.$ac_objext conftest$ac_exeext
3907if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3908  (eval $ac_link) 2>&5
3909  ac_status=$?
3910  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3911  (exit $ac_status); } &&
3912         { ac_try='test -s conftest$ac_exeext'
3913  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3914  (eval $ac_try) 2>&5
3915  ac_status=$?
3916  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3917  (exit $ac_status); }; }; then
3918  eval "$as_ac_var=yes"
3919else
3920  echo "$as_me: failed program was:" >&5
3921sed 's/^/| /' conftest.$ac_ext >&5
3922
3923eval "$as_ac_var=no"
3924fi
3925rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3926fi
3927echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
3928echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
3929if test `eval echo '${'$as_ac_var'}'` = yes; then
3930  cat >>confdefs.h <<_ACEOF
3931#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3932_ACEOF
3933
3934fi
3935done
3936
3937
3938# Extra places to look for third-party include files and libraries.
3939INCDIRS="$INCDIRS           \
3940         /usr/include       \
3941         /usr/local/include \
3942         /usr/local/pgplot  \
3943         /usr/local/cfitsio \
3944         /usr/local/wcslib  \
3945         /local/pgplot      \
3946         /local/cfitsio     \
3947         /opt/local/include"
3948
3949LIBDIRS="$LIBDIRS           \
3950         /usr/lib           \
3951         /usr/local/lib     \
3952         /usr/local/pgplot  \
3953         /usr/local/cfitsio \
3954         /usr/local/wcslib  \
3955         /local/lib         \
3956         /local/pgplot      \
3957         /local/cfitsio     \
3958         /opt/SUNWspro/lib  \
3959         /opt/local/lib"
3960
3961{ echo "$as_me:$LINENO: LIBDIRS" >&5
3962echo "$as_me: LIBDIRS" >&6;}
3963
3964for LIBDIR in $LIBDIRS ; do
3965  as_ac_File=`echo "ac_cv_file_$LIBDIR" | $as_tr_sh`
3966echo "$as_me:$LINENO: checking for $LIBDIR" >&5
3967echo $ECHO_N "checking for $LIBDIR... $ECHO_C" >&6
3968if eval "test \"\${$as_ac_File+set}\" = set"; then
3969  echo $ECHO_N "(cached) $ECHO_C" >&6
3970else
3971  test "$cross_compiling" = yes &&
3972  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
3973echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
3974   { (exit 1); exit 1; }; }
3975if test -r "$LIBDIR"; then
3976  eval "$as_ac_File=yes"
3977else
3978  eval "$as_ac_File=no"
3979fi
3980fi
3981echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
3982echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
3983if test `eval echo '${'$as_ac_File'}'` = yes; then
3984  LDFLAGS="$LDFLAGS -L$LIBDIR"
3985else
3986  continue
3987fi
3988
3989done
3990
3991##########################################################################
3992# Search for PGPLOT
3993
3994for INCDIR in $INCDIRS ; do
3995  as_ac_File=`echo "ac_cv_file_$INCDIR/cpgplot.h" | $as_tr_sh`
3996echo "$as_me:$LINENO: checking for $INCDIR/cpgplot.h" >&5
3997echo $ECHO_N "checking for $INCDIR/cpgplot.h... $ECHO_C" >&6
3998if eval "test \"\${$as_ac_File+set}\" = set"; then
3999  echo $ECHO_N "(cached) $ECHO_C" >&6
4000else
4001  test "$cross_compiling" = yes &&
4002  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4003echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4004   { (exit 1); exit 1; }; }
4005if test -r "$INCDIR/cpgplot.h"; then
4006  eval "$as_ac_File=yes"
4007else
4008  eval "$as_ac_File=no"
4009fi
4010fi
4011echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4012echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4013if test `eval echo '${'$as_ac_File'}'` = yes; then
4014  PGPLOTINC=-I$INCDIR; break
4015fi
4016
4017  INCDIR=$INCDIR/pgplot
4018  as_ac_File=`echo "ac_cv_file_$INCDIR/cpgplot.h" | $as_tr_sh`
4019echo "$as_me:$LINENO: checking for $INCDIR/cpgplot.h" >&5
4020echo $ECHO_N "checking for $INCDIR/cpgplot.h... $ECHO_C" >&6
4021if eval "test \"\${$as_ac_File+set}\" = set"; then
4022  echo $ECHO_N "(cached) $ECHO_C" >&6
4023else
4024  test "$cross_compiling" = yes &&
4025  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4026echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4027   { (exit 1); exit 1; }; }
4028if test -r "$INCDIR/cpgplot.h"; then
4029  eval "$as_ac_File=yes"
4030else
4031  eval "$as_ac_File=no"
4032fi
4033fi
4034echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4035echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4036if test `eval echo '${'$as_ac_File'}'` = yes; then
4037  PGPLOTINC=-I$INCDIR; break
4038fi
4039
4040done
4041
4042# PGPLOT compiled with a SUN compiler but linked with something else.
4043echo "$as_me:$LINENO: checking for cosd in -lsunmath" >&5
4044echo $ECHO_N "checking for cosd in -lsunmath... $ECHO_C" >&6
4045if test "${ac_cv_lib_sunmath_cosd+set}" = set; then
4046  echo $ECHO_N "(cached) $ECHO_C" >&6
4047else
4048  ac_check_lib_save_LIBS=$LIBS
4049LIBS="-lsunmath $PGPLOTLIB $LIBS $LIBS"
4050cat >conftest.$ac_ext <<_ACEOF
4051#line $LINENO "configure"
4052/* confdefs.h.  */
4053_ACEOF
4054cat confdefs.h >>conftest.$ac_ext
4055cat >>conftest.$ac_ext <<_ACEOF
4056/* end confdefs.h.  */
4057
4058/* Override any gcc2 internal prototype to avoid an error.  */
4059#ifdef __cplusplus
4060extern "C"
4061#endif
4062/* We use char because int might match the return type of a gcc2
4063   builtin and then its argument prototype would still apply.  */
4064char cosd ();
4065int
4066main ()
4067{
4068cosd ();
4069  ;
4070  return 0;
4071}
4072_ACEOF
4073rm -f conftest.$ac_objext conftest$ac_exeext
4074if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4075  (eval $ac_link) 2>&5
4076  ac_status=$?
4077  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4078  (exit $ac_status); } &&
4079         { ac_try='test -s conftest$ac_exeext'
4080  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4081  (eval $ac_try) 2>&5
4082  ac_status=$?
4083  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4084  (exit $ac_status); }; }; then
4085  ac_cv_lib_sunmath_cosd=yes
4086else
4087  echo "$as_me: failed program was:" >&5
4088sed 's/^/| /' conftest.$ac_ext >&5
4089
4090ac_cv_lib_sunmath_cosd=no
4091fi
4092rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4093LIBS=$ac_check_lib_save_LIBS
4094fi
4095echo "$as_me:$LINENO: result: $ac_cv_lib_sunmath_cosd" >&5
4096echo "${ECHO_T}$ac_cv_lib_sunmath_cosd" >&6
4097if test $ac_cv_lib_sunmath_cosd = yes; then
4098  PGPLOTLIB="-lsunmath $PGPLOTLIB"
4099fi
4100
4101echo "$as_me:$LINENO: checking for iand_ in -lM77" >&5
4102echo $ECHO_N "checking for iand_ in -lM77... $ECHO_C" >&6
4103if test "${ac_cv_lib_M77_iand_+set}" = set; then
4104  echo $ECHO_N "(cached) $ECHO_C" >&6
4105else
4106  ac_check_lib_save_LIBS=$LIBS
4107LIBS="-lM77 $PGPLOTLIB $LIBS $LIBS"
4108cat >conftest.$ac_ext <<_ACEOF
4109#line $LINENO "configure"
4110/* confdefs.h.  */
4111_ACEOF
4112cat confdefs.h >>conftest.$ac_ext
4113cat >>conftest.$ac_ext <<_ACEOF
4114/* end confdefs.h.  */
4115
4116/* Override any gcc2 internal prototype to avoid an error.  */
4117#ifdef __cplusplus
4118extern "C"
4119#endif
4120/* We use char because int might match the return type of a gcc2
4121   builtin and then its argument prototype would still apply.  */
4122char iand_ ();
4123int
4124main ()
4125{
4126iand_ ();
4127  ;
4128  return 0;
4129}
4130_ACEOF
4131rm -f conftest.$ac_objext conftest$ac_exeext
4132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4133  (eval $ac_link) 2>&5
4134  ac_status=$?
4135  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4136  (exit $ac_status); } &&
4137         { ac_try='test -s conftest$ac_exeext'
4138  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4139  (eval $ac_try) 2>&5
4140  ac_status=$?
4141  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4142  (exit $ac_status); }; }; then
4143  ac_cv_lib_M77_iand_=yes
4144else
4145  echo "$as_me: failed program was:" >&5
4146sed 's/^/| /' conftest.$ac_ext >&5
4147
4148ac_cv_lib_M77_iand_=no
4149fi
4150rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4151LIBS=$ac_check_lib_save_LIBS
4152fi
4153echo "$as_me:$LINENO: result: $ac_cv_lib_M77_iand_" >&5
4154echo "${ECHO_T}$ac_cv_lib_M77_iand_" >&6
4155if test $ac_cv_lib_M77_iand_ = yes; then
4156  PGPLOTLIB="-lM77 $PGPLOTLIB"
4157fi
4158
4159echo "$as_me:$LINENO: checking for f77_init in -lF77" >&5
4160echo $ECHO_N "checking for f77_init in -lF77... $ECHO_C" >&6
4161if test "${ac_cv_lib_F77_f77_init+set}" = set; then
4162  echo $ECHO_N "(cached) $ECHO_C" >&6
4163else
4164  ac_check_lib_save_LIBS=$LIBS
4165LIBS="-lF77 $PGPLOTLIB $LIBS $LIBS"
4166cat >conftest.$ac_ext <<_ACEOF
4167#line $LINENO "configure"
4168/* confdefs.h.  */
4169_ACEOF
4170cat confdefs.h >>conftest.$ac_ext
4171cat >>conftest.$ac_ext <<_ACEOF
4172/* end confdefs.h.  */
4173
4174/* Override any gcc2 internal prototype to avoid an error.  */
4175#ifdef __cplusplus
4176extern "C"
4177#endif
4178/* We use char because int might match the return type of a gcc2
4179   builtin and then its argument prototype would still apply.  */
4180char f77_init ();
4181int
4182main ()
4183{
4184f77_init ();
4185  ;
4186  return 0;
4187}
4188_ACEOF
4189rm -f conftest.$ac_objext conftest$ac_exeext
4190if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4191  (eval $ac_link) 2>&5
4192  ac_status=$?
4193  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4194  (exit $ac_status); } &&
4195         { ac_try='test -s conftest$ac_exeext'
4196  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4197  (eval $ac_try) 2>&5
4198  ac_status=$?
4199  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4200  (exit $ac_status); }; }; then
4201  ac_cv_lib_F77_f77_init=yes
4202else
4203  echo "$as_me: failed program was:" >&5
4204sed 's/^/| /' conftest.$ac_ext >&5
4205
4206ac_cv_lib_F77_f77_init=no
4207fi
4208rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4209LIBS=$ac_check_lib_save_LIBS
4210fi
4211echo "$as_me:$LINENO: result: $ac_cv_lib_F77_f77_init" >&5
4212echo "${ECHO_T}$ac_cv_lib_F77_f77_init" >&6
4213if test $ac_cv_lib_F77_f77_init = yes; then
4214  PGPLOTLIB="-lF77 $PGPLOTLIB"
4215fi
4216
4217# PGPLOT compiled with a GNU compiler but linked with something else.
4218#AC_CHECK_LIB([m],       [log],       [PGPLOTLIB="-lm $PGPLOTLIB"])
4219#AC_CHECK_LIB([g2c],     [gerror_],   [PGPLOTLIB="-lg2c $PGPLOTLIB"],
4220#             [], [$PGPLOTLIB $LIBS])
4221
4222# Search for X11 includes and libraries.
4223echo "$as_me:$LINENO: checking for X" >&5
4224echo $ECHO_N "checking for X... $ECHO_C" >&6
4225
4226
4227# Check whether --with-x or --without-x was given.
4228if test "${with_x+set}" = set; then
4229  withval="$with_x"
4230
4231fi;
4232# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4233if test "x$with_x" = xno; then
4234  # The user explicitly disabled X.
4235  have_x=disabled
4236else
4237  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4238    # Both variables are already set.
4239    have_x=yes
4240  else
4241    if test "${ac_cv_have_x+set}" = set; then
4242  echo $ECHO_N "(cached) $ECHO_C" >&6
4243else
4244  # One or both of the vars are not set, and there is no cached value.
4245ac_x_includes=no ac_x_libraries=no
4246rm -fr conftest.dir
4247if mkdir conftest.dir; then
4248  cd conftest.dir
4249  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4250  cat >Imakefile <<'_ACEOF'
4251acfindx:
4252        @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4253_ACEOF
4254  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4255    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4256    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4257    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4258    for ac_extension in a so sl; do
4259      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4260         test -f $ac_im_libdir/libX11.$ac_extension; then
4261        ac_im_usrlibdir=$ac_im_libdir; break
4262      fi
4263    done
4264    # Screen out bogus values from the imake configuration.  They are
4265    # bogus both because they are the default anyway, and because
4266    # using them would break gcc on systems where it needs fixed includes.
4267    case $ac_im_incroot in
4268        /usr/include) ;;
4269        *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4270    esac
4271    case $ac_im_usrlibdir in
4272        /usr/lib | /lib) ;;
4273        *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4274    esac
4275  fi
4276  cd ..
4277  rm -fr conftest.dir
4278fi
4279
4280# Standard set of common directories for X headers.
4281# Check X11 before X11Rn because it is often a symlink to the current release.
4282ac_x_header_dirs='
4283/usr/X11/include
4284/usr/X11R6/include
4285/usr/X11R5/include
4286/usr/X11R4/include
4287
4288/usr/include/X11
4289/usr/include/X11R6
4290/usr/include/X11R5
4291/usr/include/X11R4
4292
4293/usr/local/X11/include
4294/usr/local/X11R6/include
4295/usr/local/X11R5/include
4296/usr/local/X11R4/include
4297
4298/usr/local/include/X11
4299/usr/local/include/X11R6
4300/usr/local/include/X11R5
4301/usr/local/include/X11R4
4302
4303/usr/X386/include
4304/usr/x386/include
4305/usr/XFree86/include/X11
4306
4307/usr/include
4308/usr/local/include
4309/usr/unsupported/include
4310/usr/athena/include
4311/usr/local/x11r5/include
4312/usr/lpp/Xamples/include
4313
4314/usr/openwin/include
4315/usr/openwin/share/include'
4316
4317if test "$ac_x_includes" = no; then
4318  # Guess where to find include files, by looking for Intrinsic.h.
4319  # First, try using that file with no special directory specified.
4320  cat >conftest.$ac_ext <<_ACEOF
4321#line $LINENO "configure"
4322/* confdefs.h.  */
4323_ACEOF
4324cat confdefs.h >>conftest.$ac_ext
4325cat >>conftest.$ac_ext <<_ACEOF
4326/* end confdefs.h.  */
4327#include <X11/Intrinsic.h>
4328_ACEOF
4329if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4330  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4331  ac_status=$?
4332  grep -v '^ *+' conftest.er1 >conftest.err
4333  rm -f conftest.er1
4334  cat conftest.err >&5
4335  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4336  (exit $ac_status); } >/dev/null; then
4337  if test -s conftest.err; then
4338    ac_cpp_err=$ac_c_preproc_warn_flag
4339  else
4340    ac_cpp_err=
4341  fi
4342else
4343  ac_cpp_err=yes
4344fi
4345if test -z "$ac_cpp_err"; then
4346  # We can compile using X headers with no special include directory.
4347ac_x_includes=
4348else
4349  echo "$as_me: failed program was:" >&5
4350sed 's/^/| /' conftest.$ac_ext >&5
4351
4352  for ac_dir in $ac_x_header_dirs; do
4353  if test -r "$ac_dir/X11/Intrinsic.h"; then
4354    ac_x_includes=$ac_dir
4355    break
4356  fi
4357done
4358fi
4359rm -f conftest.err conftest.$ac_ext
4360fi # $ac_x_includes = no
4361
4362if test "$ac_x_libraries" = no; then
4363  # Check for the libraries.
4364  # See if we find them without any special options.
4365  # Don't add to $LIBS permanently.
4366  ac_save_LIBS=$LIBS
4367  LIBS="-lXt $LIBS"
4368  cat >conftest.$ac_ext <<_ACEOF
4369#line $LINENO "configure"
4370/* confdefs.h.  */
4371_ACEOF
4372cat confdefs.h >>conftest.$ac_ext
4373cat >>conftest.$ac_ext <<_ACEOF
4374/* end confdefs.h.  */
4375#include <X11/Intrinsic.h>
4376int
4377main ()
4378{
4379XtMalloc (0)
4380  ;
4381  return 0;
4382}
4383_ACEOF
4384rm -f conftest.$ac_objext conftest$ac_exeext
4385if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4386  (eval $ac_link) 2>&5
4387  ac_status=$?
4388  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4389  (exit $ac_status); } &&
4390         { ac_try='test -s conftest$ac_exeext'
4391  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4392  (eval $ac_try) 2>&5
4393  ac_status=$?
4394  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4395  (exit $ac_status); }; }; then
4396  LIBS=$ac_save_LIBS
4397# We can link X programs with no special library path.
4398ac_x_libraries=
4399else
4400  echo "$as_me: failed program was:" >&5
4401sed 's/^/| /' conftest.$ac_ext >&5
4402
4403LIBS=$ac_save_LIBS
4404for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
4405do
4406  # Don't even attempt the hair of trying to link an X program!
4407  for ac_extension in a so sl; do
4408    if test -r $ac_dir/libXt.$ac_extension; then
4409      ac_x_libraries=$ac_dir
4410      break 2
4411    fi
4412  done
4413done
4414fi
4415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4416fi # $ac_x_libraries = no
4417
4418if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
4419  # Didn't find X anywhere.  Cache the known absence of X.
4420  ac_cv_have_x="have_x=no"
4421else
4422  # Record where we found X for the cache.
4423  ac_cv_have_x="have_x=yes \
4424                ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4425fi
4426fi
4427
4428  fi
4429  eval "$ac_cv_have_x"
4430fi # $with_x != no
4431
4432if test "$have_x" != yes; then
4433  echo "$as_me:$LINENO: result: $have_x" >&5
4434echo "${ECHO_T}$have_x" >&6
4435  no_x=yes
4436else
4437  # If each of the values was on the command line, it overrides each guess.
4438  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4439  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4440  # Update the cache value to reflect the command line values.
4441  ac_cv_have_x="have_x=yes \
4442                ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4443  echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
4444echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
4445fi
4446
4447if test "x$ac_x_libraries" != x; then
4448  LDFLAGS="$LDFLAGS -L$ac_x_libraries"
4449  PGPLOTLIB="-lX11 $PGPLOTLIB"
4450fi
4451
4452# It is possible that other libraries may be required depending on what
4453# graphics drivers were installed with PGPLOT.
4454echo "$as_me:$LINENO: checking for deflate in -lz" >&5
4455echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6
4456if test "${ac_cv_lib_z_deflate+set}" = set; then
4457  echo $ECHO_N "(cached) $ECHO_C" >&6
4458else
4459  ac_check_lib_save_LIBS=$LIBS
4460LIBS="-lz $PGPLOTLIB $LIBS $LIBS"
4461cat >conftest.$ac_ext <<_ACEOF
4462#line $LINENO "configure"
4463/* confdefs.h.  */
4464_ACEOF
4465cat confdefs.h >>conftest.$ac_ext
4466cat >>conftest.$ac_ext <<_ACEOF
4467/* end confdefs.h.  */
4468
4469/* Override any gcc2 internal prototype to avoid an error.  */
4470#ifdef __cplusplus
4471extern "C"
4472#endif
4473/* We use char because int might match the return type of a gcc2
4474   builtin and then its argument prototype would still apply.  */
4475char deflate ();
4476int
4477main ()
4478{
4479deflate ();
4480  ;
4481  return 0;
4482}
4483_ACEOF
4484rm -f conftest.$ac_objext conftest$ac_exeext
4485if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4486  (eval $ac_link) 2>&5
4487  ac_status=$?
4488  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4489  (exit $ac_status); } &&
4490         { ac_try='test -s conftest$ac_exeext'
4491  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4492  (eval $ac_try) 2>&5
4493  ac_status=$?
4494  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4495  (exit $ac_status); }; }; then
4496  ac_cv_lib_z_deflate=yes
4497else
4498  echo "$as_me: failed program was:" >&5
4499sed 's/^/| /' conftest.$ac_ext >&5
4500
4501ac_cv_lib_z_deflate=no
4502fi
4503rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4504LIBS=$ac_check_lib_save_LIBS
4505fi
4506echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5
4507echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6
4508if test $ac_cv_lib_z_deflate = yes; then
4509  PGPLOTLIB="-lz $PGPLOTLIB"
4510fi
4511
4512echo "$as_me:$LINENO: checking for png_error in -lpng" >&5
4513echo $ECHO_N "checking for png_error in -lpng... $ECHO_C" >&6
4514if test "${ac_cv_lib_png_png_error+set}" = set; then
4515  echo $ECHO_N "(cached) $ECHO_C" >&6
4516else
4517  ac_check_lib_save_LIBS=$LIBS
4518LIBS="-lpng $PGPLOTLIB $LIBS $LIBS"
4519cat >conftest.$ac_ext <<_ACEOF
4520#line $LINENO "configure"
4521/* confdefs.h.  */
4522_ACEOF
4523cat confdefs.h >>conftest.$ac_ext
4524cat >>conftest.$ac_ext <<_ACEOF
4525/* end confdefs.h.  */
4526
4527/* Override any gcc2 internal prototype to avoid an error.  */
4528#ifdef __cplusplus
4529extern "C"
4530#endif
4531/* We use char because int might match the return type of a gcc2
4532   builtin and then its argument prototype would still apply.  */
4533char png_error ();
4534int
4535main ()
4536{
4537png_error ();
4538  ;
4539  return 0;
4540}
4541_ACEOF
4542rm -f conftest.$ac_objext conftest$ac_exeext
4543if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4544  (eval $ac_link) 2>&5
4545  ac_status=$?
4546  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4547  (exit $ac_status); } &&
4548         { ac_try='test -s conftest$ac_exeext'
4549  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4550  (eval $ac_try) 2>&5
4551  ac_status=$?
4552  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4553  (exit $ac_status); }; }; then
4554  ac_cv_lib_png_png_error=yes
4555else
4556  echo "$as_me: failed program was:" >&5
4557sed 's/^/| /' conftest.$ac_ext >&5
4558
4559ac_cv_lib_png_png_error=no
4560fi
4561rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4562LIBS=$ac_check_lib_save_LIBS
4563fi
4564echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_error" >&5
4565echo "${ECHO_T}$ac_cv_lib_png_png_error" >&6
4566if test $ac_cv_lib_png_png_error = yes; then
4567  PGPLOTLIB="-lpng $PGPLOTLIB"
4568fi
4569
4570echo "$as_me:$LINENO: checking for pgbeg_ in -lpgplot" >&5
4571echo $ECHO_N "checking for pgbeg_ in -lpgplot... $ECHO_C" >&6
4572if test "${ac_cv_lib_pgplot_pgbeg_+set}" = set; then
4573  echo $ECHO_N "(cached) $ECHO_C" >&6
4574else
4575  ac_check_lib_save_LIBS=$LIBS
4576LIBS="-lpgplot $PGPLOTLIB $LIBS $LIBS"
4577cat >conftest.$ac_ext <<_ACEOF
4578#line $LINENO "configure"
4579/* confdefs.h.  */
4580_ACEOF
4581cat confdefs.h >>conftest.$ac_ext
4582cat >>conftest.$ac_ext <<_ACEOF
4583/* end confdefs.h.  */
4584
4585/* Override any gcc2 internal prototype to avoid an error.  */
4586#ifdef __cplusplus
4587extern "C"
4588#endif
4589/* We use char because int might match the return type of a gcc2
4590   builtin and then its argument prototype would still apply.  */
4591char pgbeg_ ();
4592int
4593main ()
4594{
4595pgbeg_ ();
4596  ;
4597  return 0;
4598}
4599_ACEOF
4600rm -f conftest.$ac_objext conftest$ac_exeext
4601if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4602  (eval $ac_link) 2>&5
4603  ac_status=$?
4604  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4605  (exit $ac_status); } &&
4606         { ac_try='test -s conftest$ac_exeext'
4607  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4608  (eval $ac_try) 2>&5
4609  ac_status=$?
4610  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4611  (exit $ac_status); }; }; then
4612  ac_cv_lib_pgplot_pgbeg_=yes
4613else
4614  echo "$as_me: failed program was:" >&5
4615sed 's/^/| /' conftest.$ac_ext >&5
4616
4617ac_cv_lib_pgplot_pgbeg_=no
4618fi
4619rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4620LIBS=$ac_check_lib_save_LIBS
4621fi
4622echo "$as_me:$LINENO: result: $ac_cv_lib_pgplot_pgbeg_" >&5
4623echo "${ECHO_T}$ac_cv_lib_pgplot_pgbeg_" >&6
4624if test $ac_cv_lib_pgplot_pgbeg_ = yes; then
4625  PGPLOTLIB="-lpgplot $PGPLOTLIB"
4626fi
4627
4628echo "$as_me:$LINENO: checking for cpgopen in -lcpgplot" >&5
4629echo $ECHO_N "checking for cpgopen in -lcpgplot... $ECHO_C" >&6
4630if test "${ac_cv_lib_cpgplot_cpgopen+set}" = set; then
4631  echo $ECHO_N "(cached) $ECHO_C" >&6
4632else
4633  ac_check_lib_save_LIBS=$LIBS
4634LIBS="-lcpgplot $PGPLOTLIB $LIBS $LIBS"
4635cat >conftest.$ac_ext <<_ACEOF
4636#line $LINENO "configure"
4637/* confdefs.h.  */
4638_ACEOF
4639cat confdefs.h >>conftest.$ac_ext
4640cat >>conftest.$ac_ext <<_ACEOF
4641/* end confdefs.h.  */
4642
4643/* Override any gcc2 internal prototype to avoid an error.  */
4644#ifdef __cplusplus
4645extern "C"
4646#endif
4647/* We use char because int might match the return type of a gcc2
4648   builtin and then its argument prototype would still apply.  */
4649char cpgopen ();
4650int
4651main ()
4652{
4653cpgopen ();
4654  ;
4655  return 0;
4656}
4657_ACEOF
4658rm -f conftest.$ac_objext conftest$ac_exeext
4659if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4660  (eval $ac_link) 2>&5
4661  ac_status=$?
4662  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4663  (exit $ac_status); } &&
4664         { ac_try='test -s conftest$ac_exeext'
4665  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4666  (eval $ac_try) 2>&5
4667  ac_status=$?
4668  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4669  (exit $ac_status); }; }; then
4670  ac_cv_lib_cpgplot_cpgopen=yes
4671else
4672  echo "$as_me: failed program was:" >&5
4673sed 's/^/| /' conftest.$ac_ext >&5
4674
4675ac_cv_lib_cpgplot_cpgopen=no
4676fi
4677rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4678LIBS=$ac_check_lib_save_LIBS
4679fi
4680echo "$as_me:$LINENO: result: $ac_cv_lib_cpgplot_cpgopen" >&5
4681echo "${ECHO_T}$ac_cv_lib_cpgplot_cpgopen" >&6
4682if test $ac_cv_lib_cpgplot_cpgopen = yes; then
4683  PGPLOTLIB="-lcpgplot $PGPLOTLIB"
4684else
4685  PGPLOTLIB=
4686fi
4687
4688
4689if test "x$PGPLOTLIB" = x; then
4690#  AC_MSG_ERROR([
4691#    -------------------------------------------------------
4692#    Could not find the PGPLOT library.
4693#
4694#    ERROR: Duchamp configuration failure.
4695#    -------------------------------------------------------], [1])
4696  { echo "$as_me:$LINENO:
4697    -------------------------------------------------------
4698    WARNING! PGPLOT could not be found.
4699    Compiling Duchamp without graphics capabilities.
4700    -------------------------------------------------------" >&5
4701echo "$as_me:
4702    -------------------------------------------------------
4703    WARNING! PGPLOT could not be found.
4704    Compiling Duchamp without graphics capabilities.
4705    -------------------------------------------------------" >&6;}
4706#  AC_DEFINE([HAVE_PGPLOT], [0], [Define to 1 if PGPLOT is available.])
4707else
4708  { echo "$as_me:$LINENO: PGPLOT appears to be available." >&5
4709echo "$as_me: PGPLOT appears to be available." >&6;}
4710
4711cat >>confdefs.h <<\_ACEOF
4712#define HAVE_PGPLOT 1
4713_ACEOF
4714
4715fi
4716
4717
4718
4719##########################################################################
4720
4721##########################################################################
4722# Search for CFITSIO.
4723for INCDIR in $INCDIRS ; do
4724  as_ac_File=`echo "ac_cv_file_$INCDIR/fitsio.h" | $as_tr_sh`
4725echo "$as_me:$LINENO: checking for $INCDIR/fitsio.h" >&5
4726echo $ECHO_N "checking for $INCDIR/fitsio.h... $ECHO_C" >&6
4727if eval "test \"\${$as_ac_File+set}\" = set"; then
4728  echo $ECHO_N "(cached) $ECHO_C" >&6
4729else
4730  test "$cross_compiling" = yes &&
4731  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4732echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4733   { (exit 1); exit 1; }; }
4734if test -r "$INCDIR/fitsio.h"; then
4735  eval "$as_ac_File=yes"
4736else
4737  eval "$as_ac_File=no"
4738fi
4739fi
4740echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4741echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4742if test `eval echo '${'$as_ac_File'}'` = yes; then
4743  CFITSIOINC=-I$INCDIR; break
4744fi
4745
4746  INCDIR=$INCDIR/cfitsio
4747  as_ac_File=`echo "ac_cv_file_$INCDIR/fitsio.h" | $as_tr_sh`
4748echo "$as_me:$LINENO: checking for $INCDIR/fitsio.h" >&5
4749echo $ECHO_N "checking for $INCDIR/fitsio.h... $ECHO_C" >&6
4750if eval "test \"\${$as_ac_File+set}\" = set"; then
4751  echo $ECHO_N "(cached) $ECHO_C" >&6
4752else
4753  test "$cross_compiling" = yes &&
4754  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4755echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4756   { (exit 1); exit 1; }; }
4757if test -r "$INCDIR/fitsio.h"; then
4758  eval "$as_ac_File=yes"
4759else
4760  eval "$as_ac_File=no"
4761fi
4762fi
4763echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4764echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4765if test `eval echo '${'$as_ac_File'}'` = yes; then
4766  CFITSIOINC=-I$INCDIR; break
4767fi
4768
4769done
4770
4771echo "$as_me:$LINENO: checking for recv in -lsocket" >&5
4772echo $ECHO_N "checking for recv in -lsocket... $ECHO_C" >&6
4773if test "${ac_cv_lib_socket_recv+set}" = set; then
4774  echo $ECHO_N "(cached) $ECHO_C" >&6
4775else
4776  ac_check_lib_save_LIBS=$LIBS
4777LIBS="-lsocket $LIBS $LIBS"
4778cat >conftest.$ac_ext <<_ACEOF
4779#line $LINENO "configure"
4780/* confdefs.h.  */
4781_ACEOF
4782cat confdefs.h >>conftest.$ac_ext
4783cat >>conftest.$ac_ext <<_ACEOF
4784/* end confdefs.h.  */
4785
4786/* Override any gcc2 internal prototype to avoid an error.  */
4787#ifdef __cplusplus
4788extern "C"
4789#endif
4790/* We use char because int might match the return type of a gcc2
4791   builtin and then its argument prototype would still apply.  */
4792char recv ();
4793int
4794main ()
4795{
4796recv ();
4797  ;
4798  return 0;
4799}
4800_ACEOF
4801rm -f conftest.$ac_objext conftest$ac_exeext
4802if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4803  (eval $ac_link) 2>&5
4804  ac_status=$?
4805  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4806  (exit $ac_status); } &&
4807         { ac_try='test -s conftest$ac_exeext'
4808  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4809  (eval $ac_try) 2>&5
4810  ac_status=$?
4811  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4812  (exit $ac_status); }; }; then
4813  ac_cv_lib_socket_recv=yes
4814else
4815  echo "$as_me: failed program was:" >&5
4816sed 's/^/| /' conftest.$ac_ext >&5
4817
4818ac_cv_lib_socket_recv=no
4819fi
4820rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4821LIBS=$ac_check_lib_save_LIBS
4822fi
4823echo "$as_me:$LINENO: result: $ac_cv_lib_socket_recv" >&5
4824echo "${ECHO_T}$ac_cv_lib_socket_recv" >&6
4825if test $ac_cv_lib_socket_recv = yes; then
4826  CFITSIOLIB="-lsocket"
4827fi
4828
4829echo "$as_me:$LINENO: checking for ffopen in -lcfitsio" >&5
4830echo $ECHO_N "checking for ffopen in -lcfitsio... $ECHO_C" >&6
4831if test "${ac_cv_lib_cfitsio_ffopen+set}" = set; then
4832  echo $ECHO_N "(cached) $ECHO_C" >&6
4833else
4834  ac_check_lib_save_LIBS=$LIBS
4835LIBS="-lcfitsio $CFITSIOLIB $LIBS $LIBS"
4836cat >conftest.$ac_ext <<_ACEOF
4837#line $LINENO "configure"
4838/* confdefs.h.  */
4839_ACEOF
4840cat confdefs.h >>conftest.$ac_ext
4841cat >>conftest.$ac_ext <<_ACEOF
4842/* end confdefs.h.  */
4843
4844/* Override any gcc2 internal prototype to avoid an error.  */
4845#ifdef __cplusplus
4846extern "C"
4847#endif
4848/* We use char because int might match the return type of a gcc2
4849   builtin and then its argument prototype would still apply.  */
4850char ffopen ();
4851int
4852main ()
4853{
4854ffopen ();
4855  ;
4856  return 0;
4857}
4858_ACEOF
4859rm -f conftest.$ac_objext conftest$ac_exeext
4860if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4861  (eval $ac_link) 2>&5
4862  ac_status=$?
4863  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4864  (exit $ac_status); } &&
4865         { ac_try='test -s conftest$ac_exeext'
4866  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4867  (eval $ac_try) 2>&5
4868  ac_status=$?
4869  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4870  (exit $ac_status); }; }; then
4871  ac_cv_lib_cfitsio_ffopen=yes
4872else
4873  echo "$as_me: failed program was:" >&5
4874sed 's/^/| /' conftest.$ac_ext >&5
4875
4876ac_cv_lib_cfitsio_ffopen=no
4877fi
4878rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4879LIBS=$ac_check_lib_save_LIBS
4880fi
4881echo "$as_me:$LINENO: result: $ac_cv_lib_cfitsio_ffopen" >&5
4882echo "${ECHO_T}$ac_cv_lib_cfitsio_ffopen" >&6
4883if test $ac_cv_lib_cfitsio_ffopen = yes; then
4884  CFITSIOLIB="-lcfitsio $CFITSIOLIB"
4885fi
4886
4887
4888if test "x$CFITSIOINC" = x -o "x$CFITSIOLIB" = x; then
4889  { { echo "$as_me:$LINENO: error:
4890    -------------------------------------------------------
4891    Could not find the CFITSIO library.
4892
4893    ERROR: Duchamp configuration failure.
4894    -------------------------------------------------------" >&5
4895echo "$as_me: error:
4896    -------------------------------------------------------
4897    Could not find the CFITSIO library.
4898
4899    ERROR: Duchamp configuration failure.
4900    -------------------------------------------------------" >&2;}
4901   { (exit 1); exit 1; }; }
4902else
4903  for LIBDIR in $LIBDIRS ; do
4904    as_ac_File=`echo "ac_cv_file_$LIBDIR/libcfitsio.a" | $as_tr_sh`
4905echo "$as_me:$LINENO: checking for $LIBDIR/libcfitsio.a" >&5
4906echo $ECHO_N "checking for $LIBDIR/libcfitsio.a... $ECHO_C" >&6
4907if eval "test \"\${$as_ac_File+set}\" = set"; then
4908  echo $ECHO_N "(cached) $ECHO_C" >&6
4909else
4910  test "$cross_compiling" = yes &&
4911  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4912echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4913   { (exit 1); exit 1; }; }
4914if test -r "$LIBDIR/libcfitsio.a"; then
4915  eval "$as_ac_File=yes"
4916else
4917  eval "$as_ac_File=no"
4918fi
4919fi
4920echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4921echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4922if test `eval echo '${'$as_ac_File'}'` = yes; then
4923  CFITSIOLIB="-L$LIBDIR $CFITSIOLIB"; break
4924fi
4925
4926    LIBDIR=$LIBDIR/cfitsio
4927    as_ac_File=`echo "ac_cv_file_$LIBDIR/libcfitsio.a" | $as_tr_sh`
4928echo "$as_me:$LINENO: checking for $LIBDIR/libcfitsio.a" >&5
4929echo $ECHO_N "checking for $LIBDIR/libcfitsio.a... $ECHO_C" >&6
4930if eval "test \"\${$as_ac_File+set}\" = set"; then
4931  echo $ECHO_N "(cached) $ECHO_C" >&6
4932else
4933  test "$cross_compiling" = yes &&
4934  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4935echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4936   { (exit 1); exit 1; }; }
4937if test -r "$LIBDIR/libcfitsio.a"; then
4938  eval "$as_ac_File=yes"
4939else
4940  eval "$as_ac_File=no"
4941fi
4942fi
4943echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4944echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4945if test `eval echo '${'$as_ac_File'}'` = yes; then
4946  CFITSIOLIB="-L$LIBDIR $CFITSIOLIB"; break
4947fi
4948
4949  done
4950  { echo "$as_me:$LINENO: CFITSIO appears to be available." >&5
4951echo "$as_me: CFITSIO appears to be available." >&6;}
4952
4953cat >>confdefs.h <<\_ACEOF
4954#define HAVE_CFITSIO 1
4955_ACEOF
4956
4957fi
4958
4959
4960
4961##########################################################################
4962
4963##########################################################################
4964# Search for WCSLIB.
4965for INCDIR in $INCDIRS ; do
4966  as_ac_File=`echo "ac_cv_file_$INCDIR/cpgsbox.h" | $as_tr_sh`
4967echo "$as_me:$LINENO: checking for $INCDIR/cpgsbox.h" >&5
4968echo $ECHO_N "checking for $INCDIR/cpgsbox.h... $ECHO_C" >&6
4969if eval "test \"\${$as_ac_File+set}\" = set"; then
4970  echo $ECHO_N "(cached) $ECHO_C" >&6
4971else
4972  test "$cross_compiling" = yes &&
4973  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4974echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4975   { (exit 1); exit 1; }; }
4976if test -r "$INCDIR/cpgsbox.h"; then
4977  eval "$as_ac_File=yes"
4978else
4979  eval "$as_ac_File=no"
4980fi
4981fi
4982echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
4983echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
4984if test `eval echo '${'$as_ac_File'}'` = yes; then
4985  WCSINC="-I$INCDIR $WCSINC"; break
4986fi
4987
4988  INCDIR=$INCDIR/wcslib
4989  as_ac_File=`echo "ac_cv_file_$INCDIR/cpgsbox.h" | $as_tr_sh`
4990echo "$as_me:$LINENO: checking for $INCDIR/cpgsbox.h" >&5
4991echo $ECHO_N "checking for $INCDIR/cpgsbox.h... $ECHO_C" >&6
4992if eval "test \"\${$as_ac_File+set}\" = set"; then
4993  echo $ECHO_N "(cached) $ECHO_C" >&6
4994else
4995  test "$cross_compiling" = yes &&
4996  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4997echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4998   { (exit 1); exit 1; }; }
4999if test -r "$INCDIR/cpgsbox.h"; then
5000  eval "$as_ac_File=yes"
5001else
5002  eval "$as_ac_File=no"
5003fi
5004fi
5005echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5006echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5007if test `eval echo '${'$as_ac_File'}'` = yes; then
5008  WCSINC="-I$INCDIR $WCSINC"; break
5009fi
5010
5011done
5012for INCDIR in $INCDIRS ; do
5013  as_ac_File=`echo "ac_cv_file_$INCDIR/wcs.h" | $as_tr_sh`
5014echo "$as_me:$LINENO: checking for $INCDIR/wcs.h" >&5
5015echo $ECHO_N "checking for $INCDIR/wcs.h... $ECHO_C" >&6
5016if eval "test \"\${$as_ac_File+set}\" = set"; then
5017  echo $ECHO_N "(cached) $ECHO_C" >&6
5018else
5019  test "$cross_compiling" = yes &&
5020  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5021echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5022   { (exit 1); exit 1; }; }
5023if test -r "$INCDIR/wcs.h"; then
5024  eval "$as_ac_File=yes"
5025else
5026  eval "$as_ac_File=no"
5027fi
5028fi
5029echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5030echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5031if test `eval echo '${'$as_ac_File'}'` = yes; then
5032  WCSINC="-I$INCDIR $WCSINC"; break
5033fi
5034
5035  INCDIR=$INCDIR/wcslib
5036  as_ac_File=`echo "ac_cv_file_$INCDIR/wcs.h" | $as_tr_sh`
5037echo "$as_me:$LINENO: checking for $INCDIR/wcs.h" >&5
5038echo $ECHO_N "checking for $INCDIR/wcs.h... $ECHO_C" >&6
5039if eval "test \"\${$as_ac_File+set}\" = set"; then
5040  echo $ECHO_N "(cached) $ECHO_C" >&6
5041else
5042  test "$cross_compiling" = yes &&
5043  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5044echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5045   { (exit 1); exit 1; }; }
5046if test -r "$INCDIR/wcs.h"; then
5047  eval "$as_ac_File=yes"
5048else
5049  eval "$as_ac_File=no"
5050fi
5051fi
5052echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5053echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5054if test `eval echo '${'$as_ac_File'}'` = yes; then
5055  WCSINC="-I$INCDIR $WCSINC"; break
5056fi
5057
5058done
5059
5060echo "$as_me:$LINENO: checking for cpgsbox in -lpgsbox" >&5
5061echo $ECHO_N "checking for cpgsbox in -lpgsbox... $ECHO_C" >&6
5062if test "${ac_cv_lib_pgsbox_cpgsbox+set}" = set; then
5063  echo $ECHO_N "(cached) $ECHO_C" >&6
5064else
5065  ac_check_lib_save_LIBS=$LIBS
5066LIBS="-lpgsbox $WCSLIB $LIBS $CFITSIOLIB $PGPLOTLIB $LIBS"
5067cat >conftest.$ac_ext <<_ACEOF
5068#line $LINENO "configure"
5069/* confdefs.h.  */
5070_ACEOF
5071cat confdefs.h >>conftest.$ac_ext
5072cat >>conftest.$ac_ext <<_ACEOF
5073/* end confdefs.h.  */
5074
5075/* Override any gcc2 internal prototype to avoid an error.  */
5076#ifdef __cplusplus
5077extern "C"
5078#endif
5079/* We use char because int might match the return type of a gcc2
5080   builtin and then its argument prototype would still apply.  */
5081char cpgsbox ();
5082int
5083main ()
5084{
5085cpgsbox ();
5086  ;
5087  return 0;
5088}
5089_ACEOF
5090rm -f conftest.$ac_objext conftest$ac_exeext
5091if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5092  (eval $ac_link) 2>&5
5093  ac_status=$?
5094  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5095  (exit $ac_status); } &&
5096         { ac_try='test -s conftest$ac_exeext'
5097  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5098  (eval $ac_try) 2>&5
5099  ac_status=$?
5100  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5101  (exit $ac_status); }; }; then
5102  ac_cv_lib_pgsbox_cpgsbox=yes
5103else
5104  echo "$as_me: failed program was:" >&5
5105sed 's/^/| /' conftest.$ac_ext >&5
5106
5107ac_cv_lib_pgsbox_cpgsbox=no
5108fi
5109rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5110LIBS=$ac_check_lib_save_LIBS
5111fi
5112echo "$as_me:$LINENO: result: $ac_cv_lib_pgsbox_cpgsbox" >&5
5113echo "${ECHO_T}$ac_cv_lib_pgsbox_cpgsbox" >&6
5114if test $ac_cv_lib_pgsbox_cpgsbox = yes; then
5115  WCSLIB="-lpgsbox $WCSLIB"
5116fi
5117
5118echo "$as_me:$LINENO: checking for wcss2p in -lwcs" >&5
5119echo $ECHO_N "checking for wcss2p in -lwcs... $ECHO_C" >&6
5120if test "${ac_cv_lib_wcs_wcss2p+set}" = set; then
5121  echo $ECHO_N "(cached) $ECHO_C" >&6
5122else
5123  ac_check_lib_save_LIBS=$LIBS
5124LIBS="-lwcs $WCSLIB $LIBS $CFITSIOLIB $PGPLOTLIB $LIBS"
5125cat >conftest.$ac_ext <<_ACEOF
5126#line $LINENO "configure"
5127/* confdefs.h.  */
5128_ACEOF
5129cat confdefs.h >>conftest.$ac_ext
5130cat >>conftest.$ac_ext <<_ACEOF
5131/* end confdefs.h.  */
5132
5133/* Override any gcc2 internal prototype to avoid an error.  */
5134#ifdef __cplusplus
5135extern "C"
5136#endif
5137/* We use char because int might match the return type of a gcc2
5138   builtin and then its argument prototype would still apply.  */
5139char wcss2p ();
5140int
5141main ()
5142{
5143wcss2p ();
5144  ;
5145  return 0;
5146}
5147_ACEOF
5148rm -f conftest.$ac_objext conftest$ac_exeext
5149if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5150  (eval $ac_link) 2>&5
5151  ac_status=$?
5152  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5153  (exit $ac_status); } &&
5154         { ac_try='test -s conftest$ac_exeext'
5155  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5156  (eval $ac_try) 2>&5
5157  ac_status=$?
5158  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5159  (exit $ac_status); }; }; then
5160  ac_cv_lib_wcs_wcss2p=yes
5161else
5162  echo "$as_me: failed program was:" >&5
5163sed 's/^/| /' conftest.$ac_ext >&5
5164
5165ac_cv_lib_wcs_wcss2p=no
5166fi
5167rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5168LIBS=$ac_check_lib_save_LIBS
5169fi
5170echo "$as_me:$LINENO: result: $ac_cv_lib_wcs_wcss2p" >&5
5171echo "${ECHO_T}$ac_cv_lib_wcs_wcss2p" >&6
5172if test $ac_cv_lib_wcs_wcss2p = yes; then
5173  WCSLIB="-lwcs $WCSLIB"
5174fi
5175
5176
5177if test "x$WCSINC" = x -o "x$WCSLIB" = x; then
5178  { { echo "$as_me:$LINENO: error:
5179    -------------------------------------------------------
5180    Could not find the WCSLIB library.
5181
5182    ERROR: Duchamp configuration failure.
5183    -------------------------------------------------------" >&5
5184echo "$as_me: error:
5185    -------------------------------------------------------
5186    Could not find the WCSLIB library.
5187
5188    ERROR: Duchamp configuration failure.
5189    -------------------------------------------------------" >&2;}
5190   { (exit 1); exit 1; }; }
5191else
5192  for LIBDIR in $LIBDIRS ; do
5193    as_ac_File=`echo "ac_cv_file_$LIBDIR/libpgsbox.a" | $as_tr_sh`
5194echo "$as_me:$LINENO: checking for $LIBDIR/libpgsbox.a" >&5
5195echo $ECHO_N "checking for $LIBDIR/libpgsbox.a... $ECHO_C" >&6
5196if eval "test \"\${$as_ac_File+set}\" = set"; then
5197  echo $ECHO_N "(cached) $ECHO_C" >&6
5198else
5199  test "$cross_compiling" = yes &&
5200  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5201echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5202   { (exit 1); exit 1; }; }
5203if test -r "$LIBDIR/libpgsbox.a"; then
5204  eval "$as_ac_File=yes"
5205else
5206  eval "$as_ac_File=no"
5207fi
5208fi
5209echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5210echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5211if test `eval echo '${'$as_ac_File'}'` = yes; then
5212  WCSLIB="-L$LIBDIR $WCSLIB"; break
5213fi
5214
5215    LIBDIR=$LIBDIR/wcs
5216    as_ac_File=`echo "ac_cv_file_$LIBDIR/libpgsbox.a" | $as_tr_sh`
5217echo "$as_me:$LINENO: checking for $LIBDIR/libpgsbox.a" >&5
5218echo $ECHO_N "checking for $LIBDIR/libpgsbox.a... $ECHO_C" >&6
5219if eval "test \"\${$as_ac_File+set}\" = set"; then
5220  echo $ECHO_N "(cached) $ECHO_C" >&6
5221else
5222  test "$cross_compiling" = yes &&
5223  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5224echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5225   { (exit 1); exit 1; }; }
5226if test -r "$LIBDIR/libpgsbox.a"; then
5227  eval "$as_ac_File=yes"
5228else
5229  eval "$as_ac_File=no"
5230fi
5231fi
5232echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5233echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5234if test `eval echo '${'$as_ac_File'}'` = yes; then
5235  WCSLIB="-L$LIBDIR $WCSLIB"; break
5236fi
5237
5238  done
5239  for LIBDIR in $LIBDIRS ; do
5240    as_ac_File=`echo "ac_cv_file_$LIBDIR/libwcs.a" | $as_tr_sh`
5241echo "$as_me:$LINENO: checking for $LIBDIR/libwcs.a" >&5
5242echo $ECHO_N "checking for $LIBDIR/libwcs.a... $ECHO_C" >&6
5243if eval "test \"\${$as_ac_File+set}\" = set"; then
5244  echo $ECHO_N "(cached) $ECHO_C" >&6
5245else
5246  test "$cross_compiling" = yes &&
5247  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5248echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5249   { (exit 1); exit 1; }; }
5250if test -r "$LIBDIR/libwcs.a"; then
5251  eval "$as_ac_File=yes"
5252else
5253  eval "$as_ac_File=no"
5254fi
5255fi
5256echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5257echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5258if test `eval echo '${'$as_ac_File'}'` = yes; then
5259  WCSLIB="-L$LIBDIR $WCSLIB"; break
5260fi
5261
5262    LIBDIR=$LIBDIR/wcs
5263    as_ac_File=`echo "ac_cv_file_$LIBDIR/libwcs.a" | $as_tr_sh`
5264echo "$as_me:$LINENO: checking for $LIBDIR/libwcs.a" >&5
5265echo $ECHO_N "checking for $LIBDIR/libwcs.a... $ECHO_C" >&6
5266if eval "test \"\${$as_ac_File+set}\" = set"; then
5267  echo $ECHO_N "(cached) $ECHO_C" >&6
5268else
5269  test "$cross_compiling" = yes &&
5270  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
5271echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
5272   { (exit 1); exit 1; }; }
5273if test -r "$LIBDIR/libwcs.a"; then
5274  eval "$as_ac_File=yes"
5275else
5276  eval "$as_ac_File=no"
5277fi
5278fi
5279echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
5280echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
5281if test `eval echo '${'$as_ac_File'}'` = yes; then
5282  WCSLIB="-L$LIBDIR $WCSLIB"; break
5283fi
5284
5285  done
5286  { echo "$as_me:$LINENO: WCSLIB appears to be available." >&5
5287echo "$as_me: WCSLIB appears to be available." >&6;}
5288
5289cat >>confdefs.h <<\_ACEOF
5290#define HAVE_WCSLIB 1
5291_ACEOF
5292
5293fi
5294
5295
5296
5297##########################################################################
5298
5299
5300
5301          ac_config_files="$ac_config_files Makefile"
5302
5303cat >confcache <<\_ACEOF
5304# This file is a shell script that caches the results of configure
5305# tests run on this system so they can be shared between configure
5306# scripts and configure runs, see configure's option --config-cache.
5307# It is not useful on other systems.  If it contains results you don't
5308# want to keep, you may remove or edit it.
5309#
5310# config.status only pays attention to the cache file if you give it
5311# the --recheck option to rerun configure.
5312#
5313# `ac_cv_env_foo' variables (set or unset) will be overridden when
5314# loading this file, other *unset* `ac_cv_foo' will be assigned the
5315# following values.
5316
5317_ACEOF
5318
5319# The following way of writing the cache mishandles newlines in values,
5320# but we know of no workaround that is simple, portable, and efficient.
5321# So, don't put newlines in cache variables' values.
5322# Ultrix sh set writes to stderr and can't be redirected directly,
5323# and sets the high bit in the cache file unless we assign to the vars.
5324{
5325  (set) 2>&1 |
5326    case `(ac_space=' '; set | grep ac_space) 2>&1` in
5327    *ac_space=\ *)
5328      # `set' does not quote correctly, so add quotes (double-quote
5329      # substitution turns \\\\ into \\, and sed turns \\ into \).
5330      sed -n \
5331        "s/'/'\\\\''/g;
5332          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5333      ;;
5334    *)
5335      # `set' quotes correctly as required by POSIX, so do not add quotes.
5336      sed -n \
5337        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
5338      ;;
5339    esac;
5340} |
5341  sed '
5342     t clear
5343     : clear
5344     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
5345     t end
5346     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
5347     : end' >>confcache
5348if diff $cache_file confcache >/dev/null 2>&1; then :; else
5349  if test -w $cache_file; then
5350    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
5351    cat confcache >$cache_file
5352  else
5353    echo "not updating unwritable cache $cache_file"
5354  fi
5355fi
5356rm -f confcache
5357
5358test "x$prefix" = xNONE && prefix=$ac_default_prefix
5359# Let make expand exec_prefix.
5360test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5361
5362# VPATH may cause trouble with some makes, so we remove $(srcdir),
5363# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
5364# trailing colons and then remove the whole line if VPATH becomes empty
5365# (actually we leave an empty line to preserve line numbers).
5366if test "x$srcdir" = x.; then
5367  ac_vpsub='/^[         ]*VPATH[        ]*=/{
5368s/:*\$(srcdir):*/:/;
5369s/:*\${srcdir}:*/:/;
5370s/:*@srcdir@:*/:/;
5371s/^\([^=]*=[    ]*\):*/\1/;
5372s/:*$//;
5373s/^[^=]*=[      ]*$//;
5374}'
5375fi
5376
5377DEFS=-DHAVE_CONFIG_H
5378
5379ac_libobjs=
5380ac_ltlibobjs=
5381for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
5382  # 1. Remove the extension, and $U if already installed.
5383  ac_i=`echo "$ac_i" |
5384         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
5385  # 2. Add them.
5386  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
5387  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
5388done
5389LIBOBJS=$ac_libobjs
5390
5391LTLIBOBJS=$ac_ltlibobjs
5392
5393
5394
5395: ${CONFIG_STATUS=./config.status}
5396ac_clean_files_save=$ac_clean_files
5397ac_clean_files="$ac_clean_files $CONFIG_STATUS"
5398{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
5399echo "$as_me: creating $CONFIG_STATUS" >&6;}
5400cat >$CONFIG_STATUS <<_ACEOF
5401#! $SHELL
5402# Generated by $as_me.
5403# Run this file to recreate the current configuration.
5404# Compiler output produced by configure, useful for debugging
5405# configure, is in config.log if it exists.
5406
5407debug=false
5408ac_cs_recheck=false
5409ac_cs_silent=false
5410SHELL=\${CONFIG_SHELL-$SHELL}
5411_ACEOF
5412
5413cat >>$CONFIG_STATUS <<\_ACEOF
5414## --------------------- ##
5415## M4sh Initialization.  ##
5416## --------------------- ##
5417
5418# Be Bourne compatible
5419if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
5420  emulate sh
5421  NULLCMD=:
5422  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
5423  # is contrary to our usage.  Disable this feature.
5424  alias -g '${1+"$@"}'='"$@"'
5425elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
5426  set -o posix
5427fi
5428
5429# Support unset when possible.
5430if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
5431  as_unset=unset
5432else
5433  as_unset=false
5434fi
5435
5436
5437# Work around bugs in pre-3.0 UWIN ksh.
5438$as_unset ENV MAIL MAILPATH
5439PS1='$ '
5440PS2='> '
5441PS4='+ '
5442
5443# NLS nuisances.
5444for as_var in \
5445  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
5446  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
5447  LC_TELEPHONE LC_TIME
5448do
5449  if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
5450    eval $as_var=C; export $as_var
5451  else
5452    $as_unset $as_var
5453  fi
5454done
5455
5456# Required to use basename.
5457if expr a : '\(a\)' >/dev/null 2>&1; then
5458  as_expr=expr
5459else
5460  as_expr=false
5461fi
5462
5463if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
5464  as_basename=basename
5465else
5466  as_basename=false
5467fi
5468
5469
5470# Name of the executable.
5471as_me=`$as_basename "$0" ||
5472$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
5473         X"$0" : 'X\(//\)$' \| \
5474         X"$0" : 'X\(/\)$' \| \
5475         .     : '\(.\)' 2>/dev/null ||
5476echo X/"$0" |
5477    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
5478          /^X\/\(\/\/\)$/{ s//\1/; q; }
5479          /^X\/\(\/\).*/{ s//\1/; q; }
5480          s/.*/./; q'`
5481
5482
5483# PATH needs CR, and LINENO needs CR and PATH.
5484# Avoid depending upon Character Ranges.
5485as_cr_letters='abcdefghijklmnopqrstuvwxyz'
5486as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
5487as_cr_Letters=$as_cr_letters$as_cr_LETTERS
5488as_cr_digits='0123456789'
5489as_cr_alnum=$as_cr_Letters$as_cr_digits
5490
5491# The user is always right.
5492if test "${PATH_SEPARATOR+set}" != set; then
5493  echo "#! /bin/sh" >conf$$.sh
5494  echo  "exit 0"   >>conf$$.sh
5495  chmod +x conf$$.sh
5496  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
5497    PATH_SEPARATOR=';'
5498  else
5499    PATH_SEPARATOR=:
5500  fi
5501  rm -f conf$$.sh
5502fi
5503
5504
5505  as_lineno_1=$LINENO
5506  as_lineno_2=$LINENO
5507  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
5508  test "x$as_lineno_1" != "x$as_lineno_2" &&
5509  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
5510  # Find who we are.  Look in the path if we contain no path at all
5511  # relative or not.
5512  case $0 in
5513    *[\\/]* ) as_myself=$0 ;;
5514    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5515for as_dir in $PATH
5516do
5517  IFS=$as_save_IFS
5518  test -z "$as_dir" && as_dir=.
5519  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
5520done
5521
5522       ;;
5523  esac
5524  # We did not find ourselves, most probably we were run as `sh COMMAND'
5525  # in which case we are not to be found in the path.
5526  if test "x$as_myself" = x; then
5527    as_myself=$0
5528  fi
5529  if test ! -f "$as_myself"; then
5530    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
5531echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
5532   { (exit 1); exit 1; }; }
5533  fi
5534  case $CONFIG_SHELL in
5535  '')
5536    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5537for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
5538do
5539  IFS=$as_save_IFS
5540  test -z "$as_dir" && as_dir=.
5541  for as_base in sh bash ksh sh5; do
5542         case $as_dir in
5543         /*)
5544           if ("$as_dir/$as_base" -c '
5545  as_lineno_1=$LINENO
5546  as_lineno_2=$LINENO
5547  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
5548  test "x$as_lineno_1" != "x$as_lineno_2" &&
5549  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
5550             $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
5551             $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
5552             CONFIG_SHELL=$as_dir/$as_base
5553             export CONFIG_SHELL
5554             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
5555           fi;;
5556         esac
5557       done
5558done
5559;;
5560  esac
5561
5562  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
5563  # uniformly replaced by the line number.  The first 'sed' inserts a
5564  # line-number line before each line; the second 'sed' does the real
5565  # work.  The second script uses 'N' to pair each line-number line
5566  # with the numbered line, and appends trailing '-' during
5567  # substitution so that $LINENO is not a special case at line end.
5568  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
5569  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
5570  sed '=' <$as_myself |
5571    sed '
5572      N
5573      s,$,-,
5574      : loop
5575      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
5576      t loop
5577      s,-$,,
5578      s,^['$as_cr_digits']*\n,,
5579    ' >$as_me.lineno &&
5580  chmod +x $as_me.lineno ||
5581    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
5582echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
5583   { (exit 1); exit 1; }; }
5584
5585  # Don't try to exec as it changes $[0], causing all sort of problems
5586  # (the dirname of $[0] is not the place where we might find the
5587  # original and so on.  Autoconf is especially sensible to this).
5588  . ./$as_me.lineno
5589  # Exit status is that of the last command.
5590  exit
5591}
5592
5593
5594case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
5595  *c*,-n*) ECHO_N= ECHO_C='
5596' ECHO_T='      ' ;;
5597  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
5598  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
5599esac
5600
5601if expr a : '\(a\)' >/dev/null 2>&1; then
5602  as_expr=expr
5603else
5604  as_expr=false
5605fi
5606
5607rm -f conf$$ conf$$.exe conf$$.file
5608echo >conf$$.file
5609if ln -s conf$$.file conf$$ 2>/dev/null; then
5610  # We could just check for DJGPP; but this test a) works b) is more generic
5611  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
5612  if test -f conf$$.exe; then
5613    # Don't use ln at all; we don't have any links
5614    as_ln_s='cp -p'
5615  else
5616    as_ln_s='ln -s'
5617  fi
5618elif ln conf$$.file conf$$ 2>/dev/null; then
5619  as_ln_s=ln
5620else
5621  as_ln_s='cp -p'
5622fi
5623rm -f conf$$ conf$$.exe conf$$.file
5624
5625if mkdir -p . 2>/dev/null; then
5626  as_mkdir_p=:
5627else
5628  as_mkdir_p=false
5629fi
5630
5631as_executable_p="test -f"
5632
5633# Sed expression to map a string onto a valid CPP name.
5634as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
5635
5636# Sed expression to map a string onto a valid variable name.
5637as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
5638
5639
5640# IFS
5641# We need space, tab and new line, in precisely that order.
5642as_nl='
5643'
5644IFS="   $as_nl"
5645
5646# CDPATH.
5647$as_unset CDPATH
5648
5649exec 6>&1
5650
5651# Open the log real soon, to keep \$[0] and so on meaningful, and to
5652# report actual input values of CONFIG_FILES etc. instead of their
5653# values after options handling.  Logging --version etc. is OK.
5654exec 5>>config.log
5655{
5656  echo
5657  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
5658## Running $as_me. ##
5659_ASBOX
5660} >&5
5661cat >&5 <<_CSEOF
5662
5663This file was extended by Duchamp $as_me 1.1, which was
5664generated by GNU Autoconf 2.57.  Invocation command line was
5665
5666  CONFIG_FILES    = $CONFIG_FILES
5667  CONFIG_HEADERS  = $CONFIG_HEADERS
5668  CONFIG_LINKS    = $CONFIG_LINKS
5669  CONFIG_COMMANDS = $CONFIG_COMMANDS
5670  $ $0 $@
5671
5672_CSEOF
5673echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
5674echo >&5
5675_ACEOF
5676
5677# Files that config.status was made for.
5678if test -n "$ac_config_files"; then
5679  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
5680fi
5681
5682if test -n "$ac_config_headers"; then
5683  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
5684fi
5685
5686if test -n "$ac_config_links"; then
5687  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
5688fi
5689
5690if test -n "$ac_config_commands"; then
5691  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
5692fi
5693
5694cat >>$CONFIG_STATUS <<\_ACEOF
5695
5696ac_cs_usage="\
5697\`$as_me' instantiates files from templates according to the
5698current configuration.
5699
5700Usage: $0 [OPTIONS] [FILE]...
5701
5702  -h, --help       print this help, then exit
5703  -V, --version    print version number, then exit
5704  -q, --quiet      do not print progress messages
5705  -d, --debug      don't remove temporary files
5706      --recheck    update $as_me by reconfiguring in the same conditions
5707  --file=FILE[:TEMPLATE]
5708                   instantiate the configuration file FILE
5709  --header=FILE[:TEMPLATE]
5710                   instantiate the configuration header FILE
5711
5712Configuration files:
5713$config_files
5714
5715Configuration headers:
5716$config_headers
5717
5718Report bugs to <bug-autoconf@gnu.org>."
5719_ACEOF
5720
5721cat >>$CONFIG_STATUS <<_ACEOF
5722ac_cs_version="\\
5723Duchamp config.status 1.1
5724configured by $0, generated by GNU Autoconf 2.57,
5725  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
5726
5727Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
5728Free Software Foundation, Inc.
5729This config.status script is free software; the Free Software Foundation
5730gives unlimited permission to copy, distribute and modify it."
5731srcdir=$srcdir
5732_ACEOF
5733
5734cat >>$CONFIG_STATUS <<\_ACEOF
5735# If no file are specified by the user, then we need to provide default
5736# value.  By we need to know if files were specified by the user.
5737ac_need_defaults=:
5738while test $# != 0
5739do
5740  case $1 in
5741  --*=*)
5742    ac_option=`expr "x$1" : 'x\([^=]*\)='`
5743    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
5744    ac_shift=:
5745    ;;
5746  -*)
5747    ac_option=$1
5748    ac_optarg=$2
5749    ac_shift=shift
5750    ;;
5751  *) # This is not an option, so the user has probably given explicit
5752     # arguments.
5753     ac_option=$1
5754     ac_need_defaults=false;;
5755  esac
5756
5757  case $ac_option in
5758  # Handling of the options.
5759_ACEOF
5760cat >>$CONFIG_STATUS <<\_ACEOF
5761  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5762    ac_cs_recheck=: ;;
5763  --version | --vers* | -V )
5764    echo "$ac_cs_version"; exit 0 ;;
5765  --he | --h)
5766    # Conflict between --help and --header
5767    { { echo "$as_me:$LINENO: error: ambiguous option: $1
5768Try \`$0 --help' for more information." >&5
5769echo "$as_me: error: ambiguous option: $1
5770Try \`$0 --help' for more information." >&2;}
5771   { (exit 1); exit 1; }; };;
5772  --help | --hel | -h )
5773    echo "$ac_cs_usage"; exit 0 ;;
5774  --debug | --d* | -d )
5775    debug=: ;;
5776  --file | --fil | --fi | --f )
5777    $ac_shift
5778    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
5779    ac_need_defaults=false;;
5780  --header | --heade | --head | --hea )
5781    $ac_shift
5782    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
5783    ac_need_defaults=false;;
5784  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
5785  | -silent | --silent | --silen | --sile | --sil | --si | --s)
5786    ac_cs_silent=: ;;
5787
5788  # This is an error.
5789  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
5790Try \`$0 --help' for more information." >&5
5791echo "$as_me: error: unrecognized option: $1
5792Try \`$0 --help' for more information." >&2;}
5793   { (exit 1); exit 1; }; } ;;
5794
5795  *) ac_config_targets="$ac_config_targets $1" ;;
5796
5797  esac
5798  shift
5799done
5800
5801ac_configure_extra_args=
5802
5803if $ac_cs_silent; then
5804  exec 6>/dev/null
5805  ac_configure_extra_args="$ac_configure_extra_args --silent"
5806fi
5807
5808_ACEOF
5809cat >>$CONFIG_STATUS <<_ACEOF
5810if \$ac_cs_recheck; then
5811  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
5812  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
5813fi
5814
5815_ACEOF
5816
5817
5818
5819
5820
5821cat >>$CONFIG_STATUS <<\_ACEOF
5822for ac_config_target in $ac_config_targets
5823do
5824  case "$ac_config_target" in
5825  # Handling of arguments.
5826  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
5827  "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
5828  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
5829echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
5830   { (exit 1); exit 1; }; };;
5831  esac
5832done
5833
5834# If the user did not use the arguments to specify the items to instantiate,
5835# then the envvar interface is used.  Set only those that are not.
5836# We use the long form for the default assignment because of an extremely
5837# bizarre bug on SunOS 4.1.3.
5838if $ac_need_defaults; then
5839  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
5840  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
5841fi
5842
5843# Have a temporary directory for convenience.  Make it in the build tree
5844# simply because there is no reason to put it here, and in addition,
5845# creating and moving files from /tmp can sometimes cause problems.
5846# Create a temporary directory, and hook for its removal unless debugging.
5847$debug ||
5848{
5849  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
5850  trap '{ (exit 1); exit 1; }' 1 2 13 15
5851}
5852
5853# Create a (secure) tmp directory for tmp files.
5854
5855{
5856  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
5857  test -n "$tmp" && test -d "$tmp"
5858}  ||
5859{
5860  tmp=./confstat$$-$RANDOM
5861  (umask 077 && mkdir $tmp)
5862} ||
5863{
5864   echo "$me: cannot create a temporary directory in ." >&2
5865   { (exit 1); exit 1; }
5866}
5867
5868_ACEOF
5869
5870cat >>$CONFIG_STATUS <<_ACEOF
5871
5872#
5873# CONFIG_FILES section.
5874#
5875
5876# No need to generate the scripts if there are no CONFIG_FILES.
5877# This happens for instance when ./config.status config.h
5878if test -n "\$CONFIG_FILES"; then
5879  # Protect against being on the right side of a sed subst in config.status.
5880  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
5881   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
5882s,@SHELL@,$SHELL,;t t
5883s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
5884s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
5885s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
5886s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
5887s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
5888s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
5889s,@exec_prefix@,$exec_prefix,;t t
5890s,@prefix@,$prefix,;t t
5891s,@program_transform_name@,$program_transform_name,;t t
5892s,@bindir@,$bindir,;t t
5893s,@sbindir@,$sbindir,;t t
5894s,@libexecdir@,$libexecdir,;t t
5895s,@datadir@,$datadir,;t t
5896s,@sysconfdir@,$sysconfdir,;t t
5897s,@sharedstatedir@,$sharedstatedir,;t t
5898s,@localstatedir@,$localstatedir,;t t
5899s,@libdir@,$libdir,;t t
5900s,@includedir@,$includedir,;t t
5901s,@oldincludedir@,$oldincludedir,;t t
5902s,@infodir@,$infodir,;t t
5903s,@mandir@,$mandir,;t t
5904s,@build_alias@,$build_alias,;t t
5905s,@host_alias@,$host_alias,;t t
5906s,@target_alias@,$target_alias,;t t
5907s,@DEFS@,$DEFS,;t t
5908s,@ECHO_C@,$ECHO_C,;t t
5909s,@ECHO_N@,$ECHO_N,;t t
5910s,@ECHO_T@,$ECHO_T,;t t
5911s,@LIBS@,$LIBS,;t t
5912s,@CXX@,$CXX,;t t
5913s,@CXXFLAGS@,$CXXFLAGS,;t t
5914s,@LDFLAGS@,$LDFLAGS,;t t
5915s,@CPPFLAGS@,$CPPFLAGS,;t t
5916s,@ac_ct_CXX@,$ac_ct_CXX,;t t
5917s,@EXEEXT@,$EXEEXT,;t t
5918s,@OBJEXT@,$OBJEXT,;t t
5919s,@CC@,$CC,;t t
5920s,@CFLAGS@,$CFLAGS,;t t
5921s,@ac_ct_CC@,$ac_ct_CC,;t t
5922s,@CPP@,$CPP,;t t
5923s,@EGREP@,$EGREP,;t t
5924s,@RANLIB@,$RANLIB,;t t
5925s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
5926s,@POW_LIB@,$POW_LIB,;t t
5927s,@LIBOBJS@,$LIBOBJS,;t t
5928s,@PGPLOTINC@,$PGPLOTINC,;t t
5929s,@PGPLOTLIB@,$PGPLOTLIB,;t t
5930s,@CFITSIOINC@,$CFITSIOINC,;t t
5931s,@CFITSIOLIB@,$CFITSIOLIB,;t t
5932s,@WCSINC@,$WCSINC,;t t
5933s,@WCSLIB@,$WCSLIB,;t t
5934s,@LTLIBOBJS@,$LTLIBOBJS,;t t
5935CEOF
5936
5937_ACEOF
5938
5939  cat >>$CONFIG_STATUS <<\_ACEOF
5940  # Split the substitutions into bite-sized pieces for seds with
5941  # small command number limits, like on Digital OSF/1 and HP-UX.
5942  ac_max_sed_lines=48
5943  ac_sed_frag=1 # Number of current file.
5944  ac_beg=1 # First line for current file.
5945  ac_end=$ac_max_sed_lines # Line after last line for current file.
5946  ac_more_lines=:
5947  ac_sed_cmds=
5948  while $ac_more_lines; do
5949    if test $ac_beg -gt 1; then
5950      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
5951    else
5952      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
5953    fi
5954    if test ! -s $tmp/subs.frag; then
5955      ac_more_lines=false
5956    else
5957      # The purpose of the label and of the branching condition is to
5958      # speed up the sed processing (if there are no `@' at all, there
5959      # is no need to browse any of the substitutions).
5960      # These are the two extra sed commands mentioned above.
5961      (echo ':t
5962  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
5963      if test -z "$ac_sed_cmds"; then
5964        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
5965      else
5966        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
5967      fi
5968      ac_sed_frag=`expr $ac_sed_frag + 1`
5969      ac_beg=$ac_end
5970      ac_end=`expr $ac_end + $ac_max_sed_lines`
5971    fi
5972  done
5973  if test -z "$ac_sed_cmds"; then
5974    ac_sed_cmds=cat
5975  fi
5976fi # test -n "$CONFIG_FILES"
5977
5978_ACEOF
5979cat >>$CONFIG_STATUS <<\_ACEOF
5980for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
5981  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5982  case $ac_file in
5983  - | *:- | *:-:* ) # input from stdin
5984        cat >$tmp/stdin
5985        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5986        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5987  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
5988        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
5989  * )   ac_file_in=$ac_file.in ;;
5990  esac
5991
5992  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
5993  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
5994$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5995         X"$ac_file" : 'X\(//\)[^/]' \| \
5996         X"$ac_file" : 'X\(//\)$' \| \
5997         X"$ac_file" : 'X\(/\)' \| \
5998         .     : '\(.\)' 2>/dev/null ||
5999echo X"$ac_file" |
6000    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
6001          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
6002          /^X\(\/\/\)$/{ s//\1/; q; }
6003          /^X\(\/\).*/{ s//\1/; q; }
6004          s/.*/./; q'`
6005  { if $as_mkdir_p; then
6006    mkdir -p "$ac_dir"
6007  else
6008    as_dir="$ac_dir"
6009    as_dirs=
6010    while test ! -d "$as_dir"; do
6011      as_dirs="$as_dir $as_dirs"
6012      as_dir=`(dirname "$as_dir") 2>/dev/null ||
6013$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6014         X"$as_dir" : 'X\(//\)[^/]' \| \
6015         X"$as_dir" : 'X\(//\)$' \| \
6016         X"$as_dir" : 'X\(/\)' \| \
6017         .     : '\(.\)' 2>/dev/null ||
6018echo X"$as_dir" |
6019    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
6020          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
6021          /^X\(\/\/\)$/{ s//\1/; q; }
6022          /^X\(\/\).*/{ s//\1/; q; }
6023          s/.*/./; q'`
6024    done
6025    test ! -n "$as_dirs" || mkdir $as_dirs
6026  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
6027echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
6028   { (exit 1); exit 1; }; }; }
6029
6030  ac_builddir=.
6031
6032if test "$ac_dir" != .; then
6033  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
6034  # A "../" for each directory in $ac_dir_suffix.
6035  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
6036else
6037  ac_dir_suffix= ac_top_builddir=
6038fi
6039
6040case $srcdir in
6041  .)  # No --srcdir option.  We are building in place.
6042    ac_srcdir=.
6043    if test -z "$ac_top_builddir"; then
6044       ac_top_srcdir=.
6045    else
6046       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
6047    fi ;;
6048  [\\/]* | ?:[\\/]* )  # Absolute path.
6049    ac_srcdir=$srcdir$ac_dir_suffix;
6050    ac_top_srcdir=$srcdir ;;
6051  *) # Relative path.
6052    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
6053    ac_top_srcdir=$ac_top_builddir$srcdir ;;
6054esac
6055# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
6056# absolute.
6057ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
6058ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
6059ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
6060ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
6061
6062
6063
6064  if test x"$ac_file" != x-; then
6065    { echo "$as_me:$LINENO: creating $ac_file" >&5
6066echo "$as_me: creating $ac_file" >&6;}
6067    rm -f "$ac_file"
6068  fi
6069  # Let's still pretend it is `configure' which instantiates (i.e., don't
6070  # use $as_me), people would be surprised to read:
6071  #    /* config.h.  Generated by config.status.  */
6072  if test x"$ac_file" = x-; then
6073    configure_input=
6074  else
6075    configure_input="$ac_file.  "
6076  fi
6077  configure_input=$configure_input"Generated from `echo $ac_file_in |
6078                                     sed 's,.*/,,'` by configure."
6079
6080  # First look for the input files in the build tree, otherwise in the
6081  # src tree.
6082  ac_file_inputs=`IFS=:
6083    for f in $ac_file_in; do
6084      case $f in
6085      -) echo $tmp/stdin ;;
6086      [\\/$]*)
6087         # Absolute (can't be DOS-style, as IFS=:)
6088         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
6089echo "$as_me: error: cannot find input file: $f" >&2;}
6090   { (exit 1); exit 1; }; }
6091         echo $f;;
6092      *) # Relative
6093         if test -f "$f"; then
6094           # Build tree
6095           echo $f
6096         elif test -f "$srcdir/$f"; then
6097           # Source tree
6098           echo $srcdir/$f
6099         else
6100           # /dev/null tree
6101           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
6102echo "$as_me: error: cannot find input file: $f" >&2;}
6103   { (exit 1); exit 1; }; }
6104         fi;;
6105      esac
6106    done` || { (exit 1); exit 1; }
6107_ACEOF
6108cat >>$CONFIG_STATUS <<_ACEOF
6109  sed "$ac_vpsub
6110$extrasub
6111_ACEOF
6112cat >>$CONFIG_STATUS <<\_ACEOF
6113:t
6114/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
6115s,@configure_input@,$configure_input,;t t
6116s,@srcdir@,$ac_srcdir,;t t
6117s,@abs_srcdir@,$ac_abs_srcdir,;t t
6118s,@top_srcdir@,$ac_top_srcdir,;t t
6119s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
6120s,@builddir@,$ac_builddir,;t t
6121s,@abs_builddir@,$ac_abs_builddir,;t t
6122s,@top_builddir@,$ac_top_builddir,;t t
6123s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
6124" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
6125  rm -f $tmp/stdin
6126  if test x"$ac_file" != x-; then
6127    mv $tmp/out $ac_file
6128  else
6129    cat $tmp/out
6130    rm -f $tmp/out
6131  fi
6132
6133done
6134_ACEOF
6135cat >>$CONFIG_STATUS <<\_ACEOF
6136
6137#
6138# CONFIG_HEADER section.
6139#
6140
6141# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6142# NAME is the cpp macro being defined and VALUE is the value it is being given.
6143#
6144# ac_d sets the value in "#define NAME VALUE" lines.
6145ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
6146ac_dB='[        ].*$,\1#\2'
6147ac_dC=' '
6148ac_dD=',;t'
6149# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
6150ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
6151ac_uB='$,\1#\2define\3'
6152ac_uC=' '
6153ac_uD=',;t'
6154
6155for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
6156  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6157  case $ac_file in
6158  - | *:- | *:-:* ) # input from stdin
6159        cat >$tmp/stdin
6160        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
6161        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
6162  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
6163        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
6164  * )   ac_file_in=$ac_file.in ;;
6165  esac
6166
6167  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
6168echo "$as_me: creating $ac_file" >&6;}
6169
6170  # First look for the input files in the build tree, otherwise in the
6171  # src tree.
6172  ac_file_inputs=`IFS=:
6173    for f in $ac_file_in; do
6174      case $f in
6175      -) echo $tmp/stdin ;;
6176      [\\/$]*)
6177         # Absolute (can't be DOS-style, as IFS=:)
6178         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
6179echo "$as_me: error: cannot find input file: $f" >&2;}
6180   { (exit 1); exit 1; }; }
6181         echo $f;;
6182      *) # Relative
6183         if test -f "$f"; then
6184           # Build tree
6185           echo $f
6186         elif test -f "$srcdir/$f"; then
6187           # Source tree
6188           echo $srcdir/$f
6189         else
6190           # /dev/null tree
6191           { { 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         fi;;
6195      esac
6196    done` || { (exit 1); exit 1; }
6197  # Remove the trailing spaces.
6198  sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
6199
6200_ACEOF
6201
6202# Transform confdefs.h into two sed scripts, `conftest.defines' and
6203# `conftest.undefs', that substitutes the proper values into
6204# config.h.in to produce config.h.  The first handles `#define'
6205# templates, and the second `#undef' templates.
6206# And first: Protect against being on the right side of a sed subst in
6207# config.status.  Protect against being in an unquoted here document
6208# in config.status.
6209rm -f conftest.defines conftest.undefs
6210# Using a here document instead of a string reduces the quoting nightmare.
6211# Putting comments in sed scripts is not portable.
6212#
6213# `end' is used to avoid that the second main sed command (meant for
6214# 0-ary CPP macros) applies to n-ary macro definitions.
6215# See the Autoconf documentation for `clear'.
6216cat >confdef2sed.sed <<\_ACEOF
6217s/[\\&,]/\\&/g
6218s,[\\$`],\\&,g
6219t clear
6220: clear
6221s,^[    ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
6222t end
6223s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
6224: end
6225_ACEOF
6226# If some macros were called several times there might be several times
6227# the same #defines, which is useless.  Nevertheless, we may not want to
6228# sort them, since we want the *last* AC-DEFINE to be honored.
6229uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
6230sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
6231rm -f confdef2sed.sed
6232
6233# This sed command replaces #undef with comments.  This is necessary, for
6234# example, in the case of _POSIX_SOURCE, which is predefined and required
6235# on some systems where configure will not decide to define it.
6236cat >>conftest.undefs <<\_ACEOF
6237s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
6238_ACEOF
6239
6240# Break up conftest.defines because some shells have a limit on the size
6241# of here documents, and old seds have small limits too (100 cmds).
6242echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
6243echo '  if grep "^[     ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
6244echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
6245echo '  :' >>$CONFIG_STATUS
6246rm -f conftest.tail
6247while grep . conftest.defines >/dev/null
6248do
6249  # Write a limited-size here document to $tmp/defines.sed.
6250  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
6251  # Speed up: don't consider the non `#define' lines.
6252  echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS
6253  # Work around the forget-to-reset-the-flag bug.
6254  echo 't clr' >>$CONFIG_STATUS
6255  echo ': clr' >>$CONFIG_STATUS
6256  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
6257  echo 'CEOF
6258  sed -f $tmp/defines.sed $tmp/in >$tmp/out
6259  rm -f $tmp/in
6260  mv $tmp/out $tmp/in
6261' >>$CONFIG_STATUS
6262  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
6263  rm -f conftest.defines
6264  mv conftest.tail conftest.defines
6265done
6266rm -f conftest.defines
6267echo '  fi # grep' >>$CONFIG_STATUS
6268echo >>$CONFIG_STATUS
6269
6270# Break up conftest.undefs because some shells have a limit on the size
6271# of here documents, and old seds have small limits too (100 cmds).
6272echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
6273rm -f conftest.tail
6274while grep . conftest.undefs >/dev/null
6275do
6276  # Write a limited-size here document to $tmp/undefs.sed.
6277  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
6278  # Speed up: don't consider the non `#undef'
6279  echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS
6280  # Work around the forget-to-reset-the-flag bug.
6281  echo 't clr' >>$CONFIG_STATUS
6282  echo ': clr' >>$CONFIG_STATUS
6283  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
6284  echo 'CEOF
6285  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
6286  rm -f $tmp/in
6287  mv $tmp/out $tmp/in
6288' >>$CONFIG_STATUS
6289  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
6290  rm -f conftest.undefs
6291  mv conftest.tail conftest.undefs
6292done
6293rm -f conftest.undefs
6294
6295cat >>$CONFIG_STATUS <<\_ACEOF
6296  # Let's still pretend it is `configure' which instantiates (i.e., don't
6297  # use $as_me), people would be surprised to read:
6298  #    /* config.h.  Generated by config.status.  */
6299  if test x"$ac_file" = x-; then
6300    echo "/* Generated by configure.  */" >$tmp/config.h
6301  else
6302    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
6303  fi
6304  cat $tmp/in >>$tmp/config.h
6305  rm -f $tmp/in
6306  if test x"$ac_file" != x-; then
6307    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
6308      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
6309echo "$as_me: $ac_file is unchanged" >&6;}
6310    else
6311      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
6312$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6313         X"$ac_file" : 'X\(//\)[^/]' \| \
6314         X"$ac_file" : 'X\(//\)$' \| \
6315         X"$ac_file" : 'X\(/\)' \| \
6316         .     : '\(.\)' 2>/dev/null ||
6317echo X"$ac_file" |
6318    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
6319          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
6320          /^X\(\/\/\)$/{ s//\1/; q; }
6321          /^X\(\/\).*/{ s//\1/; q; }
6322          s/.*/./; q'`
6323      { if $as_mkdir_p; then
6324    mkdir -p "$ac_dir"
6325  else
6326    as_dir="$ac_dir"
6327    as_dirs=
6328    while test ! -d "$as_dir"; do
6329      as_dirs="$as_dir $as_dirs"
6330      as_dir=`(dirname "$as_dir") 2>/dev/null ||
6331$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6332         X"$as_dir" : 'X\(//\)[^/]' \| \
6333         X"$as_dir" : 'X\(//\)$' \| \
6334         X"$as_dir" : 'X\(/\)' \| \
6335         .     : '\(.\)' 2>/dev/null ||
6336echo X"$as_dir" |
6337    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
6338          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
6339          /^X\(\/\/\)$/{ s//\1/; q; }
6340          /^X\(\/\).*/{ s//\1/; q; }
6341          s/.*/./; q'`
6342    done
6343    test ! -n "$as_dirs" || mkdir $as_dirs
6344  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
6345echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
6346   { (exit 1); exit 1; }; }; }
6347
6348      rm -f $ac_file
6349      mv $tmp/config.h $ac_file
6350    fi
6351  else
6352    cat $tmp/config.h
6353    rm -f $tmp/config.h
6354  fi
6355done
6356_ACEOF
6357
6358cat >>$CONFIG_STATUS <<\_ACEOF
6359
6360{ (exit 0); exit 0; }
6361_ACEOF
6362chmod +x $CONFIG_STATUS
6363ac_clean_files=$ac_clean_files_save
6364
6365
6366# configure is writing to config.log, and then calls config.status.
6367# config.status does its own redirection, appending to config.log.
6368# Unfortunately, on DOS this fails, as config.log is still kept open
6369# by configure, so config.status won't be able to write to it; its
6370# output is simply discarded.  So we exec the FD to /dev/null,
6371# effectively closing config.log, so it can be properly (re)opened and
6372# appended to by config.status.  When coming back to configure, we
6373# need to make the FD available again.
6374if test "$no_create" != yes; then
6375  ac_cs_success=:
6376  ac_config_status_args=
6377  test "$silent" = yes &&
6378    ac_config_status_args="$ac_config_status_args --quiet"
6379  exec 5>/dev/null
6380  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
6381  exec 5>>config.log
6382  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
6383  # would make configure fail if this is the last instruction.
6384  $ac_cs_success || { (exit 1); exit 1; }
6385fi
6386
Note: See TracBrowser for help on using the repository browser.