source: trunk/base/configure @ 17271

Last change on this file since 17271 was 17270, checked in by jberry, 14 years ago

autoreconf

  • 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
4480for 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 \
4481        readline/readline.h readline/history.h
4482do
4483as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4484if eval "test \"\${$as_ac_Header+set}\" = set"; then
4485  echo "$as_me:$LINENO: checking for $ac_header" >&5
4486echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4487if eval "test \"\${$as_ac_Header+set}\" = set"; then
4488  echo $ECHO_N "(cached) $ECHO_C" >&6
4489fi
4490echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4491echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4492else
4493  # Is the header compilable?
4494echo "$as_me:$LINENO: checking $ac_header usability" >&5
4495echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4496cat >conftest.$ac_ext <<_ACEOF
4497/* confdefs.h.  */
4498_ACEOF
4499cat confdefs.h >>conftest.$ac_ext
4500cat >>conftest.$ac_ext <<_ACEOF
4501/* end confdefs.h.  */
4502$ac_includes_default
4503#include <$ac_header>
4504_ACEOF
4505rm -f conftest.$ac_objext
4506if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4507  (eval $ac_compile) 2>conftest.er1
4508  ac_status=$?
4509  grep -v '^ *+' conftest.er1 >conftest.err
4510  rm -f conftest.er1
4511  cat conftest.err >&5
4512  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4513  (exit $ac_status); } &&
4514         { ac_try='test -z "$ac_c_werror_flag"
4515                         || test ! -s conftest.err'
4516  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4517  (eval $ac_try) 2>&5
4518  ac_status=$?
4519  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4520  (exit $ac_status); }; } &&
4521         { ac_try='test -s conftest.$ac_objext'
4522  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4523  (eval $ac_try) 2>&5
4524  ac_status=$?
4525  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4526  (exit $ac_status); }; }; then
4527  ac_header_compiler=yes
4528else
4529  echo "$as_me: failed program was:" >&5
4530sed 's/^/| /' conftest.$ac_ext >&5
4531
4532ac_header_compiler=no
4533fi
4534rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4535echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4536echo "${ECHO_T}$ac_header_compiler" >&6
4537
4538# Is the header present?
4539echo "$as_me:$LINENO: checking $ac_header presence" >&5
4540echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4541cat >conftest.$ac_ext <<_ACEOF
4542/* confdefs.h.  */
4543_ACEOF
4544cat confdefs.h >>conftest.$ac_ext
4545cat >>conftest.$ac_ext <<_ACEOF
4546/* end confdefs.h.  */
4547#include <$ac_header>
4548_ACEOF
4549if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4550  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4551  ac_status=$?
4552  grep -v '^ *+' conftest.er1 >conftest.err
4553  rm -f conftest.er1
4554  cat conftest.err >&5
4555  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4556  (exit $ac_status); } >/dev/null; then
4557  if test -s conftest.err; then
4558    ac_cpp_err=$ac_c_preproc_warn_flag
4559    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4560  else
4561    ac_cpp_err=
4562  fi
4563else
4564  ac_cpp_err=yes
4565fi
4566if test -z "$ac_cpp_err"; then
4567  ac_header_preproc=yes
4568else
4569  echo "$as_me: failed program was:" >&5
4570sed 's/^/| /' conftest.$ac_ext >&5
4571
4572  ac_header_preproc=no
4573fi
4574rm -f conftest.err conftest.$ac_ext
4575echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4576echo "${ECHO_T}$ac_header_preproc" >&6
4577
4578# So?  What about this header?
4579case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4580  yes:no: )
4581    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4582echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4583    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4584echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4585    ac_header_preproc=yes
4586    ;;
4587  no:yes:* )
4588    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4589echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4590    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4591echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4592    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4593echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4594    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4595echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4596    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4597echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4598    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4599echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4600    (
4601      cat <<\_ASBOX
4602## ----------------------------------------- ##
4603## Report this to darwinports@opendarwin.org ##
4604## ----------------------------------------- ##
4605_ASBOX
4606    ) |
4607      sed "s/^/$as_me: WARNING:     /" >&2
4608    ;;
4609esac
4610echo "$as_me:$LINENO: checking for $ac_header" >&5
4611echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4612if eval "test \"\${$as_ac_Header+set}\" = set"; then
4613  echo $ECHO_N "(cached) $ECHO_C" >&6
4614else
4615  eval "$as_ac_Header=\$ac_header_preproc"
4616fi
4617echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4618echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4619
4620fi
4621if test `eval echo '${'$as_ac_Header'}'` = yes; then
4622  cat >>confdefs.h <<_ACEOF
4623#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4624_ACEOF
4625
4626fi
4627
4628done
4629
4630
4631INCLUDES="-I.. -I. $INCLUDES"
4632
4633# Checks for library functions.
4634echo "$as_me:$LINENO: checking whether closedir returns void" >&5
4635echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6
4636if test "${ac_cv_func_closedir_void+set}" = set; then
4637  echo $ECHO_N "(cached) $ECHO_C" >&6
4638else
4639  if test "$cross_compiling" = yes; then
4640  ac_cv_func_closedir_void=yes
4641else
4642  cat >conftest.$ac_ext <<_ACEOF
4643/* confdefs.h.  */
4644_ACEOF
4645cat confdefs.h >>conftest.$ac_ext
4646cat >>conftest.$ac_ext <<_ACEOF
4647/* end confdefs.h.  */
4648$ac_includes_default
4649#include <$ac_header_dirent>
4650#ifndef __cplusplus
4651int closedir ();
4652#endif
4653
4654int
4655main ()
4656{
4657exit (closedir (opendir (".")) != 0);
4658  ;
4659  return 0;
4660}
4661_ACEOF
4662rm -f conftest$ac_exeext
4663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4664  (eval $ac_link) 2>&5
4665  ac_status=$?
4666  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4667  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4668  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4669  (eval $ac_try) 2>&5
4670  ac_status=$?
4671  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4672  (exit $ac_status); }; }; then
4673  ac_cv_func_closedir_void=no
4674else
4675  echo "$as_me: program exited with status $ac_status" >&5
4676echo "$as_me: failed program was:" >&5
4677sed 's/^/| /' conftest.$ac_ext >&5
4678
4679( exit $ac_status )
4680ac_cv_func_closedir_void=yes
4681fi
4682rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4683fi
4684fi
4685echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5
4686echo "${ECHO_T}$ac_cv_func_closedir_void" >&6
4687if test $ac_cv_func_closedir_void = yes; then
4688
4689cat >>confdefs.h <<\_ACEOF
4690#define CLOSEDIR_VOID 1
4691_ACEOF
4692
4693fi
4694
4695echo "$as_me:$LINENO: checking for pid_t" >&5
4696echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4697if test "${ac_cv_type_pid_t+set}" = set; then
4698  echo $ECHO_N "(cached) $ECHO_C" >&6
4699else
4700  cat >conftest.$ac_ext <<_ACEOF
4701/* confdefs.h.  */
4702_ACEOF
4703cat confdefs.h >>conftest.$ac_ext
4704cat >>conftest.$ac_ext <<_ACEOF
4705/* end confdefs.h.  */
4706$ac_includes_default
4707int
4708main ()
4709{
4710if ((pid_t *) 0)
4711  return 0;
4712if (sizeof (pid_t))
4713  return 0;
4714  ;
4715  return 0;
4716}
4717_ACEOF
4718rm -f conftest.$ac_objext
4719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4720  (eval $ac_compile) 2>conftest.er1
4721  ac_status=$?
4722  grep -v '^ *+' conftest.er1 >conftest.err
4723  rm -f conftest.er1
4724  cat conftest.err >&5
4725  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4726  (exit $ac_status); } &&
4727         { ac_try='test -z "$ac_c_werror_flag"
4728                         || test ! -s conftest.err'
4729  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4730  (eval $ac_try) 2>&5
4731  ac_status=$?
4732  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4733  (exit $ac_status); }; } &&
4734         { ac_try='test -s conftest.$ac_objext'
4735  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4736  (eval $ac_try) 2>&5
4737  ac_status=$?
4738  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4739  (exit $ac_status); }; }; then
4740  ac_cv_type_pid_t=yes
4741else
4742  echo "$as_me: failed program was:" >&5
4743sed 's/^/| /' conftest.$ac_ext >&5
4744
4745ac_cv_type_pid_t=no
4746fi
4747rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4748fi
4749echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
4750echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4751if test $ac_cv_type_pid_t = yes; then
4752  :
4753else
4754
4755cat >>confdefs.h <<_ACEOF
4756#define pid_t int
4757_ACEOF
4758
4759fi
4760
4761
4762
4763for ac_header in unistd.h vfork.h
4764do
4765as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4766if eval "test \"\${$as_ac_Header+set}\" = set"; then
4767  echo "$as_me:$LINENO: checking for $ac_header" >&5
4768echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4769if eval "test \"\${$as_ac_Header+set}\" = set"; then
4770  echo $ECHO_N "(cached) $ECHO_C" >&6
4771fi
4772echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4773echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4774else
4775  # Is the header compilable?
4776echo "$as_me:$LINENO: checking $ac_header usability" >&5
4777echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4778cat >conftest.$ac_ext <<_ACEOF
4779/* confdefs.h.  */
4780_ACEOF
4781cat confdefs.h >>conftest.$ac_ext
4782cat >>conftest.$ac_ext <<_ACEOF
4783/* end confdefs.h.  */
4784$ac_includes_default
4785#include <$ac_header>
4786_ACEOF
4787rm -f conftest.$ac_objext
4788if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4789  (eval $ac_compile) 2>conftest.er1
4790  ac_status=$?
4791  grep -v '^ *+' conftest.er1 >conftest.err
4792  rm -f conftest.er1
4793  cat conftest.err >&5
4794  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4795  (exit $ac_status); } &&
4796         { ac_try='test -z "$ac_c_werror_flag"
4797                         || test ! -s conftest.err'
4798  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4799  (eval $ac_try) 2>&5
4800  ac_status=$?
4801  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4802  (exit $ac_status); }; } &&
4803         { ac_try='test -s conftest.$ac_objext'
4804  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4805  (eval $ac_try) 2>&5
4806  ac_status=$?
4807  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4808  (exit $ac_status); }; }; then
4809  ac_header_compiler=yes
4810else
4811  echo "$as_me: failed program was:" >&5
4812sed 's/^/| /' conftest.$ac_ext >&5
4813
4814ac_header_compiler=no
4815fi
4816rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4817echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4818echo "${ECHO_T}$ac_header_compiler" >&6
4819
4820# Is the header present?
4821echo "$as_me:$LINENO: checking $ac_header presence" >&5
4822echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4823cat >conftest.$ac_ext <<_ACEOF
4824/* confdefs.h.  */
4825_ACEOF
4826cat confdefs.h >>conftest.$ac_ext
4827cat >>conftest.$ac_ext <<_ACEOF
4828/* end confdefs.h.  */
4829#include <$ac_header>
4830_ACEOF
4831if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4832  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4833  ac_status=$?
4834  grep -v '^ *+' conftest.er1 >conftest.err
4835  rm -f conftest.er1
4836  cat conftest.err >&5
4837  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4838  (exit $ac_status); } >/dev/null; then
4839  if test -s conftest.err; then
4840    ac_cpp_err=$ac_c_preproc_warn_flag
4841    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4842  else
4843    ac_cpp_err=
4844  fi
4845else
4846  ac_cpp_err=yes
4847fi
4848if test -z "$ac_cpp_err"; then
4849  ac_header_preproc=yes
4850else
4851  echo "$as_me: failed program was:" >&5
4852sed 's/^/| /' conftest.$ac_ext >&5
4853
4854  ac_header_preproc=no
4855fi
4856rm -f conftest.err conftest.$ac_ext
4857echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4858echo "${ECHO_T}$ac_header_preproc" >&6
4859
4860# So?  What about this header?
4861case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4862  yes:no: )
4863    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4864echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4865    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4866echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4867    ac_header_preproc=yes
4868    ;;
4869  no:yes:* )
4870    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4871echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4872    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
4873echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
4874    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4875echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4876    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
4877echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
4878    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4879echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4880    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4881echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4882    (
4883      cat <<\_ASBOX
4884## ----------------------------------------- ##
4885## Report this to darwinports@opendarwin.org ##
4886## ----------------------------------------- ##
4887_ASBOX
4888    ) |
4889      sed "s/^/$as_me: WARNING:     /" >&2
4890    ;;
4891esac
4892echo "$as_me:$LINENO: checking for $ac_header" >&5
4893echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4894if eval "test \"\${$as_ac_Header+set}\" = set"; then
4895  echo $ECHO_N "(cached) $ECHO_C" >&6
4896else
4897  eval "$as_ac_Header=\$ac_header_preproc"
4898fi
4899echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4900echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4901
4902fi
4903if test `eval echo '${'$as_ac_Header'}'` = yes; then
4904  cat >>confdefs.h <<_ACEOF
4905#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4906_ACEOF
4907
4908fi
4909
4910done
4911
4912
4913
4914for ac_func in fork vfork
4915do
4916as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4917echo "$as_me:$LINENO: checking for $ac_func" >&5
4918echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4919if eval "test \"\${$as_ac_var+set}\" = set"; then
4920  echo $ECHO_N "(cached) $ECHO_C" >&6
4921else
4922  cat >conftest.$ac_ext <<_ACEOF
4923/* confdefs.h.  */
4924_ACEOF
4925cat confdefs.h >>conftest.$ac_ext
4926cat >>conftest.$ac_ext <<_ACEOF
4927/* end confdefs.h.  */
4928/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4929   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4930#define $ac_func innocuous_$ac_func
4931
4932/* System header to define __stub macros and hopefully few prototypes,
4933    which can conflict with char $ac_func (); below.
4934    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4935    <limits.h> exists even on freestanding compilers.  */
4936
4937#ifdef __STDC__
4938# include <limits.h>
4939#else
4940# include <assert.h>
4941#endif
4942
4943#undef $ac_func
4944
4945/* Override any gcc2 internal prototype to avoid an error.  */
4946#ifdef __cplusplus
4947extern "C"
4948{
4949#endif
4950/* We use char because int might match the return type of a gcc2
4951   builtin and then its argument prototype would still apply.  */
4952char $ac_func ();
4953/* The GNU C library defines this for functions which it implements
4954    to always fail with ENOSYS.  Some functions are actually named
4955    something starting with __ and the normal name is an alias.  */
4956#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4957choke me
4958#else
4959char (*f) () = $ac_func;
4960#endif
4961#ifdef __cplusplus
4962}
4963#endif
4964
4965int
4966main ()
4967{
4968return f != $ac_func;
4969  ;
4970  return 0;
4971}
4972_ACEOF
4973rm -f conftest.$ac_objext conftest$ac_exeext
4974if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4975  (eval $ac_link) 2>conftest.er1
4976  ac_status=$?
4977  grep -v '^ *+' conftest.er1 >conftest.err
4978  rm -f conftest.er1
4979  cat conftest.err >&5
4980  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4981  (exit $ac_status); } &&
4982         { ac_try='test -z "$ac_c_werror_flag"
4983                         || test ! -s conftest.err'
4984  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4985  (eval $ac_try) 2>&5
4986  ac_status=$?
4987  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4988  (exit $ac_status); }; } &&
4989         { ac_try='test -s conftest$ac_exeext'
4990  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4991  (eval $ac_try) 2>&5
4992  ac_status=$?
4993  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4994  (exit $ac_status); }; }; then
4995  eval "$as_ac_var=yes"
4996else
4997  echo "$as_me: failed program was:" >&5
4998sed 's/^/| /' conftest.$ac_ext >&5
4999
5000eval "$as_ac_var=no"
5001fi
5002rm -f conftest.err conftest.$ac_objext \
5003      conftest$ac_exeext conftest.$ac_ext
5004fi
5005echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5006echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5007if test `eval echo '${'$as_ac_var'}'` = yes; then
5008  cat >>confdefs.h <<_ACEOF
5009#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5010_ACEOF
5011
5012fi
5013done
5014
5015if test "x$ac_cv_func_fork" = xyes; then
5016  echo "$as_me:$LINENO: checking for working fork" >&5
5017echo $ECHO_N "checking for working fork... $ECHO_C" >&6
5018if test "${ac_cv_func_fork_works+set}" = set; then
5019  echo $ECHO_N "(cached) $ECHO_C" >&6
5020else
5021  if test "$cross_compiling" = yes; then
5022  ac_cv_func_fork_works=cross
5023else
5024  cat >conftest.$ac_ext <<_ACEOF
5025/* By Ruediger Kuhlmann. */
5026      #include <sys/types.h>
5027      #if HAVE_UNISTD_H
5028      # include <unistd.h>
5029      #endif
5030      /* Some systems only have a dummy stub for fork() */
5031      int main ()
5032      {
5033        if (fork() < 0)
5034          exit (1);
5035        exit (0);
5036      }
5037_ACEOF
5038rm -f conftest$ac_exeext
5039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5040  (eval $ac_link) 2>&5
5041  ac_status=$?
5042  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5043  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5044  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5045  (eval $ac_try) 2>&5
5046  ac_status=$?
5047  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5048  (exit $ac_status); }; }; then
5049  ac_cv_func_fork_works=yes
5050else
5051  echo "$as_me: program exited with status $ac_status" >&5
5052echo "$as_me: failed program was:" >&5
5053sed 's/^/| /' conftest.$ac_ext >&5
5054
5055( exit $ac_status )
5056ac_cv_func_fork_works=no
5057fi
5058rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5059fi
5060fi
5061echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
5062echo "${ECHO_T}$ac_cv_func_fork_works" >&6
5063
5064else
5065  ac_cv_func_fork_works=$ac_cv_func_fork
5066fi
5067if test "x$ac_cv_func_fork_works" = xcross; then
5068  case $host in
5069    *-*-amigaos* | *-*-msdosdjgpp*)
5070      # Override, as these systems have only a dummy fork() stub
5071      ac_cv_func_fork_works=no
5072      ;;
5073    *)
5074      ac_cv_func_fork_works=yes
5075      ;;
5076  esac
5077  { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
5078echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
5079fi
5080ac_cv_func_vfork_works=$ac_cv_func_vfork
5081if test "x$ac_cv_func_vfork" = xyes; then
5082  echo "$as_me:$LINENO: checking for working vfork" >&5
5083echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
5084if test "${ac_cv_func_vfork_works+set}" = set; then
5085  echo $ECHO_N "(cached) $ECHO_C" >&6
5086else
5087  if test "$cross_compiling" = yes; then
5088  ac_cv_func_vfork_works=cross
5089else
5090  cat >conftest.$ac_ext <<_ACEOF
5091/* confdefs.h.  */
5092_ACEOF
5093cat confdefs.h >>conftest.$ac_ext
5094cat >>conftest.$ac_ext <<_ACEOF
5095/* end confdefs.h.  */
5096/* Thanks to Paul Eggert for this test.  */
5097#include <stdio.h>
5098#include <stdlib.h>
5099#include <sys/types.h>
5100#include <sys/stat.h>
5101#include <sys/wait.h>
5102#if HAVE_UNISTD_H
5103# include <unistd.h>
5104#endif
5105#if HAVE_VFORK_H
5106# include <vfork.h>
5107#endif
5108/* On some sparc systems, changes by the child to local and incoming
5109   argument registers are propagated back to the parent.  The compiler
5110   is told about this with #include <vfork.h>, but some compilers
5111   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
5112   static variable whose address is put into a register that is
5113   clobbered by the vfork.  */
5114static void
5115#ifdef __cplusplus
5116sparc_address_test (int arg)
5117# else
5118sparc_address_test (arg) int arg;
5119#endif
5120{
5121  static pid_t child;
5122  if (!child) {
5123    child = vfork ();
5124    if (child < 0) {
5125      perror ("vfork");
5126      _exit(2);
5127    }
5128    if (!child) {
5129      arg = getpid();
5130      write(-1, "", 0);
5131      _exit (arg);
5132    }
5133  }
5134}
5135
5136int
5137main ()
5138{
5139  pid_t parent = getpid ();
5140  pid_t child;
5141
5142  sparc_address_test (0);
5143
5144  child = vfork ();
5145
5146  if (child == 0) {
5147    /* Here is another test for sparc vfork register problems.  This
5148       test uses lots of local variables, at least as many local
5149       variables as main has allocated so far including compiler
5150       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
5151       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
5152       reuse the register of parent for one of the local variables,
5153       since it will think that parent can't possibly be used any more
5154       in this routine.  Assigning to the local variable will thus
5155       munge parent in the parent process.  */
5156    pid_t
5157      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
5158      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
5159    /* Convince the compiler that p..p7 are live; otherwise, it might
5160       use the same hardware register for all 8 local variables.  */
5161    if (p != p1 || p != p2 || p != p3 || p != p4
5162        || p != p5 || p != p6 || p != p7)
5163      _exit(1);
5164
5165    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
5166       from child file descriptors.  If the child closes a descriptor
5167       before it execs or exits, this munges the parent's descriptor
5168       as well.  Test for this by closing stdout in the child.  */
5169    _exit(close(fileno(stdout)) != 0);
5170  } else {
5171    int status;
5172    struct stat st;
5173
5174    while (wait(&status) != child)
5175      ;
5176    exit(
5177         /* Was there some problem with vforking?  */
5178         child < 0
5179
5180         /* Did the child fail?  (This shouldn't happen.)  */
5181         || status
5182
5183         /* Did the vfork/compiler bug occur?  */
5184         || parent != getpid()
5185
5186         /* Did the file descriptor bug occur?  */
5187         || fstat(fileno(stdout), &st) != 0
5188         );
5189  }
5190}
5191_ACEOF
5192rm -f conftest$ac_exeext
5193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5194  (eval $ac_link) 2>&5
5195  ac_status=$?
5196  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5197  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5198  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5199  (eval $ac_try) 2>&5
5200  ac_status=$?
5201  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5202  (exit $ac_status); }; }; then
5203  ac_cv_func_vfork_works=yes
5204else
5205  echo "$as_me: program exited with status $ac_status" >&5
5206echo "$as_me: failed program was:" >&5
5207sed 's/^/| /' conftest.$ac_ext >&5
5208
5209( exit $ac_status )
5210ac_cv_func_vfork_works=no
5211fi
5212rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5213fi
5214fi
5215echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
5216echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
5217
5218fi;
5219if test "x$ac_cv_func_fork_works" = xcross; then
5220  ac_cv_func_vfork_works=$ac_cv_func_vfork
5221  { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
5222echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
5223fi
5224
5225if test "x$ac_cv_func_vfork_works" = xyes; then
5226
5227cat >>confdefs.h <<\_ACEOF
5228#define HAVE_WORKING_VFORK 1
5229_ACEOF
5230
5231else
5232
5233cat >>confdefs.h <<\_ACEOF
5234#define vfork fork
5235_ACEOF
5236
5237fi
5238if test "x$ac_cv_func_fork_works" = xyes; then
5239
5240cat >>confdefs.h <<\_ACEOF
5241#define HAVE_WORKING_FORK 1
5242_ACEOF
5243
5244fi
5245
5246echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
5247echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6
5248if test "${ac_cv_have_decl_strerror_r+set}" = set; then
5249  echo $ECHO_N "(cached) $ECHO_C" >&6
5250else
5251  cat >conftest.$ac_ext <<_ACEOF
5252/* confdefs.h.  */
5253_ACEOF
5254cat confdefs.h >>conftest.$ac_ext
5255cat >>conftest.$ac_ext <<_ACEOF
5256/* end confdefs.h.  */
5257$ac_includes_default
5258int
5259main ()
5260{
5261#ifndef strerror_r
5262  char *p = (char *) strerror_r;
5263#endif
5264
5265  ;
5266  return 0;
5267}
5268_ACEOF
5269rm -f conftest.$ac_objext
5270if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5271  (eval $ac_compile) 2>conftest.er1
5272  ac_status=$?
5273  grep -v '^ *+' conftest.er1 >conftest.err
5274  rm -f conftest.er1
5275  cat conftest.err >&5
5276  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277  (exit $ac_status); } &&
5278         { ac_try='test -z "$ac_c_werror_flag"
5279                         || test ! -s conftest.err'
5280  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5281  (eval $ac_try) 2>&5
5282  ac_status=$?
5283  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5284  (exit $ac_status); }; } &&
5285         { ac_try='test -s conftest.$ac_objext'
5286  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5287  (eval $ac_try) 2>&5
5288  ac_status=$?
5289  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5290  (exit $ac_status); }; }; then
5291  ac_cv_have_decl_strerror_r=yes
5292else
5293  echo "$as_me: failed program was:" >&5
5294sed 's/^/| /' conftest.$ac_ext >&5
5295
5296ac_cv_have_decl_strerror_r=no
5297fi
5298rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5299fi
5300echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
5301echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6
5302if test $ac_cv_have_decl_strerror_r = yes; then
5303
5304cat >>confdefs.h <<_ACEOF
5305#define HAVE_DECL_STRERROR_R 1
5306_ACEOF
5307
5308
5309else
5310  cat >>confdefs.h <<_ACEOF
5311#define HAVE_DECL_STRERROR_R 0
5312_ACEOF
5313
5314
5315fi
5316
5317
5318
5319for ac_func in strerror_r
5320do
5321as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5322echo "$as_me:$LINENO: checking for $ac_func" >&5
5323echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5324if eval "test \"\${$as_ac_var+set}\" = set"; then
5325  echo $ECHO_N "(cached) $ECHO_C" >&6
5326else
5327  cat >conftest.$ac_ext <<_ACEOF
5328/* confdefs.h.  */
5329_ACEOF
5330cat confdefs.h >>conftest.$ac_ext
5331cat >>conftest.$ac_ext <<_ACEOF
5332/* end confdefs.h.  */
5333/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5334   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5335#define $ac_func innocuous_$ac_func
5336
5337/* System header to define __stub macros and hopefully few prototypes,
5338    which can conflict with char $ac_func (); below.
5339    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5340    <limits.h> exists even on freestanding compilers.  */
5341
5342#ifdef __STDC__
5343# include <limits.h>
5344#else
5345# include <assert.h>
5346#endif
5347
5348#undef $ac_func
5349
5350/* Override any gcc2 internal prototype to avoid an error.  */
5351#ifdef __cplusplus
5352extern "C"
5353{
5354#endif
5355/* We use char because int might match the return type of a gcc2
5356   builtin and then its argument prototype would still apply.  */
5357char $ac_func ();
5358/* The GNU C library defines this for functions which it implements
5359    to always fail with ENOSYS.  Some functions are actually named
5360    something starting with __ and the normal name is an alias.  */
5361#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5362choke me
5363#else
5364char (*f) () = $ac_func;
5365#endif
5366#ifdef __cplusplus
5367}
5368#endif
5369
5370int
5371main ()
5372{
5373return f != $ac_func;
5374  ;
5375  return 0;
5376}
5377_ACEOF
5378rm -f conftest.$ac_objext conftest$ac_exeext
5379if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5380  (eval $ac_link) 2>conftest.er1
5381  ac_status=$?
5382  grep -v '^ *+' conftest.er1 >conftest.err
5383  rm -f conftest.er1
5384  cat conftest.err >&5
5385  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5386  (exit $ac_status); } &&
5387         { ac_try='test -z "$ac_c_werror_flag"
5388                         || test ! -s conftest.err'
5389  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5390  (eval $ac_try) 2>&5
5391  ac_status=$?
5392  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5393  (exit $ac_status); }; } &&
5394         { ac_try='test -s conftest$ac_exeext'
5395  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5396  (eval $ac_try) 2>&5
5397  ac_status=$?
5398  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5399  (exit $ac_status); }; }; then
5400  eval "$as_ac_var=yes"
5401else
5402  echo "$as_me: failed program was:" >&5
5403sed 's/^/| /' conftest.$ac_ext >&5
5404
5405eval "$as_ac_var=no"
5406fi
5407rm -f conftest.err conftest.$ac_objext \
5408      conftest$ac_exeext conftest.$ac_ext
5409fi
5410echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5411echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5412if test `eval echo '${'$as_ac_var'}'` = yes; then
5413  cat >>confdefs.h <<_ACEOF
5414#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5415_ACEOF
5416
5417fi
5418done
5419
5420echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5
5421echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6
5422if test "${ac_cv_func_strerror_r_char_p+set}" = set; then
5423  echo $ECHO_N "(cached) $ECHO_C" >&6
5424else
5425
5426    ac_cv_func_strerror_r_char_p=no
5427    if test $ac_cv_have_decl_strerror_r = yes; then
5428      cat >conftest.$ac_ext <<_ACEOF
5429/* confdefs.h.  */
5430_ACEOF
5431cat confdefs.h >>conftest.$ac_ext
5432cat >>conftest.$ac_ext <<_ACEOF
5433/* end confdefs.h.  */
5434$ac_includes_default
5435int
5436main ()
5437{
5438
5439          char buf[100];
5440          char x = *strerror_r (0, buf, sizeof buf);
5441          char *p = strerror_r (0, buf, sizeof buf);
5442
5443  ;
5444  return 0;
5445}
5446_ACEOF
5447rm -f conftest.$ac_objext
5448if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5449  (eval $ac_compile) 2>conftest.er1
5450  ac_status=$?
5451  grep -v '^ *+' conftest.er1 >conftest.err
5452  rm -f conftest.er1
5453  cat conftest.err >&5
5454  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5455  (exit $ac_status); } &&
5456         { ac_try='test -z "$ac_c_werror_flag"
5457                         || test ! -s conftest.err'
5458  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5459  (eval $ac_try) 2>&5
5460  ac_status=$?
5461  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5462  (exit $ac_status); }; } &&
5463         { ac_try='test -s conftest.$ac_objext'
5464  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5465  (eval $ac_try) 2>&5
5466  ac_status=$?
5467  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5468  (exit $ac_status); }; }; then
5469  ac_cv_func_strerror_r_char_p=yes
5470else
5471  echo "$as_me: failed program was:" >&5
5472sed 's/^/| /' conftest.$ac_ext >&5
5473
5474fi
5475rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5476    else
5477      # strerror_r is not declared.  Choose between
5478      # systems that have relatively inaccessible declarations for the
5479      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
5480      # former has a strerror_r that returns char*, while the latter
5481      # has a strerror_r that returns `int'.
5482      # This test should segfault on the DEC system.
5483      if test "$cross_compiling" = yes; then
5484  :
5485else
5486  cat >conftest.$ac_ext <<_ACEOF
5487/* confdefs.h.  */
5488_ACEOF
5489cat confdefs.h >>conftest.$ac_ext
5490cat >>conftest.$ac_ext <<_ACEOF
5491/* end confdefs.h.  */
5492$ac_includes_default
5493        extern char *strerror_r ();
5494int
5495main ()
5496{
5497char buf[100];
5498          char x = *strerror_r (0, buf, sizeof buf);
5499          exit (!isalpha (x));
5500  ;
5501  return 0;
5502}
5503_ACEOF
5504rm -f conftest$ac_exeext
5505if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5506  (eval $ac_link) 2>&5
5507  ac_status=$?
5508  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5509  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5510  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5511  (eval $ac_try) 2>&5
5512  ac_status=$?
5513  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5514  (exit $ac_status); }; }; then
5515  ac_cv_func_strerror_r_char_p=yes
5516else
5517  echo "$as_me: program exited with status $ac_status" >&5
5518echo "$as_me: failed program was:" >&5
5519sed 's/^/| /' conftest.$ac_ext >&5
5520
5521fi
5522rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5523fi
5524    fi
5525
5526fi
5527echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
5528echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6
5529if test $ac_cv_func_strerror_r_char_p = yes; then
5530
5531cat >>confdefs.h <<\_ACEOF
5532#define STRERROR_R_CHAR_P 1
5533_ACEOF
5534
5535fi
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551for ac_func in bzero memset dup2 regcomp strdup strerror strtol fgetln lockf flock setmode strcasecmp strncasecmp copyfile
5552do
5553as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5554echo "$as_me:$LINENO: checking for $ac_func" >&5
5555echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5556if eval "test \"\${$as_ac_var+set}\" = set"; then
5557  echo $ECHO_N "(cached) $ECHO_C" >&6
5558else
5559  cat >conftest.$ac_ext <<_ACEOF
5560/* confdefs.h.  */
5561_ACEOF
5562cat confdefs.h >>conftest.$ac_ext
5563cat >>conftest.$ac_ext <<_ACEOF
5564/* end confdefs.h.  */
5565/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
5566   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5567#define $ac_func innocuous_$ac_func
5568
5569/* System header to define __stub macros and hopefully few prototypes,
5570    which can conflict with char $ac_func (); below.
5571    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5572    <limits.h> exists even on freestanding compilers.  */
5573
5574#ifdef __STDC__
5575# include <limits.h>
5576#else
5577# include <assert.h>
5578#endif
5579
5580#undef $ac_func
5581
5582/* Override any gcc2 internal prototype to avoid an error.  */
5583#ifdef __cplusplus
5584extern "C"
5585{
5586#endif
5587/* We use char because int might match the return type of a gcc2
5588   builtin and then its argument prototype would still apply.  */
5589char $ac_func ();
5590/* The GNU C library defines this for functions which it implements
5591    to always fail with ENOSYS.  Some functions are actually named
5592    something starting with __ and the normal name is an alias.  */
5593#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5594choke me
5595#else
5596char (*f) () = $ac_func;
5597#endif
5598#ifdef __cplusplus
5599}
5600#endif
5601
5602int
5603main ()
5604{
5605return f != $ac_func;
5606  ;
5607  return 0;
5608}
5609_ACEOF
5610rm -f conftest.$ac_objext conftest$ac_exeext
5611if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5612  (eval $ac_link) 2>conftest.er1
5613  ac_status=$?
5614  grep -v '^ *+' conftest.er1 >conftest.err
5615  rm -f conftest.er1
5616  cat conftest.err >&5
5617  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5618  (exit $ac_status); } &&
5619         { ac_try='test -z "$ac_c_werror_flag"
5620                         || test ! -s conftest.err'
5621  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5622  (eval $ac_try) 2>&5
5623  ac_status=$?
5624  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5625  (exit $ac_status); }; } &&
5626         { ac_try='test -s conftest$ac_exeext'
5627  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5628  (eval $ac_try) 2>&5
5629  ac_status=$?
5630  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5631  (exit $ac_status); }; }; then
5632  eval "$as_ac_var=yes"
5633else
5634  echo "$as_me: failed program was:" >&5
5635sed 's/^/| /' conftest.$ac_ext >&5
5636
5637eval "$as_ac_var=no"
5638fi
5639rm -f conftest.err conftest.$ac_objext \
5640      conftest$ac_exeext conftest.$ac_ext
5641fi
5642echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
5643echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5644if test `eval echo '${'$as_ac_var'}'` = yes; then
5645  cat >>confdefs.h <<_ACEOF
5646#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5647_ACEOF
5648
5649fi
5650done
5651
5652
5653# Check for md5 implementation
5654
5655
5656        # Check for libmd, which is prefered
5657        echo "$as_me:$LINENO: checking for MD5Update in -lmd" >&5
5658echo $ECHO_N "checking for MD5Update in -lmd... $ECHO_C" >&6
5659if test "${ac_cv_lib_md_MD5Update+set}" = set; then
5660  echo $ECHO_N "(cached) $ECHO_C" >&6
5661else
5662  ac_check_lib_save_LIBS=$LIBS
5663LIBS="-lmd  $LIBS"
5664cat >conftest.$ac_ext <<_ACEOF
5665/* confdefs.h.  */
5666_ACEOF
5667cat confdefs.h >>conftest.$ac_ext
5668cat >>conftest.$ac_ext <<_ACEOF
5669/* end confdefs.h.  */
5670
5671/* Override any gcc2 internal prototype to avoid an error.  */
5672#ifdef __cplusplus
5673extern "C"
5674#endif
5675/* We use char because int might match the return type of a gcc2
5676   builtin and then its argument prototype would still apply.  */
5677char MD5Update ();
5678int
5679main ()
5680{
5681MD5Update ();
5682  ;
5683  return 0;
5684}
5685_ACEOF
5686rm -f conftest.$ac_objext conftest$ac_exeext
5687if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5688  (eval $ac_link) 2>conftest.er1
5689  ac_status=$?
5690  grep -v '^ *+' conftest.er1 >conftest.err
5691  rm -f conftest.er1
5692  cat conftest.err >&5
5693  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5694  (exit $ac_status); } &&
5695         { ac_try='test -z "$ac_c_werror_flag"
5696                         || test ! -s conftest.err'
5697  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5698  (eval $ac_try) 2>&5
5699  ac_status=$?
5700  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5701  (exit $ac_status); }; } &&
5702         { ac_try='test -s conftest$ac_exeext'
5703  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5704  (eval $ac_try) 2>&5
5705  ac_status=$?
5706  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5707  (exit $ac_status); }; }; then
5708  ac_cv_lib_md_MD5Update=yes
5709else
5710  echo "$as_me: failed program was:" >&5
5711sed 's/^/| /' conftest.$ac_ext >&5
5712
5713ac_cv_lib_md_MD5Update=no
5714fi
5715rm -f conftest.err conftest.$ac_objext \
5716      conftest$ac_exeext conftest.$ac_ext
5717LIBS=$ac_check_lib_save_LIBS
5718fi
5719echo "$as_me:$LINENO: result: $ac_cv_lib_md_MD5Update" >&5
5720echo "${ECHO_T}$ac_cv_lib_md_MD5Update" >&6
5721if test $ac_cv_lib_md_MD5Update = yes; then
5722
5723
5724for ac_header in md5.h
5725do
5726as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5727if eval "test \"\${$as_ac_Header+set}\" = set"; then
5728  echo "$as_me:$LINENO: checking for $ac_header" >&5
5729echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5730if eval "test \"\${$as_ac_Header+set}\" = set"; then
5731  echo $ECHO_N "(cached) $ECHO_C" >&6
5732fi
5733echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5734echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5735else
5736  # Is the header compilable?
5737echo "$as_me:$LINENO: checking $ac_header usability" >&5
5738echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5739cat >conftest.$ac_ext <<_ACEOF
5740/* confdefs.h.  */
5741_ACEOF
5742cat confdefs.h >>conftest.$ac_ext
5743cat >>conftest.$ac_ext <<_ACEOF
5744/* end confdefs.h.  */
5745$ac_includes_default
5746#include <$ac_header>
5747_ACEOF
5748rm -f conftest.$ac_objext
5749if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5750  (eval $ac_compile) 2>conftest.er1
5751  ac_status=$?
5752  grep -v '^ *+' conftest.er1 >conftest.err
5753  rm -f conftest.er1
5754  cat conftest.err >&5
5755  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5756  (exit $ac_status); } &&
5757         { ac_try='test -z "$ac_c_werror_flag"
5758                         || test ! -s conftest.err'
5759  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5760  (eval $ac_try) 2>&5
5761  ac_status=$?
5762  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5763  (exit $ac_status); }; } &&
5764         { ac_try='test -s conftest.$ac_objext'
5765  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5766  (eval $ac_try) 2>&5
5767  ac_status=$?
5768  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5769  (exit $ac_status); }; }; then
5770  ac_header_compiler=yes
5771else
5772  echo "$as_me: failed program was:" >&5
5773sed 's/^/| /' conftest.$ac_ext >&5
5774
5775ac_header_compiler=no
5776fi
5777rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5778echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5779echo "${ECHO_T}$ac_header_compiler" >&6
5780
5781# Is the header present?
5782echo "$as_me:$LINENO: checking $ac_header presence" >&5
5783echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
5784cat >conftest.$ac_ext <<_ACEOF
5785/* confdefs.h.  */
5786_ACEOF
5787cat confdefs.h >>conftest.$ac_ext
5788cat >>conftest.$ac_ext <<_ACEOF
5789/* end confdefs.h.  */
5790#include <$ac_header>
5791_ACEOF
5792if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5793  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5794  ac_status=$?
5795  grep -v '^ *+' conftest.er1 >conftest.err
5796  rm -f conftest.er1
5797  cat conftest.err >&5
5798  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5799  (exit $ac_status); } >/dev/null; then
5800  if test -s conftest.err; then
5801    ac_cpp_err=$ac_c_preproc_warn_flag
5802    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5803  else
5804    ac_cpp_err=
5805  fi
5806else
5807  ac_cpp_err=yes
5808fi
5809if test -z "$ac_cpp_err"; then
5810  ac_header_preproc=yes
5811else
5812  echo "$as_me: failed program was:" >&5
5813sed 's/^/| /' conftest.$ac_ext >&5
5814
5815  ac_header_preproc=no
5816fi
5817rm -f conftest.err conftest.$ac_ext
5818echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5819echo "${ECHO_T}$ac_header_preproc" >&6
5820
5821# So?  What about this header?
5822case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5823  yes:no: )
5824    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5825echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5826    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5827echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5828    ac_header_preproc=yes
5829    ;;
5830  no:yes:* )
5831    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5832echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5833    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
5834echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
5835    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5836echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5837    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
5838echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
5839    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5840echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5841    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5842echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5843    (
5844      cat <<\_ASBOX
5845## ----------------------------------------- ##
5846## Report this to darwinports@opendarwin.org ##
5847## ----------------------------------------- ##
5848_ASBOX
5849    ) |
5850      sed "s/^/$as_me: WARNING:     /" >&2
5851    ;;
5852esac
5853echo "$as_me:$LINENO: checking for $ac_header" >&5
5854echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5855if eval "test \"\${$as_ac_Header+set}\" = set"; then
5856  echo $ECHO_N "(cached) $ECHO_C" >&6
5857else
5858  eval "$as_ac_Header=\$ac_header_preproc"
5859fi
5860echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5861echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5862
5863fi
5864if test `eval echo '${'$as_ac_Header'}'` = yes; then
5865  cat >>confdefs.h <<_ACEOF
5866#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5867_ACEOF
5868
5869else
5870
5871                        case $host_os in
5872                                darwin*)
5873                                        { echo "$as_me:$LINENO: Please install the BSD SDK package from the Xcode Developer Tools CD." >&5
5874echo "$as_me: Please install the BSD SDK package from the Xcode Developer Tools CD." >&6;}
5875                                        ;;
5876                                *)
5877                                        { echo "$as_me:$LINENO: Please install the libmd developer headers for your platform." >&5
5878echo "$as_me: Please install the libmd developer headers for your platform." >&6;}
5879                                        ;;
5880                        esac
5881                        { { echo "$as_me:$LINENO: error: libmd was found, but md5.h is missing." >&5
5882echo "$as_me: error: libmd was found, but md5.h is missing." >&2;}
5883   { (exit 1); exit 1; }; }
5884
5885fi
5886
5887done
5888
5889
5890cat >>confdefs.h <<\_ACEOF
5891#define HAVE_LIBMD
5892_ACEOF
5893
5894                MD5_LIBS="-lmd"
5895
5896fi
5897
5898        if test "x$MD5_LIBS" = "x" ; then
5899                # If libmd is not found, check for libcrypto from OpenSSL
5900                echo "$as_me:$LINENO: checking for MD5_Update in -lcrypto" >&5
5901echo $ECHO_N "checking for MD5_Update in -lcrypto... $ECHO_C" >&6
5902if test "${ac_cv_lib_crypto_MD5_Update+set}" = set; then
5903  echo $ECHO_N "(cached) $ECHO_C" >&6
5904else
5905  ac_check_lib_save_LIBS=$LIBS
5906LIBS="-lcrypto  $LIBS"
5907cat >conftest.$ac_ext <<_ACEOF
5908/* confdefs.h.  */
5909_ACEOF
5910cat confdefs.h >>conftest.$ac_ext
5911cat >>conftest.$ac_ext <<_ACEOF
5912/* end confdefs.h.  */
5913
5914/* Override any gcc2 internal prototype to avoid an error.  */
5915#ifdef __cplusplus
5916extern "C"
5917#endif
5918/* We use char because int might match the return type of a gcc2
5919   builtin and then its argument prototype would still apply.  */
5920char MD5_Update ();
5921int
5922main ()
5923{
5924MD5_Update ();
5925  ;
5926  return 0;
5927}
5928_ACEOF
5929rm -f conftest.$ac_objext conftest$ac_exeext
5930if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5931  (eval $ac_link) 2>conftest.er1
5932  ac_status=$?
5933  grep -v '^ *+' conftest.er1 >conftest.err
5934  rm -f conftest.er1
5935  cat conftest.err >&5
5936  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5937  (exit $ac_status); } &&
5938         { ac_try='test -z "$ac_c_werror_flag"
5939                         || test ! -s conftest.err'
5940  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5941  (eval $ac_try) 2>&5
5942  ac_status=$?
5943  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5944  (exit $ac_status); }; } &&
5945         { ac_try='test -s conftest$ac_exeext'
5946  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5947  (eval $ac_try) 2>&5
5948  ac_status=$?
5949  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5950  (exit $ac_status); }; }; then
5951  ac_cv_lib_crypto_MD5_Update=yes
5952else
5953  echo "$as_me: failed program was:" >&5
5954sed 's/^/| /' conftest.$ac_ext >&5
5955
5956ac_cv_lib_crypto_MD5_Update=no
5957fi
5958rm -f conftest.err conftest.$ac_objext \
5959      conftest$ac_exeext conftest.$ac_ext
5960LIBS=$ac_check_lib_save_LIBS
5961fi
5962echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_MD5_Update" >&5
5963echo "${ECHO_T}$ac_cv_lib_crypto_MD5_Update" >&6
5964if test $ac_cv_lib_crypto_MD5_Update = yes; then
5965
5966
5967for ac_header in openssl/md5.h
5968do
5969as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5970if eval "test \"\${$as_ac_Header+set}\" = set"; then
5971  echo "$as_me:$LINENO: checking for $ac_header" >&5
5972echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5973if eval "test \"\${$as_ac_Header+set}\" = set"; then
5974  echo $ECHO_N "(cached) $ECHO_C" >&6
5975fi
5976echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5977echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5978else
5979  # Is the header compilable?
5980echo "$as_me:$LINENO: checking $ac_header usability" >&5
5981echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
5982cat >conftest.$ac_ext <<_ACEOF
5983/* confdefs.h.  */
5984_ACEOF
5985cat confdefs.h >>conftest.$ac_ext
5986cat >>conftest.$ac_ext <<_ACEOF
5987/* end confdefs.h.  */
5988$ac_includes_default
5989#include <$ac_header>
5990_ACEOF
5991rm -f conftest.$ac_objext
5992if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5993  (eval $ac_compile) 2>conftest.er1
5994  ac_status=$?
5995  grep -v '^ *+' conftest.er1 >conftest.err
5996  rm -f conftest.er1
5997  cat conftest.err >&5
5998  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5999  (exit $ac_status); } &&
6000         { ac_try='test -z "$ac_c_werror_flag"
6001                         || test ! -s conftest.err'
6002  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6003  (eval $ac_try) 2>&5
6004  ac_status=$?
6005  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6006  (exit $ac_status); }; } &&
6007         { ac_try='test -s conftest.$ac_objext'
6008  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6009  (eval $ac_try) 2>&5
6010  ac_status=$?
6011  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6012  (exit $ac_status); }; }; then
6013  ac_header_compiler=yes
6014else
6015  echo "$as_me: failed program was:" >&5
6016sed 's/^/| /' conftest.$ac_ext >&5
6017
6018ac_header_compiler=no
6019fi
6020rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6021echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6022echo "${ECHO_T}$ac_header_compiler" >&6
6023
6024# Is the header present?
6025echo "$as_me:$LINENO: checking $ac_header presence" >&5
6026echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6027cat >conftest.$ac_ext <<_ACEOF
6028/* confdefs.h.  */
6029_ACEOF
6030cat confdefs.h >>conftest.$ac_ext
6031cat >>conftest.$ac_ext <<_ACEOF
6032/* end confdefs.h.  */
6033#include <$ac_header>
6034_ACEOF
6035if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6036  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6037  ac_status=$?
6038  grep -v '^ *+' conftest.er1 >conftest.err
6039  rm -f conftest.er1
6040  cat conftest.err >&5
6041  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6042  (exit $ac_status); } >/dev/null; then
6043  if test -s conftest.err; then
6044    ac_cpp_err=$ac_c_preproc_warn_flag
6045    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6046  else
6047    ac_cpp_err=
6048  fi
6049else
6050  ac_cpp_err=yes
6051fi
6052if test -z "$ac_cpp_err"; then
6053  ac_header_preproc=yes
6054else
6055  echo "$as_me: failed program was:" >&5
6056sed 's/^/| /' conftest.$ac_ext >&5
6057
6058  ac_header_preproc=no
6059fi
6060rm -f conftest.err conftest.$ac_ext
6061echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6062echo "${ECHO_T}$ac_header_preproc" >&6
6063
6064# So?  What about this header?
6065case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6066  yes:no: )
6067    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6068echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6069    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6070echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6071    ac_header_preproc=yes
6072    ;;
6073  no:yes:* )
6074    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6075echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6076    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6077echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6078    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6079echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6080    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6081echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6082    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6083echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6084    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6085echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6086    (
6087      cat <<\_ASBOX
6088## ----------------------------------------- ##
6089## Report this to darwinports@opendarwin.org ##
6090## ----------------------------------------- ##
6091_ASBOX
6092    ) |
6093      sed "s/^/$as_me: WARNING:     /" >&2
6094    ;;
6095esac
6096echo "$as_me:$LINENO: checking for $ac_header" >&5
6097echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6098if eval "test \"\${$as_ac_Header+set}\" = set"; then
6099  echo $ECHO_N "(cached) $ECHO_C" >&6
6100else
6101  eval "$as_ac_Header=\$ac_header_preproc"
6102fi
6103echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6104echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6105
6106fi
6107if test `eval echo '${'$as_ac_Header'}'` = yes; then
6108  cat >>confdefs.h <<_ACEOF
6109#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6110_ACEOF
6111
6112else
6113
6114                                case $host_os in
6115                                        darwin*)
6116                                        { echo "$as_me:$LINENO: Please install the BSD SDK package from the Xcode Developer Tools CD." >&5
6117echo "$as_me: Please install the BSD SDK package from the Xcode Developer Tools CD." >&6;}
6118                                                ;;
6119                                        *)
6120                                        { echo "$as_me:$LINENO: Please install the libmd developer headers for your platform." >&5
6121echo "$as_me: Please install the libmd developer headers for your platform." >&6;}
6122                                                ;;
6123                                esac
6124                                { { echo "$as_me:$LINENO: error: libcrypt was found, but header file openssl/md5.h is missing." >&5
6125echo "$as_me: error: libcrypt was found, but header file openssl/md5.h is missing." >&2;}
6126   { (exit 1); exit 1; }; }
6127
6128fi
6129
6130done
6131
6132
6133cat >>confdefs.h <<\_ACEOF
6134#define HAVE_LIBCRYPTO
6135_ACEOF
6136
6137                        MD5_LIBS="-lcrypto"
6138
6139else
6140
6141                        { { echo "$as_me:$LINENO: error: Neither OpenSSL or libmd were found. A working md5 implementation is required." >&5
6142echo "$as_me: error: Neither OpenSSL or libmd were found. A working md5 implementation is required." >&2;}
6143   { (exit 1); exit 1; }; }
6144
6145fi
6146
6147        fi
6148        if test "x$MD5_LIBS" = "x"; then
6149                { { echo "$as_me:$LINENO: error: Neither OpenSSL or libmd were found. A working md5 implementation is required." >&5
6150echo "$as_me: error: Neither OpenSSL or libmd were found. A working md5 implementation is required." >&2;}
6151   { (exit 1); exit 1; }; }
6152        fi
6153
6154
6155# Check for X11 and paraphernalia
6156echo "$as_me:$LINENO: checking for X" >&5
6157echo $ECHO_N "checking for X... $ECHO_C" >&6
6158
6159
6160# Check whether --with-x or --without-x was given.
6161if test "${with_x+set}" = set; then
6162  withval="$with_x"
6163
6164fi;
6165# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6166if test "x$with_x" = xno; then
6167  # The user explicitly disabled X.
6168  have_x=disabled
6169else
6170  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6171    # Both variables are already set.
6172    have_x=yes
6173  else
6174    if test "${ac_cv_have_x+set}" = set; then
6175  echo $ECHO_N "(cached) $ECHO_C" >&6
6176else
6177  # One or both of the vars are not set, and there is no cached value.
6178ac_x_includes=no ac_x_libraries=no
6179rm -fr conftest.dir
6180if mkdir conftest.dir; then
6181  cd conftest.dir
6182  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6183  cat >Imakefile <<'_ACEOF'
6184acfindx:
6185        @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6186_ACEOF
6187  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6188    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6189    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6190    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6191    for ac_extension in a so sl; do
6192      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6193         test -f $ac_im_libdir/libX11.$ac_extension; then
6194        ac_im_usrlibdir=$ac_im_libdir; break
6195      fi
6196    done
6197    # Screen out bogus values from the imake configuration.  They are
6198    # bogus both because they are the default anyway, and because
6199    # using them would break gcc on systems where it needs fixed includes.
6200    case $ac_im_incroot in
6201        /usr/include) ;;
6202        *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6203    esac
6204    case $ac_im_usrlibdir in
6205        /usr/lib | /lib) ;;
6206        *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6207    esac
6208  fi
6209  cd ..
6210  rm -fr conftest.dir
6211fi
6212
6213# Standard set of common directories for X headers.
6214# Check X11 before X11Rn because it is often a symlink to the current release.
6215ac_x_header_dirs='
6216/usr/X11/include
6217/usr/X11R6/include
6218/usr/X11R5/include
6219/usr/X11R4/include
6220
6221/usr/include/X11
6222/usr/include/X11R6
6223/usr/include/X11R5
6224/usr/include/X11R4
6225
6226/usr/local/X11/include
6227/usr/local/X11R6/include
6228/usr/local/X11R5/include
6229/usr/local/X11R4/include
6230
6231/usr/local/include/X11
6232/usr/local/include/X11R6
6233/usr/local/include/X11R5
6234/usr/local/include/X11R4
6235
6236/usr/X386/include
6237/usr/x386/include
6238/usr/XFree86/include/X11
6239
6240/usr/include
6241/usr/local/include
6242/usr/unsupported/include
6243/usr/athena/include
6244/usr/local/x11r5/include
6245/usr/lpp/Xamples/include
6246
6247/usr/openwin/include
6248/usr/openwin/share/include'
6249
6250if test "$ac_x_includes" = no; then
6251  # Guess where to find include files, by looking for Intrinsic.h.
6252  # First, try using that file with no special directory specified.
6253  cat >conftest.$ac_ext <<_ACEOF
6254/* confdefs.h.  */
6255_ACEOF
6256cat confdefs.h >>conftest.$ac_ext
6257cat >>conftest.$ac_ext <<_ACEOF
6258/* end confdefs.h.  */
6259#include <X11/Intrinsic.h>
6260_ACEOF
6261if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6262  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6263  ac_status=$?
6264  grep -v '^ *+' conftest.er1 >conftest.err
6265  rm -f conftest.er1
6266  cat conftest.err >&5
6267  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6268  (exit $ac_status); } >/dev/null; then
6269  if test -s conftest.err; then
6270    ac_cpp_err=$ac_c_preproc_warn_flag
6271    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6272  else
6273    ac_cpp_err=
6274  fi
6275else
6276  ac_cpp_err=yes
6277fi
6278if test -z "$ac_cpp_err"; then
6279  # We can compile using X headers with no special include directory.
6280ac_x_includes=
6281else
6282  echo "$as_me: failed program was:" >&5
6283sed 's/^/| /' conftest.$ac_ext >&5
6284
6285  for ac_dir in $ac_x_header_dirs; do
6286  if test -r "$ac_dir/X11/Intrinsic.h"; then
6287    ac_x_includes=$ac_dir
6288    break
6289  fi
6290done
6291fi
6292rm -f conftest.err conftest.$ac_ext
6293fi # $ac_x_includes = no
6294
6295if test "$ac_x_libraries" = no; then
6296  # Check for the libraries.
6297  # See if we find them without any special options.
6298  # Don't add to $LIBS permanently.
6299  ac_save_LIBS=$LIBS
6300  LIBS="-lXt $LIBS"
6301  cat >conftest.$ac_ext <<_ACEOF
6302/* confdefs.h.  */
6303_ACEOF
6304cat confdefs.h >>conftest.$ac_ext
6305cat >>conftest.$ac_ext <<_ACEOF
6306/* end confdefs.h.  */
6307#include <X11/Intrinsic.h>
6308int
6309main ()
6310{
6311XtMalloc (0)
6312  ;
6313  return 0;
6314}
6315_ACEOF
6316rm -f conftest.$ac_objext conftest$ac_exeext
6317if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6318  (eval $ac_link) 2>conftest.er1
6319  ac_status=$?
6320  grep -v '^ *+' conftest.er1 >conftest.err
6321  rm -f conftest.er1
6322  cat conftest.err >&5
6323  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6324  (exit $ac_status); } &&
6325         { ac_try='test -z "$ac_c_werror_flag"
6326                         || test ! -s conftest.err'
6327  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6328  (eval $ac_try) 2>&5
6329  ac_status=$?
6330  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6331  (exit $ac_status); }; } &&
6332         { ac_try='test -s conftest$ac_exeext'
6333  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6334  (eval $ac_try) 2>&5
6335  ac_status=$?
6336  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6337  (exit $ac_status); }; }; then
6338  LIBS=$ac_save_LIBS
6339# We can link X programs with no special library path.
6340ac_x_libraries=
6341else
6342  echo "$as_me: failed program was:" >&5
6343sed 's/^/| /' conftest.$ac_ext >&5
6344
6345LIBS=$ac_save_LIBS
6346for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
6347do
6348  # Don't even attempt the hair of trying to link an X program!
6349  for ac_extension in a so sl; do
6350    if test -r $ac_dir/libXt.$ac_extension; then
6351      ac_x_libraries=$ac_dir
6352      break 2
6353    fi
6354  done
6355done
6356fi
6357rm -f conftest.err conftest.$ac_objext \
6358      conftest$ac_exeext conftest.$ac_ext
6359fi # $ac_x_libraries = no
6360
6361if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
6362  # Didn't find X anywhere.  Cache the known absence of X.
6363  ac_cv_have_x="have_x=no"
6364else
6365  # Record where we found X for the cache.
6366  ac_cv_have_x="have_x=yes \
6367                ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6368fi
6369fi
6370
6371  fi
6372  eval "$ac_cv_have_x"
6373fi # $with_x != no
6374
6375if test "$have_x" != yes; then
6376  echo "$as_me:$LINENO: result: $have_x" >&5
6377echo "${ECHO_T}$have_x" >&6
6378  no_x=yes
6379else
6380  # If each of the values was on the command line, it overrides each guess.
6381  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6382  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6383  # Update the cache value to reflect the command line values.
6384  ac_cv_have_x="have_x=yes \
6385                ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6386  echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
6387echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
6388fi
6389
6390
6391
6392        if test "$no_x" = yes; then
6393  # Not all programs may use this symbol, but it does not hurt to define it.
6394
6395cat >>confdefs.h <<\_ACEOF
6396#define X_DISPLAY_MISSING 1
6397_ACEOF
6398
6399  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6400else
6401  if test -n "$x_includes"; then
6402    X_CFLAGS="$X_CFLAGS -I$x_includes"
6403  fi
6404
6405  # It would also be nice to do this for all -L options, not just this one.
6406  if test -n "$x_libraries"; then
6407    X_LIBS="$X_LIBS -L$x_libraries"
6408    # For Solaris; some versions of Sun CC require a space after -R and
6409    # others require no space.  Words are not sufficient . . . .
6410    case `(uname -sr) 2>/dev/null` in
6411    "SunOS 5"*)
6412      echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
6413echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
6414      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
6415      cat >conftest.$ac_ext <<_ACEOF
6416/* confdefs.h.  */
6417_ACEOF
6418cat confdefs.h >>conftest.$ac_ext
6419cat >>conftest.$ac_ext <<_ACEOF
6420/* end confdefs.h.  */
6421
6422int
6423main ()
6424{
6425
6426  ;
6427  return 0;
6428}
6429_ACEOF
6430rm -f conftest.$ac_objext conftest$ac_exeext
6431if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6432  (eval $ac_link) 2>conftest.er1
6433  ac_status=$?
6434  grep -v '^ *+' conftest.er1 >conftest.err
6435  rm -f conftest.er1
6436  cat conftest.err >&5
6437  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6438  (exit $ac_status); } &&
6439         { ac_try='test -z "$ac_c_werror_flag"
6440                         || test ! -s conftest.err'
6441  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6442  (eval $ac_try) 2>&5
6443  ac_status=$?
6444  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6445  (exit $ac_status); }; } &&
6446         { ac_try='test -s conftest$ac_exeext'
6447  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6448  (eval $ac_try) 2>&5
6449  ac_status=$?
6450  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6451  (exit $ac_status); }; }; then
6452  ac_R_nospace=yes
6453else
6454  echo "$as_me: failed program was:" >&5
6455sed 's/^/| /' conftest.$ac_ext >&5
6456
6457ac_R_nospace=no
6458fi
6459rm -f conftest.err conftest.$ac_objext \
6460      conftest$ac_exeext conftest.$ac_ext
6461      if test $ac_R_nospace = yes; then
6462        echo "$as_me:$LINENO: result: no" >&5
6463echo "${ECHO_T}no" >&6
6464        X_LIBS="$X_LIBS -R$x_libraries"
6465      else
6466        LIBS="$ac_xsave_LIBS -R $x_libraries"
6467        cat >conftest.$ac_ext <<_ACEOF
6468/* confdefs.h.  */
6469_ACEOF
6470cat confdefs.h >>conftest.$ac_ext
6471cat >>conftest.$ac_ext <<_ACEOF
6472/* end confdefs.h.  */
6473
6474int
6475main ()
6476{
6477
6478  ;
6479  return 0;
6480}
6481_ACEOF
6482rm -f conftest.$ac_objext conftest$ac_exeext
6483if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6484  (eval $ac_link) 2>conftest.er1
6485  ac_status=$?
6486  grep -v '^ *+' conftest.er1 >conftest.err
6487  rm -f conftest.er1
6488  cat conftest.err >&5
6489  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6490  (exit $ac_status); } &&
6491         { ac_try='test -z "$ac_c_werror_flag"
6492                         || test ! -s conftest.err'
6493  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6494  (eval $ac_try) 2>&5
6495  ac_status=$?
6496  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6497  (exit $ac_status); }; } &&
6498         { ac_try='test -s conftest$ac_exeext'
6499  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6500  (eval $ac_try) 2>&5
6501  ac_status=$?
6502  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6503  (exit $ac_status); }; }; then
6504  ac_R_space=yes
6505else
6506  echo "$as_me: failed program was:" >&5
6507sed 's/^/| /' conftest.$ac_ext >&5
6508
6509ac_R_space=no
6510fi
6511rm -f conftest.err conftest.$ac_objext \
6512      conftest$ac_exeext conftest.$ac_ext
6513        if test $ac_R_space = yes; then
6514          echo "$as_me:$LINENO: result: yes" >&5
6515echo "${ECHO_T}yes" >&6
6516          X_LIBS="$X_LIBS -R $x_libraries"
6517        else
6518          echo "$as_me:$LINENO: result: neither works" >&5
6519echo "${ECHO_T}neither works" >&6
6520        fi
6521      fi
6522      LIBS=$ac_xsave_LIBS
6523    esac
6524  fi
6525
6526  # Check for system-dependent libraries X programs must link with.
6527  # Do this before checking for the system-independent R6 libraries
6528  # (-lICE), since we may need -lsocket or whatever for X linking.
6529
6530  if test "$ISC" = yes; then
6531    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6532  else
6533    # Martyn Johnson says this is needed for Ultrix, if the X
6534    # libraries were built with DECnet support.  And Karl Berry says
6535    # the Alpha needs dnet_stub (dnet does not exist).
6536    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
6537    cat >conftest.$ac_ext <<_ACEOF
6538/* confdefs.h.  */
6539_ACEOF
6540cat confdefs.h >>conftest.$ac_ext
6541cat >>conftest.$ac_ext <<_ACEOF
6542/* end confdefs.h.  */
6543
6544/* Override any gcc2 internal prototype to avoid an error.  */
6545#ifdef __cplusplus
6546extern "C"
6547#endif
6548/* We use char because int might match the return type of a gcc2
6549   builtin and then its argument prototype would still apply.  */
6550char XOpenDisplay ();
6551int
6552main ()
6553{
6554XOpenDisplay ();
6555  ;
6556  return 0;
6557}
6558_ACEOF
6559rm -f conftest.$ac_objext conftest$ac_exeext
6560if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6561  (eval $ac_link) 2>conftest.er1
6562  ac_status=$?
6563  grep -v '^ *+' conftest.er1 >conftest.err
6564  rm -f conftest.er1
6565  cat conftest.err >&5
6566  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6567  (exit $ac_status); } &&
6568         { ac_try='test -z "$ac_c_werror_flag"
6569                         || test ! -s conftest.err'
6570  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6571  (eval $ac_try) 2>&5
6572  ac_status=$?
6573  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6574  (exit $ac_status); }; } &&
6575         { ac_try='test -s conftest$ac_exeext'
6576  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6577  (eval $ac_try) 2>&5
6578  ac_status=$?
6579  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6580  (exit $ac_status); }; }; then
6581  :
6582else
6583  echo "$as_me: failed program was:" >&5
6584sed 's/^/| /' conftest.$ac_ext >&5
6585
6586echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
6587echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
6588if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
6589  echo $ECHO_N "(cached) $ECHO_C" >&6
6590else
6591  ac_check_lib_save_LIBS=$LIBS
6592LIBS="-ldnet  $LIBS"
6593cat >conftest.$ac_ext <<_ACEOF
6594/* confdefs.h.  */
6595_ACEOF
6596cat confdefs.h >>conftest.$ac_ext
6597cat >>conftest.$ac_ext <<_ACEOF
6598/* end confdefs.h.  */
6599
6600/* Override any gcc2 internal prototype to avoid an error.  */
6601#ifdef __cplusplus
6602extern "C"
6603#endif
6604/* We use char because int might match the return type of a gcc2
6605   builtin and then its argument prototype would still apply.  */
6606char dnet_ntoa ();
6607int
6608main ()
6609{
6610dnet_ntoa ();
6611  ;
6612  return 0;
6613}
6614_ACEOF
6615rm -f conftest.$ac_objext conftest$ac_exeext
6616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6617  (eval $ac_link) 2>conftest.er1
6618  ac_status=$?
6619  grep -v '^ *+' conftest.er1 >conftest.err
6620  rm -f conftest.er1
6621  cat conftest.err >&5
6622  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6623  (exit $ac_status); } &&
6624         { ac_try='test -z "$ac_c_werror_flag"
6625                         || test ! -s conftest.err'
6626  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6627  (eval $ac_try) 2>&5
6628  ac_status=$?
6629  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6630  (exit $ac_status); }; } &&
6631         { ac_try='test -s conftest$ac_exeext'
6632  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6633  (eval $ac_try) 2>&5
6634  ac_status=$?
6635  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6636  (exit $ac_status); }; }; then
6637  ac_cv_lib_dnet_dnet_ntoa=yes
6638else
6639  echo "$as_me: failed program was:" >&5
6640sed 's/^/| /' conftest.$ac_ext >&5
6641
6642ac_cv_lib_dnet_dnet_ntoa=no
6643fi
6644rm -f conftest.err conftest.$ac_objext \
6645      conftest$ac_exeext conftest.$ac_ext
6646LIBS=$ac_check_lib_save_LIBS
6647fi
6648echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
6649echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
6650if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
6651  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6652fi
6653
6654    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6655      echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
6656echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
6657if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
6658  echo $ECHO_N "(cached) $ECHO_C" >&6
6659else
6660  ac_check_lib_save_LIBS=$LIBS
6661LIBS="-ldnet_stub  $LIBS"
6662cat >conftest.$ac_ext <<_ACEOF
6663/* confdefs.h.  */
6664_ACEOF
6665cat confdefs.h >>conftest.$ac_ext
6666cat >>conftest.$ac_ext <<_ACEOF
6667/* end confdefs.h.  */
6668
6669/* Override any gcc2 internal prototype to avoid an error.  */
6670#ifdef __cplusplus
6671extern "C"
6672#endif
6673/* We use char because int might match the return type of a gcc2
6674   builtin and then its argument prototype would still apply.  */
6675char dnet_ntoa ();
6676int
6677main ()
6678{
6679dnet_ntoa ();
6680  ;
6681  return 0;
6682}
6683_ACEOF
6684rm -f conftest.$ac_objext conftest$ac_exeext
6685if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6686  (eval $ac_link) 2>conftest.er1
6687  ac_status=$?
6688  grep -v '^ *+' conftest.er1 >conftest.err
6689  rm -f conftest.er1
6690  cat conftest.err >&5
6691  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6692  (exit $ac_status); } &&
6693         { ac_try='test -z "$ac_c_werror_flag"
6694                         || test ! -s conftest.err'
6695  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6696  (eval $ac_try) 2>&5
6697  ac_status=$?
6698  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6699  (exit $ac_status); }; } &&
6700         { ac_try='test -s conftest$ac_exeext'
6701  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6702  (eval $ac_try) 2>&5
6703  ac_status=$?
6704  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6705  (exit $ac_status); }; }; then
6706  ac_cv_lib_dnet_stub_dnet_ntoa=yes
6707else
6708  echo "$as_me: failed program was:" >&5
6709sed 's/^/| /' conftest.$ac_ext >&5
6710
6711ac_cv_lib_dnet_stub_dnet_ntoa=no
6712fi
6713rm -f conftest.err conftest.$ac_objext \
6714      conftest$ac_exeext conftest.$ac_ext
6715LIBS=$ac_check_lib_save_LIBS
6716fi
6717echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
6718echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
6719if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
6720  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6721fi
6722
6723    fi
6724fi
6725rm -f conftest.err conftest.$ac_objext \
6726      conftest$ac_exeext conftest.$ac_ext
6727    LIBS="$ac_xsave_LIBS"
6728
6729    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6730    # to get the SysV transport functions.
6731    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
6732    # needs -lnsl.
6733    # The nsl library prevents programs from opening the X display
6734    # on Irix 5.2, according to T.E. Dickey.
6735    # The functions gethostbyname, getservbyname, and inet_addr are
6736    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
6737    echo "$as_me:$LINENO: checking for gethostbyname" >&5
6738echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
6739if test "${ac_cv_func_gethostbyname+set}" = set; then
6740  echo $ECHO_N "(cached) $ECHO_C" >&6
6741else
6742  cat >conftest.$ac_ext <<_ACEOF
6743/* confdefs.h.  */
6744_ACEOF
6745cat confdefs.h >>conftest.$ac_ext
6746cat >>conftest.$ac_ext <<_ACEOF
6747/* end confdefs.h.  */
6748/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
6749   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6750#define gethostbyname innocuous_gethostbyname
6751
6752/* System header to define __stub macros and hopefully few prototypes,
6753    which can conflict with char gethostbyname (); below.
6754    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6755    <limits.h> exists even on freestanding compilers.  */
6756
6757#ifdef __STDC__
6758# include <limits.h>
6759#else
6760# include <assert.h>
6761#endif
6762
6763#undef gethostbyname
6764
6765/* Override any gcc2 internal prototype to avoid an error.  */
6766#ifdef __cplusplus
6767extern "C"
6768{
6769#endif
6770/* We use char because int might match the return type of a gcc2
6771   builtin and then its argument prototype would still apply.  */
6772char gethostbyname ();
6773/* The GNU C library defines this for functions which it implements
6774    to always fail with ENOSYS.  Some functions are actually named
6775    something starting with __ and the normal name is an alias.  */
6776#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6777choke me
6778#else
6779char (*f) () = gethostbyname;
6780#endif
6781#ifdef __cplusplus
6782}
6783#endif
6784
6785int
6786main ()
6787{
6788return f != gethostbyname;
6789  ;
6790  return 0;
6791}
6792_ACEOF
6793rm -f conftest.$ac_objext conftest$ac_exeext
6794if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6795  (eval $ac_link) 2>conftest.er1
6796  ac_status=$?
6797  grep -v '^ *+' conftest.er1 >conftest.err
6798  rm -f conftest.er1
6799  cat conftest.err >&5
6800  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6801  (exit $ac_status); } &&
6802         { ac_try='test -z "$ac_c_werror_flag"
6803                         || test ! -s conftest.err'
6804  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6805  (eval $ac_try) 2>&5
6806  ac_status=$?
6807  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6808  (exit $ac_status); }; } &&
6809         { ac_try='test -s conftest$ac_exeext'
6810  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6811  (eval $ac_try) 2>&5
6812  ac_status=$?
6813  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6814  (exit $ac_status); }; }; then
6815  ac_cv_func_gethostbyname=yes
6816else
6817  echo "$as_me: failed program was:" >&5
6818sed 's/^/| /' conftest.$ac_ext >&5
6819
6820ac_cv_func_gethostbyname=no
6821fi
6822rm -f conftest.err conftest.$ac_objext \
6823      conftest$ac_exeext conftest.$ac_ext
6824fi
6825echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
6826echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
6827
6828    if test $ac_cv_func_gethostbyname = no; then
6829      echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
6830echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
6831if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
6832  echo $ECHO_N "(cached) $ECHO_C" >&6
6833else
6834  ac_check_lib_save_LIBS=$LIBS
6835LIBS="-lnsl  $LIBS"
6836cat >conftest.$ac_ext <<_ACEOF
6837/* confdefs.h.  */
6838_ACEOF
6839cat confdefs.h >>conftest.$ac_ext
6840cat >>conftest.$ac_ext <<_ACEOF
6841/* end confdefs.h.  */
6842
6843/* Override any gcc2 internal prototype to avoid an error.  */
6844#ifdef __cplusplus
6845extern "C"
6846#endif
6847/* We use char because int might match the return type of a gcc2
6848   builtin and then its argument prototype would still apply.  */
6849char gethostbyname ();
6850int
6851main ()
6852{
6853gethostbyname ();
6854  ;
6855  return 0;
6856}
6857_ACEOF
6858rm -f conftest.$ac_objext conftest$ac_exeext
6859if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6860  (eval $ac_link) 2>conftest.er1
6861  ac_status=$?
6862  grep -v '^ *+' conftest.er1 >conftest.err
6863  rm -f conftest.er1
6864  cat conftest.err >&5
6865  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6866  (exit $ac_status); } &&
6867         { ac_try='test -z "$ac_c_werror_flag"
6868                         || test ! -s conftest.err'
6869  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6870  (eval $ac_try) 2>&5
6871  ac_status=$?
6872  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6873  (exit $ac_status); }; } &&
6874         { ac_try='test -s conftest$ac_exeext'
6875  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6876  (eval $ac_try) 2>&5
6877  ac_status=$?
6878  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6879  (exit $ac_status); }; }; then
6880  ac_cv_lib_nsl_gethostbyname=yes
6881else
6882  echo "$as_me: failed program was:" >&5
6883sed 's/^/| /' conftest.$ac_ext >&5
6884
6885ac_cv_lib_nsl_gethostbyname=no
6886fi
6887rm -f conftest.err conftest.$ac_objext \
6888      conftest$ac_exeext conftest.$ac_ext
6889LIBS=$ac_check_lib_save_LIBS
6890fi
6891echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
6892echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
6893if test $ac_cv_lib_nsl_gethostbyname = yes; then
6894  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6895fi
6896
6897      if test $ac_cv_lib_nsl_gethostbyname = no; then
6898        echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
6899echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
6900if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
6901  echo $ECHO_N "(cached) $ECHO_C" >&6
6902else
6903  ac_check_lib_save_LIBS=$LIBS
6904LIBS="-lbsd  $LIBS"
6905cat >conftest.$ac_ext <<_ACEOF
6906/* confdefs.h.  */
6907_ACEOF
6908cat confdefs.h >>conftest.$ac_ext
6909cat >>conftest.$ac_ext <<_ACEOF
6910/* end confdefs.h.  */
6911
6912/* Override any gcc2 internal prototype to avoid an error.  */
6913#ifdef __cplusplus
6914extern "C"
6915#endif
6916/* We use char because int might match the return type of a gcc2
6917   builtin and then its argument prototype would still apply.  */
6918char gethostbyname ();
6919int
6920main ()
6921{
6922gethostbyname ();
6923  ;
6924  return 0;
6925}
6926_ACEOF
6927rm -f conftest.$ac_objext conftest$ac_exeext
6928if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6929  (eval $ac_link) 2>conftest.er1
6930  ac_status=$?
6931  grep -v '^ *+' conftest.er1 >conftest.err
6932  rm -f conftest.er1
6933  cat conftest.err >&5
6934  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6935  (exit $ac_status); } &&
6936         { ac_try='test -z "$ac_c_werror_flag"
6937                         || test ! -s conftest.err'
6938  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6939  (eval $ac_try) 2>&5
6940  ac_status=$?
6941  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6942  (exit $ac_status); }; } &&
6943         { ac_try='test -s conftest$ac_exeext'
6944  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6945  (eval $ac_try) 2>&5
6946  ac_status=$?
6947  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6948  (exit $ac_status); }; }; then
6949  ac_cv_lib_bsd_gethostbyname=yes
6950else
6951  echo "$as_me: failed program was:" >&5
6952sed 's/^/| /' conftest.$ac_ext >&5
6953
6954ac_cv_lib_bsd_gethostbyname=no
6955fi
6956rm -f conftest.err conftest.$ac_objext \
6957      conftest$ac_exeext conftest.$ac_ext
6958LIBS=$ac_check_lib_save_LIBS
6959fi
6960echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
6961echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
6962if test $ac_cv_lib_bsd_gethostbyname = yes; then
6963  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
6964fi
6965
6966      fi
6967    fi
6968
6969    # lieder@skyler.mavd.honeywell.com says without -lsocket,
6970    # socket/setsockopt and other routines are undefined under SCO ODT
6971    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
6972    # on later versions), says Simon Leinen: it contains gethostby*
6973    # variants that don't use the name server (or something).  -lsocket
6974    # must be given before -lnsl if both are needed.  We assume that
6975    # if connect needs -lnsl, so does gethostbyname.
6976    echo "$as_me:$LINENO: checking for connect" >&5
6977echo $ECHO_N "checking for connect... $ECHO_C" >&6
6978if test "${ac_cv_func_connect+set}" = set; then
6979  echo $ECHO_N "(cached) $ECHO_C" >&6
6980else
6981  cat >conftest.$ac_ext <<_ACEOF
6982/* confdefs.h.  */
6983_ACEOF
6984cat confdefs.h >>conftest.$ac_ext
6985cat >>conftest.$ac_ext <<_ACEOF
6986/* end confdefs.h.  */
6987/* Define connect to an innocuous variant, in case <limits.h> declares connect.
6988   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
6989#define connect innocuous_connect
6990
6991/* System header to define __stub macros and hopefully few prototypes,
6992    which can conflict with char connect (); below.
6993    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6994    <limits.h> exists even on freestanding compilers.  */
6995
6996#ifdef __STDC__
6997# include <limits.h>
6998#else
6999# include <assert.h>
7000#endif
7001
7002#undef connect
7003
7004/* Override any gcc2 internal prototype to avoid an error.  */
7005#ifdef __cplusplus
7006extern "C"
7007{
7008#endif
7009/* We use char because int might match the return type of a gcc2
7010   builtin and then its argument prototype would still apply.  */
7011char connect ();
7012/* The GNU C library defines this for functions which it implements
7013    to always fail with ENOSYS.  Some functions are actually named
7014    something starting with __ and the normal name is an alias.  */
7015#if defined (__stub_connect) || defined (__stub___connect)
7016choke me
7017#else
7018char (*f) () = connect;
7019#endif
7020#ifdef __cplusplus
7021}
7022#endif
7023
7024int
7025main ()
7026{
7027return f != connect;
7028  ;
7029  return 0;
7030}
7031_ACEOF
7032rm -f conftest.$ac_objext conftest$ac_exeext
7033if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7034  (eval $ac_link) 2>conftest.er1
7035  ac_status=$?
7036  grep -v '^ *+' conftest.er1 >conftest.err
7037  rm -f conftest.er1
7038  cat conftest.err >&5
7039  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7040  (exit $ac_status); } &&
7041         { ac_try='test -z "$ac_c_werror_flag"
7042                         || test ! -s conftest.err'
7043  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7044  (eval $ac_try) 2>&5
7045  ac_status=$?
7046  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7047  (exit $ac_status); }; } &&
7048         { ac_try='test -s conftest$ac_exeext'
7049  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7050  (eval $ac_try) 2>&5
7051  ac_status=$?
7052  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7053  (exit $ac_status); }; }; then
7054  ac_cv_func_connect=yes
7055else
7056  echo "$as_me: failed program was:" >&5
7057sed 's/^/| /' conftest.$ac_ext >&5
7058
7059ac_cv_func_connect=no
7060fi
7061rm -f conftest.err conftest.$ac_objext \
7062      conftest$ac_exeext conftest.$ac_ext
7063fi
7064echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
7065echo "${ECHO_T}$ac_cv_func_connect" >&6
7066
7067    if test $ac_cv_func_connect = no; then
7068      echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
7069echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
7070if test "${ac_cv_lib_socket_connect+set}" = set; then
7071  echo $ECHO_N "(cached) $ECHO_C" >&6
7072else
7073  ac_check_lib_save_LIBS=$LIBS
7074LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7075cat >conftest.$ac_ext <<_ACEOF
7076/* confdefs.h.  */
7077_ACEOF
7078cat confdefs.h >>conftest.$ac_ext
7079cat >>conftest.$ac_ext <<_ACEOF
7080/* end confdefs.h.  */
7081
7082/* Override any gcc2 internal prototype to avoid an error.  */
7083#ifdef __cplusplus
7084extern "C"
7085#endif
7086/* We use char because int might match the return type of a gcc2
7087   builtin and then its argument prototype would still apply.  */
7088char connect ();
7089int
7090main ()
7091{
7092connect ();
7093  ;
7094  return 0;
7095}
7096_ACEOF
7097rm -f conftest.$ac_objext conftest$ac_exeext
7098if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7099  (eval $ac_link) 2>conftest.er1
7100  ac_status=$?
7101  grep -v '^ *+' conftest.er1 >conftest.err
7102  rm -f conftest.er1
7103  cat conftest.err >&5
7104  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7105  (exit $ac_status); } &&
7106         { ac_try='test -z "$ac_c_werror_flag"
7107                         || test ! -s conftest.err'
7108  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7109  (eval $ac_try) 2>&5
7110  ac_status=$?
7111  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7112  (exit $ac_status); }; } &&
7113         { ac_try='test -s conftest$ac_exeext'
7114  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7115  (eval $ac_try) 2>&5
7116  ac_status=$?
7117  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7118  (exit $ac_status); }; }; then
7119  ac_cv_lib_socket_connect=yes
7120else
7121  echo "$as_me: failed program was:" >&5
7122sed 's/^/| /' conftest.$ac_ext >&5
7123
7124ac_cv_lib_socket_connect=no
7125fi
7126rm -f conftest.err conftest.$ac_objext \
7127      conftest$ac_exeext conftest.$ac_ext
7128LIBS=$ac_check_lib_save_LIBS
7129fi
7130echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
7131echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
7132if test $ac_cv_lib_socket_connect = yes; then
7133  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7134fi
7135
7136    fi
7137
7138    # Guillermo Gomez says -lposix is necessary on A/UX.
7139    echo "$as_me:$LINENO: checking for remove" >&5
7140echo $ECHO_N "checking for remove... $ECHO_C" >&6
7141if test "${ac_cv_func_remove+set}" = set; then
7142  echo $ECHO_N "(cached) $ECHO_C" >&6
7143else
7144  cat >conftest.$ac_ext <<_ACEOF
7145/* confdefs.h.  */
7146_ACEOF
7147cat confdefs.h >>conftest.$ac_ext
7148cat >>conftest.$ac_ext <<_ACEOF
7149/* end confdefs.h.  */
7150/* Define remove to an innocuous variant, in case <limits.h> declares remove.
7151   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7152#define remove innocuous_remove
7153
7154/* System header to define __stub macros and hopefully few prototypes,
7155    which can conflict with char remove (); below.
7156    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7157    <limits.h> exists even on freestanding compilers.  */
7158
7159#ifdef __STDC__
7160# include <limits.h>
7161#else
7162# include <assert.h>
7163#endif
7164
7165#undef remove
7166
7167/* Override any gcc2 internal prototype to avoid an error.  */
7168#ifdef __cplusplus
7169extern "C"
7170{
7171#endif
7172/* We use char because int might match the return type of a gcc2
7173   builtin and then its argument prototype would still apply.  */
7174char remove ();
7175/* The GNU C library defines this for functions which it implements
7176    to always fail with ENOSYS.  Some functions are actually named
7177    something starting with __ and the normal name is an alias.  */
7178#if defined (__stub_remove) || defined (__stub___remove)
7179choke me
7180#else
7181char (*f) () = remove;
7182#endif
7183#ifdef __cplusplus
7184}
7185#endif
7186
7187int
7188main ()
7189{
7190return f != remove;
7191  ;
7192  return 0;
7193}
7194_ACEOF
7195rm -f conftest.$ac_objext conftest$ac_exeext
7196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7197  (eval $ac_link) 2>conftest.er1
7198  ac_status=$?
7199  grep -v '^ *+' conftest.er1 >conftest.err
7200  rm -f conftest.er1
7201  cat conftest.err >&5
7202  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7203  (exit $ac_status); } &&
7204         { ac_try='test -z "$ac_c_werror_flag"
7205                         || test ! -s conftest.err'
7206  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7207  (eval $ac_try) 2>&5
7208  ac_status=$?
7209  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7210  (exit $ac_status); }; } &&
7211         { ac_try='test -s conftest$ac_exeext'
7212  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7213  (eval $ac_try) 2>&5
7214  ac_status=$?
7215  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7216  (exit $ac_status); }; }; then
7217  ac_cv_func_remove=yes
7218else
7219  echo "$as_me: failed program was:" >&5
7220sed 's/^/| /' conftest.$ac_ext >&5
7221
7222ac_cv_func_remove=no
7223fi
7224rm -f conftest.err conftest.$ac_objext \
7225      conftest$ac_exeext conftest.$ac_ext
7226fi
7227echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
7228echo "${ECHO_T}$ac_cv_func_remove" >&6
7229
7230    if test $ac_cv_func_remove = no; then
7231      echo "$as_me:$LINENO: checking for remove in -lposix" >&5
7232echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
7233if test "${ac_cv_lib_posix_remove+set}" = set; then
7234  echo $ECHO_N "(cached) $ECHO_C" >&6
7235else
7236  ac_check_lib_save_LIBS=$LIBS
7237LIBS="-lposix  $LIBS"
7238cat >conftest.$ac_ext <<_ACEOF
7239/* confdefs.h.  */
7240_ACEOF
7241cat confdefs.h >>conftest.$ac_ext
7242cat >>conftest.$ac_ext <<_ACEOF
7243/* end confdefs.h.  */
7244
7245/* Override any gcc2 internal prototype to avoid an error.  */
7246#ifdef __cplusplus
7247extern "C"
7248#endif
7249/* We use char because int might match the return type of a gcc2
7250   builtin and then its argument prototype would still apply.  */
7251char remove ();
7252int
7253main ()
7254{
7255remove ();
7256  ;
7257  return 0;
7258}
7259_ACEOF
7260rm -f conftest.$ac_objext conftest$ac_exeext
7261if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7262  (eval $ac_link) 2>conftest.er1
7263  ac_status=$?
7264  grep -v '^ *+' conftest.er1 >conftest.err
7265  rm -f conftest.er1
7266  cat conftest.err >&5
7267  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7268  (exit $ac_status); } &&
7269         { ac_try='test -z "$ac_c_werror_flag"
7270                         || test ! -s conftest.err'
7271  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7272  (eval $ac_try) 2>&5
7273  ac_status=$?
7274  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7275  (exit $ac_status); }; } &&
7276         { ac_try='test -s conftest$ac_exeext'
7277  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7278  (eval $ac_try) 2>&5
7279  ac_status=$?
7280  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7281  (exit $ac_status); }; }; then
7282  ac_cv_lib_posix_remove=yes
7283else
7284  echo "$as_me: failed program was:" >&5
7285sed 's/^/| /' conftest.$ac_ext >&5
7286
7287ac_cv_lib_posix_remove=no
7288fi
7289rm -f conftest.err conftest.$ac_objext \
7290      conftest$ac_exeext conftest.$ac_ext
7291LIBS=$ac_check_lib_save_LIBS
7292fi
7293echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
7294echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
7295if test $ac_cv_lib_posix_remove = yes; then
7296  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7297fi
7298
7299    fi
7300
7301    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7302    echo "$as_me:$LINENO: checking for shmat" >&5
7303echo $ECHO_N "checking for shmat... $ECHO_C" >&6
7304if test "${ac_cv_func_shmat+set}" = set; then
7305  echo $ECHO_N "(cached) $ECHO_C" >&6
7306else
7307  cat >conftest.$ac_ext <<_ACEOF
7308/* confdefs.h.  */
7309_ACEOF
7310cat confdefs.h >>conftest.$ac_ext
7311cat >>conftest.$ac_ext <<_ACEOF
7312/* end confdefs.h.  */
7313/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
7314   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
7315#define shmat innocuous_shmat
7316
7317/* System header to define __stub macros and hopefully few prototypes,
7318    which can conflict with char shmat (); below.
7319    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7320    <limits.h> exists even on freestanding compilers.  */
7321
7322#ifdef __STDC__
7323# include <limits.h>
7324#else
7325# include <assert.h>
7326#endif
7327
7328#undef shmat
7329
7330/* Override any gcc2 internal prototype to avoid an error.  */
7331#ifdef __cplusplus
7332extern "C"
7333{
7334#endif
7335/* We use char because int might match the return type of a gcc2
7336   builtin and then its argument prototype would still apply.  */
7337char shmat ();
7338/* The GNU C library defines this for functions which it implements
7339    to always fail with ENOSYS.  Some functions are actually named
7340    something starting with __ and the normal name is an alias.  */
7341#if defined (__stub_shmat) || defined (__stub___shmat)
7342choke me
7343#else
7344char (*f) () = shmat;
7345#endif
7346#ifdef __cplusplus
7347}
7348#endif
7349
7350int
7351main ()
7352{
7353return f != shmat;
7354  ;
7355  return 0;
7356}
7357_ACEOF
7358rm -f conftest.$ac_objext conftest$ac_exeext
7359if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7360  (eval $ac_link) 2>conftest.er1
7361  ac_status=$?
7362  grep -v '^ *+' conftest.er1 >conftest.err
7363  rm -f conftest.er1
7364  cat conftest.err >&5
7365  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7366  (exit $ac_status); } &&
7367         { ac_try='test -z "$ac_c_werror_flag"
7368                         || test ! -s conftest.err'
7369  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7370  (eval $ac_try) 2>&5
7371  ac_status=$?
7372  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7373  (exit $ac_status); }; } &&
7374         { ac_try='test -s conftest$ac_exeext'
7375  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7376  (eval $ac_try) 2>&5
7377  ac_status=$?
7378  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7379  (exit $ac_status); }; }; then
7380  ac_cv_func_shmat=yes
7381else
7382  echo "$as_me: failed program was:" >&5
7383sed 's/^/| /' conftest.$ac_ext >&5
7384
7385ac_cv_func_shmat=no
7386fi
7387rm -f conftest.err conftest.$ac_objext \
7388      conftest$ac_exeext conftest.$ac_ext
7389fi
7390echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
7391echo "${ECHO_T}$ac_cv_func_shmat" >&6
7392
7393    if test $ac_cv_func_shmat = no; then
7394      echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
7395echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
7396if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7397  echo $ECHO_N "(cached) $ECHO_C" >&6
7398else
7399  ac_check_lib_save_LIBS=$LIBS
7400LIBS="-lipc  $LIBS"
7401cat >conftest.$ac_ext <<_ACEOF
7402/* confdefs.h.  */
7403_ACEOF
7404cat confdefs.h >>conftest.$ac_ext
7405cat >>conftest.$ac_ext <<_ACEOF
7406/* end confdefs.h.  */
7407
7408/* Override any gcc2 internal prototype to avoid an error.  */
7409#ifdef __cplusplus
7410extern "C"
7411#endif
7412/* We use char because int might match the return type of a gcc2
7413   builtin and then its argument prototype would still apply.  */
7414char shmat ();
7415int
7416main ()
7417{
7418shmat ();
7419  ;
7420  return 0;
7421}
7422_ACEOF
7423rm -f conftest.$ac_objext conftest$ac_exeext
7424if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7425  (eval $ac_link) 2>conftest.er1
7426  ac_status=$?
7427  grep -v '^ *+' conftest.er1 >conftest.err
7428  rm -f conftest.er1
7429  cat conftest.err >&5
7430  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7431  (exit $ac_status); } &&
7432         { ac_try='test -z "$ac_c_werror_flag"
7433                         || test ! -s conftest.err'
7434  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7435  (eval $ac_try) 2>&5
7436  ac_status=$?
7437  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7438  (exit $ac_status); }; } &&
7439         { ac_try='test -s conftest$ac_exeext'
7440  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7441  (eval $ac_try) 2>&5
7442  ac_status=$?
7443  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7444  (exit $ac_status); }; }; then
7445  ac_cv_lib_ipc_shmat=yes
7446else
7447  echo "$as_me: failed program was:" >&5
7448sed 's/^/| /' conftest.$ac_ext >&5
7449
7450ac_cv_lib_ipc_shmat=no
7451fi
7452rm -f conftest.err conftest.$ac_objext \
7453      conftest$ac_exeext conftest.$ac_ext
7454LIBS=$ac_check_lib_save_LIBS
7455fi
7456echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
7457echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
7458if test $ac_cv_lib_ipc_shmat = yes; then
7459  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7460fi
7461
7462    fi
7463  fi
7464
7465  # Check for libraries that X11R6 Xt/Xaw programs need.
7466  ac_save_LDFLAGS=$LDFLAGS
7467  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7468  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7469  # check for ICE first), but we must link in the order -lSM -lICE or
7470  # we get undefined symbols.  So assume we have SM if we have ICE.
7471  # These have to be linked with before -lX11, unlike the other
7472  # libraries we check for below, so use a different variable.
7473  # John Interrante, Karl Berry
7474  echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
7475echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
7476if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
7477  echo $ECHO_N "(cached) $ECHO_C" >&6
7478else
7479  ac_check_lib_save_LIBS=$LIBS
7480LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7481cat >conftest.$ac_ext <<_ACEOF
7482/* confdefs.h.  */
7483_ACEOF
7484cat confdefs.h >>conftest.$ac_ext
7485cat >>conftest.$ac_ext <<_ACEOF
7486/* end confdefs.h.  */
7487
7488/* Override any gcc2 internal prototype to avoid an error.  */
7489#ifdef __cplusplus
7490extern "C"
7491#endif
7492/* We use char because int might match the return type of a gcc2
7493   builtin and then its argument prototype would still apply.  */
7494char IceConnectionNumber ();
7495int
7496main ()
7497{
7498IceConnectionNumber ();
7499  ;
7500  return 0;
7501}
7502_ACEOF
7503rm -f conftest.$ac_objext conftest$ac_exeext
7504if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7505  (eval $ac_link) 2>conftest.er1
7506  ac_status=$?
7507  grep -v '^ *+' conftest.er1 >conftest.err
7508  rm -f conftest.er1
7509  cat conftest.err >&5
7510  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7511  (exit $ac_status); } &&
7512         { ac_try='test -z "$ac_c_werror_flag"
7513                         || test ! -s conftest.err'
7514  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7515  (eval $ac_try) 2>&5
7516  ac_status=$?
7517  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7518  (exit $ac_status); }; } &&
7519         { ac_try='test -s conftest$ac_exeext'
7520  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7521  (eval $ac_try) 2>&5
7522  ac_status=$?
7523  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7524  (exit $ac_status); }; }; then
7525  ac_cv_lib_ICE_IceConnectionNumber=yes
7526else
7527  echo "$as_me: failed program was:" >&5
7528sed 's/^/| /' conftest.$ac_ext >&5
7529
7530ac_cv_lib_ICE_IceConnectionNumber=no
7531fi
7532rm -f conftest.err conftest.$ac_objext \
7533      conftest$ac_exeext conftest.$ac_ext
7534LIBS=$ac_check_lib_save_LIBS
7535fi
7536echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
7537echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
7538if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
7539  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7540fi
7541
7542  LDFLAGS=$ac_save_LDFLAGS
7543
7544fi
7545
7546
7547        # Check for libX11
7548        echo "$as_me:$LINENO: checking for XOpenDisplay in -lX11" >&5
7549echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
7550if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
7551  echo $ECHO_N "(cached) $ECHO_C" >&6
7552else
7553  ac_check_lib_save_LIBS=$LIBS
7554LIBS="-lX11 -L/usr/X11R6/lib $X_LIBS $LIBS"
7555cat >conftest.$ac_ext <<_ACEOF
7556/* confdefs.h.  */
7557_ACEOF
7558cat confdefs.h >>conftest.$ac_ext
7559cat >>conftest.$ac_ext <<_ACEOF
7560/* end confdefs.h.  */
7561
7562/* Override any gcc2 internal prototype to avoid an error.  */
7563#ifdef __cplusplus
7564extern "C"
7565#endif
7566/* We use char because int might match the return type of a gcc2
7567   builtin and then its argument prototype would still apply.  */
7568char XOpenDisplay ();
7569int
7570main ()
7571{
7572XOpenDisplay ();
7573  ;
7574  return 0;
7575}
7576_ACEOF
7577rm -f conftest.$ac_objext conftest$ac_exeext
7578if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7579  (eval $ac_link) 2>conftest.er1
7580  ac_status=$?
7581  grep -v '^ *+' conftest.er1 >conftest.err
7582  rm -f conftest.er1
7583  cat conftest.err >&5
7584  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7585  (exit $ac_status); } &&
7586         { ac_try='test -z "$ac_c_werror_flag"
7587                         || test ! -s conftest.err'
7588  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7589  (eval $ac_try) 2>&5
7590  ac_status=$?
7591  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7592  (exit $ac_status); }; } &&
7593         { ac_try='test -s conftest$ac_exeext'
7594  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7595  (eval $ac_try) 2>&5
7596  ac_status=$?
7597  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7598  (exit $ac_status); }; }; then
7599  ac_cv_lib_X11_XOpenDisplay=yes
7600else
7601  echo "$as_me: failed program was:" >&5
7602sed 's/^/| /' conftest.$ac_ext >&5
7603
7604ac_cv_lib_X11_XOpenDisplay=no
7605fi
7606rm -f conftest.err conftest.$ac_objext \
7607      conftest$ac_exeext conftest.$ac_ext
7608LIBS=$ac_check_lib_save_LIBS
7609fi
7610echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XOpenDisplay" >&5
7611echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
7612if test $ac_cv_lib_X11_XOpenDisplay = yes; then
7613
7614                has_x_runtime=yes
7615
7616else
7617   has_x_runtime=no
7618fi
7619
7620
7621#       echo "------done---------"
7622#       echo "x_includes=${x_includes}"
7623#       echo "x_libraries=${x_libraries}"
7624#       echo "no_x=${no_x}"
7625#       echo "X_CFLAGS=${X_CFLAGS}"
7626#       echo "X_LIBS=${X_LIBS}"
7627#       echo "X_DISPLAY_MISSING=${X_DISPLAY_MISSING}"
7628#       echo "has_x_runtime=${has_x_runtime}"
7629#       echo "host_os=${host_os}"
7630#       echo "------done---------"
7631
7632        state=
7633
7634        case "__${has_x_runtime}__${no_x}__" in
7635                "__no__yes__")
7636                # either the user said --without-x, or it was not found
7637                # at all (runtime or headers)
7638                        { echo "$as_me:$LINENO: WARNING: X11 not available. You will not be able to use dports that use X11" >&5
7639echo "$as_me: WARNING: X11 not available. You will not be able to use dports that use X11" >&2;}
7640                        state=0
7641                        ;;
7642                "__yes__yes__")
7643                        state=1
7644                        ;;
7645                "__yes____")
7646                        state=2
7647                        ;;
7648                *)
7649                        state=3
7650                        ;;
7651        esac
7652
7653        case $host_os in
7654                darwin*)
7655                        case $state in
7656                                1)
7657                                        cat <<EOF;
7658Please install the X11 SDK packages from the
7659Xcode Developer Tools CD
7660EOF
7661                                        { { echo "$as_me:$LINENO: error: Broken X11 install. No X11 headers" >&5
7662echo "$as_me: error: Broken X11 install. No X11 headers" >&2;}
7663   { (exit 1); exit 1; }; }
7664
7665                                        ;;
7666                                3)
7667                                        cat <<EOF;
7668Unknown configuration problem. Please install the X11 runtime
7669and/or X11 SDK  packages from the Xcode Developer Tools CD
7670EOF
7671                                        { { echo "$as_me:$LINENO: error: Broken X11 install" >&5
7672echo "$as_me: error: Broken X11 install" >&2;}
7673   { (exit 1); exit 1; }; }
7674                                        ;;
7675                        esac
7676                        ;;
7677                *)
7678                        case $state in
7679                                1)
7680                                        cat <<EOF;
7681Please install the X11 developer headers for your platform
7682EOF
7683                                        { { echo "$as_me:$LINENO: error: Broken X11 install. No X11 headers" >&5
7684echo "$as_me: error: Broken X11 install. No X11 headers" >&2;}
7685   { (exit 1); exit 1; }; }
7686
7687                                        ;;
7688                                3)
7689                                        cat <<EOF;
7690Unknown configuration problem. Please install the X11
7691implementation for your platform
7692EOF
7693                                        { { echo "$as_me:$LINENO: error: Broken X11 install" >&5
7694echo "$as_me: error: Broken X11 install" >&2;}
7695   { (exit 1); exit 1; }; }
7696                                        ;;
7697                        esac
7698                        ;;
7699        esac
7700
7701
7702
7703# Check for readline
7704
7705echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
7706echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
7707if test "${ac_cv_lib_readline_readline+set}" = set; then
7708  echo $ECHO_N "(cached) $ECHO_C" >&6
7709else
7710  ac_check_lib_save_LIBS=$LIBS
7711LIBS="-lreadline  $LIBS"
7712cat >conftest.$ac_ext <<_ACEOF
7713/* confdefs.h.  */
7714_ACEOF
7715cat confdefs.h >>conftest.$ac_ext
7716cat >>conftest.$ac_ext <<_ACEOF
7717/* end confdefs.h.  */
7718
7719/* Override any gcc2 internal prototype to avoid an error.  */
7720#ifdef __cplusplus
7721extern "C"
7722#endif
7723/* We use char because int might match the return type of a gcc2
7724   builtin and then its argument prototype would still apply.  */
7725char readline ();
7726int
7727main ()
7728{
7729readline ();
7730  ;
7731  return 0;
7732}
7733_ACEOF
7734rm -f conftest.$ac_objext conftest$ac_exeext
7735if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7736  (eval $ac_link) 2>conftest.er1
7737  ac_status=$?
7738  grep -v '^ *+' conftest.er1 >conftest.err
7739  rm -f conftest.er1
7740  cat conftest.err >&5
7741  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7742  (exit $ac_status); } &&
7743         { ac_try='test -z "$ac_c_werror_flag"
7744                         || test ! -s conftest.err'
7745  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7746  (eval $ac_try) 2>&5
7747  ac_status=$?
7748  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7749  (exit $ac_status); }; } &&
7750         { ac_try='test -s conftest$ac_exeext'
7751  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7752  (eval $ac_try) 2>&5
7753  ac_status=$?
7754  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7755  (exit $ac_status); }; }; then
7756  ac_cv_lib_readline_readline=yes
7757else
7758  echo "$as_me: failed program was:" >&5
7759sed 's/^/| /' conftest.$ac_ext >&5
7760
7761ac_cv_lib_readline_readline=no
7762fi
7763rm -f conftest.err conftest.$ac_objext \
7764      conftest$ac_exeext conftest.$ac_ext
7765LIBS=$ac_check_lib_save_LIBS
7766fi
7767echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
7768echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
7769if test $ac_cv_lib_readline_readline = yes; then
7770  cat >>confdefs.h <<_ACEOF
7771#define HAVE_LIBREADLINE 1
7772_ACEOF
7773
7774  LIBS="-lreadline $LIBS"
7775
7776fi
7777
7778echo "$as_me:$LINENO: checking whether rl_username_completion_function is declared" >&5
7779echo $ECHO_N "checking whether rl_username_completion_function is declared... $ECHO_C" >&6
7780if test "${ac_cv_have_decl_rl_username_completion_function+set}" = set; then
7781  echo $ECHO_N "(cached) $ECHO_C" >&6
7782else
7783  cat >conftest.$ac_ext <<_ACEOF
7784/* confdefs.h.  */
7785_ACEOF
7786cat confdefs.h >>conftest.$ac_ext
7787cat >>conftest.$ac_ext <<_ACEOF
7788/* end confdefs.h.  */
7789
7790#include <stdio.h>
7791#if HAVE_READLINE_READLINE_H
7792# include <readline/readline.h>
7793#endif
7794
7795
7796int
7797main ()
7798{
7799#ifndef rl_username_completion_function
7800  char *p = (char *) rl_username_completion_function;
7801#endif
7802
7803  ;
7804  return 0;
7805}
7806_ACEOF
7807rm -f conftest.$ac_objext
7808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7809  (eval $ac_compile) 2>conftest.er1
7810  ac_status=$?
7811  grep -v '^ *+' conftest.er1 >conftest.err
7812  rm -f conftest.er1
7813  cat conftest.err >&5
7814  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7815  (exit $ac_status); } &&
7816         { ac_try='test -z "$ac_c_werror_flag"
7817                         || test ! -s conftest.err'
7818  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7819  (eval $ac_try) 2>&5
7820  ac_status=$?
7821  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7822  (exit $ac_status); }; } &&
7823         { ac_try='test -s conftest.$ac_objext'
7824  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7825  (eval $ac_try) 2>&5
7826  ac_status=$?
7827  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7828  (exit $ac_status); }; }; then
7829  ac_cv_have_decl_rl_username_completion_function=yes
7830else
7831  echo "$as_me: failed program was:" >&5
7832sed 's/^/| /' conftest.$ac_ext >&5
7833
7834ac_cv_have_decl_rl_username_completion_function=no
7835fi
7836rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7837fi
7838echo "$as_me:$LINENO: result: $ac_cv_have_decl_rl_username_completion_function" >&5
7839echo "${ECHO_T}$ac_cv_have_decl_rl_username_completion_function" >&6
7840if test $ac_cv_have_decl_rl_username_completion_function = yes; then
7841
7842cat >>confdefs.h <<_ACEOF
7843#define HAVE_DECL_RL_USERNAME_COMPLETION_FUNCTION 1
7844_ACEOF
7845
7846
7847else
7848  cat >>confdefs.h <<_ACEOF
7849#define HAVE_DECL_RL_USERNAME_COMPLETION_FUNCTION 0
7850_ACEOF
7851
7852
7853fi
7854echo "$as_me:$LINENO: checking whether rl_filename_completion_function is declared" >&5
7855echo $ECHO_N "checking whether rl_filename_completion_function is declared... $ECHO_C" >&6
7856if test "${ac_cv_have_decl_rl_filename_completion_function+set}" = set; then
7857  echo $ECHO_N "(cached) $ECHO_C" >&6
7858else
7859  cat >conftest.$ac_ext <<_ACEOF
7860/* confdefs.h.  */
7861_ACEOF
7862cat confdefs.h >>conftest.$ac_ext
7863cat >>conftest.$ac_ext <<_ACEOF
7864/* end confdefs.h.  */
7865
7866#include <stdio.h>
7867#if HAVE_READLINE_READLINE_H
7868# include <readline/readline.h>
7869#endif
7870
7871
7872int
7873main ()
7874{
7875#ifndef rl_filename_completion_function
7876  char *p = (char *) rl_filename_completion_function;
7877#endif
7878
7879  ;
7880  return 0;
7881}
7882_ACEOF
7883rm -f conftest.$ac_objext
7884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7885  (eval $ac_compile) 2>conftest.er1
7886  ac_status=$?
7887  grep -v '^ *+' conftest.er1 >conftest.err
7888  rm -f conftest.er1
7889  cat conftest.err >&5
7890  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7891  (exit $ac_status); } &&
7892         { ac_try='test -z "$ac_c_werror_flag"
7893                         || test ! -s conftest.err'
7894  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7895  (eval $ac_try) 2>&5
7896  ac_status=$?
7897  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7898  (exit $ac_status); }; } &&
7899         { ac_try='test -s conftest.$ac_objext'
7900  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7901  (eval $ac_try) 2>&5
7902  ac_status=$?
7903  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7904  (exit $ac_status); }; }; then
7905  ac_cv_have_decl_rl_filename_completion_function=yes
7906else
7907  echo "$as_me: failed program was:" >&5
7908sed 's/^/| /' conftest.$ac_ext >&5
7909
7910ac_cv_have_decl_rl_filename_completion_function=no
7911fi
7912rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7913fi
7914echo "$as_me:$LINENO: result: $ac_cv_have_decl_rl_filename_completion_function" >&5
7915echo "${ECHO_T}$ac_cv_have_decl_rl_filename_completion_function" >&6
7916if test $ac_cv_have_decl_rl_filename_completion_function = yes; then
7917
7918cat >>confdefs.h <<_ACEOF
7919#define HAVE_DECL_RL_FILENAME_COMPLETION_FUNCTION 1
7920_ACEOF
7921
7922
7923else
7924  cat >>confdefs.h <<_ACEOF
7925#define HAVE_DECL_RL_FILENAME_COMPLETION_FUNCTION 0
7926_ACEOF
7927
7928
7929fi
7930echo "$as_me:$LINENO: checking whether rl_completion_matches is declared" >&5
7931echo $ECHO_N "checking whether rl_completion_matches is declared... $ECHO_C" >&6
7932if test "${ac_cv_have_decl_rl_completion_matches+set}" = set; then
7933  echo $ECHO_N "(cached) $ECHO_C" >&6
7934else
7935  cat >conftest.$ac_ext <<_ACEOF
7936/* confdefs.h.  */
7937_ACEOF
7938cat confdefs.h >>conftest.$ac_ext
7939cat >>conftest.$ac_ext <<_ACEOF
7940/* end confdefs.h.  */
7941
7942#include <stdio.h>
7943#if HAVE_READLINE_READLINE_H
7944# include <readline/readline.h>
7945#endif
7946
7947
7948int
7949main ()
7950{
7951#ifndef rl_completion_matches
7952  char *p = (char *) rl_completion_matches;
7953#endif
7954
7955  ;
7956  return 0;
7957}
7958_ACEOF
7959rm -f conftest.$ac_objext
7960if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7961  (eval $ac_compile) 2>conftest.er1
7962  ac_status=$?
7963  grep -v '^ *+' conftest.er1 >conftest.err
7964  rm -f conftest.er1
7965  cat conftest.err >&5
7966  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7967  (exit $ac_status); } &&
7968         { ac_try='test -z "$ac_c_werror_flag"
7969                         || test ! -s conftest.err'
7970  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7971  (eval $ac_try) 2>&5
7972  ac_status=$?
7973  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7974  (exit $ac_status); }; } &&
7975         { ac_try='test -s conftest.$ac_objext'
7976  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7977  (eval $ac_try) 2>&5
7978  ac_status=$?
7979  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7980  (exit $ac_status); }; }; then
7981  ac_cv_have_decl_rl_completion_matches=yes
7982else
7983  echo "$as_me: failed program was:" >&5
7984sed 's/^/| /' conftest.$ac_ext >&5
7985
7986ac_cv_have_decl_rl_completion_matches=no
7987fi
7988rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
7989fi
7990echo "$as_me:$LINENO: result: $ac_cv_have_decl_rl_completion_matches" >&5
7991echo "${ECHO_T}$ac_cv_have_decl_rl_completion_matches" >&6
7992if test $ac_cv_have_decl_rl_completion_matches = yes; then
7993
7994cat >>confdefs.h <<_ACEOF
7995#define HAVE_DECL_RL_COMPLETION_MATCHES 1
7996_ACEOF
7997
7998
7999else
8000  cat >>confdefs.h <<_ACEOF
8001#define HAVE_DECL_RL_COMPLETION_MATCHES 0
8002_ACEOF
8003
8004
8005fi
8006echo "$as_me:$LINENO: checking whether username_completion_function is declared" >&5
8007echo $ECHO_N "checking whether username_completion_function is declared... $ECHO_C" >&6
8008if test "${ac_cv_have_decl_username_completion_function+set}" = set; then
8009  echo $ECHO_N "(cached) $ECHO_C" >&6
8010else
8011  cat >conftest.$ac_ext <<_ACEOF
8012/* confdefs.h.  */
8013_ACEOF
8014cat confdefs.h >>conftest.$ac_ext
8015cat >>conftest.$ac_ext <<_ACEOF
8016/* end confdefs.h.  */
8017
8018#include <stdio.h>
8019#if HAVE_READLINE_READLINE_H
8020# include <readline/readline.h>
8021#endif
8022
8023
8024int
8025main ()
8026{
8027#ifndef username_completion_function
8028  char *p = (char *) username_completion_function;
8029#endif
8030
8031  ;
8032  return 0;
8033}
8034_ACEOF
8035rm -f conftest.$ac_objext
8036if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8037  (eval $ac_compile) 2>conftest.er1
8038  ac_status=$?
8039  grep -v '^ *+' conftest.er1 >conftest.err
8040  rm -f conftest.er1
8041  cat conftest.err >&5
8042  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8043  (exit $ac_status); } &&
8044         { ac_try='test -z "$ac_c_werror_flag"
8045                         || test ! -s conftest.err'
8046  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8047  (eval $ac_try) 2>&5
8048  ac_status=$?
8049  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8050  (exit $ac_status); }; } &&
8051         { ac_try='test -s conftest.$ac_objext'
8052  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8053  (eval $ac_try) 2>&5
8054  ac_status=$?
8055  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8056  (exit $ac_status); }; }; then
8057  ac_cv_have_decl_username_completion_function=yes
8058else
8059  echo "$as_me: failed program was:" >&5
8060sed 's/^/| /' conftest.$ac_ext >&5
8061
8062ac_cv_have_decl_username_completion_function=no
8063fi
8064rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8065fi
8066echo "$as_me:$LINENO: result: $ac_cv_have_decl_username_completion_function" >&5
8067echo "${ECHO_T}$ac_cv_have_decl_username_completion_function" >&6
8068if test $ac_cv_have_decl_username_completion_function = yes; then
8069
8070cat >>confdefs.h <<_ACEOF
8071#define HAVE_DECL_USERNAME_COMPLETION_FUNCTION 1
8072_ACEOF
8073
8074
8075else
8076  cat >>confdefs.h <<_ACEOF
8077#define HAVE_DECL_USERNAME_COMPLETION_FUNCTION 0
8078_ACEOF
8079
8080
8081fi
8082echo "$as_me:$LINENO: checking whether filename_completion_function is declared" >&5
8083echo $ECHO_N "checking whether filename_completion_function is declared... $ECHO_C" >&6
8084if test "${ac_cv_have_decl_filename_completion_function+set}" = set; then
8085  echo $ECHO_N "(cached) $ECHO_C" >&6
8086else
8087  cat >conftest.$ac_ext <<_ACEOF
8088/* confdefs.h.  */
8089_ACEOF
8090cat confdefs.h >>conftest.$ac_ext
8091cat >>conftest.$ac_ext <<_ACEOF
8092/* end confdefs.h.  */
8093
8094#include <stdio.h>
8095#if HAVE_READLINE_READLINE_H
8096# include <readline/readline.h>
8097#endif
8098
8099
8100int
8101main ()
8102{
8103#ifndef filename_completion_function
8104  char *p = (char *) filename_completion_function;
8105#endif
8106
8107  ;
8108  return 0;
8109}
8110_ACEOF
8111rm -f conftest.$ac_objext
8112if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8113  (eval $ac_compile) 2>conftest.er1
8114  ac_status=$?
8115  grep -v '^ *+' conftest.er1 >conftest.err
8116  rm -f conftest.er1
8117  cat conftest.err >&5
8118  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8119  (exit $ac_status); } &&
8120         { ac_try='test -z "$ac_c_werror_flag"
8121                         || test ! -s conftest.err'
8122  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8123  (eval $ac_try) 2>&5
8124  ac_status=$?
8125  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8126  (exit $ac_status); }; } &&
8127         { ac_try='test -s conftest.$ac_objext'
8128  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8129  (eval $ac_try) 2>&5
8130  ac_status=$?
8131  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8132  (exit $ac_status); }; }; then
8133  ac_cv_have_decl_filename_completion_function=yes
8134else
8135  echo "$as_me: failed program was:" >&5
8136sed 's/^/| /' conftest.$ac_ext >&5
8137
8138ac_cv_have_decl_filename_completion_function=no
8139fi
8140rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8141fi
8142echo "$as_me:$LINENO: result: $ac_cv_have_decl_filename_completion_function" >&5
8143echo "${ECHO_T}$ac_cv_have_decl_filename_completion_function" >&6
8144if test $ac_cv_have_decl_filename_completion_function = yes; then
8145
8146cat >>confdefs.h <<_ACEOF
8147#define HAVE_DECL_FILENAME_COMPLETION_FUNCTION 1
8148_ACEOF
8149
8150
8151else
8152  cat >>confdefs.h <<_ACEOF
8153#define HAVE_DECL_FILENAME_COMPLETION_FUNCTION 0
8154_ACEOF
8155
8156
8157fi
8158echo "$as_me:$LINENO: checking whether completion_matches is declared" >&5
8159echo $ECHO_N "checking whether completion_matches is declared... $ECHO_C" >&6
8160if test "${ac_cv_have_decl_completion_matches+set}" = set; then
8161  echo $ECHO_N "(cached) $ECHO_C" >&6
8162else
8163  cat >conftest.$ac_ext <<_ACEOF
8164/* confdefs.h.  */
8165_ACEOF
8166cat confdefs.h >>conftest.$ac_ext
8167cat >>conftest.$ac_ext <<_ACEOF
8168/* end confdefs.h.  */
8169
8170#include <stdio.h>
8171#if HAVE_READLINE_READLINE_H
8172# include <readline/readline.h>
8173#endif
8174
8175
8176int
8177main ()
8178{
8179#ifndef completion_matches
8180  char *p = (char *) completion_matches;
8181#endif
8182
8183  ;
8184  return 0;
8185}
8186_ACEOF
8187rm -f conftest.$ac_objext
8188if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8189  (eval $ac_compile) 2>conftest.er1
8190  ac_status=$?
8191  grep -v '^ *+' conftest.er1 >conftest.err
8192  rm -f conftest.er1
8193  cat conftest.err >&5
8194  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8195  (exit $ac_status); } &&
8196         { ac_try='test -z "$ac_c_werror_flag"
8197                         || test ! -s conftest.err'
8198  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8199  (eval $ac_try) 2>&5
8200  ac_status=$?
8201  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8202  (exit $ac_status); }; } &&
8203         { ac_try='test -s conftest.$ac_objext'
8204  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8205  (eval $ac_try) 2>&5
8206  ac_status=$?
8207  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8208  (exit $ac_status); }; }; then
8209  ac_cv_have_decl_completion_matches=yes
8210else
8211  echo "$as_me: failed program was:" >&5
8212sed 's/^/| /' conftest.$ac_ext >&5
8213
8214ac_cv_have_decl_completion_matches=no
8215fi
8216rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
8217fi
8218echo "$as_me:$LINENO: result: $ac_cv_have_decl_completion_matches" >&5
8219echo "${ECHO_T}$ac_cv_have_decl_completion_matches" >&6
8220if test $ac_cv_have_decl_completion_matches = yes; then
8221
8222cat >>confdefs.h <<_ACEOF
8223#define HAVE_DECL_COMPLETION_MATCHES 1
8224_ACEOF
8225
8226
8227else
8228  cat >>confdefs.h <<_ACEOF
8229#define HAVE_DECL_COMPLETION_MATCHES 0
8230_ACEOF
8231
8232
8233fi
8234
8235
8236
8237# Load tclConfig.sh
8238
8239    #
8240    # Ok, lets find the tcl configuration
8241    # First, look for one uninstalled.
8242    # the alternative search directory is invoked by --with-tcl
8243    #
8244
8245    if test x"${no_tcl}" = x ; then
8246        # we reset no_tcl in case something fails here
8247        no_tcl=true
8248
8249# Check whether --with-tcl or --without-tcl was given.
8250if test "${with_tcl+set}" = set; then
8251  withval="$with_tcl"
8252  with_tclconfig=${withval}
8253fi;
8254        echo "$as_me:$LINENO: checking for Tcl configuration" >&5
8255echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
8256        if test "${ac_cv_c_tclconfig+set}" = set; then
8257  echo $ECHO_N "(cached) $ECHO_C" >&6
8258else
8259
8260
8261            # First check to see if --with-tcl was specified.
8262            if test x"${with_tclconfig}" != x ; then
8263                if test -f "${with_tclconfig}/tclConfig.sh" ; then
8264                    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
8265                else
8266                    { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
8267echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
8268   { (exit 1); exit 1; }; }
8269                fi
8270            fi
8271
8272            # then check for a private Tcl installation
8273            if test x"${ac_cv_c_tclconfig}" = x ; then
8274                for i in \
8275                        ../tcl \
8276                        `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
8277                        ../../tcl \
8278                        `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
8279                        ../../../tcl \
8280                        `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
8281                    if test -f "$i/unix/tclConfig.sh" ; then
8282                        ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
8283                        break
8284                    fi
8285                done
8286            fi
8287
8288            # check in a few common install locations
8289            if test x"${ac_cv_c_tclconfig}" = x ; then
8290                for i in `ls -d ${libdir} 2>/dev/null` \
8291                        `ls -d /usr/local/lib 2>/dev/null` \
8292                        `ls -d /usr/contrib/lib 2>/dev/null` \
8293                        `ls -d /usr/lib 2>/dev/null` \
8294                        `ls -d /usr/pkg/lib 2>/dev/null` \
8295                        `ls -d /System/Library/Tcl/8.3 2>/dev/null` \
8296                        `ls -d /usr/local/lib/tcl8.4 2>/dev/null` \
8297                        `ls -d /usr/local/lib/tcl8.3 2>/dev/null` \
8298                        `ls -d /usr/lib/tcl8.4 2>/dev/null` \
8299                        `ls -d /usr/lib/tcl8.3 2>/dev/null` \
8300                        ; do
8301                    if test -f "$i/tclConfig.sh" ; then
8302                        ac_cv_c_tclconfig=`(cd $i; pwd)`
8303                        break
8304                    fi
8305                done
8306            fi
8307
8308            # check in a few other private locations
8309            if test x"${ac_cv_c_tclconfig}" = x ; then
8310                for i in \
8311                        ${srcdir}/../tcl \
8312                        `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
8313                    if test -f "$i/unix/tclConfig.sh" ; then
8314                    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
8315                    break
8316                fi
8317                done
8318            fi
8319
8320fi
8321
8322
8323        if test x"${ac_cv_c_tclconfig}" = x ; then
8324            TCL_BIN_DIR="# no Tcl configs found"
8325            { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions" >&5
8326echo "$as_me: error: Can't find Tcl configuration definitions" >&2;}
8327   { (exit 1); exit 1; }; }
8328        else
8329            no_tcl=
8330            TCL_BIN_DIR=${ac_cv_c_tclconfig}
8331            echo "$as_me:$LINENO: result: found $TCL_BIN_DIR/tclConfig.sh" >&5
8332echo "${ECHO_T}found $TCL_BIN_DIR/tclConfig.sh" >&6
8333        fi
8334    fi
8335
8336
8337    echo "$as_me:$LINENO: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
8338echo $ECHO_N "checking for existence of $TCL_BIN_DIR/tclConfig.sh... $ECHO_C" >&6
8339
8340    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
8341        echo "$as_me:$LINENO: result: loading" >&5
8342echo "${ECHO_T}loading" >&6
8343        . $TCL_BIN_DIR/tclConfig.sh
8344    else
8345        echo "$as_me:$LINENO: result: file not found" >&5
8346echo "${ECHO_T}file not found" >&6
8347    fi
8348
8349    #
8350    # If the TCL_BIN_DIR is the build directory (not the install directory),
8351    # then set the common variable name to the value of the build variables.
8352    # For example, the variable TCL_LIB_SPEC will be set to the value
8353    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
8354    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
8355    # installed and uninstalled version of Tcl.
8356    #
8357
8358    if test -f $TCL_BIN_DIR/Makefile ; then
8359        TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
8360        TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
8361        TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
8362    fi
8363
8364    #
8365    # eval is required to do the TCL_DBGX substitution
8366    #
8367
8368    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
8369    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
8370    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
8371
8372    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
8373    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
8374    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389# Check for Tcl public headers
8390CYGPATH=echo
8391
8392    echo "$as_me:$LINENO: checking for Tcl public headers" >&5
8393echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6
8394
8395
8396# Check whether --with-tclinclude or --without-tclinclude was given.
8397if test "${with_tclinclude+set}" = set; then
8398  withval="$with_tclinclude"
8399  with_tclinclude=${withval}
8400fi;
8401
8402    if test x"${with_tclinclude}" != x ; then
8403        if test -f "${with_tclinclude}/tcl.h" ; then
8404            ac_cv_c_tclh=${with_tclinclude}
8405        else
8406            { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain Tcl public header file tcl.h" >&5
8407echo "$as_me: error: ${with_tclinclude} directory does not contain Tcl public header file tcl.h" >&2;}
8408   { (exit 1); exit 1; }; }
8409        fi
8410    else
8411        if test "${ac_cv_c_tclh+set}" = set; then
8412  echo $ECHO_N "(cached) $ECHO_C" >&6
8413else
8414
8415            # Use the value from --with-tclinclude, if it was given
8416
8417            if test x"${with_tclinclude}" != x ; then
8418                ac_cv_c_tclh=${with_tclinclude}
8419            else
8420                # Do NOT check in $includedir, we need to prevent automatic
8421                # location of Tcl headers in $prefix/include unless explicitly
8422                # specified with the --with-tclinclude option. But go ahead and
8423                # check some other possible local system locations.
8424
8425                for i in \
8426                        /usr/local/include /usr/include /usr/local/include/tcl${TCL_VERSION} /usr/include/tcl${TCL_VERSION}; do
8427                    if test -f "$i/tcl.h" ; then
8428                        ac_cv_c_tclh=$i
8429                        break
8430                    fi
8431                done
8432            fi
8433
8434fi
8435
8436    fi
8437
8438    # Print a message based on how we determined the include path
8439
8440    if test x"${ac_cv_c_tclh}" = x ; then
8441        { { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
8442echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
8443   { (exit 1); exit 1; }; }
8444    else
8445        echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
8446echo "${ECHO_T}${ac_cv_c_tclh}" >&6
8447    fi
8448
8449    # Convert to a native path and substitute into the output files.
8450
8451    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
8452
8453    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
8454
8455
8456
8457
8458# Check for tclsh binary
8459
8460
8461
8462        case $host_os in
8463                freebsd*)
8464                        # FreeBSD installs a dummy tclsh (annoying)
8465                        # Look for a real versioned tclsh first
8466                        # Extract the first word of "tclsh${TCL_VERSION} tclsh", so it can be a program name with args.
8467set dummy tclsh${TCL_VERSION} tclsh; ac_word=$2
8468echo "$as_me:$LINENO: checking for $ac_word" >&5
8469echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8470if test "${ac_cv_path_TCLSH+set}" = set; then
8471  echo $ECHO_N "(cached) $ECHO_C" >&6
8472else
8473  case $TCLSH in
8474  [\\/]* | ?:[\\/]*)
8475  ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
8476  ;;
8477  *)
8478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8479for as_dir in $PATH
8480do
8481  IFS=$as_save_IFS
8482  test -z "$as_dir" && as_dir=.
8483  for ac_exec_ext in '' $ac_executable_extensions; do
8484  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8485    ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
8486    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8487    break 2
8488  fi
8489done
8490done
8491
8492  ;;
8493esac
8494fi
8495TCLSH=$ac_cv_path_TCLSH
8496
8497if test -n "$TCLSH"; then
8498  echo "$as_me:$LINENO: result: $TCLSH" >&5
8499echo "${ECHO_T}$TCLSH" >&6
8500else
8501  echo "$as_me:$LINENO: result: no" >&5
8502echo "${ECHO_T}no" >&6
8503fi
8504
8505                        ;;
8506                *)
8507                        # Otherwise, look for a non-versioned tclsh
8508                        # Extract the first word of "tclsh tclsh${TCL_VERSION}", so it can be a program name with args.
8509set dummy tclsh tclsh${TCL_VERSION}; ac_word=$2
8510echo "$as_me:$LINENO: checking for $ac_word" >&5
8511echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8512if test "${ac_cv_path_TCLSH+set}" = set; then
8513  echo $ECHO_N "(cached) $ECHO_C" >&6
8514else
8515  case $TCLSH in
8516  [\\/]* | ?:[\\/]*)
8517  ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
8518  ;;
8519  *)
8520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8521for as_dir in $PATH
8522do
8523  IFS=$as_save_IFS
8524  test -z "$as_dir" && as_dir=.
8525  for ac_exec_ext in '' $ac_executable_extensions; do
8526  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8527    ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
8528    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8529    break 2
8530  fi
8531done
8532done
8533
8534  ;;
8535esac
8536fi
8537TCLSH=$ac_cv_path_TCLSH
8538
8539if test -n "$TCLSH"; then
8540  echo "$as_me:$LINENO: result: $TCLSH" >&5
8541echo "${ECHO_T}$TCLSH" >&6
8542else
8543  echo "$as_me:$LINENO: result: no" >&5
8544echo "${ECHO_T}no" >&6
8545fi
8546
8547                        ;;
8548        esac
8549        if test "x$TCLSH" = "x" ; then
8550                { { echo "$as_me:$LINENO: error: Could not find tclsh" >&5
8551echo "$as_me: error: Could not find tclsh" >&2;}
8552   { (exit 1); exit 1; }; }
8553        fi
8554
8555
8556
8557
8558# Check for Tcl package path
8559
8560    echo "$as_me:$LINENO: checking for Tcl package directory" >&5
8561echo $ECHO_N "checking for Tcl package directory... $ECHO_C" >&6
8562
8563
8564# Check whether --with-tclpackage or --without-tclpackage was given.
8565if test "${with_tclpackage+set}" = set; then
8566  withval="$with_tclpackage"
8567  with_tclpackagedir=${withval}
8568fi;
8569
8570    if test x"${with_tclpackagedir}" != x ; then
8571        ac_cv_c_tclpkgd=${with_tclpackagedir}
8572    else
8573        if test "${ac_cv_c_tclpkgd+set}" = set; then
8574  echo $ECHO_N "(cached) $ECHO_C" >&6
8575else
8576
8577            # Use the value from --with-tclpackage, if it was given
8578
8579            if test x"${with_tclpackagedir}" != x ; then
8580                echo "tclpackagedir"
8581                ac_cv_c_tclpkgd=${with_tclpackagedir}
8582            else
8583                # On darwin we can do some intelligent guessing
8584                case $host_os in
8585                    darwin*)
8586                        tcl_autopath=`echo 'puts -nonewline \$auto_path' | $TCLSH`
8587                        for path in $tcl_autopath; do
8588                            if test "$path" = "/Library/Tcl"; then
8589                                ac_cv_c_tclpkgd="$path"
8590                                break
8591                            fi
8592                            if test "$path" = "/System/Library/Tcl"; then
8593                                if test -d "$path"; then
8594                                    ac_cv_c_tclpkgd="$path"
8595                                    break
8596                                fi
8597                            fi
8598                        done
8599                    ;;
8600                esac
8601                if test x"${ac_cv_c_tclpkgd}" = x ; then
8602                    # Fudge a path from the first entry in the auto_path
8603                    tcl_pkgpath=`echo 'puts -nonewline [lindex \$auto_path 0]' | $TCLSH`
8604                    if test -d "$tcl_pkgpath"; then
8605                        ac_cv_c_tclpkgd="$tcl_pkgpath"
8606                    fi
8607                    # If the first entry does not exist, do nothing
8608                fi
8609            fi
8610
8611fi
8612
8613    fi
8614
8615    if test x"${ac_cv_c_tclpkgd}" = x ; then
8616        { { echo "$as_me:$LINENO: error: Tcl package directory not found.  Please specify its location with --with-tclpackage" >&5
8617echo "$as_me: error: Tcl package directory not found.  Please specify its location with --with-tclpackage" >&2;}
8618   { (exit 1); exit 1; }; }
8619    else
8620        echo "$as_me:$LINENO: result: ${ac_cv_c_tclpkgd}" >&5
8621echo "${ECHO_T}${ac_cv_c_tclpkgd}" >&6
8622    fi
8623
8624    # Convert to a native path and substitute into the output files.
8625
8626    PACKAGE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclpkgd}`
8627
8628    TCL_PACKAGE_DIR=${PACKAGE_DIR_NATIVE}
8629
8630
8631
8632
8633# Check if thread is enabled.
8634
8635        echo "$as_me:$LINENO: checking whether tclsh was compiled with threads" >&5
8636echo $ECHO_N "checking whether tclsh was compiled with threads... $ECHO_C" >&6
8637        tcl_threadenabled=`echo 'puts -nonewline [info exists tcl_platform(threaded)]' | $TCLSH`
8638        if test "$tcl_threadenabled" = "1" ; then
8639                echo "$as_me:$LINENO: result: yes" >&5
8640echo "${ECHO_T}yes" >&6
8641        else
8642                echo "$as_me:$LINENO: result: no" >&5
8643echo "${ECHO_T}no" >&6
8644                { { echo "$as_me:$LINENO: error: tcl wasn't compiled with threads enabled" >&5
8645echo "$as_me: error: tcl wasn't compiled with threads enabled" >&2;}
8646   { (exit 1); exit 1; }; }
8647        fi
8648
8649
8650## libcurl
8651
8652
8653# Check whether --with-curlprefix or --without-curlprefix was given.
8654if test "${with_curlprefix+set}" = set; then
8655  withval="$with_curlprefix"
8656    curlprefix=$withval
8657fi;
8658
8659        if test "x$curlprefix" = "x"; then
8660                # Extract the first word of "curl-config", so it can be a program name with args.
8661set dummy curl-config; ac_word=$2
8662echo "$as_me:$LINENO: checking for $ac_word" >&5
8663echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8664if test "${ac_cv_path_CURL_CONFIG+set}" = set; then
8665  echo $ECHO_N "(cached) $ECHO_C" >&6
8666else
8667  case $CURL_CONFIG in
8668  [\\/]* | ?:[\\/]*)
8669  ac_cv_path_CURL_CONFIG="$CURL_CONFIG" # Let the user override the test with a path.
8670  ;;
8671  *)
8672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8673for as_dir in $PATH
8674do
8675  IFS=$as_save_IFS
8676  test -z "$as_dir" && as_dir=.
8677  for ac_exec_ext in '' $ac_executable_extensions; do
8678  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8679    ac_cv_path_CURL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8680    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8681    break 2
8682  fi
8683done
8684done
8685
8686  ;;
8687esac
8688fi
8689CURL_CONFIG=$ac_cv_path_CURL_CONFIG
8690
8691if test -n "$CURL_CONFIG"; then
8692  echo "$as_me:$LINENO: result: $CURL_CONFIG" >&5
8693echo "${ECHO_T}$CURL_CONFIG" >&6
8694else
8695  echo "$as_me:$LINENO: result: no" >&5
8696echo "${ECHO_T}no" >&6
8697fi
8698
8699        else
8700                # Extract the first word of "curl-config", so it can be a program name with args.
8701set dummy curl-config; ac_word=$2
8702echo "$as_me:$LINENO: checking for $ac_word" >&5
8703echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8704if test "${ac_cv_path_CURL_CONFIG+set}" = set; then
8705  echo $ECHO_N "(cached) $ECHO_C" >&6
8706else
8707  case $CURL_CONFIG in
8708  [\\/]* | ?:[\\/]*)
8709  ac_cv_path_CURL_CONFIG="$CURL_CONFIG" # Let the user override the test with a path.
8710  ;;
8711  *)
8712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8713for as_dir in $curlprefix/bin
8714do
8715  IFS=$as_save_IFS
8716  test -z "$as_dir" && as_dir=.
8717  for ac_exec_ext in '' $ac_executable_extensions; do
8718  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8719    ac_cv_path_CURL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8720    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
8721    break 2
8722  fi
8723done
8724done
8725
8726  ;;
8727esac
8728fi
8729CURL_CONFIG=$ac_cv_path_CURL_CONFIG
8730
8731if test -n "$CURL_CONFIG"; then
8732  echo "$as_me:$LINENO: result: $CURL_CONFIG" >&5
8733echo "${ECHO_T}$CURL_CONFIG" >&6
8734else
8735  echo "$as_me:$LINENO: result: no" >&5
8736echo "${ECHO_T}no" >&6
8737fi
8738
8739        fi
8740
8741        if test "x$CURL_CONFIG" = "x"; then
8742                { { echo "$as_me:$LINENO: error: cannot find curl-config. Is libcurl installed?" >&5
8743echo "$as_me: error: cannot find curl-config. Is libcurl installed?" >&2;}
8744   { (exit 1); exit 1; }; }
8745        fi
8746
8747        CFLAGS_LIBCURL=$($CURL_CONFIG --cflags)
8748        # Due to a bug in dist, --arch flags are improperly supplied by curl-config.
8749        # Get rid of them.
8750        LDFLAGS_LIBCURL=$($CURL_CONFIG --libs | sed 's/-arch [A-Za-z0-9]* //g')
8751
8752
8753
8754
8755
8756# Do we have curl_easy_strerror?
8757
8758
8759echo "$as_me:$LINENO: checking for curl_easy_strerror in -lcurl" >&5
8760echo $ECHO_N "checking for curl_easy_strerror in -lcurl... $ECHO_C" >&6
8761if test "${ac_cv_lib_curl_curl_easy_strerror+set}" = set; then
8762  echo $ECHO_N "(cached) $ECHO_C" >&6
8763else
8764  ac_check_lib_save_LIBS=$LIBS
8765LIBS="-lcurl $LDFLAGS_LIBCURL $LIBS"
8766cat >conftest.$ac_ext <<_ACEOF
8767/* confdefs.h.  */
8768_ACEOF
8769cat confdefs.h >>conftest.$ac_ext
8770cat >>conftest.$ac_ext <<_ACEOF
8771/* end confdefs.h.  */
8772
8773/* Override any gcc2 internal prototype to avoid an error.  */
8774#ifdef __cplusplus
8775extern "C"
8776#endif
8777/* We use char because int might match the return type of a gcc2
8778   builtin and then its argument prototype would still apply.  */
8779char curl_easy_strerror ();
8780int
8781main ()
8782{
8783curl_easy_strerror ();
8784  ;
8785  return 0;
8786}
8787_ACEOF
8788rm -f conftest.$ac_objext conftest$ac_exeext
8789if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8790  (eval $ac_link) 2>conftest.er1
8791  ac_status=$?
8792  grep -v '^ *+' conftest.er1 >conftest.err
8793  rm -f conftest.er1
8794  cat conftest.err >&5
8795  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8796  (exit $ac_status); } &&
8797         { ac_try='test -z "$ac_c_werror_flag"
8798                         || test ! -s conftest.err'
8799  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8800  (eval $ac_try) 2>&5
8801  ac_status=$?
8802  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8803  (exit $ac_status); }; } &&
8804         { ac_try='test -s conftest$ac_exeext'
8805  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8806  (eval $ac_try) 2>&5
8807  ac_status=$?
8808  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8809  (exit $ac_status); }; }; then
8810  ac_cv_lib_curl_curl_easy_strerror=yes
8811else
8812  echo "$as_me: failed program was:" >&5
8813sed 's/^/| /' conftest.$ac_ext >&5
8814
8815ac_cv_lib_curl_curl_easy_strerror=no
8816fi
8817rm -f conftest.err conftest.$ac_objext \
8818      conftest$ac_exeext conftest.$ac_ext
8819LIBS=$ac_check_lib_save_LIBS
8820fi
8821echo "$as_me:$LINENO: result: $ac_cv_lib_curl_curl_easy_strerror" >&5
8822echo "${ECHO_T}$ac_cv_lib_curl_curl_easy_strerror" >&6
8823if test $ac_cv_lib_curl_curl_easy_strerror = yes; then
8824  cat >>confdefs.h <<\_ACEOF
8825#define HAVE_CURL_EASY_STRERROR 1
8826_ACEOF
8827
8828fi
8829
8830
8831# Determine if we need to install some bundled packages
8832OUR_INCLUDED_PACKAGES=
8833
8834## Thread package.
8835
8836# Check whether --with-included-tclthread or --without-included-tclthread was given.
8837if test "${with_included_tclthread+set}" = set; then
8838  withval="$with_included_tclthread"
8839  with_included_tclthread=$withval
8840else
8841  with_included_tclthread="unspecified"
8842fi;
8843
8844# Check if thread package is already installed.
8845if test "x$with_included_tclthread" = "xunspecified" ; then
8846
8847        echo "$as_me:$LINENO: checking for Tcl Thread package" >&5
8848echo $ECHO_N "checking for Tcl Thread package... $ECHO_C" >&6
8849        package_present=`echo 'if {[catch {package require Thread}]} {puts -nonewline 0} else {puts -nonewline 1}' | $TCLSH`
8850        if test "$package_present" = "1"; then
8851  echo "$as_me:$LINENO: result: yes" >&5
8852echo "${ECHO_T}yes" >&6; with_included_tclthread=no
8853else
8854  echo "$as_me:$LINENO: result: no" >&5
8855echo "${ECHO_T}no" >&6; with_included_tclthread=yes
8856fi
8857
8858
8859fi
8860
8861# If thread package isn't installed, configure and install thread package.
8862if test "$with_included_tclthread" = "yes"; then
8863        OUR_INCLUDED_PACKAGES="$OUR_INCLUDED_PACKAGES thread2.6"
8864
8865
8866subdirs="$subdirs src/thread2.6"
8867
8868        # Extract thread package
8869        (cd src/; gzip -d < thread2.6.tar.gz | tar xf -)
8870        # Patch thread package (so thread2.6 is the vanilla distribution directory)
8871        patch -p0 < src/thread2.6.diff
8872fi
8873
8874
8875
8876# Allows building of shared libraries
8877
8878    echo "$as_me:$LINENO: checking how to build libraries" >&5
8879echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6
8880    # Check whether --enable-shared or --disable-shared was given.
8881if test "${enable_shared+set}" = set; then
8882  enableval="$enable_shared"
8883  tcl_ok=$enableval
8884else
8885  tcl_ok=yes
8886fi;
8887
8888    if test "${enable_shared+set}" = set; then
8889        enableval="$enable_shared"
8890        tcl_ok=$enableval
8891    else
8892        tcl_ok=yes
8893    fi
8894
8895    if test "$tcl_ok" = "yes" ; then
8896        echo "$as_me:$LINENO: result: shared" >&5
8897echo "${ECHO_T}shared" >&6
8898        SHARED_BUILD=1
8899    else
8900        echo "$as_me:$LINENO: result: static" >&5
8901echo "${ECHO_T}static" >&6
8902        SHARED_BUILD=0
8903
8904cat >>confdefs.h <<\_ACEOF
8905#define STATIC_BUILD 1
8906_ACEOF
8907
8908    fi
8909
8910
8911# Pull compiler / linker values from tclConfig.sh
8912CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
8913CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
8914LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
8915LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
8916SHLIB_LD=${TCL_SHLIB_LD}
8917STLIB_LD=${TCL_STLIB_LD}
8918SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
8919SHLIB_SUFFIX=${TCL_SHLIB_SUFFIX}
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933#misc variables that need to be expanded for substitution into tcl
8934
8935oldprefix=$prefix
8936if test "x$prefix" = "xNONE" ; then
8937   prefix=$ac_default_prefix
8938fi
8939
8940eval "prefix_expanded=$prefix"
8941
8942# do this twice, since there is a nested variable of
8943# ${prefix} inside of ${sysconfdir}
8944eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR"
8945eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR_EXPANDED"
8946
8947eval "localstatedir_expanded=$localstatedir"
8948
8949
8950prefix=$oldprefix
8951
8952
8953# Output
8954
8955                                                                                                    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"
8956
8957
8958cat >confcache <<\_ACEOF
8959# This file is a shell script that caches the results of configure
8960# tests run on this system so they can be shared between configure
8961# scripts and configure runs, see configure's option --config-cache.
8962# It is not useful on other systems.  If it contains results you don't
8963# want to keep, you may remove or edit it.
8964#
8965# config.status only pays attention to the cache file if you give it
8966# the --recheck option to rerun configure.
8967#
8968# `ac_cv_env_foo' variables (set or unset) will be overridden when
8969# loading this file, other *unset* `ac_cv_foo' will be assigned the
8970# following values.
8971
8972_ACEOF
8973
8974# The following way of writing the cache mishandles newlines in values,
8975# but we know of no workaround that is simple, portable, and efficient.
8976# So, don't put newlines in cache variables' values.
8977# Ultrix sh set writes to stderr and can't be redirected directly,
8978# and sets the high bit in the cache file unless we assign to the vars.
8979{
8980  (set) 2>&1 |
8981    case `(ac_space=' '; set | grep ac_space) 2>&1` in
8982    *ac_space=\ *)
8983      # `set' does not quote correctly, so add quotes (double-quote
8984      # substitution turns \\\\ into \\, and sed turns \\ into \).
8985      sed -n \
8986        "s/'/'\\\\''/g;
8987          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
8988      ;;
8989    *)
8990      # `set' quotes correctly as required by POSIX, so do not add quotes.
8991      sed -n \
8992        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
8993      ;;
8994    esac;
8995} |
8996  sed '
8997     t clear
8998     : clear
8999     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
9000     t end
9001     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
9002     : end' >>confcache
9003if diff $cache_file confcache >/dev/null 2>&1; then :; else
9004  if test -w $cache_file; then
9005    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
9006    cat confcache >$cache_file
9007  else
9008    echo "not updating unwritable cache $cache_file"
9009  fi
9010fi
9011rm -f confcache
9012
9013test "x$prefix" = xNONE && prefix=$ac_default_prefix
9014# Let make expand exec_prefix.
9015test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9016
9017# VPATH may cause trouble with some makes, so we remove $(srcdir),
9018# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
9019# trailing colons and then remove the whole line if VPATH becomes empty
9020# (actually we leave an empty line to preserve line numbers).
9021if test "x$srcdir" = x.; then
9022  ac_vpsub='/^[  ]*VPATH[        ]*=/{
9023s/:*\$(srcdir):*/:/;
9024s/:*\${srcdir}:*/:/;
9025s/:*@srcdir@:*/:/;
9026s/^\([^=]*=[     ]*\):*/\1/;
9027s/:*$//;
9028s/^[^=]*=[       ]*$//;
9029}'
9030fi
9031
9032DEFS=-DHAVE_CONFIG_H
9033
9034ac_libobjs=
9035ac_ltlibobjs=
9036for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
9037  # 1. Remove the extension, and $U if already installed.
9038  ac_i=`echo "$ac_i" |
9039         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
9040  # 2. Add them.
9041  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
9042  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
9043done
9044LIBOBJS=$ac_libobjs
9045
9046LTLIBOBJS=$ac_ltlibobjs
9047
9048
9049
9050: ${CONFIG_STATUS=./config.status}
9051ac_clean_files_save=$ac_clean_files
9052ac_clean_files="$ac_clean_files $CONFIG_STATUS"
9053{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
9054echo "$as_me: creating $CONFIG_STATUS" >&6;}
9055cat >$CONFIG_STATUS <<_ACEOF
9056#! $SHELL
9057# Generated by $as_me.
9058# Run this file to recreate the current configuration.
9059# Compiler output produced by configure, useful for debugging
9060# configure, is in config.log if it exists.
9061
9062debug=false
9063ac_cs_recheck=false
9064ac_cs_silent=false
9065SHELL=\${CONFIG_SHELL-$SHELL}
9066_ACEOF
9067
9068cat >>$CONFIG_STATUS <<\_ACEOF
9069## --------------------- ##
9070## M4sh Initialization.  ##
9071## --------------------- ##
9072
9073# Be Bourne compatible
9074if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
9075  emulate sh
9076  NULLCMD=:
9077  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
9078  # is contrary to our usage.  Disable this feature.
9079  alias -g '${1+"$@"}'='"$@"'
9080elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
9081  set -o posix
9082fi
9083DUALCASE=1; export DUALCASE # for MKS sh
9084
9085# Support unset when possible.
9086if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9087  as_unset=unset
9088else
9089  as_unset=false
9090fi
9091
9092
9093# Work around bugs in pre-3.0 UWIN ksh.
9094$as_unset ENV MAIL MAILPATH
9095PS1='$ '
9096PS2='> '
9097PS4='+ '
9098
9099# NLS nuisances.
9100for as_var in \
9101  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
9102  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
9103  LC_TELEPHONE LC_TIME
9104do
9105  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
9106    eval $as_var=C; export $as_var
9107  else
9108    $as_unset $as_var
9109  fi
9110done
9111
9112# Required to use basename.
9113if expr a : '\(a\)' >/dev/null 2>&1; then
9114  as_expr=expr
9115else
9116  as_expr=false
9117fi
9118
9119if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
9120  as_basename=basename
9121else
9122  as_basename=false
9123fi
9124
9125
9126# Name of the executable.
9127as_me=`$as_basename "$0" ||
9128$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9129         X"$0" : 'X\(//\)$' \| \
9130         X"$0" : 'X\(/\)$' \| \
9131         .     : '\(.\)' 2>/dev/null ||
9132echo X/"$0" |
9133    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
9134          /^X\/\(\/\/\)$/{ s//\1/; q; }
9135          /^X\/\(\/\).*/{ s//\1/; q; }
9136          s/.*/./; q'`
9137
9138
9139# PATH needs CR, and LINENO needs CR and PATH.
9140# Avoid depending upon Character Ranges.
9141as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9142as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9143as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9144as_cr_digits='0123456789'
9145as_cr_alnum=$as_cr_Letters$as_cr_digits
9146
9147# The user is always right.
9148if test "${PATH_SEPARATOR+set}" != set; then
9149  echo "#! /bin/sh" >conf$$.sh
9150  echo  "exit 0"   >>conf$$.sh
9151  chmod +x conf$$.sh
9152  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
9153    PATH_SEPARATOR=';'
9154  else
9155    PATH_SEPARATOR=:
9156  fi
9157  rm -f conf$$.sh
9158fi
9159
9160
9161  as_lineno_1=$LINENO
9162  as_lineno_2=$LINENO
9163  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
9164  test "x$as_lineno_1" != "x$as_lineno_2" &&
9165  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
9166  # Find who we are.  Look in the path if we contain no path at all
9167  # relative or not.
9168  case $0 in
9169    *[\\/]* ) as_myself=$0 ;;
9170    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9171for as_dir in $PATH
9172do
9173  IFS=$as_save_IFS
9174  test -z "$as_dir" && as_dir=.
9175  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
9176done
9177
9178       ;;
9179  esac
9180  # We did not find ourselves, most probably we were run as `sh COMMAND'
9181  # in which case we are not to be found in the path.
9182  if test "x$as_myself" = x; then
9183    as_myself=$0
9184  fi
9185  if test ! -f "$as_myself"; then
9186    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
9187echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
9188   { (exit 1); exit 1; }; }
9189  fi
9190  case $CONFIG_SHELL in
9191  '')
9192    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9193for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
9194do
9195  IFS=$as_save_IFS
9196  test -z "$as_dir" && as_dir=.
9197  for as_base in sh bash ksh sh5; do
9198         case $as_dir in
9199         /*)
9200           if ("$as_dir/$as_base" -c '
9201  as_lineno_1=$LINENO
9202  as_lineno_2=$LINENO
9203  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
9204  test "x$as_lineno_1" != "x$as_lineno_2" &&
9205  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
9206             $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
9207             $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
9208             CONFIG_SHELL=$as_dir/$as_base
9209             export CONFIG_SHELL
9210             exec "$CONFIG_SHELL" "$0" ${1+"$@"}
9211           fi;;
9212         esac
9213       done
9214done
9215;;
9216  esac
9217
9218  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
9219  # uniformly replaced by the line number.  The first 'sed' inserts a
9220  # line-number line before each line; the second 'sed' does the real
9221  # work.  The second script uses 'N' to pair each line-number line
9222  # with the numbered line, and appends trailing '-' during
9223  # substitution so that $LINENO is not a special case at line end.
9224  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
9225  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
9226  sed '=' <$as_myself |
9227    sed '
9228      N
9229      s,$,-,
9230      : loop
9231      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
9232      t loop
9233      s,-$,,
9234      s,^['$as_cr_digits']*\n,,
9235    ' >$as_me.lineno &&
9236  chmod +x $as_me.lineno ||
9237    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
9238echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
9239   { (exit 1); exit 1; }; }
9240
9241  # Don't try to exec as it changes $[0], causing all sort of problems
9242  # (the dirname of $[0] is not the place where we might find the
9243  # original and so on.  Autoconf is especially sensible to this).
9244  . ./$as_me.lineno
9245  # Exit status is that of the last command.
9246  exit
9247}
9248
9249
9250case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
9251  *c*,-n*) ECHO_N= ECHO_C='
9252' ECHO_T='      ' ;;
9253  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
9254  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
9255esac
9256
9257if expr a : '\(a\)' >/dev/null 2>&1; then
9258  as_expr=expr
9259else
9260  as_expr=false
9261fi
9262
9263rm -f conf$$ conf$$.exe conf$$.file
9264echo >conf$$.file
9265if ln -s conf$$.file conf$$ 2>/dev/null; then
9266  # We could just check for DJGPP; but this test a) works b) is more generic
9267  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
9268  if test -f conf$$.exe; then
9269    # Don't use ln at all; we don't have any links
9270    as_ln_s='cp -p'
9271  else
9272    as_ln_s='ln -s'
9273  fi
9274elif ln conf$$.file conf$$ 2>/dev/null; then
9275  as_ln_s=ln
9276else
9277  as_ln_s='cp -p'
9278fi
9279rm -f conf$$ conf$$.exe conf$$.file
9280
9281if mkdir -p . 2>/dev/null; then
9282  as_mkdir_p=:
9283else
9284  test -d ./-p && rmdir ./-p
9285  as_mkdir_p=false
9286fi
9287
9288as_executable_p="test -f"
9289
9290# Sed expression to map a string onto a valid CPP name.
9291as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
9292
9293# Sed expression to map a string onto a valid variable name.
9294as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
9295
9296
9297# IFS
9298# We need space, tab and new line, in precisely that order.
9299as_nl='
9300'
9301IFS="   $as_nl"
9302
9303# CDPATH.
9304$as_unset CDPATH
9305
9306exec 6>&1
9307
9308# Open the log real soon, to keep \$[0] and so on meaningful, and to
9309# report actual input values of CONFIG_FILES etc. instead of their
9310# values after options handling.  Logging --version etc. is OK.
9311exec 5>>config.log
9312{
9313  echo
9314  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
9315## Running $as_me. ##
9316_ASBOX
9317} >&5
9318cat >&5 <<_CSEOF
9319
9320This file was extended by OpenDarwin DarwinPorts $as_me 1.0, which was
9321generated by GNU Autoconf 2.59.  Invocation command line was
9322
9323  CONFIG_FILES    = $CONFIG_FILES
9324  CONFIG_HEADERS  = $CONFIG_HEADERS
9325  CONFIG_LINKS    = $CONFIG_LINKS
9326  CONFIG_COMMANDS = $CONFIG_COMMANDS
9327  $ $0 $@
9328
9329_CSEOF
9330echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
9331echo >&5
9332_ACEOF
9333
9334# Files that config.status was made for.
9335if test -n "$ac_config_files"; then
9336  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
9337fi
9338
9339if test -n "$ac_config_headers"; then
9340  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
9341fi
9342
9343if test -n "$ac_config_links"; then
9344  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
9345fi
9346
9347if test -n "$ac_config_commands"; then
9348  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
9349fi
9350
9351cat >>$CONFIG_STATUS <<\_ACEOF
9352
9353ac_cs_usage="\
9354\`$as_me' instantiates files from templates according to the
9355current configuration.
9356
9357Usage: $0 [OPTIONS] [FILE]...
9358
9359  -h, --help       print this help, then exit
9360  -V, --version    print version number, then exit
9361  -q, --quiet      do not print progress messages
9362  -d, --debug      don't remove temporary files
9363      --recheck    update $as_me by reconfiguring in the same conditions
9364  --file=FILE[:TEMPLATE]
9365                   instantiate the configuration file FILE
9366  --header=FILE[:TEMPLATE]
9367                   instantiate the configuration header FILE
9368
9369Configuration files:
9370$config_files
9371
9372Configuration headers:
9373$config_headers
9374
9375Report bugs to <bug-autoconf@gnu.org>."
9376_ACEOF
9377
9378cat >>$CONFIG_STATUS <<_ACEOF
9379ac_cs_version="\\
9380OpenDarwin DarwinPorts config.status 1.0
9381configured by $0, generated by GNU Autoconf 2.59,
9382  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
9383
9384Copyright (C) 2003 Free Software Foundation, Inc.
9385This config.status script is free software; the Free Software Foundation
9386gives unlimited permission to copy, distribute and modify it."
9387srcdir=$srcdir
9388INSTALL="$INSTALL"
9389_ACEOF
9390
9391cat >>$CONFIG_STATUS <<\_ACEOF
9392# If no file are specified by the user, then we need to provide default
9393# value.  By we need to know if files were specified by the user.
9394ac_need_defaults=:
9395while test $# != 0
9396do
9397  case $1 in
9398  --*=*)
9399    ac_option=`expr "x$1" : 'x\([^=]*\)='`
9400    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
9401    ac_shift=:
9402    ;;
9403  -*)
9404    ac_option=$1
9405    ac_optarg=$2
9406    ac_shift=shift
9407    ;;
9408  *) # This is not an option, so the user has probably given explicit
9409     # arguments.
9410     ac_option=$1
9411     ac_need_defaults=false;;
9412  esac
9413
9414  case $ac_option in
9415  # Handling of the options.
9416_ACEOF
9417cat >>$CONFIG_STATUS <<\_ACEOF
9418  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9419    ac_cs_recheck=: ;;
9420  --version | --vers* | -V )
9421    echo "$ac_cs_version"; exit 0 ;;
9422  --he | --h)
9423    # Conflict between --help and --header
9424    { { echo "$as_me:$LINENO: error: ambiguous option: $1
9425Try \`$0 --help' for more information." >&5
9426echo "$as_me: error: ambiguous option: $1
9427Try \`$0 --help' for more information." >&2;}
9428   { (exit 1); exit 1; }; };;
9429  --help | --hel | -h )
9430    echo "$ac_cs_usage"; exit 0 ;;
9431  --debug | --d* | -d )
9432    debug=: ;;
9433  --file | --fil | --fi | --f )
9434    $ac_shift
9435    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
9436    ac_need_defaults=false;;
9437  --header | --heade | --head | --hea )
9438    $ac_shift
9439    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
9440    ac_need_defaults=false;;
9441  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
9442  | -silent | --silent | --silen | --sile | --sil | --si | --s)
9443    ac_cs_silent=: ;;
9444
9445  # This is an error.
9446  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
9447Try \`$0 --help' for more information." >&5
9448echo "$as_me: error: unrecognized option: $1
9449Try \`$0 --help' for more information." >&2;}
9450   { (exit 1); exit 1; }; } ;;
9451
9452  *) ac_config_targets="$ac_config_targets $1" ;;
9453
9454  esac
9455  shift
9456done
9457
9458ac_configure_extra_args=
9459
9460if $ac_cs_silent; then
9461  exec 6>/dev/null
9462  ac_configure_extra_args="$ac_configure_extra_args --silent"
9463fi
9464
9465_ACEOF
9466cat >>$CONFIG_STATUS <<_ACEOF
9467if \$ac_cs_recheck; then
9468  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
9469  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
9470fi
9471
9472_ACEOF
9473
9474
9475
9476
9477
9478cat >>$CONFIG_STATUS <<\_ACEOF
9479for ac_config_target in $ac_config_targets
9480do
9481  case "$ac_config_target" in
9482  # Handling of arguments.
9483  "src/programs/daemondo/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/programs/daemondo/Makefile" ;;
9484  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
9485  "Mk/dports.autoconf.mk" ) CONFIG_FILES="$CONFIG_FILES Mk/dports.autoconf.mk" ;;
9486  "doc/prefix.mtree" ) CONFIG_FILES="$CONFIG_FILES doc/prefix.mtree" ;;
9487  "doc/macosx.mtree" ) CONFIG_FILES="$CONFIG_FILES doc/macosx.mtree" ;;
9488  "doc/ports.conf" ) CONFIG_FILES="$CONFIG_FILES doc/ports.conf" ;;
9489  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
9490  "src/darwinports1.0/darwinports_autoconf.tcl" ) CONFIG_FILES="$CONFIG_FILES src/darwinports1.0/darwinports_autoconf.tcl" ;;
9491  "src/port1.0/port_autoconf.tcl" ) CONFIG_FILES="$CONFIG_FILES src/port1.0/port_autoconf.tcl" ;;
9492  "src/programs/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/programs/Makefile" ;;
9493  "src/darwinports1.0/darwinports_fastload.tcl" ) CONFIG_FILES="$CONFIG_FILES src/darwinports1.0/darwinports_fastload.tcl" ;;
9494  "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
9495  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
9496echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
9497   { (exit 1); exit 1; }; };;
9498  esac
9499done
9500
9501# If the user did not use the arguments to specify the items to instantiate,
9502# then the envvar interface is used.  Set only those that are not.
9503# We use the long form for the default assignment because of an extremely
9504# bizarre bug on SunOS 4.1.3.
9505if $ac_need_defaults; then
9506  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
9507  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
9508fi
9509
9510# Have a temporary directory for convenience.  Make it in the build tree
9511# simply because there is no reason to put it here, and in addition,
9512# creating and moving files from /tmp can sometimes cause problems.
9513# Create a temporary directory, and hook for its removal unless debugging.
9514$debug ||
9515{
9516  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
9517  trap '{ (exit 1); exit 1; }' 1 2 13 15
9518}
9519
9520# Create a (secure) tmp directory for tmp files.
9521
9522{
9523  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
9524  test -n "$tmp" && test -d "$tmp"
9525}  ||
9526{
9527  tmp=./confstat$$-$RANDOM
9528  (umask 077 && mkdir $tmp)
9529} ||
9530{
9531   echo "$me: cannot create a temporary directory in ." >&2
9532   { (exit 1); exit 1; }
9533}
9534
9535_ACEOF
9536
9537cat >>$CONFIG_STATUS <<_ACEOF
9538
9539#
9540# CONFIG_FILES section.
9541#
9542
9543# No need to generate the scripts if there are no CONFIG_FILES.
9544# This happens for instance when ./config.status config.h
9545if test -n "\$CONFIG_FILES"; then
9546  # Protect against being on the right side of a sed subst in config.status.
9547  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
9548   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
9549s,@SHELL@,$SHELL,;t t
9550s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
9551s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
9552s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
9553s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
9554s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
9555s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
9556s,@exec_prefix@,$exec_prefix,;t t
9557s,@prefix@,$prefix,;t t
9558s,@program_transform_name@,$program_transform_name,;t t
9559s,@bindir@,$bindir,;t t
9560s,@sbindir@,$sbindir,;t t
9561s,@libexecdir@,$libexecdir,;t t
9562s,@datadir@,$datadir,;t t
9563s,@sysconfdir@,$sysconfdir,;t t
9564s,@sharedstatedir@,$sharedstatedir,;t t
9565s,@localstatedir@,$localstatedir,;t t
9566s,@libdir@,$libdir,;t t
9567s,@includedir@,$includedir,;t t
9568s,@oldincludedir@,$oldincludedir,;t t
9569s,@infodir@,$infodir,;t t
9570s,@mandir@,$mandir,;t t
9571s,@build_alias@,$build_alias,;t t
9572s,@host_alias@,$host_alias,;t t
9573s,@target_alias@,$target_alias,;t t
9574s,@DEFS@,$DEFS,;t t
9575s,@ECHO_C@,$ECHO_C,;t t
9576s,@ECHO_N@,$ECHO_N,;t t
9577s,@ECHO_T@,$ECHO_T,;t t
9578s,@LIBS@,$LIBS,;t t
9579s,@build@,$build,;t t
9580s,@build_cpu@,$build_cpu,;t t
9581s,@build_vendor@,$build_vendor,;t t
9582s,@build_os@,$build_os,;t t
9583s,@host@,$host,;t t
9584s,@host_cpu@,$host_cpu,;t t
9585s,@host_vendor@,$host_vendor,;t t
9586s,@host_os@,$host_os,;t t
9587s,@target@,$target,;t t
9588s,@target_cpu@,$target_cpu,;t t
9589s,@target_vendor@,$target_vendor,;t t
9590s,@target_os@,$target_os,;t t
9591s,@CC@,$CC,;t t
9592s,@CFLAGS@,$CFLAGS,;t t
9593s,@LDFLAGS@,$LDFLAGS,;t t
9594s,@CPPFLAGS@,$CPPFLAGS,;t t
9595s,@ac_ct_CC@,$ac_ct_CC,;t t
9596s,@EXEEXT@,$EXEEXT,;t t
9597s,@OBJEXT@,$OBJEXT,;t t
9598s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
9599s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
9600s,@INSTALL_DATA@,$INSTALL_DATA,;t t
9601s,@SET_MAKE@,$SET_MAKE,;t t
9602s,@LN_S@,$LN_S,;t t
9603s,@CVS@,$CVS,;t t
9604s,@RSYNC@,$RSYNC,;t t
9605s,@HAVE_LAUNCHD@,$HAVE_LAUNCHD,;t t
9606s,@LAUNCHCTL@,$LAUNCHCTL,;t t
9607s,@XCODEBUILD@,$XCODEBUILD,;t t
9608s,@TAR@,$TAR,;t t
9609s,@GNUTAR@,$GNUTAR,;t t
9610s,@TAR_CMD@,$TAR_CMD,;t t
9611s,@CFLAGS_QUICHEEATERS@,$CFLAGS_QUICHEEATERS,;t t
9612s,@MTREE@,$MTREE,;t t
9613s,@subdirs@,$subdirs,;t t
9614s,@ENABLE_LAUNCHD_SUPPORT@,$ENABLE_LAUNCHD_SUPPORT,;t t
9615s,@HAVE_FRAMEWORK_COREFOUNDATION@,$HAVE_FRAMEWORK_COREFOUNDATION,;t t
9616s,@HAVE_FRAMEWORK_SYSTEMCONFIGURATION@,$HAVE_FRAMEWORK_SYSTEMCONFIGURATION,;t t
9617s,@HAVE_FRAMEWORK_IOKIT@,$HAVE_FRAMEWORK_IOKIT,;t t
9618s,@HAVE_FUNCTION_CFNOTIFICATIONCENTERGETDARWINNOTIFYCENTER@,$HAVE_FUNCTION_CFNOTIFICATIONCENTERGETDARWINNOTIFYCENTER,;t t
9619s,@REPLACEMENT_PROGS@,$REPLACEMENT_PROGS,;t t
9620s,@EXTRA_PROGS@,$EXTRA_PROGS,;t t
9621s,@DPORTSDIR@,$DPORTSDIR,;t t
9622s,@PORTCONFIGDIR@,$PORTCONFIGDIR,;t t
9623s,@SQLITE3_DIR@,$SQLITE3_DIR,;t t
9624s,@DSTUSR@,$DSTUSR,;t t
9625s,@DSTGRP@,$DSTGRP,;t t
9626s,@DSTMODE@,$DSTMODE,;t t
9627s,@CPP@,$CPP,;t t
9628s,@EGREP@,$EGREP,;t t
9629s,@MD5_LIBS@,$MD5_LIBS,;t t
9630s,@X_CFLAGS@,$X_CFLAGS,;t t
9631s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
9632s,@X_LIBS@,$X_LIBS,;t t
9633s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
9634s,@TCL_VERSION@,$TCL_VERSION,;t t
9635s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
9636s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
9637s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
9638s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
9639s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
9640s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
9641s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
9642s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
9643s,@TCL_INCLUDES@,$TCL_INCLUDES,;t t
9644s,@TCLSH@,$TCLSH,;t t
9645s,@TCL_PACKAGE_DIR@,$TCL_PACKAGE_DIR,;t t
9646s,@CURL_CONFIG@,$CURL_CONFIG,;t t
9647s,@CFLAGS_LIBCURL@,$CFLAGS_LIBCURL,;t t
9648s,@LDFLAGS_LIBCURL@,$LDFLAGS_LIBCURL,;t t
9649s,@OUR_INCLUDED_PACKAGES@,$OUR_INCLUDED_PACKAGES,;t t
9650s,@INCLUDES@,$INCLUDES,;t t
9651s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
9652s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
9653s,@TCL_DEFS@,$TCL_DEFS,;t t
9654s,@STLIB_LD@,$STLIB_LD,;t t
9655s,@SHLIB_LD@,$SHLIB_LD,;t t
9656s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
9657s,@SHLIB_LDFLAGS@,$SHLIB_LDFLAGS,;t t
9658s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t
9659s,@TCL_CC@,$TCL_CC,;t t
9660s,@prefix_expanded@,$prefix_expanded,;t t
9661s,@PORTCONFIGDIR_EXPANDED@,$PORTCONFIGDIR_EXPANDED,;t t
9662s,@localstatedir_expanded@,$localstatedir_expanded,;t t
9663s,@LIBOBJS@,$LIBOBJS,;t t
9664s,@LTLIBOBJS@,$LTLIBOBJS,;t t
9665CEOF
9666
9667_ACEOF
9668
9669  cat >>$CONFIG_STATUS <<\_ACEOF
9670  # Split the substitutions into bite-sized pieces for seds with
9671  # small command number limits, like on Digital OSF/1 and HP-UX.
9672  ac_max_sed_lines=48
9673  ac_sed_frag=1 # Number of current file.
9674  ac_beg=1 # First line for current file.
9675  ac_end=$ac_max_sed_lines # Line after last line for current file.
9676  ac_more_lines=:
9677  ac_sed_cmds=
9678  while $ac_more_lines; do
9679    if test $ac_beg -gt 1; then
9680      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
9681    else
9682      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
9683    fi
9684    if test ! -s $tmp/subs.frag; then
9685      ac_more_lines=false
9686    else
9687      # The purpose of the label and of the branching condition is to
9688      # speed up the sed processing (if there are no `@' at all, there
9689      # is no need to browse any of the substitutions).
9690      # These are the two extra sed commands mentioned above.
9691      (echo ':t
9692  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
9693      if test -z "$ac_sed_cmds"; then
9694        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
9695      else
9696        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
9697      fi
9698      ac_sed_frag=`expr $ac_sed_frag + 1`
9699      ac_beg=$ac_end
9700      ac_end=`expr $ac_end + $ac_max_sed_lines`
9701    fi
9702  done
9703  if test -z "$ac_sed_cmds"; then
9704    ac_sed_cmds=cat
9705  fi
9706fi # test -n "$CONFIG_FILES"
9707
9708_ACEOF
9709cat >>$CONFIG_STATUS <<\_ACEOF
9710for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
9711  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9712  case $ac_file in
9713  - | *:- | *:-:* ) # input from stdin
9714        cat >$tmp/stdin
9715        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
9716        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
9717  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
9718        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
9719  * )   ac_file_in=$ac_file.in ;;
9720  esac
9721
9722  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
9723  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
9724$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9725         X"$ac_file" : 'X\(//\)[^/]' \| \
9726         X"$ac_file" : 'X\(//\)$' \| \
9727         X"$ac_file" : 'X\(/\)' \| \
9728         .     : '\(.\)' 2>/dev/null ||
9729echo X"$ac_file" |
9730    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9731          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9732          /^X\(\/\/\)$/{ s//\1/; q; }
9733          /^X\(\/\).*/{ s//\1/; q; }
9734          s/.*/./; q'`
9735  { if $as_mkdir_p; then
9736    mkdir -p "$ac_dir"
9737  else
9738    as_dir="$ac_dir"
9739    as_dirs=
9740    while test ! -d "$as_dir"; do
9741      as_dirs="$as_dir $as_dirs"
9742      as_dir=`(dirname "$as_dir") 2>/dev/null ||
9743$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9744         X"$as_dir" : 'X\(//\)[^/]' \| \
9745         X"$as_dir" : 'X\(//\)$' \| \
9746         X"$as_dir" : 'X\(/\)' \| \
9747         .     : '\(.\)' 2>/dev/null ||
9748echo X"$as_dir" |
9749    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
9750          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
9751          /^X\(\/\/\)$/{ s//\1/; q; }
9752          /^X\(\/\).*/{ s//\1/; q; }
9753          s/.*/./; q'`
9754    done
9755    test ! -n "$as_dirs" || mkdir $as_dirs
9756  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
9757echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
9758   { (exit 1); exit 1; }; }; }
9759
9760  ac_builddir=.
9761
9762if test "$ac_dir" != .; then
9763  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
9764  # A "../" for each directory in $ac_dir_suffix.
9765  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
9766else
9767  ac_dir_suffix= ac_top_builddir=
9768fi
9769
9770case $srcdir in
9771  .)  # No --srcdir option.  We are building in place.
9772    ac_srcdir=.
9773    if test -z "$ac_top_builddir"; then
9774       ac_top_srcdir=.
9775    else
9776       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
9777    fi ;;
9778  [\\/]* | ?:[\\/]* )  # Absolute path.
9779    ac_srcdir=$srcdir$ac_dir_suffix;
9780    ac_top_srcdir=$srcdir ;;
9781  *) # Relative path.
9782    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
9783    ac_top_srcdir=$ac_top_builddir$srcdir ;;
9784esac
9785
9786# Do not use `cd foo && pwd` to compute absolute paths, because
9787# the directories may not exist.
9788case `pwd` in
9789.) ac_abs_builddir="$ac_dir";;
9790*)
9791  case "$ac_dir" in
9792  .) ac_abs_builddir=`pwd`;;
9793  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
9794  *) ac_abs_builddir=`pwd`/"$ac_dir";;
9795  esac;;
9796esac
9797case $ac_abs_builddir in
9798.) ac_abs_top_builddir=${ac_top_builddir}.;;
9799*)
9800  case ${ac_top_builddir}. in
9801  .) ac_abs_top_builddir=$ac_abs_builddir;;
9802  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
9803  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
9804  esac;;
9805esac
9806case $ac_abs_builddir in
9807.) ac_abs_srcdir=$ac_srcdir;;
9808*)
9809  case $ac_srcdir in
9810  .) ac_abs_srcdir=$ac_abs_builddir;;
9811  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
9812  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
9813  esac;;
9814esac
9815case $ac_abs_builddir in
9816.) ac_abs_top_srcdir=$ac_top_srcdir;;
9817*)
9818  case $ac_top_srcdir in
9819  .) ac_abs_top_srcdir=$ac_abs_builddir;;
9820  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
9821  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
9822  esac;;
9823esac
9824
9825
9826  case $INSTALL in
9827  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
9828  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
9829  esac
9830
9831  if test x"$ac_file" != x-; then
9832    { echo "$as_me:$LINENO: creating $ac_file" >&5
9833echo "$as_me: creating $ac_file" >&6;}
9834    rm -f "$ac_file"
9835  fi
9836  # Let's still pretend it is `configure' which instantiates (i.e., don't
9837  # use $as_me), people would be surprised to read:
9838  #    /* config.h.  Generated by config.status.  */
9839  if test x"$ac_file" = x-; then
9840    configure_input=
9841  else
9842    configure_input="$ac_file.  "
9843  fi
9844  configure_input=$configure_input"Generated from `echo $ac_file_in |
9845                                     sed 's,.*/,,'` by configure."
9846
9847  # First look for the input files in the build tree, otherwise in the
9848  # src tree.
9849  ac_file_inputs=`IFS=:
9850    for f in $ac_file_in; do
9851      case $f in
9852      -) echo $tmp/stdin ;;
9853      [\\/$]*)
9854         # Absolute (can't be DOS-style, as IFS=:)
9855         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
9856echo "$as_me: error: cannot find input file: $f" >&2;}
9857   { (exit 1); exit 1; }; }
9858         echo "$f";;
9859      *) # Relative
9860         if test -f "$f"; then
9861           # Build tree
9862           echo "$f"
9863         elif test -f "$srcdir/$f"; then
9864           # Source tree
9865           echo "$srcdir/$f"
9866         else
9867           # /dev/null tree
9868           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
9869echo "$as_me: error: cannot find input file: $f" >&2;}
9870   { (exit 1); exit 1; }; }
9871         fi;;
9872      esac
9873    done` || { (exit 1); exit 1; }
9874_ACEOF
9875cat >>$CONFIG_STATUS <<_ACEOF
9876  sed "$ac_vpsub
9877$extrasub
9878_ACEOF
9879cat >>$CONFIG_STATUS <<\_ACEOF
9880:t
9881/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
9882s,@configure_input@,$configure_input,;t t
9883s,@srcdir@,$ac_srcdir,;t t
9884s,@abs_srcdir@,$ac_abs_srcdir,;t t
9885s,@top_srcdir@,$ac_top_srcdir,;t t
9886s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
9887s,@builddir@,$ac_builddir,;t t
9888s,@abs_builddir@,$ac_abs_builddir,;t t
9889s,@top_builddir@,$ac_top_builddir,;t t
9890s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
9891s,@INSTALL@,$ac_INSTALL,;t t
9892" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
9893  rm -f $tmp/stdin
9894  if test x"$ac_file" != x-; then
9895    mv $tmp/out $ac_file
9896  else
9897    cat $tmp/out
9898    rm -f $tmp/out
9899  fi
9900
9901done
9902_ACEOF
9903cat >>$CONFIG_STATUS <<\_ACEOF
9904
9905#
9906# CONFIG_HEADER section.
9907#
9908
9909# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9910# NAME is the cpp macro being defined and VALUE is the value it is being given.
9911#
9912# ac_d sets the value in "#define NAME VALUE" lines.
9913ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)'
9914ac_dB='[         ].*$,\1#\2'
9915ac_dC=' '
9916ac_dD=',;t'
9917# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9918ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9919ac_uB='$,\1#\2define\3'
9920ac_uC=' '
9921ac_uD=',;t'
9922
9923for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
9924  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9925  case $ac_file in
9926  - | *:- | *:-:* ) # input from stdin
9927        cat >$tmp/stdin
9928        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
9929        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
9930  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
9931        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
9932  * )   ac_file_in=$ac_file.in ;;
9933  esac
9934
9935  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
9936echo "$as_me: creating $ac_file" >&6;}
9937
9938  # First look for the input files in the build tree, otherwise in the
9939  # src tree.
9940  ac_file_inputs=`IFS=:
9941    for f in $ac_file_in; do
9942      case $f in
9943      -) echo $tmp/stdin ;;
9944      [\\/$]*)
9945         # Absolute (can't be DOS-style, as IFS=:)
9946         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
9947echo "$as_me: error: cannot find input file: $f" >&2;}
9948   { (exit 1); exit 1; }; }
9949         # Do quote $f, to prevent DOS paths from being IFS'd.
9950         echo "$f";;
9951      *) # Relative
9952         if test -f "$f"; then
9953           # Build tree
9954           echo "$f"
9955         elif test -f "$srcdir/$f"; then
9956           # Source tree
9957           echo "$srcdir/$f"
9958         else
9959           # /dev/null tree
9960           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
9961echo "$as_me: error: cannot find input file: $f" >&2;}
9962   { (exit 1); exit 1; }; }
9963         fi;;
9964      esac
9965    done` || { (exit 1); exit 1; }
9966  # Remove the trailing spaces.
9967  sed 's/[       ]*$//' $ac_file_inputs >$tmp/in
9968
9969_ACEOF
9970
9971# Transform confdefs.h into two sed scripts, `conftest.defines' and
9972# `conftest.undefs', that substitutes the proper values into
9973# config.h.in to produce config.h.  The first handles `#define'
9974# templates, and the second `#undef' templates.
9975# And first: Protect against being on the right side of a sed subst in
9976# config.status.  Protect against being in an unquoted here document
9977# in config.status.
9978rm -f conftest.defines conftest.undefs
9979# Using a here document instead of a string reduces the quoting nightmare.
9980# Putting comments in sed scripts is not portable.
9981#
9982# `end' is used to avoid that the second main sed command (meant for
9983# 0-ary CPP macros) applies to n-ary macro definitions.
9984# See the Autoconf documentation for `clear'.
9985cat >confdef2sed.sed <<\_ACEOF
9986s/[\\&,]/\\&/g
9987s,[\\$`],\\&,g
9988t clear
9989: clear
9990s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
9991t end
9992s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
9993: end
9994_ACEOF
9995# If some macros were called several times there might be several times
9996# the same #defines, which is useless.  Nevertheless, we may not want to
9997# sort them, since we want the *last* AC-DEFINE to be honored.
9998uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
9999sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
10000rm -f confdef2sed.sed
10001
10002# This sed command replaces #undef with comments.  This is necessary, for
10003# example, in the case of _POSIX_SOURCE, which is predefined and required
10004# on some systems where configure will not decide to define it.
10005cat >>conftest.undefs <<\_ACEOF
10006s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
10007_ACEOF
10008
10009# Break up conftest.defines because some shells have a limit on the size
10010# of here documents, and old seds have small limits too (100 cmds).
10011echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
10012echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
10013echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
10014echo '  :' >>$CONFIG_STATUS
10015rm -f conftest.tail
10016while grep . conftest.defines >/dev/null
10017do
10018  # Write a limited-size here document to $tmp/defines.sed.
10019  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
10020  # Speed up: don't consider the non `#define' lines.
10021  echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS
10022  # Work around the forget-to-reset-the-flag bug.
10023  echo 't clr' >>$CONFIG_STATUS
10024  echo ': clr' >>$CONFIG_STATUS
10025  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
10026  echo 'CEOF
10027  sed -f $tmp/defines.sed $tmp/in >$tmp/out
10028  rm -f $tmp/in
10029  mv $tmp/out $tmp/in
10030' >>$CONFIG_STATUS
10031  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
10032  rm -f conftest.defines
10033  mv conftest.tail conftest.defines
10034done
10035rm -f conftest.defines
10036echo '  fi # grep' >>$CONFIG_STATUS
10037echo >>$CONFIG_STATUS
10038
10039# Break up conftest.undefs because some shells have a limit on the size
10040# of here documents, and old seds have small limits too (100 cmds).
10041echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
10042rm -f conftest.tail
10043while grep . conftest.undefs >/dev/null
10044do
10045  # Write a limited-size here document to $tmp/undefs.sed.
10046  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
10047  # Speed up: don't consider the non `#undef'
10048  echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS
10049  # Work around the forget-to-reset-the-flag bug.
10050  echo 't clr' >>$CONFIG_STATUS
10051  echo ': clr' >>$CONFIG_STATUS
10052  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
10053  echo 'CEOF
10054  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
10055  rm -f $tmp/in
10056  mv $tmp/out $tmp/in
10057' >>$CONFIG_STATUS
10058  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
10059  rm -f conftest.undefs
10060  mv conftest.tail conftest.undefs
10061done
10062rm -f conftest.undefs
10063
10064cat >>$CONFIG_STATUS <<\_ACEOF
10065  # Let's still pretend it is `configure' which instantiates (i.e., don't
10066  # use $as_me), people would be surprised to read:
10067  #    /* config.h.  Generated by config.status.  */
10068  if test x"$ac_file" = x-; then
10069    echo "/* Generated by configure.  */" >$tmp/config.h
10070  else
10071    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
10072  fi
10073  cat $tmp/in >>$tmp/config.h
10074  rm -f $tmp/in
10075  if test x"$ac_file" != x-; then
10076    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
10077      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
10078echo "$as_me: $ac_file is unchanged" >&6;}
10079    else
10080      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
10081$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10082         X"$ac_file" : 'X\(//\)[^/]' \| \
10083         X"$ac_file" : 'X\(//\)$' \| \
10084         X"$ac_file" : 'X\(/\)' \| \
10085         .     : '\(.\)' 2>/dev/null ||
10086echo X"$ac_file" |
10087    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10088          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10089          /^X\(\/\/\)$/{ s//\1/; q; }
10090          /^X\(\/\).*/{ s//\1/; q; }
10091          s/.*/./; q'`
10092      { if $as_mkdir_p; then
10093    mkdir -p "$ac_dir"
10094  else
10095    as_dir="$ac_dir"
10096    as_dirs=
10097    while test ! -d "$as_dir"; do
10098      as_dirs="$as_dir $as_dirs"
10099      as_dir=`(dirname "$as_dir") 2>/dev/null ||
10100$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10101         X"$as_dir" : 'X\(//\)[^/]' \| \
10102         X"$as_dir" : 'X\(//\)$' \| \
10103         X"$as_dir" : 'X\(/\)' \| \
10104         .     : '\(.\)' 2>/dev/null ||
10105echo X"$as_dir" |
10106    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10107          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10108          /^X\(\/\/\)$/{ s//\1/; q; }
10109          /^X\(\/\).*/{ s//\1/; q; }
10110          s/.*/./; q'`
10111    done
10112    test ! -n "$as_dirs" || mkdir $as_dirs
10113  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
10114echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
10115   { (exit 1); exit 1; }; }; }
10116
10117      rm -f $ac_file
10118      mv $tmp/config.h $ac_file
10119    fi
10120  else
10121    cat $tmp/config.h
10122    rm -f $tmp/config.h
10123  fi
10124done
10125_ACEOF
10126
10127cat >>$CONFIG_STATUS <<\_ACEOF
10128
10129{ (exit 0); exit 0; }
10130_ACEOF
10131chmod +x $CONFIG_STATUS
10132ac_clean_files=$ac_clean_files_save
10133
10134
10135# configure is writing to config.log, and then calls config.status.
10136# config.status does its own redirection, appending to config.log.
10137# Unfortunately, on DOS this fails, as config.log is still kept open
10138# by configure, so config.status won't be able to write to it; its
10139# output is simply discarded.  So we exec the FD to /dev/null,
10140# effectively closing config.log, so it can be properly (re)opened and
10141# appended to by config.status.  When coming back to configure, we
10142# need to make the FD available again.
10143if test "$no_create" != yes; then
10144  ac_cs_success=:
10145  ac_config_status_args=
10146  test "$silent" = yes &&
10147    ac_config_status_args="$ac_config_status_args --quiet"
10148  exec 5>/dev/null
10149  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
10150  exec 5>>config.log
10151  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
10152  # would make configure fail if this is the last instruction.
10153  $ac_cs_success || { (exit 1); exit 1; }
10154fi
10155
10156#
10157# CONFIG_SUBDIRS section.
10158#
10159if test "$no_recursion" != yes; then
10160
10161  # Remove --cache-file and --srcdir arguments so they do not pile up.
10162  ac_sub_configure_args=
10163  ac_prev=
10164  for ac_arg in $ac_configure_args; do
10165    if test -n "$ac_prev"; then
10166      ac_prev=
10167      continue
10168    fi
10169    case $ac_arg in
10170    -cache-file | --cache-file | --cache-fil | --cache-fi \
10171    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
10172      ac_prev=cache_file ;;
10173    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
10174    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
10175    | --c=*)
10176      ;;
10177    --config-cache | -C)
10178      ;;
10179    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10180      ac_prev=srcdir ;;
10181    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10182      ;;
10183    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
10184      ac_prev=prefix ;;
10185    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
10186      ;;
10187    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
10188    esac
10189  done
10190
10191  # Always prepend --prefix to ensure using the same prefix
10192  # in subdir configurations.
10193  ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args"
10194
10195  ac_popdir=`pwd`
10196  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
10197
10198    # Do not complain, so a configure script can configure whichever
10199    # parts of a large source tree are present.
10200    test -d $srcdir/$ac_dir || continue
10201
10202    { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
10203echo "$as_me: configuring in $ac_dir" >&6;}
10204    { if $as_mkdir_p; then
10205    mkdir -p "$ac_dir"
10206  else
10207    as_dir="$ac_dir"
10208    as_dirs=
10209    while test ! -d "$as_dir"; do
10210      as_dirs="$as_dir $as_dirs"
10211      as_dir=`(dirname "$as_dir") 2>/dev/null ||
10212$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10213         X"$as_dir" : 'X\(//\)[^/]' \| \
10214         X"$as_dir" : 'X\(//\)$' \| \
10215         X"$as_dir" : 'X\(/\)' \| \
10216         .     : '\(.\)' 2>/dev/null ||
10217echo X"$as_dir" |
10218    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
10219          /^X\(\/\/\)[^/].*/{ s//\1/; q; }
10220          /^X\(\/\/\)$/{ s//\1/; q; }
10221          /^X\(\/\).*/{ s//\1/; q; }
10222          s/.*/./; q'`
10223    done
10224    test ! -n "$as_dirs" || mkdir $as_dirs
10225  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
10226echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
10227   { (exit 1); exit 1; }; }; }
10228
10229    ac_builddir=.
10230
10231if test "$ac_dir" != .; then
10232  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
10233  # A "../" for each directory in $ac_dir_suffix.
10234  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
10235else
10236  ac_dir_suffix= ac_top_builddir=
10237fi
10238
10239case $srcdir in
10240  .)  # No --srcdir option.  We are building in place.
10241    ac_srcdir=.
10242    if test -z "$ac_top_builddir"; then
10243       ac_top_srcdir=.
10244    else
10245       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
10246    fi ;;
10247  [\\/]* | ?:[\\/]* )  # Absolute path.
10248    ac_srcdir=$srcdir$ac_dir_suffix;
10249    ac_top_srcdir=$srcdir ;;
10250  *) # Relative path.
10251    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
10252    ac_top_srcdir=$ac_top_builddir$srcdir ;;
10253esac
10254
10255# Do not use `cd foo && pwd` to compute absolute paths, because
10256# the directories may not exist.
10257case `pwd` in
10258.) ac_abs_builddir="$ac_dir";;
10259*)
10260  case "$ac_dir" in
10261  .) ac_abs_builddir=`pwd`;;
10262  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
10263  *) ac_abs_builddir=`pwd`/"$ac_dir";;
10264  esac;;
10265esac
10266case $ac_abs_builddir in
10267.) ac_abs_top_builddir=${ac_top_builddir}.;;
10268*)
10269  case ${ac_top_builddir}. in
10270  .) ac_abs_top_builddir=$ac_abs_builddir;;
10271  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
10272  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
10273  esac;;
10274esac
10275case $ac_abs_builddir in
10276.) ac_abs_srcdir=$ac_srcdir;;
10277*)
10278  case $ac_srcdir in
10279  .) ac_abs_srcdir=$ac_abs_builddir;;
10280  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
10281  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
10282  esac;;
10283esac
10284case $ac_abs_builddir in
10285.) ac_abs_top_srcdir=$ac_top_srcdir;;
10286*)
10287  case $ac_top_srcdir in
10288  .) ac_abs_top_srcdir=$ac_abs_builddir;;
10289  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
10290  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
10291  esac;;
10292esac
10293
10294
10295    cd $ac_dir
10296
10297    # Check for guested configure; otherwise get Cygnus style configure.
10298    if test -f $ac_srcdir/configure.gnu; then
10299      ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'"
10300    elif test -f $ac_srcdir/configure; then
10301      ac_sub_configure="$SHELL '$ac_srcdir/configure'"
10302    elif test -f $ac_srcdir/configure.in; then
10303      ac_sub_configure=$ac_configure
10304    else
10305      { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
10306echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
10307      ac_sub_configure=
10308    fi
10309
10310    # The recursion is here.
10311    if test -n "$ac_sub_configure"; then
10312      # Make the cache file name correct relative to the subdirectory.
10313      case $cache_file in
10314      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
10315      *) # Relative path.
10316        ac_sub_cache_file=$ac_top_builddir$cache_file ;;
10317      esac
10318
10319      { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
10320echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
10321      # The eval makes quoting arguments work.
10322      eval $ac_sub_configure $ac_sub_configure_args \
10323           --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir ||
10324        { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
10325echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
10326   { (exit 1); exit 1; }; }
10327    fi
10328
10329    cd $ac_popdir
10330  done
10331fi
10332
Note: See TracBrowser for help on using the repository browser.