source: trunk/base/configure @ 34314

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

autoconf all universal options

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