source: trunk/base/configure @ 26710

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

Add missing macro for detecting pthread compiler/linker flags.

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