source: trunk/base/configure @ 42842

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

base: updated configure check for outdated OS. Updated configure to use newer autoconf to fix X11 detection for libX11.dylib in addition to libX11.so

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