source: trunk/base/configure @ 23263

Last change on this file since 23263 was 22783, checked in by jmpp@…, 13 years ago

configure.ac now lists our new name and version number. "configure" script regenerated with autoconf 2.61,
causing a change in paths for the '--docdir' command line flag, which is irrelevant since we don't use it
at the moment.

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