source: trunk/base/configure @ 17417

Last change on this file since 17417 was 17346, checked in by jberry, 13 years ago

Look for pwd.h in autoconf.

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