source: trunk/base/configure @ 40060

Last change on this file since 40060 was 40060, checked in by toby@…, 12 years ago

handle _ in arch name (x86_64)

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