source: trunk/configure @ 763

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

Version number -> 1.1.10

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