source: trunk/base/configure @ 35626

Last change on this file since 35626 was 34875, checked in by eridius@…, 12 years ago

Add support for fetch.type git (Fixes #14232)

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