source: trunk/base/configure @ 29115

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

portable sed regexp now. looks like snoopy swearing.

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