source: trunk/base/configure @ 49072

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

typo

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