source: trunk/base/configure @ 28761

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

add check for <utime.h>

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