source: trunk/base/configure @ 18976

Last change on this file since 18976 was 18777, checked in by pguyot (Paul Guyot), 14 years ago

Add sys/paths to configure.ac.
Get darwintrace.c to compile on foreign systems.

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