]> git.sur5r.net Git - openldap/blob - contrib/ldaptcl/configure
Import Randy's LDAP TCL API.
[openldap] / contrib / ldaptcl / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.12 
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:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-gcc            allow use of gcc if available"
16 ac_help="$ac_help
17   --enable-gcc            allow use of gcc if available"
18 ac_help="$ac_help
19   --with-tk=DIR          use Tk 8.0 binaries from DIR"
20 ac_help="$ac_help
21   --without-x            do not build/install ldapwish"
22 ac_help="$ac_help
23   --enable-shared         build libldaptcl as a shared library"
24 ac_help="$ac_help
25   --with-ldap=<dir>           common parent of ldap include and lib dirs"
26 ac_help="$ac_help
27   --with-ldap-incdir=<dir>    path to ldap.h"
28 ac_help="$ac_help
29   --with-ldap-libdir=<dir>    path to ldap and lber libs"
30 ac_help="$ac_help
31   --with-ldap-libflags=<libnames>   -l flags for ldap libraries"
32
33 # Initialize some variables set by options.
34 # The variables have the same names as the options, with
35 # dashes changed to underlines.
36 build=NONE
37 cache_file=./config.cache
38 exec_prefix=NONE
39 host=NONE
40 no_create=
41 nonopt=NONE
42 no_recursion=
43 prefix=NONE
44 program_prefix=NONE
45 program_suffix=NONE
46 program_transform_name=s,x,x,
47 silent=
48 site=
49 srcdir=
50 target=NONE
51 verbose=
52 x_includes=NONE
53 x_libraries=NONE
54 bindir='${exec_prefix}/bin'
55 sbindir='${exec_prefix}/sbin'
56 libexecdir='${exec_prefix}/libexec'
57 datadir='${prefix}/share'
58 sysconfdir='${prefix}/etc'
59 sharedstatedir='${prefix}/com'
60 localstatedir='${prefix}/var'
61 libdir='${exec_prefix}/lib'
62 includedir='${prefix}/include'
63 oldincludedir='/usr/include'
64 infodir='${prefix}/info'
65 mandir='${prefix}/man'
66
67 # Initialize some other variables.
68 subdirs=
69 MFLAGS= MAKEFLAGS=
70 # Maximum number of lines to put in a shell here document.
71 ac_max_here_lines=12
72
73 ac_prev=
74 for ac_option
75 do
76
77   # If the previous option needs an argument, assign it.
78   if test -n "$ac_prev"; then
79     eval "$ac_prev=\$ac_option"
80     ac_prev=
81     continue
82   fi
83
84   case "$ac_option" in
85   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
86   *) ac_optarg= ;;
87   esac
88
89   # Accept the important Cygnus configure options, so we can diagnose typos.
90
91   case "$ac_option" in
92
93   -bindir | --bindir | --bindi | --bind | --bin | --bi)
94     ac_prev=bindir ;;
95   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
96     bindir="$ac_optarg" ;;
97
98   -build | --build | --buil | --bui | --bu)
99     ac_prev=build ;;
100   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
101     build="$ac_optarg" ;;
102
103   -cache-file | --cache-file | --cache-fil | --cache-fi \
104   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
105     ac_prev=cache_file ;;
106   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
107   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
108     cache_file="$ac_optarg" ;;
109
110   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
111     ac_prev=datadir ;;
112   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
113   | --da=*)
114     datadir="$ac_optarg" ;;
115
116   -disable-* | --disable-*)
117     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
118     # Reject names that are not valid shell variable names.
119     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
120       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
121     fi
122     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123     eval "enable_${ac_feature}=no" ;;
124
125   -enable-* | --enable-*)
126     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
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     case "$ac_option" in
133       *=*) ;;
134       *) ac_optarg=yes ;;
135     esac
136     eval "enable_${ac_feature}='$ac_optarg'" ;;
137
138   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
139   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
140   | --exec | --exe | --ex)
141     ac_prev=exec_prefix ;;
142   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
143   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
144   | --exec=* | --exe=* | --ex=*)
145     exec_prefix="$ac_optarg" ;;
146
147   -gas | --gas | --ga | --g)
148     # Obsolete; use --with-gas.
149     with_gas=yes ;;
150
151   -help | --help | --hel | --he)
152     # Omit some internal or obsolete options to make the list less imposing.
153     # This message is too long to be a string in the A/UX 3.1 sh.
154     cat << EOF
155 Usage: configure [options] [host]
156 Options: [defaults in brackets after descriptions]
157 Configuration:
158   --cache-file=FILE       cache test results in FILE
159   --help                  print this message
160   --no-create             do not create output files
161   --quiet, --silent       do not print \`checking...' messages
162   --version               print the version of autoconf that created configure
163 Directory and file names:
164   --prefix=PREFIX         install architecture-independent files in PREFIX
165                           [$ac_default_prefix]
166   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
167                           [same as prefix]
168   --bindir=DIR            user executables in DIR [EPREFIX/bin]
169   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
170   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
171   --datadir=DIR           read-only architecture-independent data in DIR
172                           [PREFIX/share]
173   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
174   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
175                           [PREFIX/com]
176   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
177   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
178   --includedir=DIR        C header files in DIR [PREFIX/include]
179   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
180   --infodir=DIR           info documentation in DIR [PREFIX/info]
181   --mandir=DIR            man documentation in DIR [PREFIX/man]
182   --srcdir=DIR            find the sources in DIR [configure dir or ..]
183   --program-prefix=PREFIX prepend PREFIX to installed program names
184   --program-suffix=SUFFIX append SUFFIX to installed program names
185   --program-transform-name=PROGRAM
186                           run sed PROGRAM on installed program names
187 EOF
188     cat << EOF
189 Host type:
190   --build=BUILD           configure for building on BUILD [BUILD=HOST]
191   --host=HOST             configure for HOST [guessed]
192   --target=TARGET         configure for TARGET [TARGET=HOST]
193 Features and packages:
194   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
195   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
196   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
197   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
198   --x-includes=DIR        X include files are in DIR
199   --x-libraries=DIR       X library files are in DIR
200 EOF
201     if test -n "$ac_help"; then
202       echo "--enable and --with options recognized:$ac_help"
203     fi
204     exit 0 ;;
205
206   -host | --host | --hos | --ho)
207     ac_prev=host ;;
208   -host=* | --host=* | --hos=* | --ho=*)
209     host="$ac_optarg" ;;
210
211   -includedir | --includedir | --includedi | --included | --include \
212   | --includ | --inclu | --incl | --inc)
213     ac_prev=includedir ;;
214   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
215   | --includ=* | --inclu=* | --incl=* | --inc=*)
216     includedir="$ac_optarg" ;;
217
218   -infodir | --infodir | --infodi | --infod | --info | --inf)
219     ac_prev=infodir ;;
220   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
221     infodir="$ac_optarg" ;;
222
223   -libdir | --libdir | --libdi | --libd)
224     ac_prev=libdir ;;
225   -libdir=* | --libdir=* | --libdi=* | --libd=*)
226     libdir="$ac_optarg" ;;
227
228   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
229   | --libexe | --libex | --libe)
230     ac_prev=libexecdir ;;
231   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
232   | --libexe=* | --libex=* | --libe=*)
233     libexecdir="$ac_optarg" ;;
234
235   -localstatedir | --localstatedir | --localstatedi | --localstated \
236   | --localstate | --localstat | --localsta | --localst \
237   | --locals | --local | --loca | --loc | --lo)
238     ac_prev=localstatedir ;;
239   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
240   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
241   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
242     localstatedir="$ac_optarg" ;;
243
244   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
245     ac_prev=mandir ;;
246   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
247     mandir="$ac_optarg" ;;
248
249   -nfp | --nfp | --nf)
250     # Obsolete; use --without-fp.
251     with_fp=no ;;
252
253   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
254   | --no-cr | --no-c)
255     no_create=yes ;;
256
257   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
258   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
259     no_recursion=yes ;;
260
261   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
262   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
263   | --oldin | --oldi | --old | --ol | --o)
264     ac_prev=oldincludedir ;;
265   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
266   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
267   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
268     oldincludedir="$ac_optarg" ;;
269
270   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
271     ac_prev=prefix ;;
272   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
273     prefix="$ac_optarg" ;;
274
275   -program-prefix | --program-prefix | --program-prefi | --program-pref \
276   | --program-pre | --program-pr | --program-p)
277     ac_prev=program_prefix ;;
278   -program-prefix=* | --program-prefix=* | --program-prefi=* \
279   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
280     program_prefix="$ac_optarg" ;;
281
282   -program-suffix | --program-suffix | --program-suffi | --program-suff \
283   | --program-suf | --program-su | --program-s)
284     ac_prev=program_suffix ;;
285   -program-suffix=* | --program-suffix=* | --program-suffi=* \
286   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
287     program_suffix="$ac_optarg" ;;
288
289   -program-transform-name | --program-transform-name \
290   | --program-transform-nam | --program-transform-na \
291   | --program-transform-n | --program-transform- \
292   | --program-transform | --program-transfor \
293   | --program-transfo | --program-transf \
294   | --program-trans | --program-tran \
295   | --progr-tra | --program-tr | --program-t)
296     ac_prev=program_transform_name ;;
297   -program-transform-name=* | --program-transform-name=* \
298   | --program-transform-nam=* | --program-transform-na=* \
299   | --program-transform-n=* | --program-transform-=* \
300   | --program-transform=* | --program-transfor=* \
301   | --program-transfo=* | --program-transf=* \
302   | --program-trans=* | --program-tran=* \
303   | --progr-tra=* | --program-tr=* | --program-t=*)
304     program_transform_name="$ac_optarg" ;;
305
306   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
307   | -silent | --silent | --silen | --sile | --sil)
308     silent=yes ;;
309
310   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
311     ac_prev=sbindir ;;
312   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
313   | --sbi=* | --sb=*)
314     sbindir="$ac_optarg" ;;
315
316   -sharedstatedir | --sharedstatedir | --sharedstatedi \
317   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
318   | --sharedst | --shareds | --shared | --share | --shar \
319   | --sha | --sh)
320     ac_prev=sharedstatedir ;;
321   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
322   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
323   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
324   | --sha=* | --sh=*)
325     sharedstatedir="$ac_optarg" ;;
326
327   -site | --site | --sit)
328     ac_prev=site ;;
329   -site=* | --site=* | --sit=*)
330     site="$ac_optarg" ;;
331
332   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
333     ac_prev=srcdir ;;
334   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
335     srcdir="$ac_optarg" ;;
336
337   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
338   | --syscon | --sysco | --sysc | --sys | --sy)
339     ac_prev=sysconfdir ;;
340   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
341   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
342     sysconfdir="$ac_optarg" ;;
343
344   -target | --target | --targe | --targ | --tar | --ta | --t)
345     ac_prev=target ;;
346   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
347     target="$ac_optarg" ;;
348
349   -v | -verbose | --verbose | --verbos | --verbo | --verb)
350     verbose=yes ;;
351
352   -version | --version | --versio | --versi | --vers)
353     echo "configure generated by autoconf version 2.12"
354     exit 0 ;;
355
356   -with-* | --with-*)
357     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
358     # Reject names that are not valid shell variable names.
359     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
360       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
361     fi
362     ac_package=`echo $ac_package| sed 's/-/_/g'`
363     case "$ac_option" in
364       *=*) ;;
365       *) ac_optarg=yes ;;
366     esac
367     eval "with_${ac_package}='$ac_optarg'" ;;
368
369   -without-* | --without-*)
370     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
371     # Reject names that are not valid shell variable names.
372     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
373       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
374     fi
375     ac_package=`echo $ac_package| sed 's/-/_/g'`
376     eval "with_${ac_package}=no" ;;
377
378   --x)
379     # Obsolete; use --with-x.
380     with_x=yes ;;
381
382   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
383   | --x-incl | --x-inc | --x-in | --x-i)
384     ac_prev=x_includes ;;
385   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
386   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
387     x_includes="$ac_optarg" ;;
388
389   -x-libraries | --x-libraries | --x-librarie | --x-librari \
390   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
391     ac_prev=x_libraries ;;
392   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
393   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
394     x_libraries="$ac_optarg" ;;
395
396   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
397     ;;
398
399   *)
400     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
401       echo "configure: warning: $ac_option: invalid host type" 1>&2
402     fi
403     if test "x$nonopt" != xNONE; then
404       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
405     fi
406     nonopt="$ac_option"
407     ;;
408
409   esac
410 done
411
412 if test -n "$ac_prev"; then
413   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
414 fi
415
416 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
417
418 # File descriptor usage:
419 # 0 standard input
420 # 1 file creation
421 # 2 errors and warnings
422 # 3 some systems may open it to /dev/tty
423 # 4 used on the Kubota Titan
424 # 6 checking for... messages and results
425 # 5 compiler messages saved in config.log
426 if test "$silent" = yes; then
427   exec 6>/dev/null
428 else
429   exec 6>&1
430 fi
431 exec 5>./config.log
432
433 echo "\
434 This file contains any messages produced by compilers while
435 running configure, to aid debugging if configure makes a mistake.
436 " 1>&5
437
438 # Strip out --no-create and --no-recursion so they do not pile up.
439 # Also quote any args containing shell metacharacters.
440 ac_configure_args=
441 for ac_arg
442 do
443   case "$ac_arg" in
444   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
445   | --no-cr | --no-c) ;;
446   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
447   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
448   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
449   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
450   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
451   esac
452 done
453
454 # NLS nuisances.
455 # Only set these to C if already set.  These must not be set unconditionally
456 # because not all systems understand e.g. LANG=C (notably SCO).
457 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
458 # Non-C LC_CTYPE values break the ctype check.
459 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
460 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
461 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
462 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
463
464 # confdefs.h avoids OS command line length limits that DEFS can exceed.
465 rm -rf conftest* confdefs.h
466 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
467 echo > confdefs.h
468
469 # A filename unique to this package, relative to the directory that
470 # configure is in, which we can look for to find out if srcdir is correct.
471 ac_unique_file=neoXldap.c
472
473 # Find the source files, if location was not specified.
474 if test -z "$srcdir"; then
475   ac_srcdir_defaulted=yes
476   # Try the directory containing this script, then its parent.
477   ac_prog=$0
478   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
479   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
480   srcdir=$ac_confdir
481   if test ! -r $srcdir/$ac_unique_file; then
482     srcdir=..
483   fi
484 else
485   ac_srcdir_defaulted=no
486 fi
487 if test ! -r $srcdir/$ac_unique_file; then
488   if test "$ac_srcdir_defaulted" = yes; then
489     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
490   else
491     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
492   fi
493 fi
494 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
495
496 # Prefer explicitly selected file to automatically selected ones.
497 if test -z "$CONFIG_SITE"; then
498   if test "x$prefix" != xNONE; then
499     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
500   else
501     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
502   fi
503 fi
504 for ac_site_file in $CONFIG_SITE; do
505   if test -r "$ac_site_file"; then
506     echo "loading site script $ac_site_file"
507     . "$ac_site_file"
508   fi
509 done
510
511 if test -r "$cache_file"; then
512   echo "loading cache $cache_file"
513   . $cache_file
514 else
515   echo "creating cache $cache_file"
516   > $cache_file
517 fi
518
519 ac_ext=c
520 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
521 ac_cpp='$CPP $CPPFLAGS'
522 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
523 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
524 cross_compiling=$ac_cv_prog_cc_cross
525
526 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
527   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
528   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
529     ac_n= ac_c='
530 ' ac_t='        '
531   else
532     ac_n=-n ac_c= ac_t=
533   fi
534 else
535   ac_n= ac_c='\c' ac_t=
536 fi
537
538
539 # $Id: configure,v 1.1 1999/02/10 22:56:49 kunkee Exp $
540
541 NEO_VERSION=1.0
542 NEO_MAJOR_VERSION=1
543 NEO_MINOR_VERSION=0
544 VERSION=${NEO_VERSION}
545
546 if test "${prefix}" = "NONE"; then
547     prefix=/usr/local
548 fi
549 if test "${exec_prefix}" = "NONE"; then
550     exec_prefix=$prefix
551 fi
552
553 # Check whether --enable-gcc or --disable-gcc was given.
554 if test "${enable_gcc+set}" = set; then
555   enableval="$enable_gcc"
556   neo_ok=$enableval
557 else
558   neo_ok=no
559 fi
560
561 if test "$neo_ok" = "yes"; then
562     # Extract the first word of "gcc", so it can be a program name with args.
563 set dummy gcc; ac_word=$2
564 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
565 echo "configure:566: checking for $ac_word" >&5
566 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
567   echo $ac_n "(cached) $ac_c" 1>&6
568 else
569   if test -n "$CC"; then
570   ac_cv_prog_CC="$CC" # Let the user override the test.
571 else
572   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
573   for ac_dir in $PATH; do
574     test -z "$ac_dir" && ac_dir=.
575     if test -f $ac_dir/$ac_word; then
576       ac_cv_prog_CC="gcc"
577       break
578     fi
579   done
580   IFS="$ac_save_ifs"
581 fi
582 fi
583 CC="$ac_cv_prog_CC"
584 if test -n "$CC"; then
585   echo "$ac_t""$CC" 1>&6
586 else
587   echo "$ac_t""no" 1>&6
588 fi
589
590 if test -z "$CC"; then
591   # Extract the first word of "cc", so it can be a program name with args.
592 set dummy cc; ac_word=$2
593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
594 echo "configure:595: checking for $ac_word" >&5
595 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
596   echo $ac_n "(cached) $ac_c" 1>&6
597 else
598   if test -n "$CC"; then
599   ac_cv_prog_CC="$CC" # Let the user override the test.
600 else
601   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
602   ac_prog_rejected=no
603   for ac_dir in $PATH; do
604     test -z "$ac_dir" && ac_dir=.
605     if test -f $ac_dir/$ac_word; then
606       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
607         ac_prog_rejected=yes
608         continue
609       fi
610       ac_cv_prog_CC="cc"
611       break
612     fi
613   done
614   IFS="$ac_save_ifs"
615 if test $ac_prog_rejected = yes; then
616   # We found a bogon in the path, so make sure we never use it.
617   set dummy $ac_cv_prog_CC
618   shift
619   if test $# -gt 0; then
620     # We chose a different compiler from the bogus one.
621     # However, it has the same basename, so the bogon will be chosen
622     # first if we set CC to just the basename; use the full file name.
623     shift
624     set dummy "$ac_dir/$ac_word" "$@"
625     shift
626     ac_cv_prog_CC="$@"
627   fi
628 fi
629 fi
630 fi
631 CC="$ac_cv_prog_CC"
632 if test -n "$CC"; then
633   echo "$ac_t""$CC" 1>&6
634 else
635   echo "$ac_t""no" 1>&6
636 fi
637
638   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
639 fi
640
641 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
642 echo "configure:643: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
643
644 ac_ext=c
645 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
646 ac_cpp='$CPP $CPPFLAGS'
647 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
648 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
649 cross_compiling=$ac_cv_prog_cc_cross
650
651 cat > conftest.$ac_ext <<EOF
652 #line 653 "configure"
653 #include "confdefs.h"
654 main(){return(0);}
655 EOF
656 if { (eval echo configure:657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
657   ac_cv_prog_cc_works=yes
658   # If we can't run a trivial program, we are probably using a cross compiler.
659   if (./conftest; exit) 2>/dev/null; then
660     ac_cv_prog_cc_cross=no
661   else
662     ac_cv_prog_cc_cross=yes
663   fi
664 else
665   echo "configure: failed program was:" >&5
666   cat conftest.$ac_ext >&5
667   ac_cv_prog_cc_works=no
668 fi
669 rm -fr conftest*
670
671 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
672 if test $ac_cv_prog_cc_works = no; then
673   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
674 fi
675 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
676 echo "configure:677: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
677 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
678 cross_compiling=$ac_cv_prog_cc_cross
679
680 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
681 echo "configure:682: checking whether we are using GNU C" >&5
682 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
683   echo $ac_n "(cached) $ac_c" 1>&6
684 else
685   cat > conftest.c <<EOF
686 #ifdef __GNUC__
687   yes;
688 #endif
689 EOF
690 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
691   ac_cv_prog_gcc=yes
692 else
693   ac_cv_prog_gcc=no
694 fi
695 fi
696
697 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
698
699 if test $ac_cv_prog_gcc = yes; then
700   GCC=yes
701   ac_test_CFLAGS="${CFLAGS+set}"
702   ac_save_CFLAGS="$CFLAGS"
703   CFLAGS=
704   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
705 echo "configure:706: checking whether ${CC-cc} accepts -g" >&5
706 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
707   echo $ac_n "(cached) $ac_c" 1>&6
708 else
709   echo 'void f(){}' > conftest.c
710 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
711   ac_cv_prog_cc_g=yes
712 else
713   ac_cv_prog_cc_g=no
714 fi
715 rm -f conftest*
716
717 fi
718
719 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
720   if test "$ac_test_CFLAGS" = set; then
721     CFLAGS="$ac_save_CFLAGS"
722   elif test $ac_cv_prog_cc_g = yes; then
723     CFLAGS="-g -O2"
724   else
725     CFLAGS="-O2"
726   fi
727 else
728   GCC=
729   test "${CFLAGS+set}" = set || CFLAGS="-g"
730 fi
731
732 else
733     CC=${CC-cc}
734     
735 fi
736 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
737 echo "configure:738: checking how to run the C preprocessor" >&5
738 # On Suns, sometimes $CPP names a directory.
739 if test -n "$CPP" && test -d "$CPP"; then
740   CPP=
741 fi
742 if test -z "$CPP"; then
743 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
744   echo $ac_n "(cached) $ac_c" 1>&6
745 else
746     # This must be in double quotes, not single quotes, because CPP may get
747   # substituted into the Makefile and "${CC-cc}" will confuse make.
748   CPP="${CC-cc} -E"
749   # On the NeXT, cc -E runs the code through the compiler's parser,
750   # not just through cpp.
751   cat > conftest.$ac_ext <<EOF
752 #line 753 "configure"
753 #include "confdefs.h"
754 #include <assert.h>
755 Syntax Error
756 EOF
757 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
758 { (eval echo configure:759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
759 ac_err=`grep -v '^ *+' conftest.out`
760 if test -z "$ac_err"; then
761   :
762 else
763   echo "$ac_err" >&5
764   echo "configure: failed program was:" >&5
765   cat conftest.$ac_ext >&5
766   rm -rf conftest*
767   CPP="${CC-cc} -E -traditional-cpp"
768   cat > conftest.$ac_ext <<EOF
769 #line 770 "configure"
770 #include "confdefs.h"
771 #include <assert.h>
772 Syntax Error
773 EOF
774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
775 { (eval echo configure:776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
776 ac_err=`grep -v '^ *+' conftest.out`
777 if test -z "$ac_err"; then
778   :
779 else
780   echo "$ac_err" >&5
781   echo "configure: failed program was:" >&5
782   cat conftest.$ac_ext >&5
783   rm -rf conftest*
784   CPP=/lib/cpp
785 fi
786 rm -f conftest*
787 fi
788 rm -f conftest*
789   ac_cv_prog_CPP="$CPP"
790 fi
791   CPP="$ac_cv_prog_CPP"
792 else
793   ac_cv_prog_CPP="$CPP"
794 fi
795 echo "$ac_t""$CPP" 1>&6
796
797
798 # Check whether --enable-gcc or --disable-gcc was given.
799 if test "${enable_gcc+set}" = set; then
800   enableval="$enable_gcc"
801   neo_ok=$enableval
802 else
803   neo_ok=no
804 fi
805
806 if test "$neo_ok" = "yes"; then
807     # Extract the first word of "gcc", so it can be a program name with args.
808 set dummy gcc; ac_word=$2
809 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
810 echo "configure:811: checking for $ac_word" >&5
811 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
812   echo $ac_n "(cached) $ac_c" 1>&6
813 else
814   if test -n "$CC"; then
815   ac_cv_prog_CC="$CC" # Let the user override the test.
816 else
817   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
818   for ac_dir in $PATH; do
819     test -z "$ac_dir" && ac_dir=.
820     if test -f $ac_dir/$ac_word; then
821       ac_cv_prog_CC="gcc"
822       break
823     fi
824   done
825   IFS="$ac_save_ifs"
826 fi
827 fi
828 CC="$ac_cv_prog_CC"
829 if test -n "$CC"; then
830   echo "$ac_t""$CC" 1>&6
831 else
832   echo "$ac_t""no" 1>&6
833 fi
834
835 if test -z "$CC"; then
836   # Extract the first word of "cc", so it can be a program name with args.
837 set dummy cc; ac_word=$2
838 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
839 echo "configure:840: checking for $ac_word" >&5
840 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
841   echo $ac_n "(cached) $ac_c" 1>&6
842 else
843   if test -n "$CC"; then
844   ac_cv_prog_CC="$CC" # Let the user override the test.
845 else
846   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
847   ac_prog_rejected=no
848   for ac_dir in $PATH; do
849     test -z "$ac_dir" && ac_dir=.
850     if test -f $ac_dir/$ac_word; then
851       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
852         ac_prog_rejected=yes
853         continue
854       fi
855       ac_cv_prog_CC="cc"
856       break
857     fi
858   done
859   IFS="$ac_save_ifs"
860 if test $ac_prog_rejected = yes; then
861   # We found a bogon in the path, so make sure we never use it.
862   set dummy $ac_cv_prog_CC
863   shift
864   if test $# -gt 0; then
865     # We chose a different compiler from the bogus one.
866     # However, it has the same basename, so the bogon will be chosen
867     # first if we set CC to just the basename; use the full file name.
868     shift
869     set dummy "$ac_dir/$ac_word" "$@"
870     shift
871     ac_cv_prog_CC="$@"
872   fi
873 fi
874 fi
875 fi
876 CC="$ac_cv_prog_CC"
877 if test -n "$CC"; then
878   echo "$ac_t""$CC" 1>&6
879 else
880   echo "$ac_t""no" 1>&6
881 fi
882
883   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
884 fi
885
886 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
887 echo "configure:888: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
888
889 ac_ext=c
890 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
891 ac_cpp='$CPP $CPPFLAGS'
892 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
893 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
894 cross_compiling=$ac_cv_prog_cc_cross
895
896 cat > conftest.$ac_ext <<EOF
897 #line 898 "configure"
898 #include "confdefs.h"
899 main(){return(0);}
900 EOF
901 if { (eval echo configure:902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
902   ac_cv_prog_cc_works=yes
903   # If we can't run a trivial program, we are probably using a cross compiler.
904   if (./conftest; exit) 2>/dev/null; then
905     ac_cv_prog_cc_cross=no
906   else
907     ac_cv_prog_cc_cross=yes
908   fi
909 else
910   echo "configure: failed program was:" >&5
911   cat conftest.$ac_ext >&5
912   ac_cv_prog_cc_works=no
913 fi
914 rm -fr conftest*
915
916 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
917 if test $ac_cv_prog_cc_works = no; then
918   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
919 fi
920 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
921 echo "configure:922: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
922 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
923 cross_compiling=$ac_cv_prog_cc_cross
924
925 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
926 echo "configure:927: checking whether we are using GNU C" >&5
927 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
928   echo $ac_n "(cached) $ac_c" 1>&6
929 else
930   cat > conftest.c <<EOF
931 #ifdef __GNUC__
932   yes;
933 #endif
934 EOF
935 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
936   ac_cv_prog_gcc=yes
937 else
938   ac_cv_prog_gcc=no
939 fi
940 fi
941
942 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
943
944 if test $ac_cv_prog_gcc = yes; then
945   GCC=yes
946   ac_test_CFLAGS="${CFLAGS+set}"
947   ac_save_CFLAGS="$CFLAGS"
948   CFLAGS=
949   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
950 echo "configure:951: checking whether ${CC-cc} accepts -g" >&5
951 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
952   echo $ac_n "(cached) $ac_c" 1>&6
953 else
954   echo 'void f(){}' > conftest.c
955 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
956   ac_cv_prog_cc_g=yes
957 else
958   ac_cv_prog_cc_g=no
959 fi
960 rm -f conftest*
961
962 fi
963
964 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
965   if test "$ac_test_CFLAGS" = set; then
966     CFLAGS="$ac_save_CFLAGS"
967   elif test $ac_cv_prog_cc_g = yes; then
968     CFLAGS="-g -O2"
969   else
970     CFLAGS="-O2"
971   fi
972 else
973   GCC=
974   test "${CFLAGS+set}" = set || CFLAGS="-g"
975 fi
976
977 else
978     CC=${CC-cc}
979
980 fi
981
982 ac_aux_dir=
983 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
984   if test -f $ac_dir/install-sh; then
985     ac_aux_dir=$ac_dir
986     ac_install_sh="$ac_aux_dir/install-sh -c"
987     break
988   elif test -f $ac_dir/install.sh; then
989     ac_aux_dir=$ac_dir
990     ac_install_sh="$ac_aux_dir/install.sh -c"
991     break
992   fi
993 done
994 if test -z "$ac_aux_dir"; then
995   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
996 fi
997 ac_config_guess=$ac_aux_dir/config.guess
998 ac_config_sub=$ac_aux_dir/config.sub
999 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1000
1001 # Find a good install program.  We prefer a C program (faster),
1002 # so one script is as good as another.  But avoid the broken or
1003 # incompatible versions:
1004 # SysV /etc/install, /usr/sbin/install
1005 # SunOS /usr/etc/install
1006 # IRIX /sbin/install
1007 # AIX /bin/install
1008 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1009 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1010 # ./install, which can be erroneously created by make from ./install.sh.
1011 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1012 echo "configure:1013: checking for a BSD compatible install" >&5
1013 if test -z "$INSTALL"; then
1014 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1015   echo $ac_n "(cached) $ac_c" 1>&6
1016 else
1017     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1018   for ac_dir in $PATH; do
1019     # Account for people who put trailing slashes in PATH elements.
1020     case "$ac_dir/" in
1021     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1022     *)
1023       # OSF1 and SCO ODT 3.0 have their own names for install.
1024       for ac_prog in ginstall installbsd scoinst install; do
1025         if test -f $ac_dir/$ac_prog; then
1026           if test $ac_prog = install &&
1027             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1028             # AIX install.  It has an incompatible calling convention.
1029             # OSF/1 installbsd also uses dspmsg, but is usable.
1030             :
1031           else
1032             ac_cv_path_install="$ac_dir/$ac_prog -c"
1033             break 2
1034           fi
1035         fi
1036       done
1037       ;;
1038     esac
1039   done
1040   IFS="$ac_save_IFS"
1041
1042 fi
1043   if test "${ac_cv_path_install+set}" = set; then
1044     INSTALL="$ac_cv_path_install"
1045   else
1046     # As a last resort, use the slow shell script.  We don't cache a
1047     # path for INSTALL within a source directory, because that will
1048     # break other packages using the cache if that directory is
1049     # removed, or if the path is relative.
1050     INSTALL="$ac_install_sh"
1051   fi
1052 fi
1053 echo "$ac_t""$INSTALL" 1>&6
1054
1055 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1056 # It thinks the first close brace ends the variable substitution.
1057 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1058
1059 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1060
1061 # Extract the first word of "ranlib", so it can be a program name with args.
1062 set dummy ranlib; ac_word=$2
1063 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1064 echo "configure:1065: checking for $ac_word" >&5
1065 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1066   echo $ac_n "(cached) $ac_c" 1>&6
1067 else
1068   if test -n "$RANLIB"; then
1069   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1070 else
1071   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1072   for ac_dir in $PATH; do
1073     test -z "$ac_dir" && ac_dir=.
1074     if test -f $ac_dir/$ac_word; then
1075       ac_cv_prog_RANLIB="ranlib"
1076       break
1077     fi
1078   done
1079   IFS="$ac_save_ifs"
1080   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1081 fi
1082 fi
1083 RANLIB="$ac_cv_prog_RANLIB"
1084 if test -n "$RANLIB"; then
1085   echo "$ac_t""$RANLIB" 1>&6
1086 else
1087   echo "$ac_t""no" 1>&6
1088 fi
1089
1090
1091 if test ! -f $exec_prefix/lib/tclConfig.sh
1092 then
1093     { echo "configure: error: Tcl must be installed first" 1>&2; exit 1; }
1094 fi
1095
1096 . $exec_prefix/lib/tclConfig.sh
1097
1098 if test ! -f $exec_prefix/lib/tclxConfig.sh
1099 then
1100     { echo "configure: error: Extended Tcl must be installed first" 1>&2; exit 1; }
1101 fi
1102 . $exec_prefix/lib/tclxConfig.sh
1103
1104
1105 #--------------------------------------------------------------------
1106 #       See if there was a command-line option for where Tk is;  if
1107 #       not, assume that its top-level directory is a sibling of ours.
1108 #--------------------------------------------------------------------
1109
1110 # Check whether --with-tk or --without-tk was given.
1111 if test "${with_tk+set}" = set; then
1112   withval="$with_tk"
1113   :
1114 else
1115   with_tk=yes
1116 fi
1117
1118
1119 case "$with_tk" in
1120     yes)
1121         if test -f $exec_prefix/lib/tkConfig.sh -a $exec_prefix/lib/tkxConfig.sh
1122         then
1123             :
1124         else
1125             { echo "configure: error: Tk does not appear to be installed at $exec_prefix" 1>&2; exit 1; }
1126         fi
1127         ;;
1128     no) ;;
1129     *)  { echo "configure: error: Tk cannot be specified and must be in $exec_prefix" 1>&2; exit 1; }
1130         ;;
1131 esac
1132
1133 # Check whether --with-x or --without-x was given.
1134 if test "${with_x+set}" = set; then
1135   withval="$with_x"
1136   :
1137 fi
1138
1139 if test "$with_x" = "no"
1140 then
1141     with_tk=no
1142 fi
1143
1144 if test "$with_tk" != "no"
1145 then
1146     LDAPWISH=ldapwish
1147     . $exec_prefix/lib/tkConfig.sh
1148     . $exec_prefix/lib/tkxConfig.sh
1149 fi
1150
1151
1152
1153
1154
1155
1156
1157 #--------------------------------------------------------------------
1158 #       Read in configuration information generated by Tcl for shared
1159 #       libraries, and arrange for it to be substituted into our
1160 #       Makefile.
1161 #--------------------------------------------------------------------
1162
1163 CC=$TCL_CC
1164 SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
1165 SHLIB_LD=$TCL_SHLIB_LD
1166 SHLIB_LD_LIBS=$TCL_SHLIB_LD_LIBS
1167 SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
1168 SHLIB_VERSION=$TCL_SHLIB_VERSION
1169 DL_LIBS=$TCL_DL_LIBS
1170 LD_FLAGS=$TCL_LD_FLAGS
1171 NEO_LD_SEARCH_FLAGS=$TCL_LD_SEARCH_FLAGS
1172
1173 eval "NEO_SHARED_LIB_FILE=libldap${TCL_SHARED_LIB_SUFFIX}"
1174 eval "NEO_UNSHARED_LIB_FILE=libldap${TCL_UNSHARED_LIB_SUFFIX}"
1175
1176 #--------------------------------------------------------------------
1177 #       The statements below define a collection of symbols related to
1178 #       building libldap as a shared library instead of a static library.
1179 #--------------------------------------------------------------------
1180
1181 # Warning: in order to use the following code for libldap and libdb versions,
1182 # the VERSION shell variable is modified, and then is restored after.
1183
1184 # Check whether --enable-shared or --disable-shared was given.
1185 if test "${enable_shared+set}" = set; then
1186   enableval="$enable_shared"
1187   ok=$enableval
1188 else
1189   ok=no
1190 fi
1191
1192 if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then
1193     NEO_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
1194     eval "NEO_LIB_FILE=libldaptcl${TCL_SHARED_LIB_SUFFIX}"
1195     MAKE_LIB="\${SHLIB_LD} $TCL_LIB_HNAME -o ${NEO_LIB_FILE} \${OBJS}"
1196     RANLIB=":"
1197 else
1198     NEO_SHLIB_CFLAGS=""
1199     eval "NEO_LIB_FILE=libldaptcl${TCL_UNSHARED_LIB_SUFFIX}"
1200     MAKE_LIB="ar cr ${NEO_LIB_FILE} \${OBJS}"
1201 fi
1202
1203 # Check whether --with-ldap or --without-ldap was given.
1204 if test "${with_ldap+set}" = set; then
1205   withval="$with_ldap"
1206   neo_ldap=$withval
1207         case $withval in
1208             yes) ldapdir=/usr/local
1209                  ;;
1210             no)  ;;
1211             *)   ldapdir=$withval
1212                  neo_ldap=yes
1213                  ;;
1214         esac
1215         
1216 else
1217   
1218             neo_ldap=yes
1219             ldapdir=/usr/local
1220         
1221 fi
1222
1223
1224 ldapincdir=$ldapdir/include
1225 # Check whether --with-ldap-incdir or --without-ldap-incdir was given.
1226 if test "${with_ldap_incdir+set}" = set; then
1227   withval="$with_ldap_incdir"
1228   ldapincdir=$withval
1229 fi
1230
1231
1232 ldaplibdir=$ldapdir/lib
1233 # Check whether --with-ldap-libdir or --without-ldap-libdir was given.
1234 if test "${with_ldap_libdir+set}" = set; then
1235   withval="$with_ldap_libdir"
1236   ldapincdir=$withval
1237 fi
1238
1239
1240 # Check whether --with-ldap-libraries or --without-ldap-libraries was given.
1241 if test "${with_ldap_libraries+set}" = set; then
1242   withval="$with_ldap_libraries"
1243   ldaplibflags="-L$ldaplibdir $withval"
1244 else
1245   ldaplibflags="-L$ldaplibdir -lldap -llber"
1246 fi
1247
1248
1249 ldapinclude="-I$ldapincdir"
1250
1251 ldapbuild=yes
1252
1253
1254
1255
1256
1257
1258
1259 VERSION=${NEO_VERSION}
1260 # Note:  in the following variable, it's important to use the absolute
1261 # path name of the Tcl directory rather than "..":  this is because
1262 # AIX remembers this path and will attempt to use it at run-time to look
1263 # up the Tcl library.
1264
1265 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
1266     NEO_BUILD_LIB_SPEC="-L`pwd` -lldaptcl${VERSION}"
1267     NEO_LIB_SPEC="-L${exec_prefix}/lib -lldaptcl${VERSION}"
1268 else
1269     NEO_BUILD_LIB_SPEC="-L`pwd` -lldaptcl`echo ${VERSION} | tr -d .`"
1270     NEO_LIB_SPEC="-L${exec_prefix}/lib -lldaptcl`echo ${VERSION} | tr -d .`"
1271 fi
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307 trap '' 1 2 15
1308 cat > confcache <<\EOF
1309 # This file is a shell script that caches the results of configure
1310 # tests run on this system so they can be shared between configure
1311 # scripts and configure runs.  It is not useful on other systems.
1312 # If it contains results you don't want to keep, you may remove or edit it.
1313 #
1314 # By default, configure uses ./config.cache as the cache file,
1315 # creating it if it does not exist already.  You can give configure
1316 # the --cache-file=FILE option to use a different cache file; that is
1317 # what configure does when it calls configure scripts in
1318 # subdirectories, so they share the cache.
1319 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1320 # config.status only pays attention to the cache file if you give it the
1321 # --recheck option to rerun configure.
1322 #
1323 EOF
1324 # The following way of writing the cache mishandles newlines in values,
1325 # but we know of no workaround that is simple, portable, and efficient.
1326 # So, don't put newlines in cache variables' values.
1327 # Ultrix sh set writes to stderr and can't be redirected directly,
1328 # and sets the high bit in the cache file unless we assign to the vars.
1329 (set) 2>&1 |
1330   case `(ac_space=' '; set) 2>&1` in
1331   *ac_space=\ *)
1332     # `set' does not quote correctly, so add quotes (double-quote substitution
1333     # turns \\\\ into \\, and sed turns \\ into \).
1334     sed -n \
1335       -e "s/'/'\\\\''/g" \
1336       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1337     ;;
1338   *)
1339     # `set' quotes correctly as required by POSIX, so do not add quotes.
1340     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1341     ;;
1342   esac >> confcache
1343 if cmp -s $cache_file confcache; then
1344   :
1345 else
1346   if test -w $cache_file; then
1347     echo "updating cache $cache_file"
1348     cat confcache > $cache_file
1349   else
1350     echo "not updating unwritable cache $cache_file"
1351   fi
1352 fi
1353 rm -f confcache
1354
1355 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1356
1357 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1358 # Let make expand exec_prefix.
1359 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1360
1361 # Any assignment to VPATH causes Sun make to only execute
1362 # the first set of double-colon rules, so remove it if not needed.
1363 # If there is a colon in the path, we need to keep it.
1364 if test "x$srcdir" = x.; then
1365   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1366 fi
1367
1368 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1369
1370 # Transform confdefs.h into DEFS.
1371 # Protect against shell expansion while executing Makefile rules.
1372 # Protect against Makefile macro expansion.
1373 cat > conftest.defs <<\EOF
1374 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1375 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
1376 s%\[%\\&%g
1377 s%\]%\\&%g
1378 s%\$%$$%g
1379 EOF
1380 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1381 rm -f conftest.defs
1382
1383
1384 # Without the "./", some shells look in PATH for config.status.
1385 : ${CONFIG_STATUS=./config.status}
1386
1387 echo creating $CONFIG_STATUS
1388 rm -f $CONFIG_STATUS
1389 cat > $CONFIG_STATUS <<EOF
1390 #! /bin/sh
1391 # Generated automatically by configure.
1392 # Run this file to recreate the current configuration.
1393 # This directory was configured as follows,
1394 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1395 #
1396 # $0 $ac_configure_args
1397 #
1398 # Compiler output produced by configure, useful for debugging
1399 # configure, is in ./config.log if it exists.
1400
1401 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1402 for ac_option
1403 do
1404   case "\$ac_option" in
1405   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1406     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1407     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1408   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1409     echo "$CONFIG_STATUS generated by autoconf version 2.12"
1410     exit 0 ;;
1411   -help | --help | --hel | --he | --h)
1412     echo "\$ac_cs_usage"; exit 0 ;;
1413   *) echo "\$ac_cs_usage"; exit 1 ;;
1414   esac
1415 done
1416
1417 ac_given_srcdir=$srcdir
1418 ac_given_INSTALL="$INSTALL"
1419
1420 trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1421 EOF
1422 cat >> $CONFIG_STATUS <<EOF
1423
1424 # Protect against being on the right side of a sed subst in config.status.
1425 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1426  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1427 $ac_vpsub
1428 $extrasub
1429 s%@CFLAGS@%$CFLAGS%g
1430 s%@CPPFLAGS@%$CPPFLAGS%g
1431 s%@CXXFLAGS@%$CXXFLAGS%g
1432 s%@DEFS@%$DEFS%g
1433 s%@LDFLAGS@%$LDFLAGS%g
1434 s%@LIBS@%$LIBS%g
1435 s%@exec_prefix@%$exec_prefix%g
1436 s%@prefix@%$prefix%g
1437 s%@program_transform_name@%$program_transform_name%g
1438 s%@bindir@%$bindir%g
1439 s%@sbindir@%$sbindir%g
1440 s%@libexecdir@%$libexecdir%g
1441 s%@datadir@%$datadir%g
1442 s%@sysconfdir@%$sysconfdir%g
1443 s%@sharedstatedir@%$sharedstatedir%g
1444 s%@localstatedir@%$localstatedir%g
1445 s%@libdir@%$libdir%g
1446 s%@includedir@%$includedir%g
1447 s%@oldincludedir@%$oldincludedir%g
1448 s%@infodir@%$infodir%g
1449 s%@mandir@%$mandir%g
1450 s%@CC@%$CC%g
1451 s%@CPP@%$CPP%g
1452 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1453 s%@INSTALL_DATA@%$INSTALL_DATA%g
1454 s%@RANLIB@%$RANLIB%g
1455 s%@TK_LIBS@%$TK_LIBS%g
1456 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
1457 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
1458 s%@TK_VERSION@%$TK_VERSION%g
1459 s%@TKX_LIB_SPEC@%$TKX_LIB_SPEC%g
1460 s%@LDAPWISH@%$LDAPWISH%g
1461 s%@ldaplibflags@%$ldaplibflags%g
1462 s%@ldapinclude@%$ldapinclude%g
1463 s%@ldapbuild@%$ldapbuild%g
1464 s%@ldapdir@%$ldapdir%g
1465 s%@DL_LIBS@%$DL_LIBS%g
1466 s%@LD_FLAGS@%$LD_FLAGS%g
1467 s%@MATH_LIBS@%$MATH_LIBS%g
1468 s%@MAKE_LIB@%$MAKE_LIB%g
1469 s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
1470 s%@SHLIB_LD@%$SHLIB_LD%g
1471 s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
1472 s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
1473 s%@SHLIB_VERSION@%$SHLIB_VERSION%g
1474 s%@TCLX_TOP_DIR@%$TCLX_TOP_DIR%g
1475 s%@TCLX_TCL_DIR@%$TCLX_TCL_DIR%g
1476 s%@TCLX_LIB_SPEC@%$TCLX_LIB_SPEC%g
1477 s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
1478 s%@TCL_LIBS@%$TCL_LIBS%g
1479 s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
1480 s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
1481 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
1482 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
1483 s%@TCL_LIB_HNAME@%$TCL_LIB_HNAME%g
1484 s%@TCL_VERSION@%$TCL_VERSION%g
1485 s%@NEO_BUILD_LIB_SPEC@%$NEO_BUILD_LIB_SPEC%g
1486 s%@NEO_LD_SEARCH_FLAGS@%$NEO_LD_SEARCH_FLAGS%g
1487 s%@NEO_SHARED_LIB_FILE@%$NEO_SHARED_LIB_FILE%g
1488 s%@NEO_UNSHARED_LIB_FILE@%$NEO_UNSHARED_LIB_FILE%g
1489 s%@NEO_LIB_FILE@%$NEO_LIB_FILE%g
1490 s%@NEO_LIB_SPEC@%$NEO_LIB_SPEC%g
1491 s%@NEO_MAJOR_VERSION@%$NEO_MAJOR_VERSION%g
1492 s%@NEO_MINOR_VERSION@%$NEO_MINOR_VERSION%g
1493 s%@NEO_SHLIB_CFLAGS@%$NEO_SHLIB_CFLAGS%g
1494 s%@NEO_VERSION@%$NEO_VERSION%g
1495
1496 CEOF
1497 EOF
1498
1499 cat >> $CONFIG_STATUS <<\EOF
1500
1501 # Split the substitutions into bite-sized pieces for seds with
1502 # small command number limits, like on Digital OSF/1 and HP-UX.
1503 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1504 ac_file=1 # Number of current file.
1505 ac_beg=1 # First line for current file.
1506 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1507 ac_more_lines=:
1508 ac_sed_cmds=""
1509 while $ac_more_lines; do
1510   if test $ac_beg -gt 1; then
1511     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1512   else
1513     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1514   fi
1515   if test ! -s conftest.s$ac_file; then
1516     ac_more_lines=false
1517     rm -f conftest.s$ac_file
1518   else
1519     if test -z "$ac_sed_cmds"; then
1520       ac_sed_cmds="sed -f conftest.s$ac_file"
1521     else
1522       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1523     fi
1524     ac_file=`expr $ac_file + 1`
1525     ac_beg=$ac_end
1526     ac_end=`expr $ac_end + $ac_max_sed_cmds`
1527   fi
1528 done
1529 if test -z "$ac_sed_cmds"; then
1530   ac_sed_cmds=cat
1531 fi
1532 EOF
1533
1534 cat >> $CONFIG_STATUS <<EOF
1535
1536 CONFIG_FILES=\${CONFIG_FILES-"Makefile pkgIndex.tcl"}
1537 EOF
1538 cat >> $CONFIG_STATUS <<\EOF
1539 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1540   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1541   case "$ac_file" in
1542   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1543        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1544   *) ac_file_in="${ac_file}.in" ;;
1545   esac
1546
1547   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1548
1549   # Remove last slash and all that follows it.  Not all systems have dirname.
1550   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1551   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1552     # The file is in a subdirectory.
1553     test ! -d "$ac_dir" && mkdir "$ac_dir"
1554     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1555     # A "../" for each directory in $ac_dir_suffix.
1556     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1557   else
1558     ac_dir_suffix= ac_dots=
1559   fi
1560
1561   case "$ac_given_srcdir" in
1562   .)  srcdir=.
1563       if test -z "$ac_dots"; then top_srcdir=.
1564       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1565   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1566   *) # Relative path.
1567     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1568     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1569   esac
1570
1571   case "$ac_given_INSTALL" in
1572   [/$]*) INSTALL="$ac_given_INSTALL" ;;
1573   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1574   esac
1575
1576   echo creating "$ac_file"
1577   rm -f "$ac_file"
1578   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1579   case "$ac_file" in
1580   *Makefile*) ac_comsub="1i\\
1581 # $configure_input" ;;
1582   *) ac_comsub= ;;
1583   esac
1584
1585   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1586   sed -e "$ac_comsub
1587 s%@configure_input@%$configure_input%g
1588 s%@srcdir@%$srcdir%g
1589 s%@top_srcdir@%$top_srcdir%g
1590 s%@INSTALL@%$INSTALL%g
1591 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1592 fi; done
1593 rm -f conftest.s*
1594
1595 EOF
1596 cat >> $CONFIG_STATUS <<EOF
1597
1598 EOF
1599 cat >> $CONFIG_STATUS <<\EOF
1600
1601 exit 0
1602 EOF
1603 chmod +x $CONFIG_STATUS
1604 rm -fr confdefs* $ac_clean_files
1605 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1606