source: trunk/base/configure @ 33758

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

regenerate configure

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