source: trunk/base/configure @ 28393

Last change on this file since 28393 was 27313, checked in by jmpp@…, 13 years ago

Read the version number into the autoconf system through the esyscmd command,
finally eliminating the need to define the same thing in two places (and the
unavoidable discrepancy when one of them is forgotten).

Now that this is in place I hope eridius will finally implement a new MacPorts
versioning system for 'port version' and 'port selfupdate' using rpm-vercomp
and standard x.y.z version numbers, since he said back in 'them days, iirc,
that reading this number into autoconf was necessary (or was that just an
added bonus? ;-).

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