source: trunk/base/configure @ 25570

Last change on this file since 25570 was 24821, checked in by jberry@…, 13 years ago

autoreconf

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