1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --enable-static[=PKGS]  build static libraries [default=no]"
16ac_help="$ac_help
17  --enable-shared[=PKGS]  build shared libraries [default=yes]"
18ac_help="$ac_help
19  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
20ac_help="$ac_help
21  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
22ac_help="$ac_help
23  --disable-libtool-lock  avoid locking (might break parallel builds)"
24ac_help="$ac_help
25  --with-pic              try to use only PIC/non-PIC objects [default=use both]"
26ac_help="$ac_help
27  --enable-gcc            allow use of gcc if available [--disable-gcc]"
28ac_help="$ac_help
29  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
30ac_help="$ac_help
31 --with-tclinclude      directory containing the public Tcl header files."
32ac_help="$ac_help
33  --enable-threads        build with threads"
34ac_help="$ac_help
35  --enable-shared         build and link with shared libraries [--enable-shared]"
36ac_help="$ac_help
37  --enable-symbols        build with debugging symbols [--disable-symbols]"
38ac_help="$ac_help
39  --with-cyrus-sasl=DIR   Specify location of Cyrus SASLv2."
40
41# Initialize some variables set by options.
42# The variables have the same names as the options, with
43# dashes changed to underlines.
44build=NONE
45cache_file=./config.cache
46exec_prefix=NONE
47host=NONE
48no_create=
49nonopt=NONE
50no_recursion=
51prefix=NONE
52program_prefix=NONE
53program_suffix=NONE
54program_transform_name=s,x,x,
55silent=
56site=
57srcdir=
58target=NONE
59verbose=
60x_includes=NONE
61x_libraries=NONE
62bindir='${exec_prefix}/bin'
63sbindir='${exec_prefix}/sbin'
64libexecdir='${exec_prefix}/libexec'
65datadir='${prefix}/share'
66sysconfdir='${prefix}/etc'
67sharedstatedir='${prefix}/com'
68localstatedir='${prefix}/var'
69libdir='${exec_prefix}/lib'
70includedir='${prefix}/include'
71oldincludedir='/usr/include'
72infodir='${prefix}/info'
73mandir='${prefix}/man'
74
75# Initialize some other variables.
76subdirs=
77MFLAGS= MAKEFLAGS=
78SHELL=${CONFIG_SHELL-/bin/sh}
79# Maximum number of lines to put in a shell here document.
80ac_max_here_lines=12
81
82ac_prev=
83for ac_option
84do
85
86  # If the previous option needs an argument, assign it.
87  if test -n "$ac_prev"; then
88    eval "$ac_prev=\$ac_option"
89    ac_prev=
90    continue
91  fi
92
93  case "$ac_option" in
94  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
95  *) ac_optarg= ;;
96  esac
97
98  # Accept the important Cygnus configure options, so we can diagnose typos.
99
100  case "$ac_option" in
101
102  -bindir | --bindir | --bindi | --bind | --bin | --bi)
103    ac_prev=bindir ;;
104  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
105    bindir="$ac_optarg" ;;
106
107  -build | --build | --buil | --bui | --bu)
108    ac_prev=build ;;
109  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
110    build="$ac_optarg" ;;
111
112  -cache-file | --cache-file | --cache-fil | --cache-fi \
113  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
114    ac_prev=cache_file ;;
115  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
116  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
117    cache_file="$ac_optarg" ;;
118
119  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
120    ac_prev=datadir ;;
121  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
122  | --da=*)
123    datadir="$ac_optarg" ;;
124
125  -disable-* | --disable-*)
126    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
127    # Reject names that are not valid shell variable names.
128    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
129      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
130    fi
131    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
132    eval "enable_${ac_feature}=no" ;;
133
134  -enable-* | --enable-*)
135    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
136    # Reject names that are not valid shell variable names.
137    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
138      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
139    fi
140    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
141    case "$ac_option" in
142      *=*) ;;
143      *) ac_optarg=yes ;;
144    esac
145    eval "enable_${ac_feature}='$ac_optarg'" ;;
146
147  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
148  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
149  | --exec | --exe | --ex)
150    ac_prev=exec_prefix ;;
151  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
152  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
153  | --exec=* | --exe=* | --ex=*)
154    exec_prefix="$ac_optarg" ;;
155
156  -gas | --gas | --ga | --g)
157    # Obsolete; use --with-gas.
158    with_gas=yes ;;
159
160  -help | --help | --hel | --he)
161    # Omit some internal or obsolete options to make the list less imposing.
162    # This message is too long to be a string in the A/UX 3.1 sh.
163    cat << EOF
164Usage: configure [options] [host]
165Options: [defaults in brackets after descriptions]
166Configuration:
167  --cache-file=FILE       cache test results in FILE
168  --help                  print this message
169  --no-create             do not create output files
170  --quiet, --silent       do not print \`checking...' messages
171  --version               print the version of autoconf that created configure
172Directory and file names:
173  --prefix=PREFIX         install architecture-independent files in PREFIX
174                          [$ac_default_prefix]
175  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
176                          [same as prefix]
177  --bindir=DIR            user executables in DIR [EPREFIX/bin]
178  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
179  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
180  --datadir=DIR           read-only architecture-independent data in DIR
181                          [PREFIX/share]
182  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
183  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
184                          [PREFIX/com]
185  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
186  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
187  --includedir=DIR        C header files in DIR [PREFIX/include]
188  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
189  --infodir=DIR           info documentation in DIR [PREFIX/info]
190  --mandir=DIR            man documentation in DIR [PREFIX/man]
191  --srcdir=DIR            find the sources in DIR [configure dir or ..]
192  --program-prefix=PREFIX prepend PREFIX to installed program names
193  --program-suffix=SUFFIX append SUFFIX to installed program names
194  --program-transform-name=PROGRAM
195                          run sed PROGRAM on installed program names
196EOF
197    cat << EOF
198Host type:
199  --build=BUILD           configure for building on BUILD [BUILD=HOST]
200  --host=HOST             configure for HOST [guessed]
201  --target=TARGET         configure for TARGET [TARGET=HOST]
202Features and packages:
203  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
204  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
205  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
206  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
207  --x-includes=DIR        X include files are in DIR
208  --x-libraries=DIR       X library files are in DIR
209EOF
210    if test -n "$ac_help"; then
211      echo "--enable and --with options recognized:$ac_help"
212    fi
213    exit 0 ;;
214
215  -host | --host | --hos | --ho)
216    ac_prev=host ;;
217  -host=* | --host=* | --hos=* | --ho=*)
218    host="$ac_optarg" ;;
219
220  -includedir | --includedir | --includedi | --included | --include \
221  | --includ | --inclu | --incl | --inc)
222    ac_prev=includedir ;;
223  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
224  | --includ=* | --inclu=* | --incl=* | --inc=*)
225    includedir="$ac_optarg" ;;
226
227  -infodir | --infodir | --infodi | --infod | --info | --inf)
228    ac_prev=infodir ;;
229  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
230    infodir="$ac_optarg" ;;
231
232  -libdir | --libdir | --libdi | --libd)
233    ac_prev=libdir ;;
234  -libdir=* | --libdir=* | --libdi=* | --libd=*)
235    libdir="$ac_optarg" ;;
236
237  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
238  | --libexe | --libex | --libe)
239    ac_prev=libexecdir ;;
240  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
241  | --libexe=* | --libex=* | --libe=*)
242    libexecdir="$ac_optarg" ;;
243
244  -localstatedir | --localstatedir | --localstatedi | --localstated \
245  | --localstate | --localstat | --localsta | --localst \
246  | --locals | --local | --loca | --loc | --lo)
247    ac_prev=localstatedir ;;
248  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
249  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
250  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
251    localstatedir="$ac_optarg" ;;
252
253  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
254    ac_prev=mandir ;;
255  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
256    mandir="$ac_optarg" ;;
257
258  -nfp | --nfp | --nf)
259    # Obsolete; use --without-fp.
260    with_fp=no ;;
261
262  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
263  | --no-cr | --no-c)
264    no_create=yes ;;
265
266  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
267  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
268    no_recursion=yes ;;
269
270  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
271  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
272  | --oldin | --oldi | --old | --ol | --o)
273    ac_prev=oldincludedir ;;
274  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
275  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
276  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
277    oldincludedir="$ac_optarg" ;;
278
279  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
280    ac_prev=prefix ;;
281  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
282    prefix="$ac_optarg" ;;
283
284  -program-prefix | --program-prefix | --program-prefi | --program-pref \
285  | --program-pre | --program-pr | --program-p)
286    ac_prev=program_prefix ;;
287  -program-prefix=* | --program-prefix=* | --program-prefi=* \
288  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
289    program_prefix="$ac_optarg" ;;
290
291  -program-suffix | --program-suffix | --program-suffi | --program-suff \
292  | --program-suf | --program-su | --program-s)
293    ac_prev=program_suffix ;;
294  -program-suffix=* | --program-suffix=* | --program-suffi=* \
295  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
296    program_suffix="$ac_optarg" ;;
297
298  -program-transform-name | --program-transform-name \
299  | --program-transform-nam | --program-transform-na \
300  | --program-transform-n | --program-transform- \
301  | --program-transform | --program-transfor \
302  | --program-transfo | --program-transf \
303  | --program-trans | --program-tran \
304  | --progr-tra | --program-tr | --program-t)
305    ac_prev=program_transform_name ;;
306  -program-transform-name=* | --program-transform-name=* \
307  | --program-transform-nam=* | --program-transform-na=* \
308  | --program-transform-n=* | --program-transform-=* \
309  | --program-transform=* | --program-transfor=* \
310  | --program-transfo=* | --program-transf=* \
311  | --program-trans=* | --program-tran=* \
312  | --progr-tra=* | --program-tr=* | --program-t=*)
313    program_transform_name="$ac_optarg" ;;
314
315  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
316  | -silent | --silent | --silen | --sile | --sil)
317    silent=yes ;;
318
319  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
320    ac_prev=sbindir ;;
321  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
322  | --sbi=* | --sb=*)
323    sbindir="$ac_optarg" ;;
324
325  -sharedstatedir | --sharedstatedir | --sharedstatedi \
326  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
327  | --sharedst | --shareds | --shared | --share | --shar \
328  | --sha | --sh)
329    ac_prev=sharedstatedir ;;
330  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
331  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
332  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
333  | --sha=* | --sh=*)
334    sharedstatedir="$ac_optarg" ;;
335
336  -site | --site | --sit)
337    ac_prev=site ;;
338  -site=* | --site=* | --sit=*)
339    site="$ac_optarg" ;;
340
341  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
342    ac_prev=srcdir ;;
343  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
344    srcdir="$ac_optarg" ;;
345
346  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
347  | --syscon | --sysco | --sysc | --sys | --sy)
348    ac_prev=sysconfdir ;;
349  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
350  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
351    sysconfdir="$ac_optarg" ;;
352
353  -target | --target | --targe | --targ | --tar | --ta | --t)
354    ac_prev=target ;;
355  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
356    target="$ac_optarg" ;;
357
358  -v | -verbose | --verbose | --verbos | --verbo | --verb)
359    verbose=yes ;;
360
361  -version | --version | --versio | --versi | --vers)
362    echo "configure generated by autoconf version 2.13"
363    exit 0 ;;
364
365  -with-* | --with-*)
366    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
367    # Reject names that are not valid shell variable names.
368    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
369      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
370    fi
371    ac_package=`echo $ac_package| sed 's/-/_/g'`
372    case "$ac_option" in
373      *=*) ;;
374      *) ac_optarg=yes ;;
375    esac
376    eval "with_${ac_package}='$ac_optarg'" ;;
377
378  -without-* | --without-*)
379    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
380    # Reject names that are not valid shell variable names.
381    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
382      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
383    fi
384    ac_package=`echo $ac_package| sed 's/-/_/g'`
385    eval "with_${ac_package}=no" ;;
386
387  --x)
388    # Obsolete; use --with-x.
389    with_x=yes ;;
390
391  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
392  | --x-incl | --x-inc | --x-in | --x-i)
393    ac_prev=x_includes ;;
394  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
395  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
396    x_includes="$ac_optarg" ;;
397
398  -x-libraries | --x-libraries | --x-librarie | --x-librari \
399  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
400    ac_prev=x_libraries ;;
401  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
402  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
403    x_libraries="$ac_optarg" ;;
404
405  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
406    ;;
407
408  *)
409    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
410      echo "configure: warning: $ac_option: invalid host type" 1>&2
411    fi
412    if test "x$nonopt" != xNONE; then
413      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
414    fi
415    nonopt="$ac_option"
416    ;;
417
418  esac
419done
420
421if test -n "$ac_prev"; then
422  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
423fi
424
425trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
426
427# File descriptor usage:
428# 0 standard input
429# 1 file creation
430# 2 errors and warnings
431# 3 some systems may open it to /dev/tty
432# 4 used on the Kubota Titan
433# 6 checking for... messages and results
434# 5 compiler messages saved in config.log
435if test "$silent" = yes; then
436  exec 6>/dev/null
437else
438  exec 6>&1
439fi
440exec 5>./config.log
441
442echo "\
443This file contains any messages produced by compilers while
444running configure, to aid debugging if configure makes a mistake.
445" 1>&5
446
447# Strip out --no-create and --no-recursion so they do not pile up.
448# Also quote any args containing shell metacharacters.
449ac_configure_args=
450for ac_arg
451do
452  case "$ac_arg" in
453  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
454  | --no-cr | --no-c) ;;
455  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
456  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
457  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
458  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
459  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
460  esac
461done
462
463# NLS nuisances.
464# Only set these to C if already set.  These must not be set unconditionally
465# because not all systems understand e.g. LANG=C (notably SCO).
466# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
467# Non-C LC_CTYPE values break the ctype check.
468if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
469if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
470if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
471if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
472
473# confdefs.h avoids OS command line length limits that DEFS can exceed.
474rm -rf conftest* confdefs.h
475# AIX cpp loses on an empty file, so make sure it contains at least a newline.
476echo > confdefs.h
477
478# A filename unique to this package, relative to the directory that
479# configure is in, which we can look for to find out if srcdir is correct.
480ac_unique_file=tclsasl.c
481
482# Find the source files, if location was not specified.
483if test -z "$srcdir"; then
484  ac_srcdir_defaulted=yes
485  # Try the directory containing this script, then its parent.
486  ac_prog=$0
487  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
488  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
489  srcdir=$ac_confdir
490  if test ! -r $srcdir/$ac_unique_file; then
491    srcdir=..
492  fi
493else
494  ac_srcdir_defaulted=no
495fi
496if test ! -r $srcdir/$ac_unique_file; then
497  if test "$ac_srcdir_defaulted" = yes; then
498    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
499  else
500    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
501  fi
502fi
503srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
504
505# Prefer explicitly selected file to automatically selected ones.
506if test -z "$CONFIG_SITE"; then
507  if test "x$prefix" != xNONE; then
508    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
509  else
510    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
511  fi
512fi
513for ac_site_file in $CONFIG_SITE; do
514  if test -r "$ac_site_file"; then
515    echo "loading site script $ac_site_file"
516    . "$ac_site_file"
517  fi
518done
519
520if test -r "$cache_file"; then
521  echo "loading cache $cache_file"
522  . $cache_file
523else
524  echo "creating cache $cache_file"
525  > $cache_file
526fi
527
528ac_ext=c
529# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
530ac_cpp='$CPP $CPPFLAGS'
531ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
532ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
533cross_compiling=$ac_cv_prog_cc_cross
534
535ac_exeext=
536ac_objext=o
537if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
538  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
539  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
540    ac_n= ac_c='
541' ac_t='	'
542  else
543    ac_n=-n ac_c= ac_t=
544  fi
545else
546  ac_n= ac_c='\c' ac_t=
547fi
548
549echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
550echo "configure:551: checking for Cygwin environment" >&5
551if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
552  echo $ac_n "(cached) $ac_c" 1>&6
553else
554  cat > conftest.$ac_ext <<EOF
555#line 556 "configure"
556#include "confdefs.h"
557
558int main() {
559
560#ifndef __CYGWIN__
561#define __CYGWIN__ __CYGWIN32__
562#endif
563return __CYGWIN__;
564; return 0; }
565EOF
566if { (eval echo configure:567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
567  rm -rf conftest*
568  ac_cv_cygwin=yes
569else
570  echo "configure: failed program was:" >&5
571  cat conftest.$ac_ext >&5
572  rm -rf conftest*
573  ac_cv_cygwin=no
574fi
575rm -f conftest*
576rm -f conftest*
577fi
578
579echo "$ac_t""$ac_cv_cygwin" 1>&6
580CYGWIN=
581test "$ac_cv_cygwin" = yes && CYGWIN=yes
582echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
583echo "configure:584: checking for mingw32 environment" >&5
584if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
585  echo $ac_n "(cached) $ac_c" 1>&6
586else
587  cat > conftest.$ac_ext <<EOF
588#line 589 "configure"
589#include "confdefs.h"
590
591int main() {
592return __MINGW32__;
593; return 0; }
594EOF
595if { (eval echo configure:596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596  rm -rf conftest*
597  ac_cv_mingw32=yes
598else
599  echo "configure: failed program was:" >&5
600  cat conftest.$ac_ext >&5
601  rm -rf conftest*
602  ac_cv_mingw32=no
603fi
604rm -f conftest*
605rm -f conftest*
606fi
607
608echo "$ac_t""$ac_cv_mingw32" 1>&6
609MINGW32=
610test "$ac_cv_mingw32" = yes && MINGW32=yes
611
612ac_aux_dir=
613for ac_dir in config $srcdir/config; do
614  if test -f $ac_dir/install-sh; then
615    ac_aux_dir=$ac_dir
616    ac_install_sh="$ac_aux_dir/install-sh -c"
617    break
618  elif test -f $ac_dir/install.sh; then
619    ac_aux_dir=$ac_dir
620    ac_install_sh="$ac_aux_dir/install.sh -c"
621    break
622  fi
623done
624if test -z "$ac_aux_dir"; then
625  { echo "configure: error: can not find install-sh or install.sh in config $srcdir/config" 1>&2; exit 1; }
626fi
627ac_config_guess=$ac_aux_dir/config.guess
628ac_config_sub=$ac_aux_dir/config.sub
629ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
630
631CONFIGDIR=${srcdir}/config
632
633# Extract the first word of "gcc", so it can be a program name with args.
634set dummy gcc; ac_word=$2
635echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
636echo "configure:637: checking for $ac_word" >&5
637if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
638  echo $ac_n "(cached) $ac_c" 1>&6
639else
640  if test -n "$CC"; then
641  ac_cv_prog_CC="$CC" # Let the user override the test.
642else
643  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
644  ac_dummy="$PATH"
645  for ac_dir in $ac_dummy; do
646    test -z "$ac_dir" && ac_dir=.
647    if test -f $ac_dir/$ac_word; then
648      ac_cv_prog_CC="gcc"
649      break
650    fi
651  done
652  IFS="$ac_save_ifs"
653fi
654fi
655CC="$ac_cv_prog_CC"
656if test -n "$CC"; then
657  echo "$ac_t""$CC" 1>&6
658else
659  echo "$ac_t""no" 1>&6
660fi
661
662if test -z "$CC"; then
663  # Extract the first word of "cc", so it can be a program name with args.
664set dummy cc; ac_word=$2
665echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
666echo "configure:667: checking for $ac_word" >&5
667if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
668  echo $ac_n "(cached) $ac_c" 1>&6
669else
670  if test -n "$CC"; then
671  ac_cv_prog_CC="$CC" # Let the user override the test.
672else
673  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
674  ac_prog_rejected=no
675  ac_dummy="$PATH"
676  for ac_dir in $ac_dummy; do
677    test -z "$ac_dir" && ac_dir=.
678    if test -f $ac_dir/$ac_word; then
679      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
680        ac_prog_rejected=yes
681	continue
682      fi
683      ac_cv_prog_CC="cc"
684      break
685    fi
686  done
687  IFS="$ac_save_ifs"
688if test $ac_prog_rejected = yes; then
689  # We found a bogon in the path, so make sure we never use it.
690  set dummy $ac_cv_prog_CC
691  shift
692  if test $# -gt 0; then
693    # We chose a different compiler from the bogus one.
694    # However, it has the same basename, so the bogon will be chosen
695    # first if we set CC to just the basename; use the full file name.
696    shift
697    set dummy "$ac_dir/$ac_word" "$@"
698    shift
699    ac_cv_prog_CC="$@"
700  fi
701fi
702fi
703fi
704CC="$ac_cv_prog_CC"
705if test -n "$CC"; then
706  echo "$ac_t""$CC" 1>&6
707else
708  echo "$ac_t""no" 1>&6
709fi
710
711  if test -z "$CC"; then
712    case "`uname -s`" in
713    *win32* | *WIN32*)
714      # Extract the first word of "cl", so it can be a program name with args.
715set dummy cl; ac_word=$2
716echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
717echo "configure:718: checking for $ac_word" >&5
718if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
719  echo $ac_n "(cached) $ac_c" 1>&6
720else
721  if test -n "$CC"; then
722  ac_cv_prog_CC="$CC" # Let the user override the test.
723else
724  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
725  ac_dummy="$PATH"
726  for ac_dir in $ac_dummy; do
727    test -z "$ac_dir" && ac_dir=.
728    if test -f $ac_dir/$ac_word; then
729      ac_cv_prog_CC="cl"
730      break
731    fi
732  done
733  IFS="$ac_save_ifs"
734fi
735fi
736CC="$ac_cv_prog_CC"
737if test -n "$CC"; then
738  echo "$ac_t""$CC" 1>&6
739else
740  echo "$ac_t""no" 1>&6
741fi
742 ;;
743    esac
744  fi
745  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
746fi
747
748echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
749echo "configure:750: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
750
751ac_ext=c
752# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
753ac_cpp='$CPP $CPPFLAGS'
754ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
755ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
756cross_compiling=$ac_cv_prog_cc_cross
757
758cat > conftest.$ac_ext << EOF
759
760#line 761 "configure"
761#include "confdefs.h"
762
763main(){return(0);}
764EOF
765if { (eval echo configure:766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
766  ac_cv_prog_cc_works=yes
767  # If we can't run a trivial program, we are probably using a cross compiler.
768  if (./conftest; exit) 2>/dev/null; then
769    ac_cv_prog_cc_cross=no
770  else
771    ac_cv_prog_cc_cross=yes
772  fi
773else
774  echo "configure: failed program was:" >&5
775  cat conftest.$ac_ext >&5
776  ac_cv_prog_cc_works=no
777fi
778rm -fr conftest*
779ac_ext=c
780# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
781ac_cpp='$CPP $CPPFLAGS'
782ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
783ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
784cross_compiling=$ac_cv_prog_cc_cross
785
786echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
787if test $ac_cv_prog_cc_works = no; then
788  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
789fi
790echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
791echo "configure:792: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
792echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
793cross_compiling=$ac_cv_prog_cc_cross
794
795echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
796echo "configure:797: checking whether we are using GNU C" >&5
797if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
798  echo $ac_n "(cached) $ac_c" 1>&6
799else
800  cat > conftest.c <<EOF
801#ifdef __GNUC__
802  yes;
803#endif
804EOF
805if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
806  ac_cv_prog_gcc=yes
807else
808  ac_cv_prog_gcc=no
809fi
810fi
811
812echo "$ac_t""$ac_cv_prog_gcc" 1>&6
813
814if test $ac_cv_prog_gcc = yes; then
815  GCC=yes
816else
817  GCC=
818fi
819
820ac_test_CFLAGS="${CFLAGS+set}"
821ac_save_CFLAGS="$CFLAGS"
822CFLAGS=
823echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
824echo "configure:825: checking whether ${CC-cc} accepts -g" >&5
825if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
826  echo $ac_n "(cached) $ac_c" 1>&6
827else
828  echo 'void f(){}' > conftest.c
829if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
830  ac_cv_prog_cc_g=yes
831else
832  ac_cv_prog_cc_g=no
833fi
834rm -f conftest*
835
836fi
837
838echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
839if test "$ac_test_CFLAGS" = set; then
840  CFLAGS="$ac_save_CFLAGS"
841elif test $ac_cv_prog_cc_g = yes; then
842  if test "$GCC" = yes; then
843    CFLAGS="-g -O2"
844  else
845    CFLAGS="-g"
846  fi
847else
848  if test "$GCC" = yes; then
849    CFLAGS="-O2"
850  else
851    CFLAGS=
852  fi
853fi
854
855# Check whether --enable-static or --disable-static was given.
856if test "${enable_static+set}" = set; then
857  enableval="$enable_static"
858  p=${PACKAGE-default}
859case $enableval in
860yes) enable_static=yes ;;
861no) enable_static=no ;;
862*)
863  enable_static=no
864  # Look at the argument we got.  We use all the common list separators.
865  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
866  for pkg in $enableval; do
867    if test "X$pkg" = "X$p"; then
868      enable_static=yes
869    fi
870  done
871  IFS="$ac_save_ifs"
872  ;;
873esac
874else
875  enable_static=no
876fi
877
878# Check whether --enable-shared or --disable-shared was given.
879if test "${enable_shared+set}" = set; then
880  enableval="$enable_shared"
881  p=${PACKAGE-default}
882case $enableval in
883yes) enable_shared=yes ;;
884no) enable_shared=no ;;
885*)
886  enable_shared=no
887  # Look at the argument we got.  We use all the common list separators.
888  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
889  for pkg in $enableval; do
890    if test "X$pkg" = "X$p"; then
891      enable_shared=yes
892    fi
893  done
894  IFS="$ac_save_ifs"
895  ;;
896esac
897else
898  enable_shared=yes
899fi
900
901# Check whether --enable-fast-install or --disable-fast-install was given.
902if test "${enable_fast_install+set}" = set; then
903  enableval="$enable_fast_install"
904  p=${PACKAGE-default}
905case $enableval in
906yes) enable_fast_install=yes ;;
907no) enable_fast_install=no ;;
908*)
909  enable_fast_install=no
910  # Look at the argument we got.  We use all the common list separators.
911  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
912  for pkg in $enableval; do
913    if test "X$pkg" = "X$p"; then
914      enable_fast_install=yes
915    fi
916  done
917  IFS="$ac_save_ifs"
918  ;;
919esac
920else
921  enable_fast_install=yes
922fi
923
924
925# Make sure we can run config.sub.
926if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
927else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
928fi
929
930echo $ac_n "checking host system type""... $ac_c" 1>&6
931echo "configure:932: checking host system type" >&5
932
933host_alias=$host
934case "$host_alias" in
935NONE)
936  case $nonopt in
937  NONE)
938    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
939    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
940    fi ;;
941  *) host_alias=$nonopt ;;
942  esac ;;
943esac
944
945host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
946host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
947host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
948host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
949echo "$ac_t""$host" 1>&6
950
951echo $ac_n "checking build system type""... $ac_c" 1>&6
952echo "configure:953: checking build system type" >&5
953
954build_alias=$build
955case "$build_alias" in
956NONE)
957  case $nonopt in
958  NONE) build_alias=$host_alias ;;
959  *) build_alias=$nonopt ;;
960  esac ;;
961esac
962
963build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
964build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
965build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
966build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
967echo "$ac_t""$build" 1>&6
968
969# Check whether --with-gnu-ld or --without-gnu-ld was given.
970if test "${with_gnu_ld+set}" = set; then
971  withval="$with_gnu_ld"
972  test "$withval" = no || with_gnu_ld=yes
973else
974  with_gnu_ld=no
975fi
976
977ac_prog=ld
978if test "$GCC" = yes; then
979  # Check if gcc -print-prog-name=ld gives a path.
980  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
981echo "configure:982: checking for ld used by GCC" >&5
982  case $host in
983  *-*-mingw*)
984    # gcc leaves a trailing carriage return which upsets mingw
985    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
986  *)
987    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
988  esac
989  case $ac_prog in
990    # Accept absolute paths.
991    [\\/]* | [A-Za-z]:[\\/]*)
992      re_direlt='/[^/][^/]*/\.\./'
993      # Canonicalize the path of ld
994      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
995      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
996	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
997      done
998      test -z "$LD" && LD="$ac_prog"
999      ;;
1000  "")
1001    # If it fails, then pretend we aren't using GCC.
1002    ac_prog=ld
1003    ;;
1004  *)
1005    # If it is relative, then search for the first ld in PATH.
1006    with_gnu_ld=unknown
1007    ;;
1008  esac
1009elif test "$with_gnu_ld" = yes; then
1010  echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1011echo "configure:1012: checking for GNU ld" >&5
1012else
1013  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1014echo "configure:1015: checking for non-GNU ld" >&5
1015fi
1016if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1017  echo $ac_n "(cached) $ac_c" 1>&6
1018else
1019  if test -z "$LD"; then
1020  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1021  for ac_dir in $PATH; do
1022    test -z "$ac_dir" && ac_dir=.
1023    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1024      lt_cv_path_LD="$ac_dir/$ac_prog"
1025      # Check to see if the program is GNU ld.  I'd rather use --version,
1026      # but apparently some GNU ld's only accept -v.
1027      # Break only if it was the GNU/non-GNU ld that we prefer.
1028      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1029	test "$with_gnu_ld" != no && break
1030      else
1031	test "$with_gnu_ld" != yes && break
1032      fi
1033    fi
1034  done
1035  IFS="$ac_save_ifs"
1036else
1037  lt_cv_path_LD="$LD" # Let the user override the test with a path.
1038fi
1039fi
1040
1041LD="$lt_cv_path_LD"
1042if test -n "$LD"; then
1043  echo "$ac_t""$LD" 1>&6
1044else
1045  echo "$ac_t""no" 1>&6
1046fi
1047test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1048echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1049echo "configure:1050: checking if the linker ($LD) is GNU ld" >&5
1050if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1051  echo $ac_n "(cached) $ac_c" 1>&6
1052else
1053  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1054if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1055  lt_cv_prog_gnu_ld=yes
1056else
1057  lt_cv_prog_gnu_ld=no
1058fi
1059fi
1060
1061echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1062with_gnu_ld=$lt_cv_prog_gnu_ld
1063
1064
1065echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1066echo "configure:1067: checking for $LD option to reload object files" >&5
1067if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1068  echo $ac_n "(cached) $ac_c" 1>&6
1069else
1070  lt_cv_ld_reload_flag='-r'
1071fi
1072
1073echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1074reload_flag=$lt_cv_ld_reload_flag
1075test -n "$reload_flag" && reload_flag=" $reload_flag"
1076
1077echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1078echo "configure:1079: checking for BSD-compatible nm" >&5
1079if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1080  echo $ac_n "(cached) $ac_c" 1>&6
1081else
1082  if test -n "$NM"; then
1083  # Let the user override the test.
1084  lt_cv_path_NM="$NM"
1085else
1086  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1087  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1088    test -z "$ac_dir" && ac_dir=.
1089    tmp_nm=$ac_dir/${ac_tool_prefix}nm
1090    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1091      # Check to see if the nm accepts a BSD-compat flag.
1092      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1093      #   nm: unknown option "B" ignored
1094      # Tru64's nm complains that /dev/null is an invalid object file
1095      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1096	lt_cv_path_NM="$tmp_nm -B"
1097	break
1098      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1099	lt_cv_path_NM="$tmp_nm -p"
1100	break
1101      else
1102	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1103	continue # so that we can try to find one that supports BSD flags
1104      fi
1105    fi
1106  done
1107  IFS="$ac_save_ifs"
1108  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1109fi
1110fi
1111
1112NM="$lt_cv_path_NM"
1113echo "$ac_t""$NM" 1>&6
1114
1115echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1116echo "configure:1117: checking whether ln -s works" >&5
1117if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1118  echo $ac_n "(cached) $ac_c" 1>&6
1119else
1120  rm -f conftestdata
1121if ln -s X conftestdata 2>/dev/null
1122then
1123  rm -f conftestdata
1124  ac_cv_prog_LN_S="ln -s"
1125else
1126  ac_cv_prog_LN_S=ln
1127fi
1128fi
1129LN_S="$ac_cv_prog_LN_S"
1130if test "$ac_cv_prog_LN_S" = "ln -s"; then
1131  echo "$ac_t""yes" 1>&6
1132else
1133  echo "$ac_t""no" 1>&6
1134fi
1135
1136echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1137echo "configure:1138: checking how to recognise dependant libraries" >&5
1138if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1139  echo $ac_n "(cached) $ac_c" 1>&6
1140else
1141  lt_cv_file_magic_cmd='$MAGIC_CMD'
1142lt_cv_file_magic_test_file=
1143lt_cv_deplibs_check_method='unknown'
1144# Need to set the preceding variable on all platforms that support
1145# interlibrary dependencies.
1146# 'none' -- dependencies not supported.
1147# `unknown' -- same as none, but documents that we really don't know.
1148# 'pass_all' -- all dependencies passed with no checks.
1149# 'test_compile' -- check by making test program.
1150# 'file_magic [regex]' -- check by looking for files in library path
1151# which responds to the $file_magic_cmd with a given egrep regex.
1152# If you have `file' or equivalent on your system and you're not sure
1153# whether `pass_all' will *always* work, you probably want this one.
1154
1155case $host_os in
1156aix*)
1157  lt_cv_deplibs_check_method=pass_all
1158  ;;
1159
1160beos*)
1161  lt_cv_deplibs_check_method=pass_all
1162  ;;
1163
1164bsdi4*)
1165  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1166  lt_cv_file_magic_cmd='/usr/bin/file -L'
1167  lt_cv_file_magic_test_file=/shlib/libc.so
1168  ;;
1169
1170cygwin* | mingw* |pw32*)
1171  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1172  lt_cv_file_magic_cmd='$OBJDUMP -f'
1173  ;;
1174
1175darwin* | rhapsody*)
1176  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1177  lt_cv_file_magic_cmd='/usr/bin/file -L'
1178  case "$host_os" in
1179  rhapsody* | darwin1.012)
1180    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1181    ;;
1182  *) # Darwin 1.3 on
1183    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1184    ;;
1185  esac
1186  ;;
1187
1188freebsd* )
1189  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1190    case $host_cpu in
1191    i*86 )
1192      # Not sure whether the presence of OpenBSD here was a mistake.
1193      # Let's accept both of them until this is cleared up.
1194      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1195      lt_cv_file_magic_cmd=/usr/bin/file
1196      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1197      ;;
1198    esac
1199  else
1200    lt_cv_deplibs_check_method=pass_all
1201  fi
1202  ;;
1203
1204gnu*)
1205  lt_cv_deplibs_check_method=pass_all
1206  ;;
1207
1208hpux10.20*|hpux11*)
1209  lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1210  lt_cv_file_magic_cmd=/usr/bin/file
1211  lt_cv_file_magic_test_file=/usr/lib/libc.sl
1212  ;;
1213
1214irix5* | irix6*)
1215  case $host_os in
1216  irix5*)
1217    # this will be overridden with pass_all, but let us keep it just in case
1218    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1219    ;;
1220  *)
1221    case $LD in
1222    *-32|*"-32 ") libmagic=32-bit;;
1223    *-n32|*"-n32 ") libmagic=N32;;
1224    *-64|*"-64 ") libmagic=64-bit;;
1225    *) libmagic=never-match;;
1226    esac
1227    # this will be overridden with pass_all, but let us keep it just in case
1228    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1229    ;;
1230  esac
1231  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1232  lt_cv_deplibs_check_method=pass_all
1233  ;;
1234
1235# This must be Linux ELF.
1236linux-gnu*)
1237  case $host_cpu in
1238  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
1239    lt_cv_deplibs_check_method=pass_all ;;
1240  *)
1241    # glibc up to 2.1.1 does not perform some relocations on ARM
1242    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1243  esac
1244  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1245  ;;
1246
1247netbsd*)
1248  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1249    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1250  else
1251    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
1252  fi
1253  ;;
1254
1255newsos6)
1256  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
1257  lt_cv_file_magic_cmd=/usr/bin/file
1258  lt_cv_file_magic_test_file=/usr/lib/libnls.so
1259  ;;
1260
1261osf3* | osf4* | osf5*)
1262  # this will be overridden with pass_all, but let us keep it just in case
1263  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1264  lt_cv_file_magic_test_file=/shlib/libc.so
1265  lt_cv_deplibs_check_method=pass_all
1266  ;;
1267
1268sco3.2v5*)
1269  lt_cv_deplibs_check_method=pass_all
1270  ;;
1271
1272solaris*)
1273  lt_cv_deplibs_check_method=pass_all
1274  lt_cv_file_magic_test_file=/lib/libc.so
1275  ;;
1276
1277sysv5uw[78]* | sysv4*uw2*)
1278  lt_cv_deplibs_check_method=pass_all
1279  ;;
1280
1281sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1282  case $host_vendor in
1283  ncr)
1284    lt_cv_deplibs_check_method=pass_all
1285    ;;
1286  motorola)
1287    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
1288    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
1289    ;;
1290  esac
1291  ;;
1292esac
1293
1294fi
1295
1296echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
1297file_magic_cmd=$lt_cv_file_magic_cmd
1298deplibs_check_method=$lt_cv_deplibs_check_method
1299
1300echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1301echo "configure:1302: checking for object suffix" >&5
1302if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1303  echo $ac_n "(cached) $ac_c" 1>&6
1304else
1305  rm -f conftest*
1306echo 'int i = 1;' > conftest.$ac_ext
1307if { (eval echo configure:1308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1308  for ac_file in conftest.*; do
1309    case $ac_file in
1310    *.c) ;;
1311    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1312    esac
1313  done
1314else
1315  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1316fi
1317rm -f conftest*
1318fi
1319
1320echo "$ac_t""$ac_cv_objext" 1>&6
1321OBJEXT=$ac_cv_objext
1322ac_objext=$ac_cv_objext
1323
1324
1325
1326echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1327echo "configure:1328: checking for executable suffix" >&5
1328if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1329  echo $ac_n "(cached) $ac_c" 1>&6
1330else
1331  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1332  ac_cv_exeext=.exe
1333else
1334  rm -f conftest*
1335  echo 'int main () { return 0; }' > conftest.$ac_ext
1336  ac_cv_exeext=
1337  if { (eval echo configure:1338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1338    for file in conftest.*; do
1339      case $file in
1340      *.c | *.o | *.obj) ;;
1341      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1342      esac
1343    done
1344  else
1345    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1346  fi
1347  rm -f conftest*
1348  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1349fi
1350fi
1351
1352EXEEXT=""
1353test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1354echo "$ac_t""${ac_cv_exeext}" 1>&6
1355ac_exeext=$EXEEXT
1356
1357if test $host != $build; then
1358  ac_tool_prefix=${host_alias}-
1359else
1360  ac_tool_prefix=
1361fi
1362
1363# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1364
1365# Only perform the check for file, if the check method requires it
1366case $deplibs_check_method in
1367file_magic*)
1368  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1369    echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
1370echo "configure:1371: checking for ${ac_tool_prefix}file" >&5
1371if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1372  echo $ac_n "(cached) $ac_c" 1>&6
1373else
1374  case $MAGIC_CMD in
1375  /*)
1376  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1377  ;;
1378  ?:/*)
1379  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1380  ;;
1381  *)
1382  ac_save_MAGIC_CMD="$MAGIC_CMD"
1383  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1384  ac_dummy="/usr/bin:$PATH"
1385  for ac_dir in $ac_dummy; do
1386    test -z "$ac_dir" && ac_dir=.
1387    if test -f $ac_dir/${ac_tool_prefix}file; then
1388      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
1389      if test -n "$file_magic_test_file"; then
1390	case $deplibs_check_method in
1391	"file_magic "*)
1392	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1393	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1394	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1395	    egrep "$file_magic_regex" > /dev/null; then
1396	    :
1397	  else
1398	    cat <<EOF 1>&2
1399
1400*** Warning: the command libtool uses to detect shared libraries,
1401*** $file_magic_cmd, produces output that libtool cannot recognize.
1402*** The result is that libtool may fail to recognize shared libraries
1403*** as such.  This will affect the creation of libtool libraries that
1404*** depend on shared libraries, but programs linked with such libtool
1405*** libraries will work regardless of this problem.  Nevertheless, you
1406*** may want to report the problem to your system manager and/or to
1407*** bug-libtool@gnu.org
1408
1409EOF
1410	  fi ;;
1411	esac
1412      fi
1413      break
1414    fi
1415  done
1416  IFS="$ac_save_ifs"
1417  MAGIC_CMD="$ac_save_MAGIC_CMD"
1418  ;;
1419esac
1420fi
1421
1422MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1423if test -n "$MAGIC_CMD"; then
1424  echo "$ac_t""$MAGIC_CMD" 1>&6
1425else
1426  echo "$ac_t""no" 1>&6
1427fi
1428
1429if test -z "$lt_cv_path_MAGIC_CMD"; then
1430  if test -n "$ac_tool_prefix"; then
1431    echo $ac_n "checking for file""... $ac_c" 1>&6
1432echo "configure:1433: checking for file" >&5
1433if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1434  echo $ac_n "(cached) $ac_c" 1>&6
1435else
1436  case $MAGIC_CMD in
1437  /*)
1438  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1439  ;;
1440  ?:/*)
1441  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1442  ;;
1443  *)
1444  ac_save_MAGIC_CMD="$MAGIC_CMD"
1445  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1446  ac_dummy="/usr/bin:$PATH"
1447  for ac_dir in $ac_dummy; do
1448    test -z "$ac_dir" && ac_dir=.
1449    if test -f $ac_dir/file; then
1450      lt_cv_path_MAGIC_CMD="$ac_dir/file"
1451      if test -n "$file_magic_test_file"; then
1452	case $deplibs_check_method in
1453	"file_magic "*)
1454	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1455	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1456	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1457	    egrep "$file_magic_regex" > /dev/null; then
1458	    :
1459	  else
1460	    cat <<EOF 1>&2
1461
1462*** Warning: the command libtool uses to detect shared libraries,
1463*** $file_magic_cmd, produces output that libtool cannot recognize.
1464*** The result is that libtool may fail to recognize shared libraries
1465*** as such.  This will affect the creation of libtool libraries that
1466*** depend on shared libraries, but programs linked with such libtool
1467*** libraries will work regardless of this problem.  Nevertheless, you
1468*** may want to report the problem to your system manager and/or to
1469*** bug-libtool@gnu.org
1470
1471EOF
1472	  fi ;;
1473	esac
1474      fi
1475      break
1476    fi
1477  done
1478  IFS="$ac_save_ifs"
1479  MAGIC_CMD="$ac_save_MAGIC_CMD"
1480  ;;
1481esac
1482fi
1483
1484MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1485if test -n "$MAGIC_CMD"; then
1486  echo "$ac_t""$MAGIC_CMD" 1>&6
1487else
1488  echo "$ac_t""no" 1>&6
1489fi
1490
1491  else
1492    MAGIC_CMD=:
1493  fi
1494fi
1495
1496  fi
1497  ;;
1498esac
1499
1500# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1501set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1502echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1503echo "configure:1504: checking for $ac_word" >&5
1504if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1505  echo $ac_n "(cached) $ac_c" 1>&6
1506else
1507  if test -n "$RANLIB"; then
1508  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1509else
1510  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1511  ac_dummy="$PATH"
1512  for ac_dir in $ac_dummy; do
1513    test -z "$ac_dir" && ac_dir=.
1514    if test -f $ac_dir/$ac_word; then
1515      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1516      break
1517    fi
1518  done
1519  IFS="$ac_save_ifs"
1520fi
1521fi
1522RANLIB="$ac_cv_prog_RANLIB"
1523if test -n "$RANLIB"; then
1524  echo "$ac_t""$RANLIB" 1>&6
1525else
1526  echo "$ac_t""no" 1>&6
1527fi
1528
1529
1530if test -z "$ac_cv_prog_RANLIB"; then
1531if test -n "$ac_tool_prefix"; then
1532  # Extract the first word of "ranlib", so it can be a program name with args.
1533set dummy ranlib; ac_word=$2
1534echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1535echo "configure:1536: checking for $ac_word" >&5
1536if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1537  echo $ac_n "(cached) $ac_c" 1>&6
1538else
1539  if test -n "$RANLIB"; then
1540  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1541else
1542  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1543  ac_dummy="$PATH"
1544  for ac_dir in $ac_dummy; do
1545    test -z "$ac_dir" && ac_dir=.
1546    if test -f $ac_dir/$ac_word; then
1547      ac_cv_prog_RANLIB="ranlib"
1548      break
1549    fi
1550  done
1551  IFS="$ac_save_ifs"
1552  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1553fi
1554fi
1555RANLIB="$ac_cv_prog_RANLIB"
1556if test -n "$RANLIB"; then
1557  echo "$ac_t""$RANLIB" 1>&6
1558else
1559  echo "$ac_t""no" 1>&6
1560fi
1561
1562else
1563  RANLIB=":"
1564fi
1565fi
1566
1567# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
1568set dummy ${ac_tool_prefix}strip; ac_word=$2
1569echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1570echo "configure:1571: checking for $ac_word" >&5
1571if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1572  echo $ac_n "(cached) $ac_c" 1>&6
1573else
1574  if test -n "$STRIP"; then
1575  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1576else
1577  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1578  ac_dummy="$PATH"
1579  for ac_dir in $ac_dummy; do
1580    test -z "$ac_dir" && ac_dir=.
1581    if test -f $ac_dir/$ac_word; then
1582      ac_cv_prog_STRIP="${ac_tool_prefix}strip"
1583      break
1584    fi
1585  done
1586  IFS="$ac_save_ifs"
1587fi
1588fi
1589STRIP="$ac_cv_prog_STRIP"
1590if test -n "$STRIP"; then
1591  echo "$ac_t""$STRIP" 1>&6
1592else
1593  echo "$ac_t""no" 1>&6
1594fi
1595
1596
1597if test -z "$ac_cv_prog_STRIP"; then
1598if test -n "$ac_tool_prefix"; then
1599  # Extract the first word of "strip", so it can be a program name with args.
1600set dummy strip; ac_word=$2
1601echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1602echo "configure:1603: checking for $ac_word" >&5
1603if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1604  echo $ac_n "(cached) $ac_c" 1>&6
1605else
1606  if test -n "$STRIP"; then
1607  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1608else
1609  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1610  ac_dummy="$PATH"
1611  for ac_dir in $ac_dummy; do
1612    test -z "$ac_dir" && ac_dir=.
1613    if test -f $ac_dir/$ac_word; then
1614      ac_cv_prog_STRIP="strip"
1615      break
1616    fi
1617  done
1618  IFS="$ac_save_ifs"
1619  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
1620fi
1621fi
1622STRIP="$ac_cv_prog_STRIP"
1623if test -n "$STRIP"; then
1624  echo "$ac_t""$STRIP" 1>&6
1625else
1626  echo "$ac_t""no" 1>&6
1627fi
1628
1629else
1630  STRIP=":"
1631fi
1632fi
1633
1634
1635# Check for any special flags to pass to ltconfig.
1636libtool_flags="--cache-file=$cache_file"
1637test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1638test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1639test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1640test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
1641test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1642
1643
1644# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1645if test "${enable_libtool_lock+set}" = set; then
1646  enableval="$enable_libtool_lock"
1647  :
1648fi
1649
1650test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1651test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1652
1653# Check whether --with-pic or --without-pic was given.
1654if test "${with_pic+set}" = set; then
1655  withval="$with_pic"
1656  pic_mode="$withval"
1657else
1658  pic_mode=default
1659fi
1660
1661test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
1662test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
1663
1664# Some flags need to be propagated to the compiler or linker for good
1665# libtool support.
1666case $host in
1667*-*-irix6*)
1668  # Find out which ABI we are using.
1669  echo '#line 1670 "configure"' > conftest.$ac_ext
1670  if { (eval echo configure:1671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1671    case `/usr/bin/file conftest.$ac_objext` in
1672    *32-bit*)
1673      LD="${LD-ld} -32"
1674      ;;
1675    *N32*)
1676      LD="${LD-ld} -n32"
1677      ;;
1678    *64-bit*)
1679      LD="${LD-ld} -64"
1680      ;;
1681    esac
1682  fi
1683  rm -rf conftest*
1684  ;;
1685
1686*-*-sco3.2v5*)
1687  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1688  SAVE_CFLAGS="$CFLAGS"
1689  CFLAGS="$CFLAGS -belf"
1690  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1691echo "configure:1692: checking whether the C compiler needs -belf" >&5
1692if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1693  echo $ac_n "(cached) $ac_c" 1>&6
1694else
1695
1696     ac_ext=c
1697# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1698ac_cpp='$CPP $CPPFLAGS'
1699ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1700ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1701cross_compiling=$ac_cv_prog_cc_cross
1702
1703     cat > conftest.$ac_ext <<EOF
1704#line 1705 "configure"
1705#include "confdefs.h"
1706
1707int main() {
1708
1709; return 0; }
1710EOF
1711if { (eval echo configure:1712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1712  rm -rf conftest*
1713  lt_cv_cc_needs_belf=yes
1714else
1715  echo "configure: failed program was:" >&5
1716  cat conftest.$ac_ext >&5
1717  rm -rf conftest*
1718  lt_cv_cc_needs_belf=no
1719fi
1720rm -f conftest*
1721     ac_ext=c
1722# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1723ac_cpp='$CPP $CPPFLAGS'
1724ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1725ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1726cross_compiling=$ac_cv_prog_cc_cross
1727
1728fi
1729
1730echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1731  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1732    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1733    CFLAGS="$SAVE_CFLAGS"
1734  fi
1735  ;;
1736
1737
1738esac
1739
1740
1741# Save cache, so that ltconfig can load it
1742cat > confcache <<\EOF
1743# This file is a shell script that caches the results of configure
1744# tests run on this system so they can be shared between configure
1745# scripts and configure runs.  It is not useful on other systems.
1746# If it contains results you don't want to keep, you may remove or edit it.
1747#
1748# By default, configure uses ./config.cache as the cache file,
1749# creating it if it does not exist already.  You can give configure
1750# the --cache-file=FILE option to use a different cache file; that is
1751# what configure does when it calls configure scripts in
1752# subdirectories, so they share the cache.
1753# Giving --cache-file=/dev/null disables caching, for debugging configure.
1754# config.status only pays attention to the cache file if you give it the
1755# --recheck option to rerun configure.
1756#
1757EOF
1758# The following way of writing the cache mishandles newlines in values,
1759# but we know of no workaround that is simple, portable, and efficient.
1760# So, don't put newlines in cache variables' values.
1761# Ultrix sh set writes to stderr and can't be redirected directly,
1762# and sets the high bit in the cache file unless we assign to the vars.
1763(set) 2>&1 |
1764  case `(ac_space=' '; set | grep ac_space) 2>&1` in
1765  *ac_space=\ *)
1766    # `set' does not quote correctly, so add quotes (double-quote substitution
1767    # turns \\\\ into \\, and sed turns \\ into \).
1768    sed -n \
1769      -e "s/'/'\\\\''/g" \
1770      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1771    ;;
1772  *)
1773    # `set' quotes correctly as required by POSIX, so do not add quotes.
1774    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1775    ;;
1776  esac >> confcache
1777if cmp -s $cache_file confcache; then
1778  :
1779else
1780  if test -w $cache_file; then
1781    echo "updating cache $cache_file"
1782    cat confcache > $cache_file
1783  else
1784    echo "not updating unwritable cache $cache_file"
1785  fi
1786fi
1787rm -f confcache
1788
1789
1790# Actually configure libtool.  ac_aux_dir is where install-sh is found.
1791AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1792MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1793LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
1794AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
1795objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
1796deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
1797${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1798$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
1799|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1800
1801# Reload cache, that may have been modified by ltconfig
1802if test -r "$cache_file"; then
1803  echo "loading cache $cache_file"
1804  . $cache_file
1805else
1806  echo "creating cache $cache_file"
1807  > $cache_file
1808fi
1809
1810
1811# This can be used to rebuild libtool when needed
1812LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
1813
1814# Always use our own libtool.
1815LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1816
1817# Redirect the config.log output again, so that the ltconfig log is not
1818# clobbered by the next message.
1819exec 5>>./config.log
1820
1821
1822
1823
1824
1825
1826
1827
1828#--------------------------------------------------------------------
1829# __CHANGE__
1830# Set your package name and version numbers here.  The NODOT_VERSION is
1831# required for constructing the library name on systems that don't like
1832# dots in library names (Windows).  The VERSION variable is used on the
1833# other systems.
1834#--------------------------------------------------------------------
1835
1836PACKAGE=tclsasl
1837
1838MAJOR_VERSION=1
1839MINOR_VERSION=0
1840PATCHLEVEL=
1841
1842VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
1843NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
1844
1845
1846
1847
1848
1849#--------------------------------------------------------------------
1850# We put this here so that you can compile with -DVERSION="1.2" to
1851# encode the package version directly into the source files.
1852#--------------------------------------------------------------------
1853
1854eval cat >> confdefs.h <<EOF
1855#define VERSION "${VERSION}"
1856EOF
1857
1858
1859#--------------------------------------------------------------------
1860# Check whether --enable-gcc or --disable-gcc was given.  Do this
1861# before AC_CYGWIN is called so the compiler can
1862# be fully tested by built-in autoconf tools.
1863# This macro also calls AC_PROG_CC to set the compiler if --enable-gcc
1864# was not used.
1865#--------------------------------------------------------------------
1866
1867
1868    # Check whether --enable-gcc or --disable-gcc was given.
1869if test "${enable_gcc+set}" = set; then
1870  enableval="$enable_gcc"
1871  ok=$enableval
1872else
1873  ok=no
1874fi
1875
1876    if test "$ok" = "yes"; then
1877	CC=gcc
1878    else
1879	case "`uname -s`" in
1880	    *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*)
1881		CC=cl
1882	    ;;
1883	    *)
1884		CC=${CC-cc}
1885	    ;;
1886	esac
1887    fi
1888    # Extract the first word of "gcc", so it can be a program name with args.
1889set dummy gcc; ac_word=$2
1890echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1891echo "configure:1892: checking for $ac_word" >&5
1892if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1893  echo $ac_n "(cached) $ac_c" 1>&6
1894else
1895  if test -n "$CC"; then
1896  ac_cv_prog_CC="$CC" # Let the user override the test.
1897else
1898  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1899  ac_dummy="$PATH"
1900  for ac_dir in $ac_dummy; do
1901    test -z "$ac_dir" && ac_dir=.
1902    if test -f $ac_dir/$ac_word; then
1903      ac_cv_prog_CC="gcc"
1904      break
1905    fi
1906  done
1907  IFS="$ac_save_ifs"
1908fi
1909fi
1910CC="$ac_cv_prog_CC"
1911if test -n "$CC"; then
1912  echo "$ac_t""$CC" 1>&6
1913else
1914  echo "$ac_t""no" 1>&6
1915fi
1916
1917if test -z "$CC"; then
1918  # Extract the first word of "cc", so it can be a program name with args.
1919set dummy cc; ac_word=$2
1920echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1921echo "configure:1922: checking for $ac_word" >&5
1922if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1923  echo $ac_n "(cached) $ac_c" 1>&6
1924else
1925  if test -n "$CC"; then
1926  ac_cv_prog_CC="$CC" # Let the user override the test.
1927else
1928  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1929  ac_prog_rejected=no
1930  ac_dummy="$PATH"
1931  for ac_dir in $ac_dummy; do
1932    test -z "$ac_dir" && ac_dir=.
1933    if test -f $ac_dir/$ac_word; then
1934      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1935        ac_prog_rejected=yes
1936	continue
1937      fi
1938      ac_cv_prog_CC="cc"
1939      break
1940    fi
1941  done
1942  IFS="$ac_save_ifs"
1943if test $ac_prog_rejected = yes; then
1944  # We found a bogon in the path, so make sure we never use it.
1945  set dummy $ac_cv_prog_CC
1946  shift
1947  if test $# -gt 0; then
1948    # We chose a different compiler from the bogus one.
1949    # However, it has the same basename, so the bogon will be chosen
1950    # first if we set CC to just the basename; use the full file name.
1951    shift
1952    set dummy "$ac_dir/$ac_word" "$@"
1953    shift
1954    ac_cv_prog_CC="$@"
1955  fi
1956fi
1957fi
1958fi
1959CC="$ac_cv_prog_CC"
1960if test -n "$CC"; then
1961  echo "$ac_t""$CC" 1>&6
1962else
1963  echo "$ac_t""no" 1>&6
1964fi
1965
1966  if test -z "$CC"; then
1967    case "`uname -s`" in
1968    *win32* | *WIN32*)
1969      # Extract the first word of "cl", so it can be a program name with args.
1970set dummy cl; ac_word=$2
1971echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1972echo "configure:1973: checking for $ac_word" >&5
1973if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1974  echo $ac_n "(cached) $ac_c" 1>&6
1975else
1976  if test -n "$CC"; then
1977  ac_cv_prog_CC="$CC" # Let the user override the test.
1978else
1979  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1980  ac_dummy="$PATH"
1981  for ac_dir in $ac_dummy; do
1982    test -z "$ac_dir" && ac_dir=.
1983    if test -f $ac_dir/$ac_word; then
1984      ac_cv_prog_CC="cl"
1985      break
1986    fi
1987  done
1988  IFS="$ac_save_ifs"
1989fi
1990fi
1991CC="$ac_cv_prog_CC"
1992if test -n "$CC"; then
1993  echo "$ac_t""$CC" 1>&6
1994else
1995  echo "$ac_t""no" 1>&6
1996fi
1997 ;;
1998    esac
1999  fi
2000  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2001fi
2002
2003echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2004echo "configure:2005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2005
2006ac_ext=c
2007# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2008ac_cpp='$CPP $CPPFLAGS'
2009ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2010ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2011cross_compiling=$ac_cv_prog_cc_cross
2012
2013cat > conftest.$ac_ext << EOF
2014
2015#line 2016 "configure"
2016#include "confdefs.h"
2017
2018main(){return(0);}
2019EOF
2020if { (eval echo configure:2021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2021  ac_cv_prog_cc_works=yes
2022  # If we can't run a trivial program, we are probably using a cross compiler.
2023  if (./conftest; exit) 2>/dev/null; then
2024    ac_cv_prog_cc_cross=no
2025  else
2026    ac_cv_prog_cc_cross=yes
2027  fi
2028else
2029  echo "configure: failed program was:" >&5
2030  cat conftest.$ac_ext >&5
2031  ac_cv_prog_cc_works=no
2032fi
2033rm -fr conftest*
2034ac_ext=c
2035# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2036ac_cpp='$CPP $CPPFLAGS'
2037ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2038ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2039cross_compiling=$ac_cv_prog_cc_cross
2040
2041echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2042if test $ac_cv_prog_cc_works = no; then
2043  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2044fi
2045echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2046echo "configure:2047: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2047echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2048cross_compiling=$ac_cv_prog_cc_cross
2049
2050echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2051echo "configure:2052: checking whether we are using GNU C" >&5
2052if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2053  echo $ac_n "(cached) $ac_c" 1>&6
2054else
2055  cat > conftest.c <<EOF
2056#ifdef __GNUC__
2057  yes;
2058#endif
2059EOF
2060if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2061  ac_cv_prog_gcc=yes
2062else
2063  ac_cv_prog_gcc=no
2064fi
2065fi
2066
2067echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2068
2069if test $ac_cv_prog_gcc = yes; then
2070  GCC=yes
2071else
2072  GCC=
2073fi
2074
2075ac_test_CFLAGS="${CFLAGS+set}"
2076ac_save_CFLAGS="$CFLAGS"
2077CFLAGS=
2078echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2079echo "configure:2080: checking whether ${CC-cc} accepts -g" >&5
2080if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2081  echo $ac_n "(cached) $ac_c" 1>&6
2082else
2083  echo 'void f(){}' > conftest.c
2084if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2085  ac_cv_prog_cc_g=yes
2086else
2087  ac_cv_prog_cc_g=no
2088fi
2089rm -f conftest*
2090
2091fi
2092
2093echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2094if test "$ac_test_CFLAGS" = set; then
2095  CFLAGS="$ac_save_CFLAGS"
2096elif test $ac_cv_prog_cc_g = yes; then
2097  if test "$GCC" = yes; then
2098    CFLAGS="-g -O2"
2099  else
2100    CFLAGS="-g"
2101  fi
2102else
2103  if test "$GCC" = yes; then
2104    CFLAGS="-O2"
2105  else
2106    CFLAGS=
2107  fi
2108fi
2109
2110
2111# Find a good install program.  We prefer a C program (faster),
2112# so one script is as good as another.  But avoid the broken or
2113# incompatible versions:
2114# SysV /etc/install, /usr/sbin/install
2115# SunOS /usr/etc/install
2116# IRIX /sbin/install
2117# AIX /bin/install
2118# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2119# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2120# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2121# ./install, which can be erroneously created by make from ./install.sh.
2122echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2123echo "configure:2124: checking for a BSD compatible install" >&5
2124if test -z "$INSTALL"; then
2125if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2126  echo $ac_n "(cached) $ac_c" 1>&6
2127else
2128    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
2129  for ac_dir in $PATH; do
2130    # Account for people who put trailing slashes in PATH elements.
2131    case "$ac_dir/" in
2132    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2133    *)
2134      # OSF1 and SCO ODT 3.0 have their own names for install.
2135      # Don't use installbsd from OSF since it installs stuff as root
2136      # by default.
2137      for ac_prog in ginstall scoinst install; do
2138        if test -f $ac_dir/$ac_prog; then
2139	  if test $ac_prog = install &&
2140            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2141	    # AIX install.  It has an incompatible calling convention.
2142	    :
2143	  else
2144	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2145	    break 2
2146	  fi
2147	fi
2148      done
2149      ;;
2150    esac
2151  done
2152  IFS="$ac_save_IFS"
2153
2154fi
2155  if test "${ac_cv_path_install+set}" = set; then
2156    INSTALL="$ac_cv_path_install"
2157  else
2158    # As a last resort, use the slow shell script.  We don't cache a
2159    # path for INSTALL within a source directory, because that will
2160    # break other packages using the cache if that directory is
2161    # removed, or if the path is relative.
2162    INSTALL="$ac_install_sh"
2163  fi
2164fi
2165echo "$ac_t""$INSTALL" 1>&6
2166
2167# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2168# It thinks the first close brace ends the variable substitution.
2169test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2170
2171test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2172
2173test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2174
2175
2176#--------------------------------------------------------------------
2177# Checks to see if the make program sets the $MAKE variable.
2178#--------------------------------------------------------------------
2179
2180echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
2181echo "configure:2182: checking whether ${MAKE-make} sets \${MAKE}" >&5
2182set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2183if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2184  echo $ac_n "(cached) $ac_c" 1>&6
2185else
2186  cat > conftestmake <<\EOF
2187all:
2188	@echo 'ac_maketemp="${MAKE}"'
2189EOF
2190# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2191eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2192if test -n "$ac_maketemp"; then
2193  eval ac_cv_prog_make_${ac_make}_set=yes
2194else
2195  eval ac_cv_prog_make_${ac_make}_set=no
2196fi
2197rm -f conftestmake
2198fi
2199if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2200  echo "$ac_t""yes" 1>&6
2201  SET_MAKE=
2202else
2203  echo "$ac_t""no" 1>&6
2204  SET_MAKE="MAKE=${MAKE-make}"
2205fi
2206
2207
2208#--------------------------------------------------------------------
2209# Find ranlib
2210#--------------------------------------------------------------------
2211
2212# Extract the first word of "ranlib", so it can be a program name with args.
2213set dummy ranlib; ac_word=$2
2214echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2215echo "configure:2216: checking for $ac_word" >&5
2216if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2217  echo $ac_n "(cached) $ac_c" 1>&6
2218else
2219  if test -n "$RANLIB"; then
2220  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2221else
2222  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
2223  ac_dummy="$PATH"
2224  for ac_dir in $ac_dummy; do
2225    test -z "$ac_dir" && ac_dir=.
2226    if test -f $ac_dir/$ac_word; then
2227      ac_cv_prog_RANLIB="ranlib"
2228      break
2229    fi
2230  done
2231  IFS="$ac_save_ifs"
2232  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2233fi
2234fi
2235RANLIB="$ac_cv_prog_RANLIB"
2236if test -n "$RANLIB"; then
2237  echo "$ac_t""$RANLIB" 1>&6
2238else
2239  echo "$ac_t""no" 1>&6
2240fi
2241
2242
2243#--------------------------------------------------------------------
2244# This macro performs additional compiler tests.
2245#--------------------------------------------------------------------
2246
2247echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2248echo "configure:2249: checking for Cygwin environment" >&5
2249if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
2250  echo $ac_n "(cached) $ac_c" 1>&6
2251else
2252  cat > conftest.$ac_ext <<EOF
2253#line 2254 "configure"
2254#include "confdefs.h"
2255
2256int main() {
2257
2258#ifndef __CYGWIN__
2259#define __CYGWIN__ __CYGWIN32__
2260#endif
2261return __CYGWIN__;
2262; return 0; }
2263EOF
2264if { (eval echo configure:2265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2265  rm -rf conftest*
2266  ac_cv_cygwin=yes
2267else
2268  echo "configure: failed program was:" >&5
2269  cat conftest.$ac_ext >&5
2270  rm -rf conftest*
2271  ac_cv_cygwin=no
2272fi
2273rm -f conftest*
2274rm -f conftest*
2275fi
2276
2277echo "$ac_t""$ac_cv_cygwin" 1>&6
2278CYGWIN=
2279test "$ac_cv_cygwin" = yes && CYGWIN=yes
2280
2281#--------------------------------------------------------------------
2282# Determines the correct binary file extension (.o, .obj, .exe etc.)
2283#--------------------------------------------------------------------
2284
2285echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2286echo "configure:2287: checking for object suffix" >&5
2287if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2288  echo $ac_n "(cached) $ac_c" 1>&6
2289else
2290  rm -f conftest*
2291echo 'int i = 1;' > conftest.$ac_ext
2292if { (eval echo configure:2293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2293  for ac_file in conftest.*; do
2294    case $ac_file in
2295    *.c) ;;
2296    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2297    esac
2298  done
2299else
2300  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2301fi
2302rm -f conftest*
2303fi
2304
2305echo "$ac_t""$ac_cv_objext" 1>&6
2306OBJEXT=$ac_cv_objext
2307ac_objext=$ac_cv_objext
2308
2309
2310
2311echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
2312echo "configure:2313: checking for executable suffix" >&5
2313if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
2314  echo $ac_n "(cached) $ac_c" 1>&6
2315else
2316  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
2317  ac_cv_exeext=.exe
2318else
2319  rm -f conftest*
2320  echo 'int main () { return 0; }' > conftest.$ac_ext
2321  ac_cv_exeext=
2322  if { (eval echo configure:2323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
2323    for file in conftest.*; do
2324      case $file in
2325      *.c | *.o | *.obj) ;;
2326      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
2327      esac
2328    done
2329  else
2330    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
2331  fi
2332  rm -f conftest*
2333  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
2334fi
2335fi
2336
2337EXEEXT=""
2338test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
2339echo "$ac_t""${ac_cv_exeext}" 1>&6
2340ac_exeext=$EXEEXT
2341
2342
2343#--------------------------------------------------------------------
2344# "cygpath" is used on windows to generate native path names for include
2345# files.
2346# These variables should only be used with the compiler and linker since
2347# they generate native path names.
2348#
2349# Unix tclConfig.sh points SRC_DIR at the top-level directory of
2350# the Tcl sources, while the Windows tclConfig.sh points SRC_DIR at
2351# the win subdirectory.  Hence the different usages of SRC_DIR below.
2352#
2353# This must be done before calling SC_PUBLIC_TCL_HEADERS
2354#--------------------------------------------------------------------
2355
2356case "`uname -s`" in
2357    *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
2358	CYGPATH="cygpath -w"
2359    ;;
2360    *)
2361	CYGPATH=echo
2362    ;;
2363esac
2364
2365
2366
2367#--------------------------------------------------------------------
2368# Load the tclConfig.sh file
2369#--------------------------------------------------------------------
2370
2371
2372    #
2373    # Ok, lets find the tcl configuration
2374    # First, look for one uninstalled.
2375    # the alternative search directory is invoked by --with-tcl
2376    #
2377
2378    if test x"${no_tcl}" = x ; then
2379	# we reset no_tcl in case something fails here
2380	no_tcl=true
2381	# Check whether --with-tcl or --without-tcl was given.
2382if test "${with_tcl+set}" = set; then
2383  withval="$with_tcl"
2384  with_tclconfig=${withval}
2385fi
2386
2387	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
2388echo "configure:2389: checking for Tcl configuration" >&5
2389	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
2390  echo $ac_n "(cached) $ac_c" 1>&6
2391else
2392
2393
2394	    # First check to see if --with-tcl was specified.
2395	    if test x"${with_tclconfig}" != x ; then
2396		if test -f "${with_tclconfig}/tclConfig.sh" ; then
2397		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
2398		else
2399		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
2400		fi
2401	    fi
2402
2403	    # then check for a private Tcl installation
2404	    if test x"${ac_cv_c_tclconfig}" = x ; then
2405		for i in \
2406			../tcl \
2407			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
2408			../../tcl \
2409			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
2410			../../../tcl \
2411			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
2412		    if test -f "$i/unix/tclConfig.sh" ; then
2413			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
2414			break
2415		    fi
2416		done
2417	    fi
2418
2419	    # check in a few common install locations
2420	    if test x"${ac_cv_c_tclconfig}" = x ; then
2421		for i in `ls -d ${prefix}/lib 2>/dev/null` \
2422			`ls -d /usr/local/lib 2>/dev/null` ; do
2423		    if test -f "$i/tclConfig.sh" ; then
2424			ac_cv_c_tclconfig=`(cd $i; pwd)`
2425			break
2426		    fi
2427		done
2428	    fi
2429
2430	    # check in a few other private locations
2431	    if test x"${ac_cv_c_tclconfig}" = x ; then
2432		for i in \
2433			${srcdir}/../tcl \
2434			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2435		    if test -f "$i/unix/tclConfig.sh" ; then
2436		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
2437		    break
2438		fi
2439		done
2440	    fi
2441
2442fi
2443
2444
2445	if test x"${ac_cv_c_tclconfig}" = x ; then
2446	    TCL_BIN_DIR="# no Tcl configs found"
2447	    echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
2448	    exit 0
2449	else
2450	    no_tcl=
2451	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
2452	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
2453	fi
2454    fi
2455
2456
2457    echo $ac_n "checking for existence of $TCL_BIN_DIR/tclConfig.sh""... $ac_c" 1>&6
2458echo "configure:2459: checking for existence of $TCL_BIN_DIR/tclConfig.sh" >&5
2459
2460    if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
2461        echo "$ac_t""loading" 1>&6
2462	. $TCL_BIN_DIR/tclConfig.sh
2463    else
2464        echo "$ac_t""file not found" 1>&6
2465    fi
2466
2467    #
2468    # The eval is required to do the TCL_DBGX substitution in the
2469    # TCL_LIB_FILE variable
2470    #
2471
2472    eval TCL_LIB_FILE=${TCL_LIB_FILE}
2473    eval TCL_LIB_FLAG=${TCL_LIB_FLAG}
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492#--------------------------------------------------------------------
2493# __CHANGE__
2494# Choose which headers you need.  Extension authors should try very
2495# hard to only rely on the Tcl public header files.  Internal headers
2496# contain private data structures and are subject to change without
2497# notice.
2498# This MUST be called after SC_PATH_TCLCONFIG/SC_LOAD_TCLCONFIG
2499#--------------------------------------------------------------------
2500
2501
2502    echo $ac_n "checking for Tcl public headers""... $ac_c" 1>&6
2503echo "configure:2504: checking for Tcl public headers" >&5
2504
2505    # Check whether --with-tclinclude or --without-tclinclude was given.
2506if test "${with_tclinclude+set}" = set; then
2507  withval="$with_tclinclude"
2508  with_tclinclude=${withval}
2509fi
2510
2511
2512    if test x"${with_tclinclude}" != x ; then
2513	if test -f "${with_tclinclude}/tcl.h" ; then
2514	    ac_cv_c_tclh=${with_tclinclude}
2515	else
2516	    { echo "configure: error: ${with_tclinclude} directory does not contain Tcl public header file tcl.h" 1>&2; exit 1; }
2517	fi
2518    else
2519	if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
2520  echo $ac_n "(cached) $ac_c" 1>&6
2521else
2522
2523	    # Use the value from --with-tclinclude, if it was given
2524
2525	    if test x"${with_tclinclude}" != x ; then
2526		ac_cv_c_tclh=${with_tclinclude}
2527	    else
2528		# Check in the includedir, if --prefix was specified
2529
2530		eval "temp_includedir=${includedir}"
2531		for i in \
2532			`ls -d ${temp_includedir} 2>/dev/null` \
2533			/usr/local/include /usr/include ; do
2534		    if test -f "$i/tcl.h" ; then
2535			ac_cv_c_tclh=$i
2536			break
2537		    fi
2538		done
2539	    fi
2540
2541fi
2542
2543    fi
2544
2545    # Print a message based on how we determined the include path
2546
2547    if test x"${ac_cv_c_tclh}" = x ; then
2548	{ echo "configure: error: tcl.h not found.  Please specify its location with --with-tclinclude" 1>&2; exit 1; }
2549    else
2550	echo "$ac_t""${ac_cv_c_tclh}" 1>&6
2551    fi
2552
2553    # Convert to a native path and substitute into the output files.
2554
2555    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
2556
2557    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
2558
2559
2560
2561#SC_PRIVATE_TCL_HEADERS
2562
2563#--------------------------------------------------------------------
2564# __CHANGE__
2565# A few miscellaneous platform-specific items:
2566#
2567# Define a special symbol for Windows (BUILD_tclsasl in this case) so
2568# that we create the export library with the dll.  See sha1.h on how
2569# to use this.
2570#
2571# Windows creates a few extra files that need to be cleaned up.
2572# You can add more files to clean if your extension creates any extra
2573# files.
2574#
2575# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
2576# These will be appended to the current set of compiler flags for
2577# your system.
2578#--------------------------------------------------------------------
2579
2580case "`uname -s`" in
2581    *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
2582	cat >> confdefs.h <<EOF
2583#define BUILD_${PACKAGE} 1
2584EOF
2585
2586	CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch"
2587
2588    ;;
2589    *)
2590	CLEANFILES=
2591    ;;
2592esac
2593
2594#--------------------------------------------------------------------
2595# Check whether --enable-threads or --disable-threads was given.
2596# So far only Tcl responds to this one.
2597#--------------------------------------------------------------------
2598
2599
2600    echo $ac_n "checking for building with threads""... $ac_c" 1>&6
2601echo "configure:2602: checking for building with threads" >&5
2602    # Check whether --enable-threads or --disable-threads was given.
2603if test "${enable_threads+set}" = set; then
2604  enableval="$enable_threads"
2605  tcl_ok=$enableval
2606else
2607  tcl_ok=no
2608fi
2609
2610
2611    if test "$tcl_ok" = "yes"; then
2612	TCL_THREADS=1
2613	cat >> confdefs.h <<\EOF
2614#define TCL_THREADS 1
2615EOF
2616
2617	cat >> confdefs.h <<\EOF
2618#define _REENTRANT 1
2619EOF
2620
2621
2622	case "`uname -s`" in
2623	    *win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*)
2624		    echo "$ac_t""yes" 1>&6
2625		;;
2626	    *)
2627		echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
2628echo "configure:2629: checking for pthread_mutex_init in -lpthread" >&5
2629ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
2630if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2631  echo $ac_n "(cached) $ac_c" 1>&6
2632else
2633  ac_save_LIBS="$LIBS"
2634LIBS="-lpthread  $LIBS"
2635cat > conftest.$ac_ext <<EOF
2636#line 2637 "configure"
2637#include "confdefs.h"
2638/* Override any gcc2 internal prototype to avoid an error.  */
2639/* We use char because int might match the return type of a gcc2
2640    builtin and then its argument prototype would still apply.  */
2641char pthread_mutex_init();
2642
2643int main() {
2644pthread_mutex_init()
2645; return 0; }
2646EOF
2647if { (eval echo configure:2648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2648  rm -rf conftest*
2649  eval "ac_cv_lib_$ac_lib_var=yes"
2650else
2651  echo "configure: failed program was:" >&5
2652  cat conftest.$ac_ext >&5
2653  rm -rf conftest*
2654  eval "ac_cv_lib_$ac_lib_var=no"
2655fi
2656rm -f conftest*
2657LIBS="$ac_save_LIBS"
2658
2659fi
2660if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2661  echo "$ac_t""yes" 1>&6
2662  tcl_ok=yes
2663else
2664  echo "$ac_t""no" 1>&6
2665tcl_ok=no
2666fi
2667
2668		if test "$tcl_ok" = "yes"; then
2669		    # The space is needed
2670		    THREADS_LIBS=" -lpthread"
2671		    echo "$ac_t""yes" 1>&6
2672		else
2673		    TCL_THREADS=0
2674		    echo "$ac_t""no" 1>&6
2675		    echo "configure: warning: "Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile..."" 1>&2
2676		fi
2677		;;
2678	esac
2679    else
2680	TCL_THREADS=0
2681	echo "$ac_t""no (default)" 1>&6
2682    fi
2683
2684
2685
2686#--------------------------------------------------------------------
2687# The statement below defines a collection of symbols related to
2688# building as a shared library instead of a static library.
2689#--------------------------------------------------------------------
2690
2691
2692    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
2693echo "configure:2694: checking how to build libraries" >&5
2694    # Check whether --enable-shared or --disable-shared was given.
2695if test "${enable_shared+set}" = set; then
2696  enableval="$enable_shared"
2697  tcl_ok=$enableval
2698else
2699  tcl_ok=yes
2700fi
2701
2702
2703    if test "${enable_shared+set}" = set; then
2704	enableval="$enable_shared"
2705	tcl_ok=$enableval
2706    else
2707	tcl_ok=yes
2708    fi
2709
2710    if test "$tcl_ok" = "yes" ; then
2711	echo "$ac_t""shared" 1>&6
2712	SHARED_BUILD=1
2713    else
2714	echo "$ac_t""static" 1>&6
2715	SHARED_BUILD=0
2716	cat >> confdefs.h <<\EOF
2717#define STATIC_BUILD 1
2718EOF
2719
2720    fi
2721
2722
2723#--------------------------------------------------------------------
2724# This macro figures out what flags to use with the compiler/linker
2725# when building shared/static debug/optimized objects.  This information
2726# is all taken from the tclConfig.sh file.
2727#--------------------------------------------------------------------
2728
2729CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
2730CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
2731LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
2732LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
2733SHLIB_LD=${TCL_SHLIB_LD}
2734STLIB_LD=${TCL_STLIB_LD}
2735SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
2736
2737
2738
2739
2740
2741
2742
2743
2744#--------------------------------------------------------------------
2745# Set the default compiler switches based on the --enable-symbols
2746# option.
2747#--------------------------------------------------------------------
2748
2749
2750    case "`uname -s`" in
2751	*win32* | *WIN32* | *CYGWIN_NT* | *CYGWIN_98* | *CYGWIN_95*)
2752	    tcl_dbgx=d
2753	;;
2754	*)
2755	    tcl_dbgx=g
2756	;;
2757    esac
2758
2759    echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
2760echo "configure:2761: checking for build with symbols" >&5
2761    # Check whether --enable-symbols or --disable-symbols was given.
2762if test "${enable_symbols+set}" = set; then
2763  enableval="$enable_symbols"
2764  tcl_ok=$enableval
2765else
2766  tcl_ok=no
2767fi
2768
2769    if test "$tcl_ok" = "yes"; then
2770	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
2771	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
2772	DBGX=${tcl_dbgx}
2773	TCL_DBGX=${tcl_dbgx}
2774	echo "$ac_t""yes" 1>&6
2775    else
2776	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
2777	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
2778	DBGX=""
2779	TCL_DBGX=""
2780	echo "$ac_t""no" 1>&6
2781    fi
2782
2783
2784
2785
2786
2787
2788if test "${SHARED_BUILD}" = "1" ; then
2789    CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
2790else
2791    CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}'
2792fi
2793
2794#--------------------------------------------------------------------
2795# Everyone should be linking against the Tcl stub library.  If you
2796# can't for some reason, remove this definition.  If you aren't using
2797# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
2798# link against the non-stubbed Tcl library.
2799#--------------------------------------------------------------------
2800
2801cat >> confdefs.h <<\EOF
2802#define USE_TCL_STUBS 1
2803EOF
2804
2805
2806#--------------------------------------------------------------------
2807# This macro generates a line to use when building a library.  It
2808# depends on values set by the SC_ENABLE_SHARED, SC_ENABLE_SYMBOLS,
2809# and SC_LOAD_TCLCONFIG macros above.
2810#--------------------------------------------------------------------
2811
2812
2813    case "`uname -s`" in
2814	*win32* | *WIN32* | *CYGWIN_NT* |*CYGWIN_98*|*CYGWIN_95*)
2815	    if test "${CC-cc}" = "cl"; then
2816		MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(\$@_OBJECTS) "
2817		MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS} \$(LDFLAGS) -out:\$@ \$(\$@_OBJECTS) "
2818	    fi
2819	    ;;
2820	*)
2821	    MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(\$@_OBJECTS)"
2822	    MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(\$@_OBJECTS) \${SHLIB_LDFLAGS} \${SHLIB_LD_LIBS}"
2823	    ;;
2824    esac
2825
2826    if test "${SHARED_BUILD}" = "1" ; then
2827	MAKE_LIB=${MAKE_SHARED_LIB}
2828    else
2829	MAKE_LIB=${MAKE_STATIC_LIB}
2830    fi
2831
2832
2833
2834
2835
2836
2837#--------------------------------------------------------------------
2838# eval these two values to dereference the ${DBGX} variable.
2839#--------------------------------------------------------------------
2840
2841eval "SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}"
2842eval "UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}"
2843
2844#--------------------------------------------------------------------
2845# Shared libraries and static libraries have different names.
2846#--------------------------------------------------------------------
2847
2848case "`uname -s`" in
2849    *win32* | *WIN32* | *CYGWIN_NT*|*CYGWIN_98*|*CYGWIN_95*)
2850	if test "${SHARED_BUILD}" = "1" ; then
2851	    SHLIB_LD_LIBS="\"`cygpath -w ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\" ${TCL_SHLIB_LD_LIBS}"
2852	    eval "${PACKAGE}_LIB_FILE=${PACKAGE}${SHARED_LIB_SUFFIX}"
2853	    RANLIB=:
2854	else
2855	    eval "${PACKAGE}_LIB_FILE=${PACKAGE}${UNSHARED_LIB_SUFFIX}"
2856	fi
2857	;;
2858    *)
2859	if test "${SHARED_BUILD}" = "1" ; then
2860	    SHLIB_LD_LIBS="${TCL_STUB_LIB_SPEC}"
2861	    eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${SHARED_LIB_SUFFIX}"
2862	    RANLIB=:
2863	else
2864	    eval "${PACKAGE}_LIB_FILE=lib${PACKAGE}${UNSHARED_LIB_SUFFIX}"
2865	fi
2866	;;
2867esac
2868
2869
2870
2871#--------------------------------------------------------------------
2872# __CHANGE__
2873# Change the name from tclextension_LIB_FILE to match your package name.
2874#--------------------------------------------------------------------
2875
2876
2877
2878
2879#--------------------------------------------------------------------
2880# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
2881# file during the install process.  Don't run the TCLSH_PROG through
2882# ${CYGPATH} because it's being used directly by make.
2883# Require that we use a tclsh shell version 8.2 or later since earlier
2884# versions have bugs in the pkg_mkIndex routine.
2885#--------------------------------------------------------------------
2886
2887
2888    echo $ac_n "checking for tclsh""... $ac_c" 1>&6
2889echo "configure:2890: checking for tclsh" >&5
2890
2891    if eval "test \"`echo '$''{'ac_cv_path_tclsh'+set}'`\" = set"; then
2892  echo $ac_n "(cached) $ac_c" 1>&6
2893else
2894
2895	search_path=`echo ${exec_prefix}/bin:${prefix}/bin:${TCL_BIN_DIR}:${TCL_BIN_DIR}/../bin:${PATH} | sed -e 's/:/ /g'`
2896	for dir in $search_path ; do
2897	    for j in `ls -r $dir/tclsh[8-9]*${EXEEXT} 2> /dev/null` \
2898		    `ls -r $dir/tclsh*${EXEEXT} 2> /dev/null` ; do
2899		if test x"$ac_cv_path_tclsh" = x ; then
2900		    if test -f "$j" ; then
2901			ac_cv_path_tclsh=$j
2902			break
2903		    fi
2904		fi
2905	    done
2906	done
2907
2908fi
2909
2910
2911    if test -f "$ac_cv_path_tclsh" ; then
2912	TCLSH_PROG=$ac_cv_path_tclsh
2913	echo "$ac_t""$TCLSH_PROG" 1>&6
2914    else
2915	{ echo "configure: error: No tclsh found in PATH:  $search_path" 1>&2; exit 1; }
2916    fi
2917
2918
2919
2920PKG_TCL=${STAGEDIR}${prefix}/lib/tclsasl
2921
2922
2923# Check whether --with-cyrus-sasl or --without-cyrus-sasl was given.
2924if test "${with_cyrus_sasl+set}" = set; then
2925  withval="$with_cyrus_sasl"
2926    CYRUS_PREFIX=$withval
2927     if test "$CYRUS_PREFIX" = "no"; then
2928         { echo "configure: error: Stop wasting my time..." 1>&2; exit 1; }
2929     elif test "$CYRUS_PREFIX" = "yes"; then
2930       CYRUS_PREFIX=""
2931     elif test -n "$CYRUS_PREFIX"; then
2932       CYRUS_LIBS=$CYRUS_PREFIX/lib;
2933       CYRUS_INCLUDES=$CYRUS_PREFIX/include;
2934     fi
2935
2936else
2937    echo $ac_n "checking for sasl_server_init in -lsasl2""... $ac_c" 1>&6
2938echo "configure:2939: checking for sasl_server_init in -lsasl2" >&5
2939ac_lib_var=`echo sasl2'_'sasl_server_init | sed 'y%./+-%__p_%'`
2940if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2941  echo $ac_n "(cached) $ac_c" 1>&6
2942else
2943  ac_save_LIBS="$LIBS"
2944LIBS="-lsasl2  $LIBS"
2945cat > conftest.$ac_ext <<EOF
2946#line 2947 "configure"
2947#include "confdefs.h"
2948/* Override any gcc2 internal prototype to avoid an error.  */
2949/* We use char because int might match the return type of a gcc2
2950    builtin and then its argument prototype would still apply.  */
2951char sasl_server_init();
2952
2953int main() {
2954sasl_server_init()
2955; return 0; }
2956EOF
2957if { (eval echo configure:2958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2958  rm -rf conftest*
2959  eval "ac_cv_lib_$ac_lib_var=yes"
2960else
2961  echo "configure: failed program was:" >&5
2962  cat conftest.$ac_ext >&5
2963  rm -rf conftest*
2964  eval "ac_cv_lib_$ac_lib_var=no"
2965fi
2966rm -f conftest*
2967LIBS="$ac_save_LIBS"
2968
2969fi
2970if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2971  echo "$ac_t""yes" 1>&6
2972   CYRUS_PREFIX=""
2973else
2974  echo "$ac_t""no" 1>&6
2975 { echo "configure: error: You must specify the location of Cyrus SASLv2." 1>&2; exit 1; }
2976
2977fi
2978
2979
2980
2981fi
2982
2983
2984if test -n "${CYRUS_LIBS}"; then
2985  if test ! -d "${CYRUS_LIBS}"; then
2986    { echo "configure: error: It appears that ${CYRUS_LIBS} does not exist or is not a directory.  Did you mean to specify something else?" 1>&2; exit 1; }
2987  fi
2988  CYRUS_LIBS="-L${CYRUS_LIBS} -lsasl2 -L${CYRUS_LIBS}/sasl2 -lsasldb"
2989fi
2990
2991if test -n "${CYRUS_INCLUDES}"; then
2992  if test ! -f "${CYRUS_INCLUDES}/sasl/sasl.h"; then
2993    { echo "configure: error: You are missing the Cyrus SASLv2 include files or have specified an invalid location for them." 1>&2; exit 1; }
2994  fi
2995  CYRUS_INCLUDES="-I${CYRUS_INCLUDES}"
2996fi
2997
2998if test "$CYRUS_PREFIX" = ""; then
2999  echo $ac_n "checking for sasl_server_init in -lsasl2""... $ac_c" 1>&6
3000echo "configure:3001: checking for sasl_server_init in -lsasl2" >&5
3001ac_lib_var=`echo sasl2'_'sasl_server_init | sed 'y%./+-%__p_%'`
3002if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3003  echo $ac_n "(cached) $ac_c" 1>&6
3004else
3005  ac_save_LIBS="$LIBS"
3006LIBS="-lsasl2  $LIBS"
3007cat > conftest.$ac_ext <<EOF
3008#line 3009 "configure"
3009#include "confdefs.h"
3010/* Override any gcc2 internal prototype to avoid an error.  */
3011/* We use char because int might match the return type of a gcc2
3012    builtin and then its argument prototype would still apply.  */
3013char sasl_server_init();
3014
3015int main() {
3016sasl_server_init()
3017; return 0; }
3018EOF
3019if { (eval echo configure:3020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3020  rm -rf conftest*
3021  eval "ac_cv_lib_$ac_lib_var=yes"
3022else
3023  echo "configure: failed program was:" >&5
3024  cat conftest.$ac_ext >&5
3025  rm -rf conftest*
3026  eval "ac_cv_lib_$ac_lib_var=no"
3027fi
3028rm -f conftest*
3029LIBS="$ac_save_LIBS"
3030
3031fi
3032if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3033  echo "$ac_t""yes" 1>&6
3034   CYRUS_LIBS="-lsasl2"
3035else
3036  echo "$ac_t""no" 1>&6
3037 { echo "configure: error: You must specify the location of Cyrus SASLv2." 1>&2; exit 1; }
3038
3039fi
3040
3041fi
3042
3043
3044
3045
3046#--------------------------------------------------------------------
3047# Finally, substitute all of the various values into the Makefile.
3048#--------------------------------------------------------------------
3049
3050trap '' 1 2 15
3051cat > confcache <<\EOF
3052# This file is a shell script that caches the results of configure
3053# tests run on this system so they can be shared between configure
3054# scripts and configure runs.  It is not useful on other systems.
3055# If it contains results you don't want to keep, you may remove or edit it.
3056#
3057# By default, configure uses ./config.cache as the cache file,
3058# creating it if it does not exist already.  You can give configure
3059# the --cache-file=FILE option to use a different cache file; that is
3060# what configure does when it calls configure scripts in
3061# subdirectories, so they share the cache.
3062# Giving --cache-file=/dev/null disables caching, for debugging configure.
3063# config.status only pays attention to the cache file if you give it the
3064# --recheck option to rerun configure.
3065#
3066EOF
3067# The following way of writing the cache mishandles newlines in values,
3068# but we know of no workaround that is simple, portable, and efficient.
3069# So, don't put newlines in cache variables' values.
3070# Ultrix sh set writes to stderr and can't be redirected directly,
3071# and sets the high bit in the cache file unless we assign to the vars.
3072(set) 2>&1 |
3073  case `(ac_space=' '; set | grep ac_space) 2>&1` in
3074  *ac_space=\ *)
3075    # `set' does not quote correctly, so add quotes (double-quote substitution
3076    # turns \\\\ into \\, and sed turns \\ into \).
3077    sed -n \
3078      -e "s/'/'\\\\''/g" \
3079      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3080    ;;
3081  *)
3082    # `set' quotes correctly as required by POSIX, so do not add quotes.
3083    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3084    ;;
3085  esac >> confcache
3086if cmp -s $cache_file confcache; then
3087  :
3088else
3089  if test -w $cache_file; then
3090    echo "updating cache $cache_file"
3091    cat confcache > $cache_file
3092  else
3093    echo "not updating unwritable cache $cache_file"
3094  fi
3095fi
3096rm -f confcache
3097
3098trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3099
3100test "x$prefix" = xNONE && prefix=$ac_default_prefix
3101# Let make expand exec_prefix.
3102test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3103
3104# Any assignment to VPATH causes Sun make to only execute
3105# the first set of double-colon rules, so remove it if not needed.
3106# If there is a colon in the path, we need to keep it.
3107if test "x$srcdir" = x.; then
3108  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
3109fi
3110
3111trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3112
3113# Transform confdefs.h into DEFS.
3114# Protect against shell expansion while executing Makefile rules.
3115# Protect against Makefile macro expansion.
3116cat > conftest.defs <<\EOF
3117s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
3118s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
3119s%\[%\\&%g
3120s%\]%\\&%g
3121s%\$%$$%g
3122EOF
3123DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
3124rm -f conftest.defs
3125
3126
3127# Without the "./", some shells look in PATH for config.status.
3128: ${CONFIG_STATUS=./config.status}
3129
3130echo creating $CONFIG_STATUS
3131rm -f $CONFIG_STATUS
3132cat > $CONFIG_STATUS <<EOF
3133#! /bin/sh
3134# Generated automatically by configure.
3135# Run this file to recreate the current configuration.
3136# This directory was configured as follows,
3137# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3138#
3139# $0 $ac_configure_args
3140#
3141# Compiler output produced by configure, useful for debugging
3142# configure, is in ./config.log if it exists.
3143
3144ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3145for ac_option
3146do
3147  case "\$ac_option" in
3148  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3149    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3150    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3151  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3152    echo "$CONFIG_STATUS generated by autoconf version 2.13"
3153    exit 0 ;;
3154  -help | --help | --hel | --he | --h)
3155    echo "\$ac_cs_usage"; exit 0 ;;
3156  *) echo "\$ac_cs_usage"; exit 1 ;;
3157  esac
3158done
3159
3160ac_given_srcdir=$srcdir
3161ac_given_INSTALL="$INSTALL"
3162
3163trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3164EOF
3165cat >> $CONFIG_STATUS <<EOF
3166
3167# Protect against being on the right side of a sed subst in config.status.
3168sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3169 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3170$ac_vpsub
3171$extrasub
3172s%@SHELL@%$SHELL%g
3173s%@CFLAGS@%$CFLAGS%g
3174s%@CPPFLAGS@%$CPPFLAGS%g
3175s%@CXXFLAGS@%$CXXFLAGS%g
3176s%@FFLAGS@%$FFLAGS%g
3177s%@DEFS@%$DEFS%g
3178s%@LDFLAGS@%$LDFLAGS%g
3179s%@LIBS@%$LIBS%g
3180s%@exec_prefix@%$exec_prefix%g
3181s%@prefix@%$prefix%g
3182s%@program_transform_name@%$program_transform_name%g
3183s%@bindir@%$bindir%g
3184s%@sbindir@%$sbindir%g
3185s%@libexecdir@%$libexecdir%g
3186s%@datadir@%$datadir%g
3187s%@sysconfdir@%$sysconfdir%g
3188s%@sharedstatedir@%$sharedstatedir%g
3189s%@localstatedir@%$localstatedir%g
3190s%@libdir@%$libdir%g
3191s%@includedir@%$includedir%g
3192s%@oldincludedir@%$oldincludedir%g
3193s%@infodir@%$infodir%g
3194s%@mandir@%$mandir%g
3195s%@CONFIGDIR@%$CONFIGDIR%g
3196s%@CC@%$CC%g
3197s%@host@%$host%g
3198s%@host_alias@%$host_alias%g
3199s%@host_cpu@%$host_cpu%g
3200s%@host_vendor@%$host_vendor%g
3201s%@host_os@%$host_os%g
3202s%@build@%$build%g
3203s%@build_alias@%$build_alias%g
3204s%@build_cpu@%$build_cpu%g
3205s%@build_vendor@%$build_vendor%g
3206s%@build_os@%$build_os%g
3207s%@LN_S@%$LN_S%g
3208s%@OBJEXT@%$OBJEXT%g
3209s%@EXEEXT@%$EXEEXT%g
3210s%@RANLIB@%$RANLIB%g
3211s%@STRIP@%$STRIP%g
3212s%@LIBTOOL@%$LIBTOOL%g
3213s%@PACKAGE@%$PACKAGE%g
3214s%@VERSION@%$VERSION%g
3215s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3216s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3217s%@INSTALL_DATA@%$INSTALL_DATA%g
3218s%@SET_MAKE@%$SET_MAKE%g
3219s%@CYGPATH@%$CYGPATH%g
3220s%@TCL_DBGX@%$TCL_DBGX%g
3221s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
3222s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
3223s%@TCL_LIB_FILE@%$TCL_LIB_FILE%g
3224s%@TCL_LIBS@%$TCL_LIBS%g
3225s%@TCL_DEFS@%$TCL_DEFS%g
3226s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
3227s%@TCL_EXTRA_CFLAGS@%$TCL_EXTRA_CFLAGS%g
3228s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
3229s%@TCL_STUB_LIB_FILE@%$TCL_STUB_LIB_FILE%g
3230s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
3231s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
3232s%@TCL_STUB_LIB_SPEC@%$TCL_STUB_LIB_SPEC%g
3233s%@TCL_BUILD_STUB_LIB_SPEC@%$TCL_BUILD_STUB_LIB_SPEC%g
3234s%@TCL_INCLUDES@%$TCL_INCLUDES%g
3235s%@CLEANFILES@%$CLEANFILES%g
3236s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
3237s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
3238s%@STLIB_LD@%$STLIB_LD%g
3239s%@SHLIB_LD@%$SHLIB_LD%g
3240s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
3241s%@SHLIB_LDFLAGS@%$SHLIB_LDFLAGS%g
3242s%@CFLAGS_DEFAULT@%$CFLAGS_DEFAULT%g
3243s%@LDFLAGS_DEFAULT@%$LDFLAGS_DEFAULT%g
3244s%@MAKE_LIB@%$MAKE_LIB%g
3245s%@MAKE_SHARED_LIB@%$MAKE_SHARED_LIB%g
3246s%@MAKE_STATIC_LIB@%$MAKE_STATIC_LIB%g
3247s%@SHARED_BUILD@%$SHARED_BUILD%g
3248s%@tclsasl_LIB_FILE@%$tclsasl_LIB_FILE%g
3249s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
3250s%@TCLSH_PROG@%$TCLSH_PROG%g
3251s%@PKG_TCL@%$PKG_TCL%g
3252s%@CYRUS_INCLUDES@%$CYRUS_INCLUDES%g
3253s%@CYRUS_LIBS@%$CYRUS_LIBS%g
3254
3255CEOF
3256EOF
3257
3258cat >> $CONFIG_STATUS <<\EOF
3259
3260# Split the substitutions into bite-sized pieces for seds with
3261# small command number limits, like on Digital OSF/1 and HP-UX.
3262ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3263ac_file=1 # Number of current file.
3264ac_beg=1 # First line for current file.
3265ac_end=$ac_max_sed_cmds # Line after last line for current file.
3266ac_more_lines=:
3267ac_sed_cmds=""
3268while $ac_more_lines; do
3269  if test $ac_beg -gt 1; then
3270    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3271  else
3272    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3273  fi
3274  if test ! -s conftest.s$ac_file; then
3275    ac_more_lines=false
3276    rm -f conftest.s$ac_file
3277  else
3278    if test -z "$ac_sed_cmds"; then
3279      ac_sed_cmds="sed -f conftest.s$ac_file"
3280    else
3281      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3282    fi
3283    ac_file=`expr $ac_file + 1`
3284    ac_beg=$ac_end
3285    ac_end=`expr $ac_end + $ac_max_sed_cmds`
3286  fi
3287done
3288if test -z "$ac_sed_cmds"; then
3289  ac_sed_cmds=cat
3290fi
3291EOF
3292
3293cat >> $CONFIG_STATUS <<EOF
3294
3295CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3296EOF
3297cat >> $CONFIG_STATUS <<\EOF
3298for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3299  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3300  case "$ac_file" in
3301  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3302       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3303  *) ac_file_in="${ac_file}.in" ;;
3304  esac
3305
3306  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3307
3308  # Remove last slash and all that follows it.  Not all systems have dirname.
3309  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3310  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3311    # The file is in a subdirectory.
3312    test ! -d "$ac_dir" && mkdir "$ac_dir"
3313    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3314    # A "../" for each directory in $ac_dir_suffix.
3315    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3316  else
3317    ac_dir_suffix= ac_dots=
3318  fi
3319
3320  case "$ac_given_srcdir" in
3321  .)  srcdir=.
3322      if test -z "$ac_dots"; then top_srcdir=.
3323      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3324  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3325  *) # Relative path.
3326    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3327    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3328  esac
3329
3330  case "$ac_given_INSTALL" in
3331  [/$]*) INSTALL="$ac_given_INSTALL" ;;
3332  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3333  esac
3334
3335  echo creating "$ac_file"
3336  rm -f "$ac_file"
3337  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3338  case "$ac_file" in
3339  *Makefile*) ac_comsub="1i\\
3340# $configure_input" ;;
3341  *) ac_comsub= ;;
3342  esac
3343
3344  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3345  sed -e "$ac_comsub
3346s%@configure_input@%$configure_input%g
3347s%@srcdir@%$srcdir%g
3348s%@top_srcdir@%$top_srcdir%g
3349s%@INSTALL@%$INSTALL%g
3350" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3351fi; done
3352rm -f conftest.s*
3353
3354EOF
3355cat >> $CONFIG_STATUS <<EOF
3356
3357EOF
3358cat >> $CONFIG_STATUS <<\EOF
3359
3360exit 0
3361EOF
3362chmod +x $CONFIG_STATUS
3363rm -fr confdefs* $ac_clean_files
3364test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3365
3366