source: trunk/base/configure @ 50573

Last change on this file since 50573 was 50573, checked in by jeremyhu@…, 11 years ago

base: No longer search for X11 SDK and remove reference to x11prefix

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