source: trunk/base/configure @ 40803

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

Move default frameworks_dir under prefix, and use it in portgroups

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