source: branches/dp2mp-move/base/configure @ 26175

Last change on this file since 26175 was 26175, checked in by jmpp@…, 10 years ago

Merging landonf's r26135: Autoconf support for objc, foundation, and optionally-enabled -Werror.

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