source: trunk/base/configure @ 43375

Last change on this file since 43375 was 43375, checked in by jmpp@…, 12 years ago

Finally move trunk away from floating point version numbers and instead use the more common x.y.z format, by:

  • Moving base/macports1.0/macports_autoconf.tcl.in to the @MACPORTS_VERSION@ autoconf variable;
  • Introducing a temporary special-case hack to force the selfupdate run in case the $macports::autoconf::macports_version variable is in the old format and smaller or equal to 1.800 (cf. my comment in the selfupdate proc in base/macports1.0/macports.tcl);
  • Removing the now unnecessary base/config/mp_version file, as everything is now determined from the base/config/macports_version file;
  • Removing the @MP_VERSION@ autoconf macro;
  • Regenerating the configure script;

All in all, we should have standard x.y.z version numbers starting from current trunk + 1 (e.g. 1.8.1), since
current trunk will only serve to introduce this code into users' hands first.

PS: I chose to force the upgrade as the special-case hack, since otherwise I'd have to reset the $macports::autoconf::macports_version
variable to achieve the same result, and that seems like it might make some babies out there cry...

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