source: tags/release-1.1.1/configure @ 1280

Last change on this file since 1280 was 345, checked in by MatthewWhiting, 17 years ago

Updating version 1.1.1 with the latest fixes for the configure/make scripts and their documentation.

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