source: trunk/base/configure @ 42662

Last change on this file since 42662 was 41651, checked in by afb@…, 12 years ago

use clearenv(3) where available

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