source: trunk/base/configure @ 29188

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

autogen configure for tar/gnutar/make/gnumake/sed/sed_ext

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