source: trunk/base/configure @ 26709

Last change on this file since 26709 was 26709, checked in by landonf@…, 13 years ago

Avoid modifying CPPFLAGS/LDFLAGS directly when checking for Foundation.
Submitted by: afb@…

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