]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
c18a988f72c4d271dae24fa52f981c98182126a5
[ncurses.git] / configure
1 #! /bin/sh
2
3 # From configure.in Revision: 1.220 
4
5
6
7 # Guess values for system-dependent variables and create Makefiles.
8 # Generated automatically using autoconf version 2.13.20000819 
9 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13
14 # Defaults:
15 ac_help=
16 ac_default_prefix=/usr/local
17 # Any additions from configure.in:
18
19 # Initialize some variables set by options.
20 # The variables have the same names as the options, with
21 # dashes changed to underlines.
22 build=NONE
23 cache_file=./config.cache
24 exec_prefix=NONE
25 host=NONE
26 no_create=
27 nonopt=NONE
28 no_recursion=
29 prefix=NONE
30 program_prefix=NONE
31 program_suffix=NONE
32 program_transform_name=s,x,x,
33 silent=
34 site=
35 srcdir=
36 target=NONE
37 verbose=
38 x_includes=NONE
39 x_libraries=NONE
40 bindir='${exec_prefix}/bin'
41 sbindir='${exec_prefix}/sbin'
42 libexecdir='${exec_prefix}/libexec'
43 datadir='${prefix}/share'
44 sysconfdir='${prefix}/etc'
45 sharedstatedir='${prefix}/com'
46 localstatedir='${prefix}/var'
47 libdir='${exec_prefix}/lib'
48 includedir='${prefix}/include'
49 oldincludedir='/usr/include'
50 infodir='${prefix}/info'
51 mandir='${prefix}/man'
52
53 # Initialize some other variables.
54 subdirs=
55 MFLAGS= MAKEFLAGS=
56 SHELL=${CONFIG_SHELL-/bin/sh}
57 # Maximum number of lines to put in a shell here document.
58 ac_max_here_lines=12
59
60 ac_prev=
61 for ac_option
62 do
63
64   # If the previous option needs an argument, assign it.
65   if test -n "$ac_prev"; then
66     eval "$ac_prev=\$ac_option"
67     ac_prev=
68     continue
69   fi
70
71   case "$ac_option" in
72   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
73   *) ac_optarg= ;;
74   esac
75
76   # Accept the important Cygnus configure options, so we can diagnose typos.
77
78   case "$ac_option" in
79
80   -bindir | --bindir | --bindi | --bind | --bin | --bi)
81     ac_prev=bindir ;;
82   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
83     bindir="$ac_optarg" ;;
84
85   -build | --build | --buil | --bui | --bu)
86     ac_prev=build ;;
87   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
88     build="$ac_optarg" ;;
89
90   -cache-file | --cache-file | --cache-fil | --cache-fi \
91   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
92     ac_prev=cache_file ;;
93   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
94   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
95     cache_file="$ac_optarg" ;;
96
97   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
98     ac_prev=datadir ;;
99   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
100   | --da=*)
101     datadir="$ac_optarg" ;;
102
103   -disable-* | --disable-*)
104     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
105     # Reject names that are not valid shell variable names.
106     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
107       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
108     fi
109     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
110     eval "enable_${ac_feature}=no" ;;
111
112   -enable-* | --enable-*)
113     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
114     # Reject names that are not valid shell variable names.
115     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
116       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
117     fi
118     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119     case "$ac_option" in
120       *=*) ;;
121       *) ac_optarg=yes ;;
122     esac
123     eval "enable_${ac_feature}='$ac_optarg'" ;;
124
125   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
126   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
127   | --exec | --exe | --ex)
128     ac_prev=exec_prefix ;;
129   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
130   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
131   | --exec=* | --exe=* | --ex=*)
132     exec_prefix="$ac_optarg" ;;
133
134   -gas | --gas | --ga | --g)
135     # Obsolete; use --with-gas.
136     with_gas=yes ;;
137
138   -help | --help | --hel | --he)
139     # Omit some internal or obsolete options to make the list less imposing.
140     # This message is too long to be a string in the A/UX 3.1 sh.
141     cat << EOF
142 Usage: configure [options] [host]
143 Options: [defaults in brackets after descriptions]
144 Configuration:
145   --cache-file=FILE       cache test results in FILE
146   --help                  print this message
147   --no-create             do not create output files
148   --quiet, --silent       do not print \`checking...' messages
149   --version               print the version of autoconf that created configure
150 Directory and file names:
151   --prefix=PREFIX         install architecture-independent files in PREFIX
152                           [$ac_default_prefix]
153   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
154                           [same as prefix]
155   --bindir=DIR            user executables in DIR [EPREFIX/bin]
156   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
157   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
158   --datadir=DIR           read-only architecture-independent data in DIR
159                           [PREFIX/share]
160   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
161   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
162                           [PREFIX/com]
163   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
164   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
165   --includedir=DIR        C header files in DIR [PREFIX/include]
166   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
167   --infodir=DIR           info documentation in DIR [PREFIX/info]
168   --mandir=DIR            man documentation in DIR [PREFIX/man]
169   --srcdir=DIR            find the sources in DIR [configure dir or ..]
170   --program-prefix=PREFIX prepend PREFIX to installed program names
171   --program-suffix=SUFFIX append SUFFIX to installed program names
172   --program-transform-name=PROGRAM
173                           run sed PROGRAM on installed program names
174 EOF
175     cat << EOF
176 Host type:
177   --build=BUILD           configure for building on BUILD [BUILD=HOST]
178   --host=HOST             configure for HOST [guessed]
179   --target=TARGET         configure for TARGET [TARGET=HOST]
180 Features and packages:
181   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
182   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
183   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
184   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
185   --x-includes=DIR        X include files are in DIR
186   --x-libraries=DIR       X library files are in DIR
187 EOF
188 cat <<EOF
189 --enable and --with options recognized:
190   --with-system-type=XXX  test: override derived host system-type
191   --enable-add-ons=DIR... used to check if we are a glibc add-on.
192   --without-cxx           do not adjust ncurses bool to match C++
193   --without-cxx-binding   do not build C++ binding and demo
194   --without-ada           suppress check for Ada95, don't build demo
195   --without-progs         suppress build with programs (e.g., tic)
196   --without-curses-h      install curses.h as ncurses.h only
197   --with-install-prefix   prefixes actual install-location
198 Options to Specify the Libraries Built/Used:
199   --with-libtool          generate libraries with libtool
200   --with-shared           generate shared-libraries
201   --with-normal           generate normal-libraries (default)
202   --with-debug            generate debug-libraries (default)
203 EOF
204 cat <<EOF
205   --with-profile          generate profile-libraries
206   --with-termlib          generate separate terminfo library
207   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
208   --with-dmalloc          test: use Gray Watson's dmalloc library
209   --with-gpm              use Alessandro Rubini's GPM library
210   --enable-rpath          use rpath option when generating shared libraries
211   --with-shlib-version=X  Specify rel or abi version for shared libs
212 Fine-Tuning Your Configuration:
213   --disable-overwrite     leave out the link to -lcurses
214   --disable-database      use only built-in data
215   --with-database=XXX     specify terminfo source to install
216   --with-fallbacks=XXX    specify list of fallback terminal descriptions
217 EOF
218 cat <<EOF
219   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
220   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
221   --disable-big-core      assume machine has little memory
222   --enable-termcap        compile in termcap fallback support
223   --enable-getcap         fast termcap load, no xrefs to terminfo
224   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
225   --enable-symlinks       make tic use symbolic links not hard links
226   --enable-broken_linker  compile with broken-linker support code
227   --enable-bsdpad         recognize BSD-style prefix padding
228   --with-rcs-ids          compile-in RCS identifiers
229 Options to Specify How Manpages are Installed:
230   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
231                           optionally formatted, e.g., gzip,formatted
232 EOF
233 cat <<EOF
234   --with-manpage-renames  specify manpage-renaming
235   --with-manpage-symlinks specify manpage-symlinks
236   --with-manpage-tbl      specify manpage processing with tbl
237 Extensions:
238   --disable-ext-funcs     disable function-extensions
239   --enable-const          compile with extra/non-standard const
240   --enable-no-padding     compile with \$NCURSES_NO_PADDING code
241   --enable-sigwinch       compile with SIGWINCH handler
242   --enable-tcap-names     compile with user-definable terminal capabilities
243 Development Code:
244   --with-develop          enable all development options
245   --enable-colorfgbg      compile with \$COLORFGBG code
246 EOF
247 cat <<EOF
248   --enable-hard-tabs      compile with hard-tabs code
249   --disable-root-environ  limit environment when running as root
250   --enable-xmc-glitch     compile with limited support for xmc
251 Experimental Code:
252   --disable-assumed-color do not assume anything about default-colors
253   --disable-hashmap       compile without hashmap scrolling-optimization
254   --enable-safe-sprintf   compile with experimental safe-sprintf code
255   --disable-scroll-hints  compile without scroll-hints code
256   --enable-widec          compile with experimental wide-char/UTF-8 code
257 Testing/development Options:
258   --enable-echo           build: display "compiling" commands (default)
259   --enable-warnings       build: turn on GCC compiler warnings
260 EOF
261 cat <<EOF
262   --enable-assertions     test: turn on generation of assertion code
263   --disable-leaks         test: suppress permanent memory-leaks
264   --enable-expanded       test: generate functions for certain macros
265   --disable-macros        test: use functions rather than macros
266 Ada95 Binding Options:
267   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
268   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
269   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
270 EOF
271     exit 0 ;;
272
273   -host | --host | --hos | --ho)
274     ac_prev=host ;;
275   -host=* | --host=* | --hos=* | --ho=*)
276     host="$ac_optarg" ;;
277
278   -includedir | --includedir | --includedi | --included | --include \
279   | --includ | --inclu | --incl | --inc)
280     ac_prev=includedir ;;
281   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
282   | --includ=* | --inclu=* | --incl=* | --inc=*)
283     includedir="$ac_optarg" ;;
284
285   -infodir | --infodir | --infodi | --infod | --info | --inf)
286     ac_prev=infodir ;;
287   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
288     infodir="$ac_optarg" ;;
289
290   -libdir | --libdir | --libdi | --libd)
291     ac_prev=libdir ;;
292   -libdir=* | --libdir=* | --libdi=* | --libd=*)
293     libdir="$ac_optarg" ;;
294
295   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
296   | --libexe | --libex | --libe)
297     ac_prev=libexecdir ;;
298   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
299   | --libexe=* | --libex=* | --libe=*)
300     libexecdir="$ac_optarg" ;;
301
302   -localstatedir | --localstatedir | --localstatedi | --localstated \
303   | --localstate | --localstat | --localsta | --localst \
304   | --locals | --local | --loca | --loc | --lo)
305     ac_prev=localstatedir ;;
306   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
307   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
308   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
309     localstatedir="$ac_optarg" ;;
310
311   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
312     ac_prev=mandir ;;
313   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
314     mandir="$ac_optarg" ;;
315
316   -nfp | --nfp | --nf)
317     # Obsolete; use --without-fp.
318     with_fp=no ;;
319
320   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
321   | --no-cr | --no-c)
322     no_create=yes ;;
323
324   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
325   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
326     no_recursion=yes ;;
327
328   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
329   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
330   | --oldin | --oldi | --old | --ol | --o)
331     ac_prev=oldincludedir ;;
332   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
333   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
334   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
335     oldincludedir="$ac_optarg" ;;
336
337   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
338     ac_prev=prefix ;;
339   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
340     prefix="$ac_optarg" ;;
341
342   -program-prefix | --program-prefix | --program-prefi | --program-pref \
343   | --program-pre | --program-pr | --program-p)
344     ac_prev=program_prefix ;;
345   -program-prefix=* | --program-prefix=* | --program-prefi=* \
346   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
347     program_prefix="$ac_optarg" ;;
348
349   -program-suffix | --program-suffix | --program-suffi | --program-suff \
350   | --program-suf | --program-su | --program-s)
351     ac_prev=program_suffix ;;
352   -program-suffix=* | --program-suffix=* | --program-suffi=* \
353   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
354     program_suffix="$ac_optarg" ;;
355
356   -program-transform-name | --program-transform-name \
357   | --program-transform-nam | --program-transform-na \
358   | --program-transform-n | --program-transform- \
359   | --program-transform | --program-transfor \
360   | --program-transfo | --program-transf \
361   | --program-trans | --program-tran \
362   | --progr-tra | --program-tr | --program-t)
363     ac_prev=program_transform_name ;;
364   -program-transform-name=* | --program-transform-name=* \
365   | --program-transform-nam=* | --program-transform-na=* \
366   | --program-transform-n=* | --program-transform-=* \
367   | --program-transform=* | --program-transfor=* \
368   | --program-transfo=* | --program-transf=* \
369   | --program-trans=* | --program-tran=* \
370   | --progr-tra=* | --program-tr=* | --program-t=*)
371     program_transform_name="$ac_optarg" ;;
372
373   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
374   | -silent | --silent | --silen | --sile | --sil)
375     silent=yes ;;
376
377   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
378     ac_prev=sbindir ;;
379   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
380   | --sbi=* | --sb=*)
381     sbindir="$ac_optarg" ;;
382
383   -sharedstatedir | --sharedstatedir | --sharedstatedi \
384   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
385   | --sharedst | --shareds | --shared | --share | --shar \
386   | --sha | --sh)
387     ac_prev=sharedstatedir ;;
388   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
389   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
390   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
391   | --sha=* | --sh=*)
392     sharedstatedir="$ac_optarg" ;;
393
394   -site | --site | --sit)
395     ac_prev=site ;;
396   -site=* | --site=* | --sit=*)
397     site="$ac_optarg" ;;
398
399   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
400     ac_prev=srcdir ;;
401   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
402     srcdir="$ac_optarg" ;;
403
404   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
405   | --syscon | --sysco | --sysc | --sys | --sy)
406     ac_prev=sysconfdir ;;
407   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
408   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
409     sysconfdir="$ac_optarg" ;;
410
411   -target | --target | --targe | --targ | --tar | --ta | --t)
412     ac_prev=target ;;
413   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
414     target="$ac_optarg" ;;
415
416   -v | -verbose | --verbose | --verbos | --verbo | --verb)
417     verbose=yes ;;
418
419   -version | --version | --versio | --versi | --vers)
420     echo "configure generated by autoconf version 2.13.20000819"
421     exit 0 ;;
422
423   -with-* | --with-*)
424     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
425     # Reject names that are not valid shell variable names.
426     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
427       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
428     fi
429     ac_package=`echo $ac_package| sed 's/-/_/g'`
430     case "$ac_option" in
431       *=*) ;;
432       *) ac_optarg=yes ;;
433     esac
434     eval "with_${ac_package}='$ac_optarg'" ;;
435
436   -without-* | --without-*)
437     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
438     # Reject names that are not valid shell variable names.
439     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
440       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
441     fi
442     ac_package=`echo $ac_package| sed 's/-/_/g'`
443     eval "with_${ac_package}=no" ;;
444
445   --x)
446     # Obsolete; use --with-x.
447     with_x=yes ;;
448
449   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
450   | --x-incl | --x-inc | --x-in | --x-i)
451     ac_prev=x_includes ;;
452   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
453   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
454     x_includes="$ac_optarg" ;;
455
456   -x-libraries | --x-libraries | --x-librarie | --x-librari \
457   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
458     ac_prev=x_libraries ;;
459   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
460   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
461     x_libraries="$ac_optarg" ;;
462
463   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
464     ;;
465
466   *)
467     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
468       echo "configure: warning: $ac_option: invalid host type" 1>&2
469     fi
470     if test "x$nonopt" != xNONE; then
471       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
472     fi
473     nonopt="$ac_option"
474     ;;
475
476   esac
477 done
478
479 if test -n "$ac_prev"; then
480   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
481 fi
482
483 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
484
485 # File descriptor usage:
486 # 0 standard input
487 # 1 file creation
488 # 2 errors and warnings
489 # 3 some systems may open it to /dev/tty
490 # 4 used on the Kubota Titan
491 # 6 checking for... messages and results
492 # 5 compiler messages saved in config.log
493 if test "$silent" = yes; then
494   exec 6>/dev/null
495 else
496   exec 6>&1
497 fi
498 exec 5>./config.log
499
500 echo "\
501 This file contains any messages produced by compilers while
502 running configure, to aid debugging if configure makes a mistake.
503 " 1>&5
504
505 # Strip out --no-create and --no-recursion so they do not pile up.
506 # Also quote any args containing shell metacharacters.
507 ac_configure_args=
508 for ac_arg
509 do
510   case "$ac_arg" in
511   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
512   | --no-cr | --no-c) ;;
513   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
514   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
515   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
516   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
517   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
518   esac
519 done
520
521 # NLS nuisances.
522 # Only set these to C if already set.  These must not be set unconditionally
523 # because not all systems understand e.g. LANG=C (notably SCO).
524 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
525 # Non-C LC_CTYPE values break the ctype check.
526 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
527 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
528 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
529 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
530
531 # confdefs.h avoids OS command line length limits that DEFS can exceed.
532 rm -rf conftest* confdefs.h
533 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
534 echo > confdefs.h
535
536 # A filename unique to this package, relative to the directory that
537 # configure is in, which we can look for to find out if srcdir is correct.
538 ac_unique_file=ncurses/base/lib_initscr.c
539
540 # Find the source files, if location was not specified.
541 if test -z "$srcdir"; then
542   ac_srcdir_defaulted=yes
543   # Try the directory containing this script, then its parent.
544   ac_prog=$0
545   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
546   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
547   srcdir=$ac_confdir
548   if test ! -r $srcdir/$ac_unique_file; then
549     srcdir=..
550   fi
551 else
552   ac_srcdir_defaulted=no
553 fi
554 if test ! -r $srcdir/$ac_unique_file; then
555   if test "$ac_srcdir_defaulted" = yes; then
556     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
557   else
558     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
559   fi
560 fi
561 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
562
563 # Prefer explicitly selected file to automatically selected ones.
564 if test -z "$CONFIG_SITE"; then
565   if test "x$prefix" != xNONE; then
566     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
567   else
568     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
569   fi
570 fi
571 for ac_site_file in $CONFIG_SITE; do
572   if test -r "$ac_site_file"; then
573     echo "loading site script $ac_site_file"
574     . "$ac_site_file"
575   fi
576 done
577
578 if test -r "$cache_file"; then
579   echo "loading cache $cache_file"
580   . $cache_file
581 else
582   echo "creating cache $cache_file"
583   > $cache_file
584 fi
585
586 ac_ext=c
587 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
588 ac_cpp='$CPP $CPPFLAGS'
589 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
590 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
591 cross_compiling=$ac_cv_prog_cc_cross
592
593 ac_exeext=
594 ac_objext=o
595 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
596   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
597   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
598     ac_n= ac_c='
599 ' ac_t='        '
600   else
601     ac_n=-n ac_c= ac_t=
602   fi
603 else
604   ac_n= ac_c='\c' ac_t=
605 fi
606
607
608
609
610
611 NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[  ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
612 NCURSES_MINOR="`egrep '^NCURSES_MINOR[  ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
613 NCURSES_PATCH="`egrep '^NCURSES_PATCH[  ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
614 cf_cv_abi_version=${NCURSES_MAJOR}
615 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
616 echo "$ac_t""Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version (`date`)" 1>&6
617
618
619
620
621
622
623
624
625 ac_aux_dir=
626 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
627   if test -f $ac_dir/install-sh; then
628     ac_aux_dir=$ac_dir
629     ac_install_sh="$ac_aux_dir/install-sh -c"
630     break
631   elif test -f $ac_dir/install.sh; then
632     ac_aux_dir=$ac_dir
633     ac_install_sh="$ac_aux_dir/install.sh -c"
634     break
635   fi
636 done
637 if test -z "$ac_aux_dir"; then
638   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
639 fi
640 ac_config_guess=$ac_aux_dir/config.guess
641 ac_config_sub=$ac_aux_dir/config.sub
642 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
643
644
645 if test -f $srcdir/config.guess ; then
646         
647 # Do some error checking and defaulting for the host and target type.
648 # The inputs are:
649 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
650 #
651 # The rules are:
652 # 1. You are not allowed to specify --host, --target, and nonopt at the
653 #    same time.
654 # 2. Host defaults to nonopt.
655 # 3. If nonopt is not specified, then host defaults to the current host,
656 #    as determined by config.guess.
657 # 4. Target and build default to nonopt.
658 # 5. If nonopt is not specified, then target and build default to host.
659
660 # The aliases save the names the user supplied, while $host etc.
661 # will get canonicalized.
662 case $host---$target---$nonopt in
663 NONE---*---* | *---NONE---* | *---*---NONE) ;;
664 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
665 esac
666
667
668 # Make sure we can run config.sub.
669 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
670 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
671 fi
672
673 echo $ac_n "checking host system type""... $ac_c" 1>&6
674 echo "configure:675: checking host system type" >&5
675
676 host_alias=$host
677 case "$host_alias" in
678 NONE)
679   case $nonopt in
680   NONE)
681     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
682     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
683     fi ;;
684   *) host_alias=$nonopt ;;
685   esac ;;
686 esac
687
688 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
689 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
690 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
691 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
692 echo "$ac_t""$host" 1>&6
693
694 echo $ac_n "checking target system type""... $ac_c" 1>&6
695 echo "configure:696: checking target system type" >&5
696
697 target_alias=$target
698 case "$target_alias" in
699 NONE)
700   case $nonopt in
701   NONE) target_alias=$host_alias ;;
702   *) target_alias=$nonopt ;;
703   esac ;;
704 esac
705
706 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
707 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
708 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
709 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
710 echo "$ac_t""$target" 1>&6
711
712 echo $ac_n "checking build system type""... $ac_c" 1>&6
713 echo "configure:714: checking build system type" >&5
714
715 build_alias=$build
716 case "$build_alias" in
717 NONE)
718   case $nonopt in
719   NONE) build_alias=$host_alias ;;
720   *) build_alias=$nonopt ;;
721   esac ;;
722 esac
723
724 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
725 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
726 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
727 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
728 echo "$ac_t""$build" 1>&6
729
730 test "$host_alias" != "$target_alias" &&
731   test "$program_prefix$program_suffix$program_transform_name" = \
732     NONENONEs,x,x, &&
733   program_prefix=${target_alias}-
734
735         system_name="$host_os"
736 else
737         system_name="`(uname -s -r) 2>/dev/null`"
738         if test -z "$system_name" ; then
739                 system_name="`(hostname) 2>/dev/null`"
740         fi
741 fi
742 test -n "$system_name" && cat >> confdefs.h <<EOF
743 #define SYSTEM_NAME "$system_name"
744 EOF
745
746 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
747   echo $ac_n "(cached) $ac_c" 1>&6
748 else
749   cf_cv_system_name="$system_name"
750 fi
751
752
753 test -z "$system_name" && system_name="$cf_cv_system_name"
754 test -n "$cf_cv_system_name" && echo "$ac_t"""Configuring for $cf_cv_system_name"" 1>&6
755
756 if test ".$system_name" != ".$cf_cv_system_name" ; then
757         echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
758         { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
759 fi
760
761
762 # Check whether --with-system-type or --without-system-type was given.
763 if test "${with_system_type+set}" = set; then
764   withval="$with_system_type"
765   echo "configure: warning: overriding system type to $withval" 1>&2
766  cf_cv_system_name=$withval
767 fi
768
769
770 # We need a configure script only when compiling as part of GNU C library.
771 # Here we have to generate one of the files we need while compiling.
772 #
773 # The only problem is that users of the package might think they have to
774 # run configure themself and find it irritating when nothing happens.
775 #
776 # So we try here to find out whether we are called from the glibc configure
777 # or by a user.
778 #
779
780 # Check whether --enable-add-ons or --disable-add-ons was given.
781 if test "${enable_add_ons+set}" = set; then
782   enableval="$enable_add_ons"
783   glibc_add_on=yes
784 else
785   glibc_add_on=
786 fi
787
788
789 if test x"$glibc_add_on" = "xyes" ; then
790   rm -f $srcdir/Banner
791   # We are in glibc.
792   rm -f $srcdir/Makefile
793   cp $srcdir/Makefile.glibc $srcdir/Makefile
794   echo "ncurses `grep \"^[      ]*ncurses-version[      ]*=.*$\" \
795                 $srcdir/Makefile | sed -e \
796                 's/^[   ]*ncurses-version[      ]*=[    ]*\([^  ^ ]*\)[         ]*$/\1/'`" > $srcdir/Banner
797   exit 0
798 fi
799
800 ###     Save the given $CFLAGS to allow user-override.
801 cf_user_CFLAGS="$CFLAGS"
802
803 ###     Default install-location
804
805 echo $ac_n "checking for prefix""... $ac_c" 1>&6
806 echo "configure:807: checking for prefix" >&5
807 if test "x$prefix" = "xNONE" ; then
808         case "$cf_cv_system_name" in
809                 # non-vendor systems don't have a conflict
810         openbsd*|netbsd*|freebsd*|linux*)
811                 prefix=/usr
812                 ;;
813         *)      prefix=$ac_default_prefix
814                 ;;
815         esac
816 fi
817 echo "$ac_t""$prefix" 1>&6
818
819 if test "x$prefix" = "xNONE" ; then
820 echo $ac_n "checking for default include-directory""... $ac_c" 1>&6
821 echo "configure:822: checking for default include-directory" >&5
822 test -n "$verbose" && echo 1>&6
823 for cf_symbol in \
824         $includedir \
825         $includedir/ncurses \
826         $prefix/include \
827         $prefix/include/ncurses \
828         /usr/local/include \
829         /usr/local/include/ncurses \
830         /usr/include \
831         /usr/include/ncurses
832 do
833         cf_dir=`eval echo $cf_symbol`
834         if test -f $cf_dir/curses.h ; then
835         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
836                 includedir="$cf_symbol"
837                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
838                 break
839         fi
840         fi
841         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
842 done
843 echo "$ac_t""$includedir" 1>&6
844 fi
845
846
847 ###     Checks for programs.
848 # Extract the first word of "gcc", so it can be a program name with args.
849 set dummy gcc; ac_word=$2
850 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
851 echo "configure:852: checking for $ac_word" >&5
852 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
853   echo $ac_n "(cached) $ac_c" 1>&6
854 else
855   if test -n "$CC"; then
856   ac_cv_prog_CC="$CC" # Let the user override the test.
857 else
858   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
859   ac_dummy="$PATH"
860   for ac_dir in $ac_dummy; do
861     test -z "$ac_dir" && ac_dir=.
862     if test -f $ac_dir/$ac_word; then
863       ac_cv_prog_CC="gcc"
864       break
865     fi
866   done
867   IFS="$ac_save_ifs"
868 fi
869 fi
870 CC="$ac_cv_prog_CC"
871 if test -n "$CC"; then
872   echo "$ac_t""$CC" 1>&6
873 else
874   echo "$ac_t""no" 1>&6
875 fi
876
877 if test -z "$CC"; then
878   # Extract the first word of "cc", so it can be a program name with args.
879 set dummy cc; ac_word=$2
880 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
881 echo "configure:882: checking for $ac_word" >&5
882 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
883   echo $ac_n "(cached) $ac_c" 1>&6
884 else
885   if test -n "$CC"; then
886   ac_cv_prog_CC="$CC" # Let the user override the test.
887 else
888   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
889   ac_prog_rejected=no
890   ac_dummy="$PATH"
891   for ac_dir in $ac_dummy; do
892     test -z "$ac_dir" && ac_dir=.
893     if test -f $ac_dir/$ac_word; then
894       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
895         ac_prog_rejected=yes
896         continue
897       fi
898       ac_cv_prog_CC="cc"
899       break
900     fi
901   done
902   IFS="$ac_save_ifs"
903 if test $ac_prog_rejected = yes; then
904   # We found a bogon in the path, so make sure we never use it.
905   set dummy $ac_cv_prog_CC
906   shift
907   if test $# -gt 0; then
908     # We chose a different compiler from the bogus one.
909     # However, it has the same basename, so the bogon will be chosen
910     # first if we set CC to just the basename; use the full file name.
911     shift
912     set dummy "$ac_dir/$ac_word" "$@"
913     shift
914     ac_cv_prog_CC="$@"
915   fi
916 fi
917 fi
918 fi
919 CC="$ac_cv_prog_CC"
920 if test -n "$CC"; then
921   echo "$ac_t""$CC" 1>&6
922 else
923   echo "$ac_t""no" 1>&6
924 fi
925
926   if test -z "$CC"; then
927     case "`uname -s`" in
928     *win32* | *WIN32*)
929       # Extract the first word of "cl", so it can be a program name with args.
930 set dummy cl; ac_word=$2
931 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
932 echo "configure:933: checking for $ac_word" >&5
933 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
934   echo $ac_n "(cached) $ac_c" 1>&6
935 else
936   if test -n "$CC"; then
937   ac_cv_prog_CC="$CC" # Let the user override the test.
938 else
939   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
940   ac_dummy="$PATH"
941   for ac_dir in $ac_dummy; do
942     test -z "$ac_dir" && ac_dir=.
943     if test -f $ac_dir/$ac_word; then
944       ac_cv_prog_CC="cl"
945       break
946     fi
947   done
948   IFS="$ac_save_ifs"
949 fi
950 fi
951 CC="$ac_cv_prog_CC"
952 if test -n "$CC"; then
953   echo "$ac_t""$CC" 1>&6
954 else
955   echo "$ac_t""no" 1>&6
956 fi
957  ;;
958     esac
959   fi
960   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
961 fi
962
963 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
964 echo "configure:965: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
965
966 ac_ext=c
967 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
968 ac_cpp='$CPP $CPPFLAGS'
969 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
970 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
971 cross_compiling=$ac_cv_prog_cc_cross
972
973 cat > conftest.$ac_ext << EOF
974
975 #line 976 "configure"
976 #include "confdefs.h"
977
978 main(){return(0);}
979 EOF
980 if { (eval echo configure:981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
981   ac_cv_prog_cc_works=yes
982   # If we can't run a trivial program, we are probably using a cross compiler.
983   if (./conftest; exit) 2>/dev/null; then
984     ac_cv_prog_cc_cross=no
985   else
986     ac_cv_prog_cc_cross=yes
987   fi
988 else
989   echo "configure: failed program was:" >&5
990   cat conftest.$ac_ext >&5
991   ac_cv_prog_cc_works=no
992 fi
993 rm -fr conftest*
994 ac_ext=c
995 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
996 ac_cpp='$CPP $CPPFLAGS'
997 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
998 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
999 cross_compiling=$ac_cv_prog_cc_cross
1000
1001 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1002 if test $ac_cv_prog_cc_works = no; then
1003   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1004 fi
1005 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1006 echo "configure:1007: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1007 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1008 cross_compiling=$ac_cv_prog_cc_cross
1009
1010 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1011 echo "configure:1012: checking whether we are using GNU C" >&5
1012 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1013   echo $ac_n "(cached) $ac_c" 1>&6
1014 else
1015   cat > conftest.c <<EOF
1016 #ifdef __GNUC__
1017   yes;
1018 #endif
1019 EOF
1020 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1021   ac_cv_prog_gcc=yes
1022 else
1023   ac_cv_prog_gcc=no
1024 fi
1025 fi
1026
1027 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1028
1029 if test $ac_cv_prog_gcc = yes; then
1030   GCC=yes
1031 else
1032   GCC=
1033 fi
1034
1035 ac_test_CFLAGS="${CFLAGS+set}"
1036 ac_save_CFLAGS="$CFLAGS"
1037 CFLAGS=
1038 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1039 echo "configure:1040: checking whether ${CC-cc} accepts -g" >&5
1040 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1041   echo $ac_n "(cached) $ac_c" 1>&6
1042 else
1043   echo 'void f(){}' > conftest.c
1044 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1045   ac_cv_prog_cc_g=yes
1046 else
1047   ac_cv_prog_cc_g=no
1048 fi
1049 rm -f conftest*
1050
1051 fi
1052
1053 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1054 if test "$ac_test_CFLAGS" = set; then
1055   CFLAGS="$ac_save_CFLAGS"
1056 elif test $ac_cv_prog_cc_g = yes; then
1057   if test "$GCC" = yes; then
1058     CFLAGS="-g -O2"
1059   else
1060     CFLAGS="-g"
1061   fi
1062 else
1063   if test "$GCC" = yes; then
1064     CFLAGS="-O2"
1065   else
1066     CFLAGS=
1067   fi
1068 fi
1069
1070 if test "$GCC" = yes ; then
1071         echo $ac_n "checking version of gcc""... $ac_c" 1>&6
1072 echo "configure:1073: checking version of gcc" >&5
1073         eval "$CC --version"
1074 fi
1075 if test "$host" != $build; then
1076         for ac_prog in $CC gcc cc
1077 do
1078 # Extract the first word of "$ac_prog", so it can be a program name with args.
1079 set dummy $ac_prog; ac_word=$2
1080 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1081 echo "configure:1082: checking for $ac_word" >&5
1082 if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
1083   echo $ac_n "(cached) $ac_c" 1>&6
1084 else
1085   if test -n "$BUILD_CC"; then
1086   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
1087 else
1088   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1089   ac_dummy="$PATH"
1090   for ac_dir in $ac_dummy; do
1091     test -z "$ac_dir" && ac_dir=.
1092     if test -f $ac_dir/$ac_word; then
1093       ac_cv_prog_BUILD_CC="$ac_prog"
1094       break
1095     fi
1096   done
1097   IFS="$ac_save_ifs"
1098 fi
1099 fi
1100 BUILD_CC="$ac_cv_prog_BUILD_CC"
1101 if test -n "$BUILD_CC"; then
1102   echo "$ac_t""$BUILD_CC" 1>&6
1103 else
1104   echo "$ac_t""no" 1>&6
1105 fi
1106
1107 test -n "$BUILD_CC" && break
1108 done
1109
1110 else
1111         BUILD_CC="$CC"
1112 fi
1113
1114 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1115 echo "configure:1116: checking how to run the C preprocessor" >&5
1116 # On Suns, sometimes $CPP names a directory.
1117 if test -n "$CPP" && test -d "$CPP"; then
1118   CPP=
1119 fi
1120 if test -z "$CPP"; then
1121 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1122   echo $ac_n "(cached) $ac_c" 1>&6
1123 else
1124     # This must be in double quotes, not single quotes, because CPP may get
1125   # substituted into the Makefile and "${CC-cc}" will confuse make.
1126   CPP="${CC-cc} -E"
1127   # On the NeXT, cc -E runs the code through the compiler's parser,
1128   # not just through cpp.
1129   cat > conftest.$ac_ext <<EOF
1130 #line 1131 "configure"
1131 #include "confdefs.h"
1132 #include <assert.h>
1133 Syntax Error
1134 EOF
1135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1136 { (eval echo configure:1137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1138 if test -z "$ac_err"; then
1139   :
1140 else
1141   echo "$ac_err" >&5
1142   echo "configure: failed program was:" >&5
1143   cat conftest.$ac_ext >&5
1144   rm -rf conftest*
1145   CPP="${CC-cc} -E -traditional-cpp"
1146   cat > conftest.$ac_ext <<EOF
1147 #line 1148 "configure"
1148 #include "confdefs.h"
1149 #include <assert.h>
1150 Syntax Error
1151 EOF
1152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1153 { (eval echo configure:1154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1155 if test -z "$ac_err"; then
1156   :
1157 else
1158   echo "$ac_err" >&5
1159   echo "configure: failed program was:" >&5
1160   cat conftest.$ac_ext >&5
1161   rm -rf conftest*
1162   CPP="${CC-cc} -nologo -E"
1163   cat > conftest.$ac_ext <<EOF
1164 #line 1165 "configure"
1165 #include "confdefs.h"
1166 #include <assert.h>
1167 Syntax Error
1168 EOF
1169 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1170 { (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1171 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1172 if test -z "$ac_err"; then
1173   :
1174 else
1175   echo "$ac_err" >&5
1176   echo "configure: failed program was:" >&5
1177   cat conftest.$ac_ext >&5
1178   rm -rf conftest*
1179   CPP=/lib/cpp
1180 fi
1181 rm -f conftest*
1182 fi
1183 rm -f conftest*
1184 fi
1185 rm -f conftest*
1186   ac_cv_prog_CPP="$CPP"
1187 fi
1188   CPP="$ac_cv_prog_CPP"
1189 else
1190   ac_cv_prog_CPP="$CPP"
1191 fi
1192 echo "$ac_t""$CPP" 1>&6
1193
1194 if test $ac_cv_prog_gcc = yes; then
1195     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1196 echo "configure:1197: checking whether ${CC-cc} needs -traditional" >&5
1197 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1198   echo $ac_n "(cached) $ac_c" 1>&6
1199 else
1200     ac_pattern="Autoconf.*'x'"
1201   cat > conftest.$ac_ext <<EOF
1202 #line 1203 "configure"
1203 #include "confdefs.h"
1204 #include <sgtty.h>
1205 Autoconf TIOCGETP
1206 EOF
1207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1208   egrep "$ac_pattern" >/dev/null 2>&1; then
1209   rm -rf conftest*
1210   ac_cv_prog_gcc_traditional=yes
1211 else
1212   rm -rf conftest*
1213   ac_cv_prog_gcc_traditional=no
1214 fi
1215 rm -f conftest*
1216
1217
1218   if test $ac_cv_prog_gcc_traditional = no; then
1219     cat > conftest.$ac_ext <<EOF
1220 #line 1221 "configure"
1221 #include "confdefs.h"
1222 #include <termio.h>
1223 Autoconf TCGETA
1224 EOF
1225 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1226   egrep "$ac_pattern" >/dev/null 2>&1; then
1227   rm -rf conftest*
1228   ac_cv_prog_gcc_traditional=yes
1229 fi
1230 rm -f conftest*
1231
1232   fi
1233 fi
1234
1235 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1236   if test $ac_cv_prog_gcc_traditional = yes; then
1237     CC="$CC -traditional"
1238   fi
1239 fi
1240
1241 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1242 echo "configure:1243: checking for POSIXized ISC" >&5
1243 if test -d /etc/conf/kconfig.d &&
1244   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1245 then
1246   echo "$ac_t""yes" 1>&6
1247   ISC=yes # If later tests want to check for ISC.
1248   cat >> confdefs.h <<\EOF
1249 #define _POSIX_SOURCE 1
1250 EOF
1251
1252   if test "$GCC" = yes; then
1253     CC="$CC -posix"
1254   else
1255     CC="$CC -Xp"
1256   fi
1257 else
1258   echo "$ac_t""no" 1>&6
1259   ISC=
1260 fi
1261
1262
1263 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1264 echo "configure:1265: checking for ${CC-cc} option to accept ANSI C" >&5
1265 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1266   echo $ac_n "(cached) $ac_c" 1>&6
1267 else
1268   
1269 cf_cv_ansi_cc=no
1270 cf_save_CFLAGS="$CFLAGS"
1271 # Don't try gcc -ansi; that turns off useful extensions and
1272 # breaks some systems' header files.
1273 # AIX                   -qlanglvl=ansi
1274 # Ultrix and OSF/1      -std1
1275 # HP-UX                 -Aa -D_HPUX_SOURCE
1276 # SVR4                  -Xc
1277 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
1278 for cf_arg in "-DCC_HAS_PROTOS" \
1279         "" \
1280         -qlanglvl=ansi \
1281         -std1 \
1282         -Ae \
1283         "-Aa -D_HPUX_SOURCE" \
1284         -Xc
1285 do
1286         CFLAGS="$cf_save_CFLAGS $cf_arg"
1287         cat > conftest.$ac_ext <<EOF
1288 #line 1289 "configure"
1289 #include "confdefs.h"
1290
1291 #ifndef CC_HAS_PROTOS
1292 #if !defined(__STDC__) || (__STDC__ != 1)
1293 choke me
1294 #endif
1295 #endif
1296
1297 int main() {
1298
1299         int test (int i, double x);
1300         struct s1 {int (*f) (int a);};
1301         struct s2 {int (*f) (double a);};
1302 ; return 0; }
1303 EOF
1304 if { (eval echo configure:1305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1305   rm -rf conftest*
1306   cf_cv_ansi_cc="$cf_arg"; break
1307 else
1308   echo "configure: failed program was:" >&5
1309   cat conftest.$ac_ext >&5
1310 fi
1311 rm -f conftest*
1312 done
1313 CFLAGS="$cf_save_CFLAGS"
1314
1315 fi
1316
1317 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1318
1319 if test "$cf_cv_ansi_cc" != "no"; then
1320 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1321         CFLAGS="$CFLAGS $cf_cv_ansi_cc"
1322 else
1323         cat >> confdefs.h <<\EOF
1324 #define CC_HAS_PROTOS 1
1325 EOF
1326
1327 fi
1328 fi
1329
1330
1331 if test "$cf_cv_ansi_cc" = "no"; then
1332         { echo "configure: error: Your compiler does not appear to recognize prototypes.
1333 You have the following choices:
1334         a. adjust your compiler options
1335         b. get an up-to-date compiler
1336         c. use a wrapper such as unproto" 1>&2; exit 1; }
1337 fi
1338
1339
1340
1341 PROG_EXT=
1342 case $cf_cv_system_name in
1343 os2*)
1344     # We make sure -Zexe is not used -- it would interfere with @PROG_EXT@
1345     CFLAGS="$CFLAGS -Zmt -D__ST_MT_ERRNO__"
1346     CXXFLAGS="$CXXFLAGS -Zmt -D__ST_MT_ERRNO__"
1347     LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"`
1348     PROG_EXT=".exe"
1349     ;;
1350 cygwin*)
1351     PROG_EXT=".exe"
1352     ;;
1353 esac
1354
1355
1356
1357 case "$cf_cv_system_name" in
1358 freebsd*) #(vi
1359   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
1360   ;;
1361 *) LDPATH=$PATH:/sbin:/usr/sbin
1362   # Extract the first word of "ldconfig", so it can be a program name with args.
1363 set dummy ldconfig; ac_word=$2
1364 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1365 echo "configure:1366: checking for $ac_word" >&5
1366 if eval "test \"`echo '$''{'ac_cv_path_LDCONFIG'+set}'`\" = set"; then
1367   echo $ac_n "(cached) $ac_c" 1>&6
1368 else
1369   case "$LDCONFIG" in
1370   /*)
1371   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
1372   ;;
1373   ?:/*)                  
1374   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a dos path.
1375   ;;
1376   *)
1377   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1378   ac_dummy="$LDPATH"
1379   for ac_dir in $ac_dummy; do 
1380     test -z "$ac_dir" && ac_dir=.
1381     if test -f $ac_dir/$ac_word; then
1382       ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
1383       break
1384     fi
1385   done
1386   IFS="$ac_save_ifs"
1387   ;;
1388 esac
1389 fi
1390 LDCONFIG="$ac_cv_path_LDCONFIG"
1391 if test -n "$LDCONFIG"; then
1392   echo "$ac_t""$LDCONFIG" 1>&6
1393 else
1394   echo "$ac_t""no" 1>&6
1395 fi
1396
1397   ;;
1398 esac
1399
1400
1401 echo $ac_n "checking if you want to ensure bool is consistent with C++""... $ac_c" 1>&6
1402 echo "configure:1403: checking if you want to ensure bool is consistent with C++" >&5
1403
1404 # Check whether --with-cxx or --without-cxx was given.
1405 if test "${with_cxx+set}" = set; then
1406   withval="$with_cxx"
1407   cf_with_cxx=$withval
1408 else
1409   cf_with_cxx=yes
1410 fi
1411
1412 echo "$ac_t""$cf_with_cxx" 1>&6
1413 if test "X$cf_with_cxx" = Xno ; then
1414         CXX=""
1415         GXX=""
1416 else
1417                 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1418 do
1419 # Extract the first word of "$ac_prog", so it can be a program name with args.
1420 set dummy $ac_prog; ac_word=$2
1421 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1422 echo "configure:1423: checking for $ac_word" >&5
1423 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1424   echo $ac_n "(cached) $ac_c" 1>&6
1425 else
1426   if test -n "$CXX"; then
1427   ac_cv_prog_CXX="$CXX" # Let the user override the test.
1428 else
1429   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1430   ac_dummy="$PATH"
1431   for ac_dir in $ac_dummy; do
1432     test -z "$ac_dir" && ac_dir=.
1433     if test -f $ac_dir/$ac_word; then
1434       ac_cv_prog_CXX="$ac_prog"
1435       break
1436     fi
1437   done
1438   IFS="$ac_save_ifs"
1439 fi
1440 fi
1441 CXX="$ac_cv_prog_CXX"
1442 if test -n "$CXX"; then
1443   echo "$ac_t""$CXX" 1>&6
1444 else
1445   echo "$ac_t""no" 1>&6
1446 fi
1447
1448 test -n "$CXX" && break
1449 done
1450 test -n "$CXX" || CXX="gcc"
1451
1452
1453 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1454 echo "configure:1455: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1455
1456 ac_ext=C
1457 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1458 ac_cpp='$CXXCPP $CPPFLAGS'
1459 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1460 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1461 cross_compiling=$ac_cv_prog_cxx_cross
1462
1463 cat > conftest.$ac_ext << EOF
1464
1465 #line 1466 "configure"
1466 #include "confdefs.h"
1467
1468 int main(){return(0);}
1469 EOF
1470 if { (eval echo configure:1471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1471   ac_cv_prog_cxx_works=yes
1472   # If we can't run a trivial program, we are probably using a cross compiler.
1473   if (./conftest; exit) 2>/dev/null; then
1474     ac_cv_prog_cxx_cross=no
1475   else
1476     ac_cv_prog_cxx_cross=yes
1477   fi
1478 else
1479   echo "configure: failed program was:" >&5
1480   cat conftest.$ac_ext >&5
1481   ac_cv_prog_cxx_works=no
1482 fi
1483 rm -fr conftest*
1484 ac_ext=c
1485 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1486 ac_cpp='$CPP $CPPFLAGS'
1487 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1488 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1489 cross_compiling=$ac_cv_prog_cc_cross
1490
1491 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1492 if test $ac_cv_prog_cxx_works = no; then
1493   echo "$ac_t""You don't have any C++ compiler, too bad" 1>&6;          cf_with_cxx=no; CXX=""; GXX="";
1494 fi
1495 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1496 echo "configure:1497: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1497 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1498 cross_compiling=$ac_cv_prog_cxx_cross
1499
1500 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1501 echo "configure:1502: checking whether we are using GNU C++" >&5
1502 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1503   echo $ac_n "(cached) $ac_c" 1>&6
1504 else
1505   cat > conftest.C <<EOF
1506 #ifdef __GNUC__
1507   yes;
1508 #endif
1509 EOF
1510 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1511   ac_cv_prog_gxx=yes
1512 else
1513   ac_cv_prog_gxx=no
1514 fi
1515 fi
1516
1517 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1518
1519 if test $ac_cv_prog_gxx = yes; then
1520   GXX=yes
1521 else
1522   GXX=
1523 fi
1524
1525 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1526 ac_save_CXXFLAGS="$CXXFLAGS"
1527 CXXFLAGS=
1528 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1529 echo "configure:1530: checking whether ${CXX-g++} accepts -g" >&5
1530 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1531   echo $ac_n "(cached) $ac_c" 1>&6
1532 else
1533   echo 'void f(){}' > conftest.cc
1534 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1535   ac_cv_prog_cxx_g=yes
1536 else
1537   ac_cv_prog_cxx_g=no
1538 fi
1539 rm -f conftest*
1540
1541 fi
1542
1543 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1544 if test "$ac_test_CXXFLAGS" = set; then
1545   CXXFLAGS="$ac_save_CXXFLAGS"
1546 elif test $ac_cv_prog_cxx_g = yes; then
1547   if test "$GXX" = yes; then
1548     CXXFLAGS="-g -O2"
1549   else
1550     CXXFLAGS="-g"
1551   fi
1552 else
1553   if test "$GXX" = yes; then
1554     CXXFLAGS="-O2"
1555   else
1556     CXXFLAGS=
1557   fi
1558 fi
1559
1560         fi
1561
1562 if test "$GXX" = yes; then
1563         case "`${CXX-g++} --version`" in
1564         1*|2.[0-6]*)
1565                 GXX=""; CXX=""; ac_cv_prog_gxx=no
1566                 cf_cxx_library=no
1567                 echo No: templates do not work
1568                 ;;
1569         esac
1570 fi
1571
1572 echo $ac_n "checking if you want to build C++ binding and demo""... $ac_c" 1>&6
1573 echo "configure:1574: checking if you want to build C++ binding and demo" >&5
1574
1575 # Check whether --with-cxx-binding or --without-cxx-binding was given.
1576 if test "${with_cxx_binding+set}" = set; then
1577   withval="$with_cxx_binding"
1578   cf_with_cxx_binding=$withval
1579 else
1580   cf_with_cxx_binding=$cf_with_cxx
1581 fi
1582
1583 echo "$ac_t""$cf_with_cxx_binding" 1>&6
1584
1585 echo $ac_n "checking if you want to build with Ada95""... $ac_c" 1>&6
1586 echo "configure:1587: checking if you want to build with Ada95" >&5
1587
1588 # Check whether --with-ada or --without-ada was given.
1589 if test "${with_ada+set}" = set; then
1590   withval="$with_ada"
1591   cf_with_ada=$withval
1592 else
1593   cf_with_ada=yes
1594 fi
1595
1596 echo "$ac_t""$cf_with_ada" 1>&6
1597
1598 echo $ac_n "checking if you want to build programs such as tic""... $ac_c" 1>&6
1599 echo "configure:1600: checking if you want to build programs such as tic" >&5
1600
1601 # Check whether --with-progs or --without-progs was given.
1602 if test "${with_progs+set}" = set; then
1603   withval="$with_progs"
1604   cf_with_progs=$withval
1605 else
1606   cf_with_progs=yes
1607 fi
1608
1609 echo "$ac_t""$cf_with_progs" 1>&6
1610
1611 echo $ac_n "checking if you wish to install curses.h""... $ac_c" 1>&6
1612 echo "configure:1613: checking if you wish to install curses.h" >&5
1613
1614 # Check whether --with-curses-h or --without-curses-h was given.
1615 if test "${with_curses_h+set}" = set; then
1616   withval="$with_curses_h"
1617   with_curses_h=$withval
1618 else
1619   with_curses_h=yes
1620 fi
1621
1622 echo "$ac_t""$with_curses_h" 1>&6
1623
1624 modules_to_build="ncurses"
1625 if test "X$cf_with_progs" != Xno ; then
1626 modules_to_build="$modules_to_build progs tack"
1627 fi
1628 modules_to_build="$modules_to_build panel menu form"
1629
1630 if test "$program_transform_name" = s,x,x,; then
1631   program_transform_name=
1632 else
1633   # Double any \ or $.  echo might interpret backslashes.
1634   cat <<\EOF_SED > conftestsed
1635 s,\\,\\\\,g; s,\$,$$,g
1636 EOF_SED
1637   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1638   rm -f conftestsed
1639 fi
1640 test "$program_prefix" != NONE &&
1641   program_transform_name="s,^,${program_prefix},; $program_transform_name"
1642 # Use a double $ so make ignores it.
1643 test "$program_suffix" != NONE &&
1644   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1645
1646 # sed with no file args requires a program.
1647 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1648
1649 for ac_prog in mawk gawk nawk awk
1650 do
1651 # Extract the first word of "$ac_prog", so it can be a program name with args.
1652 set dummy $ac_prog; ac_word=$2
1653 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1654 echo "configure:1655: checking for $ac_word" >&5
1655 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1656   echo $ac_n "(cached) $ac_c" 1>&6
1657 else
1658   if test -n "$AWK"; then
1659   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1660 else
1661   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1662   ac_dummy="$PATH"
1663   for ac_dir in $ac_dummy; do
1664     test -z "$ac_dir" && ac_dir=.
1665     if test -f $ac_dir/$ac_word; then
1666       ac_cv_prog_AWK="$ac_prog"
1667       break
1668     fi
1669   done
1670   IFS="$ac_save_ifs"
1671 fi
1672 fi
1673 AWK="$ac_cv_prog_AWK"
1674 if test -n "$AWK"; then
1675   echo "$ac_t""$AWK" 1>&6
1676 else
1677   echo "$ac_t""no" 1>&6
1678 fi
1679
1680 test -n "$AWK" && break
1681 done
1682
1683 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1684 echo "configure:1685: checking whether ${MAKE-make} sets \${MAKE}" >&5
1685 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1686 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1687   echo $ac_n "(cached) $ac_c" 1>&6
1688 else
1689   cat > conftestmake <<\EOF
1690 all:
1691         @echo 'ac_maketemp="${MAKE}"'
1692 EOF
1693 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1694 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1695 if test -n "$ac_maketemp"; then
1696   eval ac_cv_prog_make_${ac_make}_set=yes
1697 else
1698   eval ac_cv_prog_make_${ac_make}_set=no
1699 fi
1700 rm -f conftestmake
1701 fi
1702 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1703   echo "$ac_t""yes" 1>&6
1704   SET_MAKE=
1705 else
1706   echo "$ac_t""no" 1>&6
1707   SET_MAKE="MAKE=${MAKE-make}"
1708 fi
1709
1710 # Find a good install program.  We prefer a C program (faster),
1711 # so one script is as good as another.  But avoid the broken or
1712 # incompatible versions:
1713 # SysV /etc/install, /usr/sbin/install
1714 # SunOS /usr/etc/install
1715 # IRIX /sbin/install
1716 # AIX /bin/install
1717 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1718 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1719 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1720 # ./install, which can be erroneously created by make from ./install.sh.
1721 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1722 echo "configure:1723: checking for a BSD compatible install" >&5
1723 if test -z "$INSTALL"; then
1724 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1725   echo $ac_n "(cached) $ac_c" 1>&6
1726 else
1727     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1728   for ac_dir in $PATH; do
1729     # Account for people who put trailing slashes in PATH elements.
1730     case "$ac_dir/" in
1731     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1732     *)
1733       # OSF1 and SCO ODT 3.0 have their own names for install.
1734       # Don't use installbsd from OSF since it installs stuff as root
1735       # by default.
1736       for ac_prog in ginstall scoinst install; do
1737         if test -f $ac_dir/$ac_prog; then
1738           if test $ac_prog = install &&
1739             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1740             # AIX install.  It has an incompatible calling convention.
1741             :
1742           else
1743             ac_cv_path_install="$ac_dir/$ac_prog -c"
1744             break 2
1745           fi
1746         fi
1747       done
1748       ;;
1749     esac
1750   done
1751   IFS="$ac_save_IFS"
1752
1753 fi
1754   if test "${ac_cv_path_install+set}" = set; then
1755     INSTALL="$ac_cv_path_install"
1756   else
1757     # As a last resort, use the slow shell script.  We don't cache a
1758     # path for INSTALL within a source directory, because that will
1759     # break other packages using the cache if that directory is
1760     # removed, or if the path is relative.
1761     INSTALL="$ac_install_sh"
1762   fi
1763 fi
1764 echo "$ac_t""$INSTALL" 1>&6
1765
1766 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1767 # It thinks the first close brace ends the variable substitution.
1768 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1769
1770 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1771
1772 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1773
1774 case $INSTALL in
1775 /*)
1776   ;;
1777 *)
1778   cf_dir=`echo $INSTALL|sed -e 's%/[^/]*$%%'`
1779   test -z "$cf_dir" && cf_dir=.
1780   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's:^.*/::'`
1781   ;;
1782 esac
1783
1784 echo $ac_n "checking for long file names""... $ac_c" 1>&6
1785 echo "configure:1786: checking for long file names" >&5
1786 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
1787   echo $ac_n "(cached) $ac_c" 1>&6
1788 else
1789   ac_cv_sys_long_file_names=yes
1790 # Test for long file names in all the places we know might matter:
1791 #      .                the current directory, where building will happen
1792 #      $prefix/lib      where we will be installing things
1793 #      $exec_prefix/lib likewise
1794 # eval it to expand exec_prefix.
1795 #      $TMPDIR          if set, where it might want to write temporary files
1796 # if $TMPDIR is not set:
1797 #      /tmp             where it might want to write temporary files
1798 #      /var/tmp         likewise
1799 #      /usr/tmp         likewise
1800 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
1801   ac_tmpdirs="$TMPDIR"
1802 else
1803   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
1804 fi
1805 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
1806   test -d $ac_dir || continue
1807   test -w $ac_dir || continue # It is less confusing to not echo anything here.
1808   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
1809   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
1810   val=`cat $ac_dir/conftest9012345 2>/dev/null`
1811   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
1812     ac_cv_sys_long_file_names=no
1813     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
1814     break
1815   fi
1816   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
1817 done
1818 fi
1819
1820 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
1821 if test $ac_cv_sys_long_file_names = yes; then
1822   cat >> confdefs.h <<\EOF
1823 #define HAVE_LONG_FILE_NAMES 1
1824 EOF
1825
1826 fi
1827
1828
1829 echo $ac_n "checking if filesystem supports mixed-case filenames""... $ac_c" 1>&6
1830 echo "configure:1831: checking if filesystem supports mixed-case filenames" >&5
1831 if eval "test \"`echo '$''{'cf_cv_mixedcase'+set}'`\" = set"; then
1832   echo $ac_n "(cached) $ac_c" 1>&6
1833 else
1834   
1835         rm -f conftest CONFTEST
1836         echo test >conftest
1837         if test -f CONFTEST ; then
1838                 cf_cv_mixedcase=no
1839         else
1840                 cf_cv_mixedcase=yes
1841         fi
1842         rm -f conftest CONFTEST
1843
1844 fi
1845
1846 echo "$ac_t""$cf_cv_mixedcase" 1>&6
1847 test "$cf_cv_mixedcase" = yes && cat >> confdefs.h <<\EOF
1848 #define MIXEDCASE_FILENAMES 1
1849 EOF
1850
1851
1852 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1853 echo "configure:1854: checking whether ln -s works" >&5
1854 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1855   echo $ac_n "(cached) $ac_c" 1>&6
1856 else
1857   rm -f conftestdata
1858 if ln -s X conftestdata 2>/dev/null
1859 then
1860   rm -f conftestdata
1861   ac_cv_prog_LN_S="ln -s"
1862 else
1863   ac_cv_prog_LN_S=ln
1864 fi
1865 fi
1866 LN_S="$ac_cv_prog_LN_S"
1867 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1868   echo "$ac_t""yes" 1>&6
1869 else
1870   echo "$ac_t""no" 1>&6
1871 fi
1872
1873 # Extract the first word of "ranlib", so it can be a program name with args.
1874 set dummy ranlib; ac_word=$2
1875 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1876 echo "configure:1877: checking for $ac_word" >&5
1877 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1878   echo $ac_n "(cached) $ac_c" 1>&6
1879 else
1880   if test -n "$RANLIB"; then
1881   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1882 else
1883   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1884   ac_dummy="$PATH"
1885   for ac_dir in $ac_dummy; do
1886     test -z "$ac_dir" && ac_dir=.
1887     if test -f $ac_dir/$ac_word; then
1888       ac_cv_prog_RANLIB="ranlib"
1889       break
1890     fi
1891   done
1892   IFS="$ac_save_ifs"
1893   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1894 fi
1895 fi
1896 RANLIB="$ac_cv_prog_RANLIB"
1897 if test -n "$RANLIB"; then
1898   echo "$ac_t""$RANLIB" 1>&6
1899 else
1900   echo "$ac_t""no" 1>&6
1901 fi
1902
1903
1904
1905 # Extract the first word of "ctags", so it can be a program name with args.
1906 set dummy ctags; ac_word=$2
1907 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1908 echo "configure:1909: checking for $ac_word" >&5
1909 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_LOWER_TAGS'+set}'`\" = set"; then
1910   echo $ac_n "(cached) $ac_c" 1>&6
1911 else
1912   if test -n "$MAKE_LOWER_TAGS"; then
1913   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
1914 else
1915   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1916   ac_dummy="$PATH"
1917   for ac_dir in $ac_dummy; do
1918     test -z "$ac_dir" && ac_dir=.
1919     if test -f $ac_dir/$ac_word; then
1920       ac_cv_prog_MAKE_LOWER_TAGS="yes"
1921       break
1922     fi
1923   done
1924   IFS="$ac_save_ifs"
1925   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
1926 fi
1927 fi
1928 MAKE_LOWER_TAGS="$ac_cv_prog_MAKE_LOWER_TAGS"
1929 if test -n "$MAKE_LOWER_TAGS"; then
1930   echo "$ac_t""$MAKE_LOWER_TAGS" 1>&6
1931 else
1932   echo "$ac_t""no" 1>&6
1933 fi
1934
1935
1936 if test "$cf_cv_mixedcase" = yes ; then
1937         # Extract the first word of "etags", so it can be a program name with args.
1938 set dummy etags; ac_word=$2
1939 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1940 echo "configure:1941: checking for $ac_word" >&5
1941 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_UPPER_TAGS'+set}'`\" = set"; then
1942   echo $ac_n "(cached) $ac_c" 1>&6
1943 else
1944   if test -n "$MAKE_UPPER_TAGS"; then
1945   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
1946 else
1947   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1948   ac_dummy="$PATH"
1949   for ac_dir in $ac_dummy; do
1950     test -z "$ac_dir" && ac_dir=.
1951     if test -f $ac_dir/$ac_word; then
1952       ac_cv_prog_MAKE_UPPER_TAGS="yes"
1953       break
1954     fi
1955   done
1956   IFS="$ac_save_ifs"
1957   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
1958 fi
1959 fi
1960 MAKE_UPPER_TAGS="$ac_cv_prog_MAKE_UPPER_TAGS"
1961 if test -n "$MAKE_UPPER_TAGS"; then
1962   echo "$ac_t""$MAKE_UPPER_TAGS" 1>&6
1963 else
1964   echo "$ac_t""no" 1>&6
1965 fi
1966
1967 else
1968         MAKE_UPPER_TAGS=no
1969 fi
1970
1971 if test "$MAKE_UPPER_TAGS" = yes ; then
1972         MAKE_UPPER_TAGS=
1973 else
1974         MAKE_UPPER_TAGS="#"
1975 fi
1976
1977
1978 if test "$MAKE_LOWER_TAGS" = yes ; then
1979         MAKE_LOWER_TAGS=
1980 else
1981         MAKE_LOWER_TAGS="#"
1982 fi
1983
1984
1985 for ac_prog in tdlint lint alint
1986 do
1987 # Extract the first word of "$ac_prog", so it can be a program name with args.
1988 set dummy $ac_prog; ac_word=$2
1989 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1990 echo "configure:1991: checking for $ac_word" >&5
1991 if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then
1992   echo $ac_n "(cached) $ac_c" 1>&6
1993 else
1994   if test -n "$LINT"; then
1995   ac_cv_prog_LINT="$LINT" # Let the user override the test.
1996 else
1997   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1998   ac_dummy="$PATH"
1999   for ac_dir in $ac_dummy; do
2000     test -z "$ac_dir" && ac_dir=.
2001     if test -f $ac_dir/$ac_word; then
2002       ac_cv_prog_LINT="$ac_prog"
2003       break
2004     fi
2005   done
2006   IFS="$ac_save_ifs"
2007 fi
2008 fi
2009 LINT="$ac_cv_prog_LINT"
2010 if test -n "$LINT"; then
2011   echo "$ac_t""$LINT" 1>&6
2012 else
2013   echo "$ac_t""no" 1>&6
2014 fi
2015
2016 test -n "$LINT" && break
2017 done
2018
2019 for ac_prog in man man_db
2020 do
2021 # Extract the first word of "$ac_prog", so it can be a program name with args.
2022 set dummy $ac_prog; ac_word=$2
2023 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2024 echo "configure:2025: checking for $ac_word" >&5
2025 if eval "test \"`echo '$''{'ac_cv_prog_MAN'+set}'`\" = set"; then
2026   echo $ac_n "(cached) $ac_c" 1>&6
2027 else
2028   if test -n "$MAN"; then
2029   ac_cv_prog_MAN="$MAN" # Let the user override the test.
2030 else
2031   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2032   ac_dummy="$PATH"
2033   for ac_dir in $ac_dummy; do
2034     test -z "$ac_dir" && ac_dir=.
2035     if test -f $ac_dir/$ac_word; then
2036       ac_cv_prog_MAN="$ac_prog"
2037       break
2038     fi
2039   done
2040   IFS="$ac_save_ifs"
2041 fi
2042 fi
2043 MAN="$ac_cv_prog_MAN"
2044 if test -n "$MAN"; then
2045   echo "$ac_t""$MAN" 1>&6
2046 else
2047   echo "$ac_t""no" 1>&6
2048 fi
2049
2050 test -n "$MAN" && break
2051 done
2052
2053
2054
2055 if eval "test \"`echo '$''{'cf_cv_subst_LD'+set}'`\" = set"; then
2056   echo $ac_n "(cached) $ac_c" 1>&6
2057 else
2058   
2059 echo $ac_n "checking for loader (symbol LD)""... $ac_c" 1>&6
2060 echo "configure:2061: checking for loader (symbol LD)" >&5
2061 test -z "$LD" && LD=ld
2062 echo "$ac_t""$LD" 1>&6
2063
2064 cf_cv_subst_LD=$LD
2065 fi
2066
2067 LD=${cf_cv_subst_LD}
2068
2069 if eval "test \"`echo '$''{'cf_cv_subst_AR'+set}'`\" = set"; then
2070   echo $ac_n "(cached) $ac_c" 1>&6
2071 else
2072   
2073 echo $ac_n "checking for archiver (symbol AR)""... $ac_c" 1>&6
2074 echo "configure:2075: checking for archiver (symbol AR)" >&5
2075 test -z "$AR" && AR=ar
2076 echo "$ac_t""$AR" 1>&6
2077
2078 cf_cv_subst_AR=$AR
2079 fi
2080
2081 AR=${cf_cv_subst_AR}
2082
2083 if eval "test \"`echo '$''{'cf_cv_subst_AR_OPTS'+set}'`\" = set"; then
2084   echo $ac_n "(cached) $ac_c" 1>&6
2085 else
2086   
2087 echo $ac_n "checking for archiver options (symbol AR_OPTS)""... $ac_c" 1>&6
2088 echo "configure:2089: checking for archiver options (symbol AR_OPTS)" >&5
2089 test -z "$AR_OPTS" && AR_OPTS=rv
2090 echo "$ac_t""$AR_OPTS" 1>&6
2091
2092 cf_cv_subst_AR_OPTS=$AR_OPTS
2093 fi
2094
2095 AR_OPTS=${cf_cv_subst_AR_OPTS}
2096
2097
2098
2099 echo $ac_n "checking for makeflags variable""... $ac_c" 1>&6
2100 echo "configure:2101: checking for makeflags variable" >&5
2101 if eval "test \"`echo '$''{'cf_cv_makeflags'+set}'`\" = set"; then
2102   echo $ac_n "(cached) $ac_c" 1>&6
2103 else
2104   
2105         cf_cv_makeflags=''
2106         for cf_option in '-$(MAKEFLAGS)' '$(MFLAGS)'
2107         do
2108                 cat >cf_makeflags.tmp <<CF_EOF
2109 all :
2110         @ echo '.$cf_option'
2111 CF_EOF
2112                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null`
2113                 case "$cf_result" in
2114                 .*k)
2115                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2116                         case "$cf_result" in
2117                         .*CC=*) cf_cv_makeflags=
2118                                 ;;
2119                         *)      cf_cv_makeflags=$cf_option
2120                                 ;;
2121                         esac
2122                         break
2123                         ;;
2124                 *)      echo no match "$cf_result"
2125                         ;;
2126                 esac
2127         done
2128         rm -f cf_makeflags.tmp
2129 fi
2130
2131 echo "$ac_t""$cf_cv_makeflags" 1>&6
2132
2133
2134
2135 echo $ac_n "checking if you have specified an install-prefix""... $ac_c" 1>&6
2136 echo "configure:2137: checking if you have specified an install-prefix" >&5
2137
2138 # Check whether --with-install-prefix or --without-install-prefix was given.
2139 if test "${with_install_prefix+set}" = set; then
2140   withval="$with_install_prefix"
2141   case "$withval" in #(vi
2142         yes|no) #(vi
2143                 ;;
2144         *)      DESTDIR="$withval"
2145                 ;;
2146         esac
2147 fi
2148
2149 echo "$ac_t""$DESTDIR" 1>&6
2150
2151
2152 ###############################################################################
2153
2154
2155 ### Options to allow the user to specify the set of libraries which are used.
2156 ### Use "--without-normal --with-shared" to allow the default model to be
2157 ### shared, for example.
2158 cf_list_models=""
2159
2160 echo $ac_n "checking if you want to build libraries with libtool""... $ac_c" 1>&6
2161 echo "configure:2162: checking if you want to build libraries with libtool" >&5
2162
2163 # Check whether --with-libtool or --without-libtool was given.
2164 if test "${with_libtool+set}" = set; then
2165   withval="$with_libtool"
2166   with_libtool=$withval
2167 else
2168   with_libtool=no
2169 fi
2170
2171 echo "$ac_t""$with_libtool" 1>&6
2172 if test "$with_libtool" = "yes"; then
2173         cf_list_models="$cf_list_models libtool"
2174         test -z "$LIBTOOL" && LIBTOOL=libtool
2175 else
2176         LIBTOOL=""
2177 fi
2178
2179
2180 echo $ac_n "checking if you want to build shared libraries""... $ac_c" 1>&6
2181 echo "configure:2182: checking if you want to build shared libraries" >&5
2182
2183 # Check whether --with-shared or --without-shared was given.
2184 if test "${with_shared+set}" = set; then
2185   withval="$with_shared"
2186   with_shared=$withval
2187 else
2188   with_shared=no
2189 fi
2190
2191 echo "$ac_t""$with_shared" 1>&6
2192 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
2193
2194 echo $ac_n "checking if you want to build static libraries""... $ac_c" 1>&6
2195 echo "configure:2196: checking if you want to build static libraries" >&5
2196
2197 # Check whether --with-normal or --without-normal was given.
2198 if test "${with_normal+set}" = set; then
2199   withval="$with_normal"
2200   with_normal=$withval
2201 else
2202   with_normal=yes
2203 fi
2204
2205 echo "$ac_t""$with_normal" 1>&6
2206 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
2207
2208 echo $ac_n "checking if you want to build debug libraries""... $ac_c" 1>&6
2209 echo "configure:2210: checking if you want to build debug libraries" >&5
2210
2211 # Check whether --with-debug or --without-debug was given.
2212 if test "${with_debug+set}" = set; then
2213   withval="$with_debug"
2214   with_debug=$withval
2215 else
2216   with_debug=yes
2217 fi
2218
2219 echo "$ac_t""$with_debug" 1>&6
2220 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
2221
2222 echo $ac_n "checking if you want to build profiling libraries""... $ac_c" 1>&6
2223 echo "configure:2224: checking if you want to build profiling libraries" >&5
2224
2225 # Check whether --with-profile or --without-profile was given.
2226 if test "${with_profile+set}" = set; then
2227   withval="$with_profile"
2228   with_profile=$withval
2229 else
2230   with_profile=no
2231 fi
2232
2233 echo "$ac_t""$with_profile" 1>&6
2234 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
2235
2236 ###############################################################################
2237
2238 echo $ac_n "checking for specified models""... $ac_c" 1>&6
2239 echo "configure:2240: checking for specified models" >&5
2240 test -z "$cf_list_models" && cf_list_models=normal
2241 test "$with_libtool" = "yes" && cf_list_models=libtool
2242 echo "$ac_t""$cf_list_models" 1>&6
2243
2244 ### Use the first model as the default, and save its suffix for use in building
2245 ### up test-applications.
2246 echo $ac_n "checking for default model""... $ac_c" 1>&6
2247 echo "configure:2248: checking for default model" >&5
2248 DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'`
2249 echo "$ac_t""$DFT_LWR_MODEL" 1>&6
2250
2251
2252 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2253
2254
2255 TINFO_NAME=tinfo
2256
2257
2258 LIB_NAME=ncurses
2259
2260
2261 LIB_DIR=../lib
2262
2263         case $cf_cv_system_name in
2264         os2)    LIB_PREFIX=''     ;;
2265         *)      LIB_PREFIX='lib'  ;;
2266         esac
2267 cf_prefix=$LIB_PREFIX
2268         
2269
2270 LIB_PREFIX=$cf_prefix
2271
2272
2273 LIB_SUFFIX=
2274
2275
2276 ###############################################################################
2277
2278 echo $ac_n "checking if you want to build a separate terminfo library""... $ac_c" 1>&6
2279 echo "configure:2280: checking if you want to build a separate terminfo library" >&5
2280
2281 # Check whether --with-termlib or --without-termlib was given.
2282 if test "${with_termlib+set}" = set; then
2283   withval="$with_termlib"
2284   with_termlib=$withval
2285 else
2286   with_termlib=no
2287 fi
2288
2289 echo "$ac_t""$with_termlib" 1>&6
2290
2291 ### Checks for special libraries, must be done up-front.
2292 echo $ac_n "checking if you want to link with dbmalloc for testing""... $ac_c" 1>&6
2293 echo "configure:2294: checking if you want to link with dbmalloc for testing" >&5
2294
2295 # Check whether --with-dbmalloc or --without-dbmalloc was given.
2296 if test "${with_dbmalloc+set}" = set; then
2297   withval="$with_dbmalloc"
2298   with_dbmalloc=$withval
2299 else
2300   with_dbmalloc=no
2301 fi
2302
2303 echo "$ac_t""$with_dbmalloc" 1>&6
2304 if test "$with_dbmalloc" = yes ; then
2305         echo $ac_n "checking for debug_malloc in -ldbmalloc""... $ac_c" 1>&6
2306 echo "configure:2307: checking for debug_malloc in -ldbmalloc" >&5
2307 ac_lib_var=`echo dbmalloc'_'debug_malloc | sed 'y%./+-%__p_%'`
2308 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2309   echo $ac_n "(cached) $ac_c" 1>&6
2310 else
2311   ac_save_LIBS="$LIBS"
2312 LIBS="-ldbmalloc  $LIBS"
2313 cat > conftest.$ac_ext <<EOF
2314 #line 2315 "configure"
2315 #include "confdefs.h"
2316 /* Override any gcc2 internal prototype to avoid an error.  */
2317 /* We use char because int might match the return type of a gcc2
2318     builtin and then its argument prototype would still apply.  */
2319 char debug_malloc();
2320
2321 int main() {
2322 debug_malloc()
2323 ; return 0; }
2324 EOF
2325 if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2326   rm -rf conftest*
2327   eval "ac_cv_lib_$ac_lib_var=yes"
2328 else
2329   echo "configure: failed program was:" >&5
2330   cat conftest.$ac_ext >&5
2331   rm -rf conftest*
2332   eval "ac_cv_lib_$ac_lib_var=no"
2333 fi
2334 rm -f conftest*
2335 LIBS="$ac_save_LIBS"
2336
2337 fi
2338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2339   echo "$ac_t""yes" 1>&6
2340     ac_tr_lib=HAVE_LIB`echo dbmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2341     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2342   cat >> confdefs.h <<EOF
2343 #define $ac_tr_lib 1
2344 EOF
2345
2346   LIBS="-ldbmalloc $LIBS"
2347
2348 else
2349   echo "$ac_t""no" 1>&6
2350 fi
2351
2352 fi
2353
2354 echo $ac_n "checking if you want to link with dmalloc for testing""... $ac_c" 1>&6
2355 echo "configure:2356: checking if you want to link with dmalloc for testing" >&5
2356
2357 # Check whether --with-dmalloc or --without-dmalloc was given.
2358 if test "${with_dmalloc+set}" = set; then
2359   withval="$with_dmalloc"
2360   with_dmalloc=$withval
2361 else
2362   with_dmalloc=no
2363 fi
2364
2365 echo "$ac_t""$with_dmalloc" 1>&6
2366 if test "$with_dmalloc" = yes ; then
2367         echo $ac_n "checking for dmalloc_debug in -ldmalloc""... $ac_c" 1>&6
2368 echo "configure:2369: checking for dmalloc_debug in -ldmalloc" >&5
2369 ac_lib_var=`echo dmalloc'_'dmalloc_debug | sed 'y%./+-%__p_%'`
2370 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2371   echo $ac_n "(cached) $ac_c" 1>&6
2372 else
2373   ac_save_LIBS="$LIBS"
2374 LIBS="-ldmalloc  $LIBS"
2375 cat > conftest.$ac_ext <<EOF
2376 #line 2377 "configure"
2377 #include "confdefs.h"
2378 /* Override any gcc2 internal prototype to avoid an error.  */
2379 /* We use char because int might match the return type of a gcc2
2380     builtin and then its argument prototype would still apply.  */
2381 char dmalloc_debug();
2382
2383 int main() {
2384 dmalloc_debug()
2385 ; return 0; }
2386 EOF
2387 if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2388   rm -rf conftest*
2389   eval "ac_cv_lib_$ac_lib_var=yes"
2390 else
2391   echo "configure: failed program was:" >&5
2392   cat conftest.$ac_ext >&5
2393   rm -rf conftest*
2394   eval "ac_cv_lib_$ac_lib_var=no"
2395 fi
2396 rm -f conftest*
2397 LIBS="$ac_save_LIBS"
2398
2399 fi
2400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2401   echo "$ac_t""yes" 1>&6
2402     ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2403     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2404   cat >> confdefs.h <<EOF
2405 #define $ac_tr_lib 1
2406 EOF
2407
2408   LIBS="-ldmalloc $LIBS"
2409
2410 else
2411   echo "$ac_t""no" 1>&6
2412 fi
2413
2414 fi
2415
2416 SHLIB_LIST=""
2417 echo $ac_n "checking if you want to link with the gpm mouse library""... $ac_c" 1>&6
2418 echo "configure:2419: checking if you want to link with the gpm mouse library" >&5
2419
2420 # Check whether --with-gpm or --without-gpm was given.
2421 if test "${with_gpm+set}" = set; then
2422   withval="$with_gpm"
2423   with_gpm=$withval
2424 else
2425   with_gpm=no
2426 fi
2427
2428 echo "$ac_t""$with_gpm" 1>&6
2429 if test "$with_gpm" = yes ; then
2430         echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
2431 echo "configure:2432: checking for Gpm_Open in -lgpm" >&5
2432 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
2433 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2434   echo $ac_n "(cached) $ac_c" 1>&6
2435 else
2436   ac_save_LIBS="$LIBS"
2437 LIBS="-lgpm  $LIBS"
2438 cat > conftest.$ac_ext <<EOF
2439 #line 2440 "configure"
2440 #include "confdefs.h"
2441 /* Override any gcc2 internal prototype to avoid an error.  */
2442 /* We use char because int might match the return type of a gcc2
2443     builtin and then its argument prototype would still apply.  */
2444 char Gpm_Open();
2445
2446 int main() {
2447 Gpm_Open()
2448 ; return 0; }
2449 EOF
2450 if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2451   rm -rf conftest*
2452   eval "ac_cv_lib_$ac_lib_var=yes"
2453 else
2454   echo "configure: failed program was:" >&5
2455   cat conftest.$ac_ext >&5
2456   rm -rf conftest*
2457   eval "ac_cv_lib_$ac_lib_var=no"
2458 fi
2459 rm -f conftest*
2460 LIBS="$ac_save_LIBS"
2461
2462 fi
2463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2464   echo "$ac_t""yes" 1>&6
2465   
2466                 EXTRA_LIBS="-lgpm -lncurses $EXTRA_LIBS"
2467                 SHLIB_LIST="-lgpm $SHLIB_LIST"
2468                 cat >> confdefs.h <<\EOF
2469 #define HAVE_LIBGPM 1
2470 EOF
2471
2472                 for ac_hdr in gpm.h
2473 do
2474 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2475 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2476 echo "configure:2477: checking for $ac_hdr" >&5
2477 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2478   echo $ac_n "(cached) $ac_c" 1>&6
2479 else
2480   cat > conftest.$ac_ext <<EOF
2481 #line 2482 "configure"
2482 #include "confdefs.h"
2483 #include <$ac_hdr>
2484 EOF
2485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2486 { (eval echo configure:2487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2487 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2488 if test -z "$ac_err"; then
2489   rm -rf conftest*
2490   eval "ac_cv_header_$ac_safe=yes"
2491 else
2492   echo "$ac_err" >&5
2493   echo "configure: failed program was:" >&5
2494   cat conftest.$ac_ext >&5
2495   rm -rf conftest*
2496   eval "ac_cv_header_$ac_safe=no"
2497 fi
2498 rm -f conftest*
2499 fi
2500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2501   echo "$ac_t""yes" 1>&6
2502     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2503   cat >> confdefs.h <<EOF
2504 #define $ac_tr_hdr 1
2505 EOF
2506  
2507 else
2508   echo "$ac_t""no" 1>&6
2509 fi
2510 done
2511
2512         
2513 else
2514   echo "$ac_t""no" 1>&6
2515 echo "configure: warning: Cannot link with gpm library - read the FAQ" 1>&2
2516 fi
2517
2518 fi
2519
2520
2521 if test X"$CC_G_OPT" = X"" ; then
2522         CC_G_OPT='-g'
2523         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
2524 fi
2525
2526
2527 if test X"$CXX_G_OPT" = X"" ; then
2528         CXX_G_OPT='-g'
2529         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
2530 fi
2531
2532
2533 echo $ac_n "checking for default loader flags""... $ac_c" 1>&6
2534 echo "configure:2535: checking for default loader flags" >&5
2535 case $DFT_LWR_MODEL in
2536 libtool) LD_MODEL=''   ;;
2537 normal)  LD_MODEL=''   ;;
2538 debug)   LD_MODEL=$CC_G_OPT ;;
2539 profile) LD_MODEL='-pg';;
2540 shared)  LD_MODEL=''   ;;
2541 esac
2542 echo "$ac_t""$LD_MODEL" 1>&6
2543
2544 echo $ac_n "checking if rpath option should be used""... $ac_c" 1>&6
2545 echo "configure:2546: checking if rpath option should be used" >&5
2546
2547 # Check whether --enable-rpath or --disable-rpath was given.
2548 if test "${enable_rpath+set}" = set; then
2549   enableval="$enable_rpath"
2550   cf_cv_ld_rpath=$enableval
2551 else
2552   cf_cv_ld_rpath=no
2553 fi
2554
2555 echo "$ac_t""$cf_cv_ld_rpath" 1>&6
2556
2557
2558         
2559         LOCAL_LDFLAGS=
2560         LOCAL_LDFLAGS2=
2561         LD_SHARED_OPTS=
2562         INSTALL_LIB="-m 644"
2563
2564         cf_cv_do_symlinks=no
2565
2566         echo $ac_n "checking if release/abi version should be used for shared libs""... $ac_c" 1>&6
2567 echo "configure:2568: checking if release/abi version should be used for shared libs" >&5
2568         
2569 # Check whether --with-shlib-version or --without-shlib-version was given.
2570 if test "${with_shlib_version+set}" = set; then
2571   withval="$with_shlib_version"
2572   test -z "$withval" && withval=auto
2573         case $withval in #(vi
2574         yes) #(vi
2575                 cf_cv_shlib_version=auto
2576                 ;;
2577         rel|abi|auto|no) #(vi
2578                 cf_cv_shlib_version=$withval
2579                 ;;
2580         *)
2581                 { echo "configure: error: option value must be one of: rel, abi, auto or no" 1>&2; exit 1; }
2582                 ;;
2583         esac
2584         
2585 else
2586   cf_cv_shlib_version=auto
2587 fi
2588
2589         echo "$ac_t""$cf_cv_shlib_version" 1>&6
2590
2591         cf_cv_rm_so_locs=no
2592
2593         # Some less-capable ports of gcc support only -fpic
2594         CC_SHARED_OPTS=
2595         if test "$GCC" = yes
2596         then
2597                 echo $ac_n "checking which $CC option to use""... $ac_c" 1>&6
2598 echo "configure:2599: checking which $CC option to use" >&5
2599                 cf_save_CFLAGS="$CFLAGS"
2600                 for CC_SHARED_OPTS in -fPIC -fpic ''
2601                 do
2602                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
2603                         cat > conftest.$ac_ext <<EOF
2604 #line 2605 "configure"
2605 #include "confdefs.h"
2606 #include <stdio.h>
2607 int main() {
2608 int x = 1
2609 ; return 0; }
2610 EOF
2611 if { (eval echo configure:2612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2612   rm -rf conftest*
2613   break
2614 else
2615   echo "configure: failed program was:" >&5
2616   cat conftest.$ac_ext >&5
2617 fi
2618 rm -f conftest*
2619                 done
2620                 echo "$ac_t""$CC_SHARED_OPTS" 1>&6
2621                 CFLAGS="$cf_save_CFLAGS"
2622         fi
2623
2624         case $cf_cv_system_name in
2625         beos*)
2626                 MK_SHARED_LIB='$(CC) -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
2627                 ;;
2628         hpux*)
2629                 # (tested with gcc 2.7.2 -- I don't have c89)
2630                 if test "$GCC" = yes; then
2631                         LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
2632                 else
2633                         CC_SHARED_OPTS='+Z'
2634                         LD_SHARED_OPTS='-Wl,+b,$(libdir)'
2635                 fi
2636                 MK_SHARED_LIB='$(LD) +b $(libdir) -b -o $@'
2637                 # HP-UX shared libraries must be executable, and should be
2638                 # readonly to exploit a quirk in the memory manager.
2639                 INSTALL_LIB="-m 555"
2640                 ;;
2641         irix*)
2642                 if test "$cf_cv_ld_rpath" = yes ; then
2643                         cf_ld_rpath_opt="-Wl,-rpath,"
2644                         EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
2645                 fi
2646                 # tested with IRIX 5.2 and 'cc'.
2647                 if test "$GCC" != yes; then
2648                         CC_SHARED_OPTS='-KPIC'
2649                 fi
2650                 MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $@` -o $@'
2651                 cf_cv_rm_so_locs=yes
2652                 ;;
2653         linux*|gnu*)
2654                 if test "$DFT_LWR_MODEL" = "shared" ; then
2655                         LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
2656                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
2657                 fi
2658                 if test "$cf_cv_ld_rpath" = yes ; then
2659                         cf_ld_rpath_opt="-Wl,-rpath,"
2660                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
2661                 fi
2662                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2663                 MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $@'
2664                 ;;
2665         openbsd2*)
2666                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
2667                 MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $@.$(ABI_VERSION)` -o $@'
2668                 ;;
2669         openbsd*|freebsd*)
2670                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
2671                 MK_SHARED_LIB='$(LD) -Bshareable -o $@'
2672                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2673                 ;;
2674         netbsd*)
2675                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
2676                 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
2677                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
2678                         LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
2679                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
2680                         EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
2681                         MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
2682                         if test "$cf_cv_shlib_version" = auto; then
2683                         if test ! -f /usr/libexec/ld.elf_so; then
2684                                 cf_cv_shlib_version=rel
2685                         fi
2686                         fi
2687                 else
2688                         MK_SHARED_LIB='$(LD) -Bshareable -o $@'
2689                 fi
2690                 ;;
2691         osf*|mls+*)
2692                 # tested with OSF/1 V3.2 and 'cc'
2693                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
2694                 # link with shared libs).
2695                 MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $@`'
2696                 case $host_os in
2697                 osf4*)
2698                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
2699                         ;;
2700                 esac
2701                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
2702                 if test "$DFT_LWR_MODEL" = "shared" ; then
2703                         LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
2704                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
2705                 fi
2706                 if test "$cf_cv_ld_rpath" = yes ; then
2707                         cf_ld_rpath_opt="-rpath"
2708                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
2709                 fi
2710                 cf_cv_rm_so_locs=yes
2711                 ;;
2712         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
2713                 # tested with osr5.0.5
2714                 if test "$ac_cv_prog_gcc" != yes; then
2715                         CC_SHARED_OPTS='-belf -KPIC'
2716                 fi
2717                 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
2718                 if test "$cf_cv_ld_rpath" = yes ; then
2719                         # only way is to set LD_RUN_PATH but no switch for it
2720                         RUN_PATH=$libdir
2721                 fi
2722                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2723                 LINK_PROGS='LD_RUN_PATH=$(libdir)'
2724                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
2725                 ;;
2726         sunos4*)
2727                 # tested with SunOS 4.1.1 and gcc 2.7.0
2728                 if test "$ac_cv_prog_gcc" != yes; then
2729                         CC_SHARED_OPTS='-KPIC'
2730                 fi
2731                 MK_SHARED_LIB='$(LD) -assert pure-text -o $@'
2732                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2733                 ;;
2734         solaris2*)
2735                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
2736                 if test "$ac_cv_prog_gcc" != yes; then
2737                         CC_SHARED_OPTS='-KPIC'
2738                 fi
2739                 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
2740                 if test "$DFT_LWR_MODEL" = "shared" ; then
2741                         LOCAL_LDFLAGS="-R `pwd`/lib:\$(libdir)"
2742                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
2743                 fi
2744                 if test "$cf_cv_ld_rpath" = yes ; then
2745                         cf_ld_rpath_opt="-R"
2746                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
2747                 fi
2748                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2749                 ;;
2750         sysv5uw7*|unix_sv*)
2751                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
2752                 if test "$ac_cv_prog_gcc" != yes; then
2753                         CC_SHARED_OPTS='-KPIC'
2754                 fi
2755                 MK_SHARED_LIB='$(LD) -d y -G -o $@'
2756                 ;;
2757         *)
2758                 CC_SHARED_OPTS='unknown'
2759                 MK_SHARED_LIB='echo unknown'
2760                 ;;
2761         esac
2762
2763         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
2764         case "$cf_cv_shlib_version" in #(vi
2765         rel|abi)
2766                 case "$MK_SHARED_LIB" in #(vi
2767                 *'-o $@')
2768                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
2769                         ;;
2770                 *)
2771                         echo "configure: warning: ignored --with-shlib-version" 1>&2
2772                         ;;
2773                 esac
2774                 ;;
2775         esac
2776
2777         if test -n "$cf_ld_rpath_opt" ; then
2778                 echo $ac_n "checking if we need a space after rpath option""... $ac_c" 1>&6
2779 echo "configure:2780: checking if we need a space after rpath option" >&5
2780                 cf_save_LIBS="$LIBS"
2781                 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
2782                 cat > conftest.$ac_ext <<EOF
2783 #line 2784 "configure"
2784 #include "confdefs.h"
2785
2786 int main() {
2787
2788 ; return 0; }
2789 EOF
2790 if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2791   rm -rf conftest*
2792   cf_rpath_space=no
2793 else
2794   echo "configure: failed program was:" >&5
2795   cat conftest.$ac_ext >&5
2796   rm -rf conftest*
2797   cf_rpath_space=yes
2798 fi
2799 rm -f conftest*
2800                 LIBS="$cf_save_LIBS"
2801                 echo "$ac_t""$cf_rpath_space" 1>&6
2802                 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
2803                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
2804         fi
2805
2806         
2807         
2808         
2809         
2810         
2811         
2812         
2813         
2814         
2815
2816 if test "$CC_SHARED_OPTS" = "unknown"; then
2817         for model in $cf_list_models; do
2818                 if test "$model" = "shared"; then
2819                         { echo "configure: error: Shared libraries are not supported in this version" 1>&2; exit 1; }
2820                 fi
2821         done
2822 fi
2823
2824 ###############################################################################
2825
2826
2827 ###     use option --disable-overwrite to leave out the link to -lcurses
2828 echo $ac_n "checking if you wish to install ncurses overwriting curses""... $ac_c" 1>&6
2829 echo "configure:2830: checking if you wish to install ncurses overwriting curses" >&5
2830
2831 # Check whether --enable-overwrite or --disable-overwrite was given.
2832 if test "${enable_overwrite+set}" = set; then
2833   enableval="$enable_overwrite"
2834   with_overwrite=$enableval
2835 else
2836   with_overwrite=yes
2837 fi
2838
2839 echo "$ac_t""$with_overwrite" 1>&6
2840
2841 echo $ac_n "checking if external terminfo-database is used""... $ac_c" 1>&6
2842 echo "configure:2843: checking if external terminfo-database is used" >&5
2843
2844 # Check whether --enable-database or --disable-database was given.
2845 if test "${enable_database+set}" = set; then
2846   enableval="$enable_database"
2847   use_database=$enableval
2848 else
2849   use_database=yes
2850 fi
2851
2852 echo "$ac_t""$use_database" 1>&6
2853
2854 case $host_os in #(vi
2855 os2*) #(vi
2856         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
2857         ;;
2858 *) #(vi
2859         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
2860         ;;
2861 esac
2862
2863
2864 if test "$use_database" != no ; then
2865         cat >> confdefs.h <<\EOF
2866 #define USE_DATABASE 1
2867 EOF
2868
2869         echo $ac_n "checking which terminfo source-file will be installed""... $ac_c" 1>&6
2870 echo "configure:2871: checking which terminfo source-file will be installed" >&5
2871         
2872 # Check whether --enable-database or --disable-database was given.
2873 if test "${enable_database+set}" = set; then
2874   enableval="$enable_database"
2875   TERMINFO_SRC=$withval
2876 fi
2877
2878         echo "$ac_t""$TERMINFO_SRC" 1>&6
2879 fi
2880
2881 echo $ac_n "checking for list of fallback descriptions""... $ac_c" 1>&6
2882 echo "configure:2883: checking for list of fallback descriptions" >&5
2883
2884 # Check whether --with-fallbacks or --without-fallbacks was given.
2885 if test "${with_fallbacks+set}" = set; then
2886   withval="$with_fallbacks"
2887   with_fallback=$withval
2888 else
2889   with_fallback=
2890 fi
2891
2892 echo "$ac_t""$with_fallback" 1>&6
2893 FALLBACK_LIST=`echo $with_fallback|sed -e 's/,/ /g'`
2894
2895
2896 if test "$use_database" = no ; then
2897         if test -z $with_fallback ; then
2898                 { echo "configure: error: You have disabled the database w/o specifying fallbacks" 1>&2; exit 1; }
2899         fi
2900         TERMINFO="${datadir}/terminfo"
2901 else
2902
2903 echo $ac_n "checking for list of terminfo directories""... $ac_c" 1>&6
2904 echo "configure:2905: checking for list of terminfo directories" >&5
2905
2906
2907 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
2908 if test "${with_terminfo_dirs+set}" = set; then
2909   withval="$with_terminfo_dirs"
2910   :
2911 else
2912   withval="${TERMINFO_DIRS-${datadir}/terminfo}"
2913 fi
2914
2915 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2916 cf_dst_path=
2917 for cf_src_path in $withval
2918 do
2919   
2920 case ".$cf_src_path" in #(vi
2921 ./*) #(vi
2922   ;;
2923 .a-zA-Z:\\/*) #(vi OS/2 EMX
2924   ;;
2925 .\${*prefix}*) #(vi
2926   eval cf_src_path="$cf_src_path"
2927   case ".$cf_src_path" in #(vi
2928   .NONE/*)
2929     cf_src_path=`echo $cf_src_path | sed -e s@NONE@$ac_default_prefix@`
2930     ;;
2931   esac
2932   ;; #(vi
2933 .NONE/*)
2934   cf_src_path=`echo $cf_src_path | sed -e s@NONE@$ac_default_prefix@`
2935   ;;
2936 *)
2937   { echo "configure: error: expected a pathname" 1>&2; exit 1; }
2938   ;;
2939 esac
2940
2941   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
2942   cf_dst_path="${cf_dst_path}${cf_src_path}"
2943 done
2944 IFS="$ac_save_ifs"
2945
2946 eval TERMINFO_DIRS="$cf_dst_path"
2947
2948 echo "$ac_t""$TERMINFO_DIRS" 1>&6
2949 test -n "$TERMINFO_DIRS" && cat >> confdefs.h <<EOF
2950 #define TERMINFO_DIRS "$TERMINFO_DIRS"
2951 EOF
2952
2953
2954 echo $ac_n "checking for default terminfo directory""... $ac_c" 1>&6
2955 echo "configure:2956: checking for default terminfo directory" >&5
2956
2957 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
2958 if test "${with_default_terminfo_dir+set}" = set; then
2959   withval="$with_default_terminfo_dir"
2960   :
2961 else
2962   withval="${TERMINFO-${datadir}/terminfo}"
2963 fi
2964
2965 case ".$withval" in #(vi
2966 ./*) #(vi
2967   ;;
2968 .a-zA-Z:\\/*) #(vi OS/2 EMX
2969   ;;
2970 .\${*prefix}*) #(vi
2971   eval withval="$withval"
2972   case ".$withval" in #(vi
2973   .NONE/*)
2974     withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
2975     ;;
2976   esac
2977   ;; #(vi
2978 .NONE/*)
2979   withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
2980   ;;
2981 *)
2982   { echo "configure: error: expected a pathname" 1>&2; exit 1; }
2983   ;;
2984 esac
2985
2986 eval TERMINFO="$withval"
2987
2988 echo "$ac_t""$TERMINFO" 1>&6
2989 cat >> confdefs.h <<EOF
2990 #define TERMINFO "$TERMINFO"
2991 EOF
2992
2993
2994 fi
2995
2996
2997
2998 ###     use option --disable-big-core to make tic run on small machines
2999 ###     We need 4Mb, check if we can allocate 50% more than that.
3000 echo $ac_n "checking if big-core option selected""... $ac_c" 1>&6
3001 echo "configure:3002: checking if big-core option selected" >&5
3002
3003 # Check whether --enable-big-core or --disable-big-core was given.
3004 if test "${enable_big_core+set}" = set; then
3005   enableval="$enable_big_core"
3006   with_big_core=$enableval
3007 else
3008   if test "$cross_compiling" = yes; then
3009   with_big_core=no
3010 else
3011   cat > conftest.$ac_ext <<EOF
3012 #line 3013 "configure"
3013 #include "confdefs.h"
3014
3015 #include <stdlib.h>
3016 #include <string.h>
3017 int main() {
3018         unsigned long n = 6000000L;
3019         char *s = malloc(n);
3020         if (s != 0)
3021                 s[0] = s[n-1] = 0;
3022         exit(s == 0);
3023 }
3024 EOF
3025 if { (eval echo configure:3026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3026 then
3027   with_big_core=yes
3028 else
3029   echo "configure: failed program was:" >&5
3030   cat conftest.$ac_ext >&5
3031   rm -fr conftest*
3032   with_big_core=no
3033 fi
3034 rm -fr conftest*
3035 fi
3036
3037 fi
3038
3039 echo "$ac_t""$with_big_core" 1>&6
3040 test "$with_big_core" = "yes" && cat >> confdefs.h <<\EOF
3041 #define HAVE_BIG_CORE 1
3042 EOF
3043
3044
3045 ###     use option --enable-termcap to compile in the termcap fallback support
3046 echo $ac_n "checking if you want termcap-fallback support""... $ac_c" 1>&6
3047 echo "configure:3048: checking if you want termcap-fallback support" >&5
3048
3049 # Check whether --enable-termcap or --disable-termcap was given.
3050 if test "${enable_termcap+set}" = set; then
3051   enableval="$enable_termcap"
3052   with_termcap=$enableval
3053 else
3054   with_termcap=no
3055 fi
3056
3057 echo "$ac_t""$with_termcap" 1>&6
3058
3059 if test "$with_termcap" != "yes" ; then
3060         cat >> confdefs.h <<\EOF
3061 #define PURE_TERMINFO 1
3062 EOF
3063
3064 else
3065
3066 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
3067 echo $ac_n "checking if fast termcap-loader is needed""... $ac_c" 1>&6
3068 echo "configure:3069: checking if fast termcap-loader is needed" >&5
3069
3070 # Check whether --enable-getcap or --disable-getcap was given.
3071 if test "${enable_getcap+set}" = set; then
3072   enableval="$enable_getcap"
3073   with_getcap=$enableval
3074 else
3075   with_getcap=no
3076 fi
3077
3078 echo "$ac_t""$with_getcap" 1>&6
3079 test "$with_getcap" = "yes" && cat >> confdefs.h <<\EOF
3080 #define USE_GETCAP 1
3081 EOF
3082
3083
3084 echo $ac_n "checking if translated termcaps will be cached in ~/.terminfo""... $ac_c" 1>&6
3085 echo "configure:3086: checking if translated termcaps will be cached in ~/.terminfo" >&5
3086
3087 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
3088 if test "${enable_getcap_cache+set}" = set; then
3089   enableval="$enable_getcap_cache"
3090   with_getcap_cache=$enableval
3091 else
3092   with_getcap_cache=no
3093 fi
3094
3095 echo "$ac_t""$with_getcap_cache" 1>&6
3096 test "$with_getcap_cache" = "yes" && cat >> confdefs.h <<\EOF
3097 #define USE_GETCAP_CACHE 1
3098 EOF
3099
3100
3101 fi
3102
3103 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
3104 ###   to reduce storage requirements for the terminfo database.
3105
3106 for ac_func in \
3107         remove \
3108         unlink 
3109 do
3110 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3111 echo "configure:3112: checking for $ac_func" >&5
3112 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3113   echo $ac_n "(cached) $ac_c" 1>&6
3114 else
3115   cat > conftest.$ac_ext <<EOF
3116 #line 3117 "configure"
3117 #include "confdefs.h"
3118 /* System header to define __stub macros and hopefully few prototypes,
3119     which can conflict with char $ac_func(); below.  */
3120 #include <assert.h>
3121 /* Override any gcc2 internal prototype to avoid an error.  */
3122 /* We use char because int might match the return type of a gcc2
3123     builtin and then its argument prototype would still apply.  */
3124 char $ac_func();
3125
3126 int main() {
3127
3128 /* The GNU C library defines this for functions which it implements
3129     to always fail with ENOSYS.  Some functions are actually named
3130     something starting with __ and the normal name is an alias.  */
3131 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3132 choke me
3133 #else
3134 $ac_func();
3135 #endif
3136
3137 ; return 0; }
3138 EOF
3139 if { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3140   rm -rf conftest*
3141   eval "ac_cv_func_$ac_func=yes"
3142 else
3143   echo "configure: failed program was:" >&5
3144   cat conftest.$ac_ext >&5
3145   rm -rf conftest*
3146   eval "ac_cv_func_$ac_func=no"
3147 fi
3148 rm -f conftest*
3149 fi
3150
3151 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3152   echo "$ac_t""yes" 1>&6
3153     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3154   cat >> confdefs.h <<EOF
3155 #define $ac_tr_func 1
3156 EOF
3157  
3158 else
3159   echo "$ac_t""no" 1>&6
3160 fi
3161 done
3162
3163
3164 if test "$ac_cv_prog_cc_cross" = yes ; then
3165         for ac_func in \
3166                 link \
3167                 symlink 
3168 do
3169 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3170 echo "configure:3171: checking for $ac_func" >&5
3171 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3172   echo $ac_n "(cached) $ac_c" 1>&6
3173 else
3174   cat > conftest.$ac_ext <<EOF
3175 #line 3176 "configure"
3176 #include "confdefs.h"
3177 /* System header to define __stub macros and hopefully few prototypes,
3178     which can conflict with char $ac_func(); below.  */
3179 #include <assert.h>
3180 /* Override any gcc2 internal prototype to avoid an error.  */
3181 /* We use char because int might match the return type of a gcc2
3182     builtin and then its argument prototype would still apply.  */
3183 char $ac_func();
3184
3185 int main() {
3186
3187 /* The GNU C library defines this for functions which it implements
3188     to always fail with ENOSYS.  Some functions are actually named
3189     something starting with __ and the normal name is an alias.  */
3190 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3191 choke me
3192 #else
3193 $ac_func();
3194 #endif
3195
3196 ; return 0; }
3197 EOF
3198 if { (eval echo configure:3199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3199   rm -rf conftest*
3200   eval "ac_cv_func_$ac_func=yes"
3201 else
3202   echo "configure: failed program was:" >&5
3203   cat conftest.$ac_ext >&5
3204   rm -rf conftest*
3205   eval "ac_cv_func_$ac_func=no"
3206 fi
3207 rm -f conftest*
3208 fi
3209
3210 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3211   echo "$ac_t""yes" 1>&6
3212     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3213   cat >> confdefs.h <<EOF
3214 #define $ac_tr_func 1
3215 EOF
3216  
3217 else
3218   echo "$ac_t""no" 1>&6
3219 fi
3220 done
3221
3222 else
3223         echo $ac_n "checking if link/symlink functions work""... $ac_c" 1>&6
3224 echo "configure:3225: checking if link/symlink functions work" >&5
3225 if eval "test \"`echo '$''{'cf_cv_link_funcs'+set}'`\" = set"; then
3226   echo $ac_n "(cached) $ac_c" 1>&6
3227 else
3228   
3229                 cf_cv_link_funcs=
3230                 for cf_func in link symlink ; do
3231                         if test "$cross_compiling" = yes; then
3232   
3233                         eval 'ac_cv_func_'$cf_func'=error'
3234 else
3235   cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238
3239 #include <sys/types.h>
3240 #include <sys/stat.h>
3241 #ifdef HAVE_UNISTD_H
3242 #include <unistd.h>
3243 #endif
3244 int main()
3245 {
3246         int fail = 0;
3247         char *src = "config.log";
3248         char *dst = "conftest.chk";
3249         struct stat src_sb;
3250         struct stat dst_sb;
3251
3252         stat(src, &src_sb);
3253         fail = ($cf_func("config.log", "conftest.chk") < 0)
3254             || (stat(dst, &dst_sb) < 0)
3255             || (dst_sb.st_mtime != src_sb.st_mtime);
3256 #ifdef HAVE_UNLINK
3257         unlink(dst);
3258 #else
3259         remove(dst);
3260 #endif
3261         exit (fail);
3262 }
3263                         
3264 EOF
3265 if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3266 then
3267   
3268                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
3269                         eval 'ac_cv_func_'$cf_func'=yes'
3270 else
3271   echo "configure: failed program was:" >&5
3272   cat conftest.$ac_ext >&5
3273   rm -fr conftest*
3274   
3275                         eval 'ac_cv_func_'$cf_func'=no'
3276 fi
3277 rm -fr conftest*
3278 fi
3279
3280                 done
3281                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
3282         
3283 fi
3284
3285 echo "$ac_t""$cf_cv_link_funcs" 1>&6
3286         test "$ac_cv_func_link"    = yes && cat >> confdefs.h <<\EOF
3287 #define HAVE_LINK 1
3288 EOF
3289
3290         test "$ac_cv_func_symlink" = yes && cat >> confdefs.h <<\EOF
3291 #define HAVE_SYMLINK 1
3292 EOF
3293
3294 fi
3295
3296
3297 with_links=no
3298 with_symlinks=no
3299
3300 if test "$ac_cv_func_link" != yes ; then
3301     echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6
3302 echo "configure:3303: checking if tic should use symbolic links" >&5
3303     if test "$ac_cv_func_symlink" = yes ; then
3304         with_symlinks=yes
3305     else
3306         with_symlinks=no
3307     fi
3308     echo "$ac_t""$with_symlinks" 1>&6
3309 elif test "$ac_cv_func_symlink" != yes ; then
3310     echo $ac_n "checking if tic should use hard links""... $ac_c" 1>&6
3311 echo "configure:3312: checking if tic should use hard links" >&5
3312     if test "$ac_cv_func_link" = yes ; then
3313         with_links=yes
3314     else
3315         with_links=no
3316     fi
3317     echo "$ac_t""$with_links" 1>&6
3318 else
3319     echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6
3320 echo "configure:3321: checking if tic should use symbolic links" >&5
3321     
3322 # Check whether --enable-symlinks or --disable-symlinks was given.
3323 if test "${enable_symlinks+set}" = set; then
3324   enableval="$enable_symlinks"
3325   with_symlinks=$enableval
3326 else
3327   with_symlinks=no
3328 fi
3329
3330     echo "$ac_t""$with_symlinks" 1>&6
3331 fi
3332
3333 test "$with_links" = yes && cat >> confdefs.h <<\EOF
3334 #define USE_LINKS 1
3335 EOF
3336
3337 test "$with_symlinks" = yes && cat >> confdefs.h <<\EOF
3338 #define USE_SYMLINKS 1
3339 EOF
3340
3341
3342 ###   use option --enable-broken-linker to force on use of broken-linker support
3343 echo $ac_n "checking if you want broken-linker support code""... $ac_c" 1>&6
3344 echo "configure:3345: checking if you want broken-linker support code" >&5
3345
3346 # Check whether --enable-broken_linker or --disable-broken_linker was given.
3347 if test "${enable_broken_linker+set}" = set; then
3348   enableval="$enable_broken_linker"
3349   with_broken_linker=$enableval
3350 else
3351   with_broken_linker=$BROKEN_LINKER
3352 fi
3353
3354 echo "$ac_t""$with_broken_linker" 1>&6
3355 test "$with_broken_linker" = yes && cat >> confdefs.h <<\EOF
3356 #define BROKEN_LINKER 1
3357 EOF
3358
3359
3360 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
3361 echo $ac_n "checking if tputs should process BSD-style prefix padding""... $ac_c" 1>&6
3362 echo "configure:3363: checking if tputs should process BSD-style prefix padding" >&5
3363
3364 # Check whether --enable-bsdpad or --disable-bsdpad was given.
3365 if test "${enable_bsdpad+set}" = set; then
3366   enableval="$enable_bsdpad"
3367   with_bsdpad=$enableval
3368 else
3369   with_bsdpad=no
3370 fi
3371
3372 echo "$ac_t""$with_bsdpad" 1>&6
3373 test "$with_bsdpad" = yes && cat >> confdefs.h <<\EOF
3374 #define BSD_TPUTS 1
3375 EOF
3376
3377
3378 ### Enable compiling-in rcs id's
3379 echo $ac_n "checking if RCS identifiers should be compiled-in""... $ac_c" 1>&6
3380 echo "configure:3381: checking if RCS identifiers should be compiled-in" >&5
3381
3382 # Check whether --with-rcs-ids or --without-rcs-ids was given.
3383 if test "${with_rcs_ids+set}" = set; then
3384   withval="$with_rcs_ids"
3385   with_rcs_ids=$withval
3386 else
3387   with_rcs_ids=no
3388 fi
3389
3390 echo "$ac_t""$with_rcs_ids" 1>&6
3391 test "$with_rcs_ids" = yes && cat >> confdefs.h <<\EOF
3392 #define USE_RCS_IDS 1
3393 EOF
3394
3395
3396 ###############################################################################
3397
3398
3399  echo $ac_n "checking format of man-pages""... $ac_c" 1>&6
3400 echo "configure:3401: checking format of man-pages" >&5
3401
3402
3403 # Check whether --with-manpage-format or --without-manpage-format was given.
3404 if test "${with_manpage_format+set}" = set; then
3405   withval="$with_manpage_format"
3406   cf_manpage_form=$withval
3407 else
3408   cf_manpage_form=unknown
3409 fi
3410
3411
3412 case ".$cf_manpage_form" in
3413 .gzip|.compress|.BSDI|.normal|.formatted) # (vi
3414   ;;
3415 .unknown|.) # (vi
3416   if test -z "$MANPATH" ; then
3417     MANPATH="/usr/man:/usr/share/man"
3418   fi
3419   # look for the 'date' man-page (it's most likely to be installed!)
3420   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3421   cf_manpage_form=unknown
3422   for cf_dir in $MANPATH; do
3423     test -z "$cf_dir" && cf_dir=/usr/man
3424     for cf_name in $cf_dir/*/date.[01]* $cf_dir/*/date
3425     do
3426        cf_test=`echo $cf_name | sed -e 's/*//'`
3427        if test "x$cf_test" = "x$cf_name" ; then
3428           case "$cf_name" in
3429           *.gz) cf_manpage_form=gzip;;
3430           *.Z)  cf_manpage_form=compress;;
3431           *.0)  cf_manpage_form=BSDI,formatted;;
3432           *)    cf_manpage_form=normal;;
3433           esac
3434           break
3435        fi
3436     done
3437     if test "$cf_manpage_form" != "unknown" ; then
3438        break
3439     fi
3440   done
3441   IFS="$ac_save_ifs"
3442   ;;
3443 .*) # (vi
3444   echo "configure: warning: Unexpected manpage-format" 1>&2
3445   ;;
3446 esac
3447
3448 echo "$ac_t""$cf_manpage_form" 1>&6
3449
3450
3451 echo $ac_n "checking for manpage renaming""... $ac_c" 1>&6
3452 echo "configure:3453: checking for manpage renaming" >&5
3453
3454
3455 # Check whether --with-manpage-renames or --without-manpage-renames was given.
3456 if test "${with_manpage_renames+set}" = set; then
3457   withval="$with_manpage_renames"
3458   cf_manpage_renames=$withval
3459 else
3460   cf_manpage_renames=yes
3461 fi
3462
3463
3464 case ".$cf_manpage_renames" in #(vi
3465 .no) #(vi
3466   ;;
3467 .|.yes)
3468   # Debian 'man' program?
3469   if test -f /etc/debian_version ; then
3470     cf_manpage_renames=`cd $srcdir && pwd`/man/man_db.renames
3471   else
3472     cf_manpage_renames=no
3473   fi
3474   ;;
3475 esac
3476
3477 if test "$cf_manpage_renames" != no ; then
3478   if test ! -f $cf_manpage_renames ; then
3479     { echo "configure: error: not a filename: $cf_manpage_renames" 1>&2; exit 1; }
3480   fi
3481
3482   test ! -d man && mkdir man
3483
3484   # Construct a sed-script to perform renaming within man-pages
3485   if test -n "$cf_manpage_renames" ; then
3486     test ! -d man && mkdir man
3487     $srcdir/man/make_sed.sh $cf_manpage_renames >man/edit_man.sed
3488   fi
3489 fi
3490
3491 echo "$ac_t""$cf_manpage_renames" 1>&6
3492
3493
3494 echo $ac_n "checking for manpage symlinks""... $ac_c" 1>&6
3495 echo "configure:3496: checking for manpage symlinks" >&5
3496
3497
3498 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
3499 if test "${with_manpage_symlinks+set}" = set; then
3500   withval="$with_manpage_symlinks"
3501   cf_manpage_symlinks=$withval
3502 else
3503   cf_manpage_symlinks=yes
3504 fi
3505
3506
3507 echo "$ac_t""$cf_manpage_symlinks" 1>&6
3508
3509
3510 echo $ac_n "checking for manpage tbl""... $ac_c" 1>&6
3511 echo "configure:3512: checking for manpage tbl" >&5
3512
3513
3514 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
3515 if test "${with_manpage_tbl+set}" = set; then
3516   withval="$with_manpage_tbl"
3517   cf_manpage_tbl=$withval
3518 else
3519   cf_manpage_tbl=no
3520 fi
3521
3522
3523 echo "$ac_t""$cf_manpage_tbl" 1>&6
3524
3525
3526   if test "$prefix" = "NONE" ; then
3527      cf_prefix="$ac_default_prefix"
3528   else
3529      cf_prefix="$prefix"
3530   fi
3531
3532   case "$cf_manpage_form" in # (vi
3533   *formatted*) # (vi
3534     cf_subdir='$mandir/cat'
3535     cf_format=yes
3536     ;;
3537   *)
3538     cf_subdir='$mandir/man'
3539     cf_format=no
3540     ;;
3541   esac
3542
3543 test ! -d man && mkdir man
3544 cat >man/edit_man.sh <<CF_EOF
3545 #! /bin/sh
3546 # this script is generated by the configure-script
3547 prefix="$cf_prefix"
3548 datadir="$datadir"
3549 TERMINFO="$TERMINFO"
3550 MKDIRS="`cd $srcdir && pwd`/mkinstalldirs"
3551 INSTALL="$INSTALL"
3552 INSTALL_DATA="$INSTALL_DATA"
3553 transform="$program_transform_name"
3554
3555 TMP=\${TMPDIR-/tmp}/man\$\$
3556 trap "rm -f \$TMP" 0 1 2 5 15
3557
3558 verb=\$1
3559 shift
3560
3561 mandir=\$1
3562 shift
3563
3564 srcdir=\$1
3565 shift
3566
3567 for i in \$* ; do
3568 case \$i in #(vi
3569 *.orig|*.rej) ;; #(vi
3570 *.[0-9]*)
3571         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
3572         if test \$verb = installing ; then
3573         if test ! -d $cf_subdir\${section} ; then
3574                 \$MKDIRS $cf_subdir\$section
3575         fi
3576         fi
3577         aliases=
3578         source=\`basename \$i\`
3579         inalias=\$source
3580         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
3581         if test ! -f \$inalias ; then
3582                 echo .. skipped \$source
3583                 continue
3584         fi
3585 CF_EOF
3586 if test "$cf_manpage_symlinks" = yes ; then
3587 cat >>man/edit_man.sh <<CF_EOF
3588         aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
3589 CF_EOF
3590 fi
3591 if test "$cf_manpage_renames" = no ; then
3592 cat >>man/edit_man.sh <<CF_EOF
3593         # perform program transformations for section 1 man pages
3594         if test \$section = 1 ; then
3595                 target=$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
3596         else
3597                 target=$cf_subdir\${section}/\$source
3598         fi
3599
3600         # replace variables in man page
3601 CF_EOF
3602         
3603         for cf_name in  captoinfo clear infocmp infotocap tic toe tput 
3604         do
3605 cat >>man/edit_man.sh <<CF_EOF
3606         prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
3607 CF_EOF
3608         done
3609         
3610 cat >>man/edit_man.sh <<CF_EOF
3611         sed     -e "s,@DATADIR@,\$datadir," \\
3612                 -e "s,@TERMINFO@,\$TERMINFO," \\
3613 CF_EOF
3614         
3615         for cf_name in  captoinfo clear infocmp infotocap tic toe tput 
3616         do
3617                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3618 cat >>man/edit_man.sh <<CF_EOF
3619                 -e "s,@$cf_NAME@,\$prog_$cf_name," \\
3620 CF_EOF
3621         done
3622         
3623 cat >>man/edit_man.sh <<CF_EOF
3624                 < \$i >\$TMP
3625 CF_EOF
3626 else
3627 cat >>man/edit_man.sh <<CF_EOF
3628         target=\`grep "^\$source" $cf_manpage_renames | $AWK '{print \$2}'\`
3629         if test -z "\$target" ; then
3630                 echo '? missing rename for '\$source
3631                 target="\$source"
3632         fi
3633         target="$cf_subdir\$section/\$target"
3634         test \$verb = installing && sed -e "s,@DATADIR@,\$datadir," < \$i | sed -f edit_man.sed >\$TMP
3635 CF_EOF
3636 fi
3637 if test $cf_manpage_tbl = yes ; then
3638 cat >>man/edit_man.sh <<CF_EOF
3639         tbl \$TMP >\$TMP.out
3640         mv \$TMP.out \$TMP
3641 CF_EOF
3642 fi
3643 if test $with_curses_h != yes ; then
3644 cat >>man/edit_man.sh <<CF_EOF
3645         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
3646         mv \$TMP.out \$TMP
3647 CF_EOF
3648 fi
3649 if test $cf_format = yes ; then
3650 cat >>man/edit_man.sh <<CF_EOF
3651         nroff -man \$TMP >\$TMP.out
3652         mv \$TMP.out \$TMP
3653 CF_EOF
3654 fi
3655 case "$cf_manpage_form" in #(vi
3656 *compress*) #(vi
3657 cat >>man/edit_man.sh <<CF_EOF
3658         if test \$verb = installing ; then
3659         if ( compress -f \$TMP )
3660         then
3661                 mv \$TMP.Z \$TMP
3662         fi
3663         fi
3664         target="\$target.Z"
3665 CF_EOF
3666   ;;
3667 *gzip*) #(vi
3668 cat >>man/edit_man.sh <<CF_EOF
3669         if test \$verb = installing ; then
3670         if ( gzip -f \$TMP )
3671         then
3672                 mv \$TMP.gz \$TMP
3673         fi
3674         fi
3675         target="\$target.gz"
3676 CF_EOF
3677   ;;
3678 *BSDI*)
3679 cat >>man/edit_man.sh <<CF_EOF
3680         # BSDI installs only .0 suffixes in the cat directories
3681         target="\`echo \$target|sed -e 's/\.[1-9]\+.\?/.0/'\`"
3682 CF_EOF
3683   ;;
3684 esac
3685 cat >>man/edit_man.sh <<CF_EOF
3686         suffix=\`basename \$target | sed -e 's/^[^.]*//'\`
3687         if test \$verb = installing ; then
3688                 echo \$verb \$target
3689                 \$INSTALL_DATA \$TMP \$target
3690                 test -n "\$aliases" && (
3691                         cd $cf_subdir\${section} && (
3692                                 target=\`basename \$target\`
3693                                 for cf_alias in \$aliases
3694                                 do
3695                                         if test \$section = 1 ; then
3696                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
3697                                         fi
3698
3699                                         if test -f \$cf_alias\${suffix} ; then
3700                                                 if ( cmp -s \$target \$cf_alias\${suffix} )
3701                                                 then
3702                                                         :
3703                                                 else
3704                                                         echo .. \$verb alias \$cf_alias\${suffix}
3705                                                         rm -f \$cf_alias\${suffix}
3706                                                         $LN_S \$target \$cf_alias\${suffix}
3707                                                 fi
3708                                         else
3709                                                 echo .. \$verb alias \$cf_alias\${suffix}
3710                                                 rm -f \$cf_alias\${suffix}
3711                                                 $LN_S \$target \$cf_alias\${suffix}
3712                                         fi
3713                                 done
3714                         )
3715                 )
3716         elif test \$verb = removing ; then
3717                 echo \$verb \$target
3718                 rm -f \$target
3719                 test -n "\$aliases" && (
3720                         cd $cf_subdir\${section} && (
3721                                 for cf_alias in \$aliases
3722                                 do
3723                                         if test \$section = 1 ; then
3724                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
3725                                         fi
3726
3727                                         echo .. \$verb alias \$cf_alias\${suffix}
3728                                         rm -f \$cf_alias\${suffix}
3729                                 done
3730                         )
3731                 )
3732         else
3733 #               echo ".hy 0"
3734                 cat \$TMP
3735         fi
3736         ;;
3737 esac
3738 done
3739 exit 0
3740 CF_EOF
3741 chmod 755 man/edit_man.sh
3742
3743
3744
3745 ###############################################################################
3746
3747
3748 ### Note that some functions (such as const) are normally disabled anyway.
3749 echo $ac_n "checking if you want to build with function extensions""... $ac_c" 1>&6
3750 echo "configure:3751: checking if you want to build with function extensions" >&5
3751
3752 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
3753 if test "${enable_ext_funcs+set}" = set; then
3754   enableval="$enable_ext_funcs"
3755   with_ext_funcs=$enableval
3756 else
3757   with_ext_funcs=yes
3758 fi
3759
3760 echo "$ac_t""$with_ext_funcs" 1>&6
3761 if test "$with_ext_funcs" = yes ; then
3762         cat >> confdefs.h <<\EOF
3763 #define HAVE_CURSES_VERSION 1
3764 EOF
3765
3766         cat >> confdefs.h <<\EOF
3767 #define HAVE_HAS_KEY 1
3768 EOF
3769
3770         cat >> confdefs.h <<\EOF
3771 #define HAVE_RESIZETERM 1
3772 EOF
3773
3774         cat >> confdefs.h <<\EOF
3775 #define HAVE_USE_DEFAULT_COLORS 1
3776 EOF
3777
3778         cat >> confdefs.h <<\EOF
3779 #define HAVE_WRESIZE 1
3780 EOF
3781
3782         cat >> confdefs.h <<\EOF
3783 #define NCURSES_EXT_FUNCS 1
3784 EOF
3785
3786 fi
3787
3788 ###   use option --enable-const to turn on use of const beyond that in XSI.
3789 echo $ac_n "checking for extended use of const keyword""... $ac_c" 1>&6
3790 echo "configure:3791: checking for extended use of const keyword" >&5
3791
3792 # Check whether --enable-const or --disable-const was given.
3793 if test "${enable_const+set}" = set; then
3794   enableval="$enable_const"
3795   with_ext_const=$enableval
3796 else
3797   with_ext_const=no
3798 fi
3799
3800 echo "$ac_t""$with_ext_const" 1>&6
3801 NCURSES_CONST='/*nothing*/'
3802 if test "$with_ext_const" = yes ; then
3803         NCURSES_CONST=const
3804 fi
3805
3806
3807 echo $ac_n "checking if you want \$NCURSES_NO_PADDING code""... $ac_c" 1>&6
3808 echo "configure:3809: checking if you want \$NCURSES_NO_PADDING code" >&5
3809
3810 # Check whether --enable-no-padding or --disable-no-padding was given.
3811 if test "${enable_no_padding+set}" = set; then
3812   enableval="$enable_no_padding"
3813   with_no_padding=$enableval
3814 else
3815   with_no_padding=$with_ext_funcs
3816 fi
3817
3818 echo "$ac_t""$with_no_padding" 1>&6
3819 test "$with_no_padding" = yes && cat >> confdefs.h <<\EOF
3820 #define NCURSES_NO_PADDING 1
3821 EOF
3822
3823
3824 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
3825 echo $ac_n "checking if you want SIGWINCH handler""... $ac_c" 1>&6
3826 echo "configure:3827: checking if you want SIGWINCH handler" >&5
3827
3828 # Check whether --enable-sigwinch or --disable-sigwinch was given.
3829 if test "${enable_sigwinch+set}" = set; then
3830   enableval="$enable_sigwinch"
3831   with_sigwinch=$enableval
3832 else
3833   with_sigwinch=$with_ext_funcs
3834 fi
3835
3836 echo "$ac_t""$with_sigwinch" 1>&6
3837 test "$with_sigwinch" = yes && cat >> confdefs.h <<\EOF
3838 #define USE_SIGWINCH 1
3839 EOF
3840
3841
3842 ###   use option --enable-tcap-names to allow user to define new capabilities
3843 echo $ac_n "checking if you want user-definable terminal capabilities like termcap""... $ac_c" 1>&6
3844 echo "configure:3845: checking if you want user-definable terminal capabilities like termcap" >&5
3845
3846 # Check whether --enable-tcap-names or --disable-tcap-names was given.
3847 if test "${enable_tcap_names+set}" = set; then
3848   enableval="$enable_tcap_names"
3849   with_tcap_names=$enableval
3850 else
3851   with_tcap_names=$with_ext_funcs
3852 fi
3853
3854 echo "$ac_t""$with_tcap_names" 1>&6
3855 NCURSES_XNAMES=0
3856 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
3857
3858
3859 ###############################################################################
3860 # These options are relatively safe to experiment with.
3861
3862 echo $ac_n "checking if you want all development code""... $ac_c" 1>&6
3863 echo "configure:3864: checking if you want all development code" >&5
3864
3865 # Check whether --with-develop or --without-develop was given.
3866 if test "${with_develop+set}" = set; then
3867   withval="$with_develop"
3868   with_develop=$withval
3869 else
3870   with_develop=no
3871 fi
3872
3873 echo "$ac_t""$with_develop" 1>&6
3874
3875 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
3876 echo $ac_n "checking if you want colorfgbg code""... $ac_c" 1>&6
3877 echo "configure:3878: checking if you want colorfgbg code" >&5
3878
3879 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
3880 if test "${enable_hard_tabs+set}" = set; then
3881   enableval="$enable_hard_tabs"
3882   with_colorfgbg=$enableval
3883 else
3884   with_colorfgbg=$with_develop
3885 fi
3886
3887 echo "$ac_t""$with_colorfgbg" 1>&6
3888 test "$with_colorfgbg" = yes && cat >> confdefs.h <<\EOF
3889 #define USE_COLORFGBG 1
3890 EOF
3891
3892
3893 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
3894 echo $ac_n "checking if you want hard-tabs code""... $ac_c" 1>&6
3895 echo "configure:3896: checking if you want hard-tabs code" >&5
3896
3897 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
3898 if test "${enable_hard_tabs+set}" = set; then
3899   enableval="$enable_hard_tabs"
3900   with_hardtabs=$enableval
3901 else
3902   with_hardtabs=$with_develop
3903 fi
3904
3905 echo "$ac_t""$with_hardtabs" 1>&6
3906 test "$with_hardtabs" = yes && cat >> confdefs.h <<\EOF
3907 #define USE_HARD_TABS 1
3908 EOF
3909
3910
3911 echo $ac_n "checking if you want to use restrict environment when running as root""... $ac_c" 1>&6
3912 echo "configure:3913: checking if you want to use restrict environment when running as root" >&5
3913
3914 # Check whether --enable-root-environ or --disable-root-environ was given.
3915 if test "${enable_root_environ+set}" = set; then
3916   enableval="$enable_root_environ"
3917   with_root_environ=$enableval
3918 else
3919   with_root_environ=yes
3920 fi
3921
3922 echo "$ac_t""$with_root_environ" 1>&6
3923 test "$with_root_environ" = yes && cat >> confdefs.h <<\EOF
3924 #define USE_ROOT_ENVIRON 1
3925 EOF
3926
3927
3928 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
3929 echo $ac_n "checking if you want limited support for xmc""... $ac_c" 1>&6
3930 echo "configure:3931: checking if you want limited support for xmc" >&5
3931
3932 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
3933 if test "${enable_xmc_glitch+set}" = set; then
3934   enableval="$enable_xmc_glitch"
3935   with_xmc_glitch=$enableval
3936 else
3937   with_xmc_glitch=$with_develop
3938 fi
3939
3940 echo "$ac_t""$with_xmc_glitch" 1>&6
3941 test "$with_xmc_glitch" = yes && cat >> confdefs.h <<\EOF
3942 #define USE_XMC_SUPPORT 1
3943 EOF
3944
3945
3946 ###############################################################################
3947 # These are just experimental, probably should not be in a package:
3948
3949
3950 echo $ac_n "checking if you do not want to assume colors are white-on-black""... $ac_c" 1>&6
3951 echo "configure:3952: checking if you do not want to assume colors are white-on-black" >&5
3952
3953 # Check whether --enable-assumed-color or --disable-assumed-color was given.
3954 if test "${enable_assumed_color+set}" = set; then
3955   enableval="$enable_assumed_color"
3956   with_assumed_color=$enableval
3957 else
3958   with_assumed_color=yes
3959 fi
3960
3961 echo "$ac_t""$with_assumed_color" 1>&6
3962 test "$with_assumed_color" = yes && cat >> confdefs.h <<\EOF
3963 #define USE_ASSUMED_COLOR 1
3964 EOF
3965
3966
3967 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
3968 echo $ac_n "checking if you want hashmap scrolling-optimization code""... $ac_c" 1>&6
3969 echo "configure:3970: checking if you want hashmap scrolling-optimization code" >&5
3970
3971 # Check whether --enable-hashmap or --disable-hashmap was given.
3972 if test "${enable_hashmap+set}" = set; then
3973   enableval="$enable_hashmap"
3974   with_hashmap=$enableval
3975 else
3976   with_hashmap=yes
3977 fi
3978
3979 echo "$ac_t""$with_hashmap" 1>&6
3980 test "$with_hashmap" = yes && cat >> confdefs.h <<\EOF
3981 #define USE_HASHMAP 1
3982 EOF
3983
3984
3985 echo $ac_n "checking if you want experimental safe-sprintf code""... $ac_c" 1>&6
3986 echo "configure:3987: checking if you want experimental safe-sprintf code" >&5
3987
3988 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
3989 if test "${enable_safe_sprintf+set}" = set; then
3990   enableval="$enable_safe_sprintf"
3991   with_safe_sprintf=$enableval
3992 else
3993   with_safe_sprintf=no
3994 fi
3995
3996 echo "$ac_t""$with_safe_sprintf" 1>&6
3997 test "$with_safe_sprintf" = yes && cat >> confdefs.h <<\EOF
3998 #define USE_SAFE_SPRINTF 1
3999 EOF
4000
4001
4002 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
4003 # when hashmap is used scroll hints are useless
4004 if test "$with_hashmap" = no ; then
4005 echo $ac_n "checking if you want to experiment without scrolling-hints code""... $ac_c" 1>&6
4006 echo "configure:4007: checking if you want to experiment without scrolling-hints code" >&5
4007
4008 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
4009 if test "${enable_scroll_hints+set}" = set; then
4010   enableval="$enable_scroll_hints"
4011   with_scroll_hints=$enableval
4012 else
4013   with_scroll_hints=yes
4014 fi
4015
4016 echo "$ac_t""$with_scroll_hints" 1>&6
4017 test "$with_scroll_hints" = yes && cat >> confdefs.h <<\EOF
4018 #define USE_SCROLL_HINTS 1
4019 EOF
4020
4021 fi
4022
4023 ###   use option --enable-widec to turn on use of wide-character support
4024 echo $ac_n "checking if you want experimental wide-character code""... $ac_c" 1>&6
4025 echo "configure:4026: checking if you want experimental wide-character code" >&5
4026
4027 # Check whether --enable-widec&nb