source: trunk/base/configure @ 25770

Last change on this file since 25770 was 25770, checked in by sfiera@…, 13 years ago

Build MacPorts with sqlite3 support in preparation for GSoC work

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