]> ncurses.scripts.mit.edu Git - ncurses.git/blob - test/configure
ncurses 5.2
[ncurses.git] / test / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13.20000819 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14
15 # Initialize some variables set by options.
16 # The variables have the same names as the options, with
17 # dashes changed to underlines.
18 build=NONE
19 cache_file=./config.cache
20 exec_prefix=NONE
21 host=NONE
22 no_create=
23 nonopt=NONE
24 no_recursion=
25 prefix=NONE
26 program_prefix=NONE
27 program_suffix=NONE
28 program_transform_name=s,x,x,
29 silent=
30 site=
31 srcdir=
32 target=NONE
33 verbose=
34 x_includes=NONE
35 x_libraries=NONE
36 bindir='${exec_prefix}/bin'
37 sbindir='${exec_prefix}/sbin'
38 libexecdir='${exec_prefix}/libexec'
39 datadir='${prefix}/share'
40 sysconfdir='${prefix}/etc'
41 sharedstatedir='${prefix}/com'
42 localstatedir='${prefix}/var'
43 libdir='${exec_prefix}/lib'
44 includedir='${prefix}/include'
45 oldincludedir='/usr/include'
46 infodir='${prefix}/info'
47 mandir='${prefix}/man'
48
49 # Initialize some other variables.
50 subdirs=
51 MFLAGS= MAKEFLAGS=
52 SHELL=${CONFIG_SHELL-/bin/sh}
53 # Maximum number of lines to put in a shell here document.
54 ac_max_here_lines=12
55
56 ac_prev=
57 for ac_option
58 do
59
60   # If the previous option needs an argument, assign it.
61   if test -n "$ac_prev"; then
62     eval "$ac_prev=\$ac_option"
63     ac_prev=
64     continue
65   fi
66
67   case "$ac_option" in
68   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
69   *) ac_optarg= ;;
70   esac
71
72   # Accept the important Cygnus configure options, so we can diagnose typos.
73
74   case "$ac_option" in
75
76   -bindir | --bindir | --bindi | --bind | --bin | --bi)
77     ac_prev=bindir ;;
78   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
79     bindir="$ac_optarg" ;;
80
81   -build | --build | --buil | --bui | --bu)
82     ac_prev=build ;;
83   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
84     build="$ac_optarg" ;;
85
86   -cache-file | --cache-file | --cache-fil | --cache-fi \
87   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
88     ac_prev=cache_file ;;
89   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
90   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
91     cache_file="$ac_optarg" ;;
92
93   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
94     ac_prev=datadir ;;
95   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
96   | --da=*)
97     datadir="$ac_optarg" ;;
98
99   -disable-* | --disable-*)
100     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
101     # Reject names that are not valid shell variable names.
102     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
103       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
104     fi
105     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
106     eval "enable_${ac_feature}=no" ;;
107
108   -enable-* | --enable-*)
109     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
110     # Reject names that are not valid shell variable names.
111     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
112       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
113     fi
114     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
115     case "$ac_option" in
116       *=*) ;;
117       *) ac_optarg=yes ;;
118     esac
119     eval "enable_${ac_feature}='$ac_optarg'" ;;
120
121   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
122   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
123   | --exec | --exe | --ex)
124     ac_prev=exec_prefix ;;
125   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
126   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
127   | --exec=* | --exe=* | --ex=*)
128     exec_prefix="$ac_optarg" ;;
129
130   -gas | --gas | --ga | --g)
131     # Obsolete; use --with-gas.
132     with_gas=yes ;;
133
134   -help | --help | --hel | --he)
135     # Omit some internal or obsolete options to make the list less imposing.
136     # This message is too long to be a string in the A/UX 3.1 sh.
137     cat << EOF
138 Usage: configure [options] [host]
139 Options: [defaults in brackets after descriptions]
140 Configuration:
141   --cache-file=FILE       cache test results in FILE
142   --help                  print this message
143   --no-create             do not create output files
144   --quiet, --silent       do not print \`checking...' messages
145   --version               print the version of autoconf that created configure
146 Directory and file names:
147   --prefix=PREFIX         install architecture-independent files in PREFIX
148                           [$ac_default_prefix]
149   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
150                           [same as prefix]
151   --bindir=DIR            user executables in DIR [EPREFIX/bin]
152   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
153   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
154   --datadir=DIR           read-only architecture-independent data in DIR
155                           [PREFIX/share]
156   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
157   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
158                           [PREFIX/com]
159   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
160   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
161   --includedir=DIR        C header files in DIR [PREFIX/include]
162   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
163   --infodir=DIR           info documentation in DIR [PREFIX/info]
164   --mandir=DIR            man documentation in DIR [PREFIX/man]
165   --srcdir=DIR            find the sources in DIR [configure dir or ..]
166   --program-prefix=PREFIX prepend PREFIX to installed program names
167   --program-suffix=SUFFIX append SUFFIX to installed program names
168   --program-transform-name=PROGRAM
169                           run sed PROGRAM on installed program names
170 EOF
171     cat << EOF
172 Host type:
173   --build=BUILD           configure for building on BUILD [BUILD=HOST]
174   --host=HOST             configure for HOST [guessed]
175   --target=TARGET         configure for TARGET [TARGET=HOST]
176 Features and packages:
177   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
178   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
179   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
180   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
181   --x-includes=DIR        X include files are in DIR
182   --x-libraries=DIR       X library files are in DIR
183 EOF
184 cat <<EOF
185 --enable and --with options recognized:
186   --with-5lib             use SunOS sysv-libraries
187   --with-ncurses          use ncurses-libraries (installed)
188 EOF
189     exit 0 ;;
190
191   -host | --host | --hos | --ho)
192     ac_prev=host ;;
193   -host=* | --host=* | --hos=* | --ho=*)
194     host="$ac_optarg" ;;
195
196   -includedir | --includedir | --includedi | --included | --include \
197   | --includ | --inclu | --incl | --inc)
198     ac_prev=includedir ;;
199   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
200   | --includ=* | --inclu=* | --incl=* | --inc=*)
201     includedir="$ac_optarg" ;;
202
203   -infodir | --infodir | --infodi | --infod | --info | --inf)
204     ac_prev=infodir ;;
205   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
206     infodir="$ac_optarg" ;;
207
208   -libdir | --libdir | --libdi | --libd)
209     ac_prev=libdir ;;
210   -libdir=* | --libdir=* | --libdi=* | --libd=*)
211     libdir="$ac_optarg" ;;
212
213   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
214   | --libexe | --libex | --libe)
215     ac_prev=libexecdir ;;
216   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
217   | --libexe=* | --libex=* | --libe=*)
218     libexecdir="$ac_optarg" ;;
219
220   -localstatedir | --localstatedir | --localstatedi | --localstated \
221   | --localstate | --localstat | --localsta | --localst \
222   | --locals | --local | --loca | --loc | --lo)
223     ac_prev=localstatedir ;;
224   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
225   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
226   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
227     localstatedir="$ac_optarg" ;;
228
229   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
230     ac_prev=mandir ;;
231   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
232     mandir="$ac_optarg" ;;
233
234   -nfp | --nfp | --nf)
235     # Obsolete; use --without-fp.
236     with_fp=no ;;
237
238   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
239   | --no-cr | --no-c)
240     no_create=yes ;;
241
242   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
243   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
244     no_recursion=yes ;;
245
246   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
247   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
248   | --oldin | --oldi | --old | --ol | --o)
249     ac_prev=oldincludedir ;;
250   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
251   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
252   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
253     oldincludedir="$ac_optarg" ;;
254
255   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
256     ac_prev=prefix ;;
257   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
258     prefix="$ac_optarg" ;;
259
260   -program-prefix | --program-prefix | --program-prefi | --program-pref \
261   | --program-pre | --program-pr | --program-p)
262     ac_prev=program_prefix ;;
263   -program-prefix=* | --program-prefix=* | --program-prefi=* \
264   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
265     program_prefix="$ac_optarg" ;;
266
267   -program-suffix | --program-suffix | --program-suffi | --program-suff \
268   | --program-suf | --program-su | --program-s)
269     ac_prev=program_suffix ;;
270   -program-suffix=* | --program-suffix=* | --program-suffi=* \
271   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
272     program_suffix="$ac_optarg" ;;
273
274   -program-transform-name | --program-transform-name \
275   | --program-transform-nam | --program-transform-na \
276   | --program-transform-n | --program-transform- \
277   | --program-transform | --program-transfor \
278   | --program-transfo | --program-transf \
279   | --program-trans | --program-tran \
280   | --progr-tra | --program-tr | --program-t)
281     ac_prev=program_transform_name ;;
282   -program-transform-name=* | --program-transform-name=* \
283   | --program-transform-nam=* | --program-transform-na=* \
284   | --program-transform-n=* | --program-transform-=* \
285   | --program-transform=* | --program-transfor=* \
286   | --program-transfo=* | --program-transf=* \
287   | --program-trans=* | --program-tran=* \
288   | --progr-tra=* | --program-tr=* | --program-t=*)
289     program_transform_name="$ac_optarg" ;;
290
291   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
292   | -silent | --silent | --silen | --sile | --sil)
293     silent=yes ;;
294
295   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
296     ac_prev=sbindir ;;
297   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
298   | --sbi=* | --sb=*)
299     sbindir="$ac_optarg" ;;
300
301   -sharedstatedir | --sharedstatedir | --sharedstatedi \
302   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
303   | --sharedst | --shareds | --shared | --share | --shar \
304   | --sha | --sh)
305     ac_prev=sharedstatedir ;;
306   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
307   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
308   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
309   | --sha=* | --sh=*)
310     sharedstatedir="$ac_optarg" ;;
311
312   -site | --site | --sit)
313     ac_prev=site ;;
314   -site=* | --site=* | --sit=*)
315     site="$ac_optarg" ;;
316
317   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
318     ac_prev=srcdir ;;
319   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
320     srcdir="$ac_optarg" ;;
321
322   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
323   | --syscon | --sysco | --sysc | --sys | --sy)
324     ac_prev=sysconfdir ;;
325   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
326   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
327     sysconfdir="$ac_optarg" ;;
328
329   -target | --target | --targe | --targ | --tar | --ta | --t)
330     ac_prev=target ;;
331   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
332     target="$ac_optarg" ;;
333
334   -v | -verbose | --verbose | --verbos | --verbo | --verb)
335     verbose=yes ;;
336
337   -version | --version | --versio | --versi | --vers)
338     echo "configure generated by autoconf version 2.13.20000819"
339     exit 0 ;;
340
341   -with-* | --with-*)
342     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
343     # Reject names that are not valid shell variable names.
344     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
345       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
346     fi
347     ac_package=`echo $ac_package| sed 's/-/_/g'`
348     case "$ac_option" in
349       *=*) ;;
350       *) ac_optarg=yes ;;
351     esac
352     eval "with_${ac_package}='$ac_optarg'" ;;
353
354   -without-* | --without-*)
355     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
356     # Reject names that are not valid shell variable names.
357     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
358       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
359     fi
360     ac_package=`echo $ac_package| sed 's/-/_/g'`
361     eval "with_${ac_package}=no" ;;
362
363   --x)
364     # Obsolete; use --with-x.
365     with_x=yes ;;
366
367   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
368   | --x-incl | --x-inc | --x-in | --x-i)
369     ac_prev=x_includes ;;
370   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
371   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
372     x_includes="$ac_optarg" ;;
373
374   -x-libraries | --x-libraries | --x-librarie | --x-librari \
375   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
376     ac_prev=x_libraries ;;
377   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
378   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
379     x_libraries="$ac_optarg" ;;
380
381   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
382     ;;
383
384   *)
385     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
386       echo "configure: warning: $ac_option: invalid host type" 1>&2
387     fi
388     if test "x$nonopt" != xNONE; then
389       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
390     fi
391     nonopt="$ac_option"
392     ;;
393
394   esac
395 done
396
397 if test -n "$ac_prev"; then
398   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
399 fi
400
401 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
402
403 # File descriptor usage:
404 # 0 standard input
405 # 1 file creation
406 # 2 errors and warnings
407 # 3 some systems may open it to /dev/tty
408 # 4 used on the Kubota Titan
409 # 6 checking for... messages and results
410 # 5 compiler messages saved in config.log
411 if test "$silent" = yes; then
412   exec 6>/dev/null
413 else
414   exec 6>&1
415 fi
416 exec 5>./config.log
417
418 echo "\
419 This file contains any messages produced by compilers while
420 running configure, to aid debugging if configure makes a mistake.
421 " 1>&5
422
423 # Strip out --no-create and --no-recursion so they do not pile up.
424 # Also quote any args containing shell metacharacters.
425 ac_configure_args=
426 for ac_arg
427 do
428   case "$ac_arg" in
429   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
430   | --no-cr | --no-c) ;;
431   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
432   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
433   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
434   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
435   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
436   esac
437 done
438
439 # NLS nuisances.
440 # Only set these to C if already set.  These must not be set unconditionally
441 # because not all systems understand e.g. LANG=C (notably SCO).
442 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
443 # Non-C LC_CTYPE values break the ctype check.
444 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
445 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
446 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
447 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
448
449 # confdefs.h avoids OS command line length limits that DEFS can exceed.
450 rm -rf conftest* confdefs.h
451 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
452 echo > confdefs.h
453
454 # A filename unique to this package, relative to the directory that
455 # configure is in, which we can look for to find out if srcdir is correct.
456 ac_unique_file=ncurses.c
457
458 # Find the source files, if location was not specified.
459 if test -z "$srcdir"; then
460   ac_srcdir_defaulted=yes
461   # Try the directory containing this script, then its parent.
462   ac_prog=$0
463   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
464   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
465   srcdir=$ac_confdir
466   if test ! -r $srcdir/$ac_unique_file; then
467     srcdir=..
468   fi
469 else
470   ac_srcdir_defaulted=no
471 fi
472 if test ! -r $srcdir/$ac_unique_file; then
473   if test "$ac_srcdir_defaulted" = yes; then
474     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
475   else
476     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
477   fi
478 fi
479 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
480
481 # Prefer explicitly selected file to automatically selected ones.
482 if test -z "$CONFIG_SITE"; then
483   if test "x$prefix" != xNONE; then
484     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
485   else
486     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
487   fi
488 fi
489 for ac_site_file in $CONFIG_SITE; do
490   if test -r "$ac_site_file"; then
491     echo "loading site script $ac_site_file"
492     . "$ac_site_file"
493   fi
494 done
495
496 if test -r "$cache_file"; then
497   echo "loading cache $cache_file"
498   . $cache_file
499 else
500   echo "creating cache $cache_file"
501   > $cache_file
502 fi
503
504 ac_ext=c
505 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
506 ac_cpp='$CPP $CPPFLAGS'
507 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
508 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
509 cross_compiling=$ac_cv_prog_cc_cross
510
511 ac_exeext=
512 ac_objext=o
513 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
514   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
515   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
516     ac_n= ac_c='
517 ' ac_t='        '
518   else
519     ac_n=-n ac_c= ac_t=
520   fi
521 else
522   ac_n= ac_c='\c' ac_t=
523 fi
524
525
526
527
528 # Extract the first word of "gcc", so it can be a program name with args.
529 set dummy gcc; ac_word=$2
530 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
531 echo "configure:532: checking for $ac_word" >&5
532 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
533   echo $ac_n "(cached) $ac_c" 1>&6
534 else
535   if test -n "$CC"; then
536   ac_cv_prog_CC="$CC" # Let the user override the test.
537 else
538   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
539   ac_dummy="$PATH"
540   for ac_dir in $ac_dummy; do
541     test -z "$ac_dir" && ac_dir=.
542     if test -f $ac_dir/$ac_word; then
543       ac_cv_prog_CC="gcc"
544       break
545     fi
546   done
547   IFS="$ac_save_ifs"
548 fi
549 fi
550 CC="$ac_cv_prog_CC"
551 if test -n "$CC"; then
552   echo "$ac_t""$CC" 1>&6
553 else
554   echo "$ac_t""no" 1>&6
555 fi
556
557 if test -z "$CC"; then
558   # Extract the first word of "cc", so it can be a program name with args.
559 set dummy cc; ac_word=$2
560 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
561 echo "configure:562: checking for $ac_word" >&5
562 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
563   echo $ac_n "(cached) $ac_c" 1>&6
564 else
565   if test -n "$CC"; then
566   ac_cv_prog_CC="$CC" # Let the user override the test.
567 else
568   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
569   ac_prog_rejected=no
570   ac_dummy="$PATH"
571   for ac_dir in $ac_dummy; do
572     test -z "$ac_dir" && ac_dir=.
573     if test -f $ac_dir/$ac_word; then
574       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
575         ac_prog_rejected=yes
576         continue
577       fi
578       ac_cv_prog_CC="cc"
579       break
580     fi
581   done
582   IFS="$ac_save_ifs"
583 if test $ac_prog_rejected = yes; then
584   # We found a bogon in the path, so make sure we never use it.
585   set dummy $ac_cv_prog_CC
586   shift
587   if test $# -gt 0; then
588     # We chose a different compiler from the bogus one.
589     # However, it has the same basename, so the bogon will be chosen
590     # first if we set CC to just the basename; use the full file name.
591     shift
592     set dummy "$ac_dir/$ac_word" "$@"
593     shift
594     ac_cv_prog_CC="$@"
595   fi
596 fi
597 fi
598 fi
599 CC="$ac_cv_prog_CC"
600 if test -n "$CC"; then
601   echo "$ac_t""$CC" 1>&6
602 else
603   echo "$ac_t""no" 1>&6
604 fi
605
606   if test -z "$CC"; then
607     case "`uname -s`" in
608     *win32* | *WIN32*)
609       # Extract the first word of "cl", so it can be a program name with args.
610 set dummy cl; ac_word=$2
611 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
612 echo "configure:613: checking for $ac_word" >&5
613 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
614   echo $ac_n "(cached) $ac_c" 1>&6
615 else
616   if test -n "$CC"; then
617   ac_cv_prog_CC="$CC" # Let the user override the test.
618 else
619   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
620   ac_dummy="$PATH"
621   for ac_dir in $ac_dummy; do
622     test -z "$ac_dir" && ac_dir=.
623     if test -f $ac_dir/$ac_word; then
624       ac_cv_prog_CC="cl"
625       break
626     fi
627   done
628   IFS="$ac_save_ifs"
629 fi
630 fi
631 CC="$ac_cv_prog_CC"
632 if test -n "$CC"; then
633   echo "$ac_t""$CC" 1>&6
634 else
635   echo "$ac_t""no" 1>&6
636 fi
637  ;;
638     esac
639   fi
640   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
641 fi
642
643 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
644 echo "configure:645: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
645
646 ac_ext=c
647 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
648 ac_cpp='$CPP $CPPFLAGS'
649 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
650 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
651 cross_compiling=$ac_cv_prog_cc_cross
652
653 cat > conftest.$ac_ext << EOF
654
655 #line 656 "configure"
656 #include "confdefs.h"
657
658 main(){return(0);}
659 EOF
660 if { (eval echo configure:661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
661   ac_cv_prog_cc_works=yes
662   # If we can't run a trivial program, we are probably using a cross compiler.
663   if (./conftest; exit) 2>/dev/null; then
664     ac_cv_prog_cc_cross=no
665   else
666     ac_cv_prog_cc_cross=yes
667   fi
668 else
669   echo "configure: failed program was:" >&5
670   cat conftest.$ac_ext >&5
671   ac_cv_prog_cc_works=no
672 fi
673 rm -fr conftest*
674 ac_ext=c
675 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
676 ac_cpp='$CPP $CPPFLAGS'
677 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
678 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
679 cross_compiling=$ac_cv_prog_cc_cross
680
681 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
682 if test $ac_cv_prog_cc_works = no; then
683   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
684 fi
685 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
686 echo "configure:687: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
687 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
688 cross_compiling=$ac_cv_prog_cc_cross
689
690 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
691 echo "configure:692: checking whether we are using GNU C" >&5
692 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
693   echo $ac_n "(cached) $ac_c" 1>&6
694 else
695   cat > conftest.c <<EOF
696 #ifdef __GNUC__
697   yes;
698 #endif
699 EOF
700 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
701   ac_cv_prog_gcc=yes
702 else
703   ac_cv_prog_gcc=no
704 fi
705 fi
706
707 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
708
709 if test $ac_cv_prog_gcc = yes; then
710   GCC=yes
711 else
712   GCC=
713 fi
714
715 ac_test_CFLAGS="${CFLAGS+set}"
716 ac_save_CFLAGS="$CFLAGS"
717 CFLAGS=
718 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
719 echo "configure:720: checking whether ${CC-cc} accepts -g" >&5
720 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
721   echo $ac_n "(cached) $ac_c" 1>&6
722 else
723   echo 'void f(){}' > conftest.c
724 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
725   ac_cv_prog_cc_g=yes
726 else
727   ac_cv_prog_cc_g=no
728 fi
729 rm -f conftest*
730
731 fi
732
733 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
734 if test "$ac_test_CFLAGS" = set; then
735   CFLAGS="$ac_save_CFLAGS"
736 elif test $ac_cv_prog_cc_g = yes; then
737   if test "$GCC" = yes; then
738     CFLAGS="-g -O2"
739   else
740     CFLAGS="-g"
741   fi
742 else
743   if test "$GCC" = yes; then
744     CFLAGS="-O2"
745   else
746     CFLAGS=
747   fi
748 fi
749
750
751 CC_G_OPT="-g"                           
752 CC_SHARED_OPTS=unknown                  
753 CPPFLAGS="$CPPFLAGS"                    
754 DFT_DEP_SUFFIX=""                       
755 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`    
756 DFT_UPR_MODEL="NORMAL"                  
757 ECHO_LINK='@ echo linking $@ ... ;'     
758 EXTRA_LIBS=""                           
759 LD="ld"                                 
760 LDFLAGS_SHARED=""                       
761 LD_MODEL=""                             
762 LD_SHARED_OPTS=""                       
763 LIBTOOL=""                              
764 LIB_NAME=curses                         
765 LIB_PREFIX="-l"                         
766 LINK_TESTS=""                           
767 LINT=lint                               
768 LINT_OPTS=""                            
769 LOCAL_LDFLAGS=""                        
770 MATH_LIB="-lm"                          
771 PROG_EXT=""                             
772 TEST_ARGS=""                            
773 TEST_DEPS=""                            
774 cf_cv_abi_version=""                    
775 cf_cv_rel_version=""                    
776
777
778 # Check whether --with-5lib or --without-5lib was given.
779 if test "${with_5lib+set}" = set; then
780   withval="$with_5lib"
781   LIBS="-L/usr/5lib $LIBS"
782          CPPFLAGS="$CPPFLAGS -I/usr/5include"
783 fi
784
785
786
787 # Check whether --with-ncurses or --without-ncurses was given.
788 if test "${with_ncurses+set}" = set; then
789   withval="$with_ncurses"
790   echo $ac_n "checking for initscr""... $ac_c" 1>&6
791 echo "configure:792: checking for initscr" >&5
792 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
793   echo $ac_n "(cached) $ac_c" 1>&6
794 else
795   cat > conftest.$ac_ext <<EOF
796 #line 797 "configure"
797 #include "confdefs.h"
798 /* System header to define __stub macros and hopefully few prototypes,
799     which can conflict with char initscr(); below.  */
800 #include <assert.h>
801 /* Override any gcc2 internal prototype to avoid an error.  */
802 /* We use char because int might match the return type of a gcc2
803     builtin and then its argument prototype would still apply.  */
804 char initscr();
805
806 int main() {
807
808 /* The GNU C library defines this for functions which it implements
809     to always fail with ENOSYS.  Some functions are actually named
810     something starting with __ and the normal name is an alias.  */
811 #if defined (__stub_initscr) || defined (__stub___initscr)
812 choke me
813 #else
814 initscr();
815 #endif
816
817 ; return 0; }
818 EOF
819 if { (eval echo configure:820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
820   rm -rf conftest*
821   eval "ac_cv_func_initscr=yes"
822 else
823   echo "configure: failed program was:" >&5
824   cat conftest.$ac_ext >&5
825   rm -rf conftest*
826   eval "ac_cv_func_initscr=no"
827 fi
828 rm -f conftest*
829 fi
830
831 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
832   echo "$ac_t""yes" 1>&6
833   :
834 else
835   echo "$ac_t""no" 1>&6
836
837          echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
838 echo "configure:839: checking for Gpm_Open in -lgpm" >&5
839 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
840 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
841   echo $ac_n "(cached) $ac_c" 1>&6
842 else
843   ac_save_LIBS="$LIBS"
844 LIBS="-lgpm  $LIBS"
845 cat > conftest.$ac_ext <<EOF
846 #line 847 "configure"
847 #include "confdefs.h"
848 /* Override any gcc2 internal prototype to avoid an error.  */
849 /* We use char because int might match the return type of a gcc2
850     builtin and then its argument prototype would still apply.  */
851 char Gpm_Open();
852
853 int main() {
854 Gpm_Open()
855 ; return 0; }
856 EOF
857 if { (eval echo configure:858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
858   rm -rf conftest*
859   eval "ac_cv_lib_$ac_lib_var=yes"
860 else
861   echo "configure: failed program was:" >&5
862   cat conftest.$ac_ext >&5
863   rm -rf conftest*
864   eval "ac_cv_lib_$ac_lib_var=no"
865 fi
866 rm -f conftest*
867 LIBS="$ac_save_LIBS"
868
869 fi
870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
871   echo "$ac_t""yes" 1>&6
872     ac_tr_lib=HAVE_LIB`echo gpm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
873     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
874   cat >> confdefs.h <<EOF
875 #define $ac_tr_lib 1
876 EOF
877
878   LIBS="-lgpm $LIBS"
879
880 else
881   echo "$ac_t""no" 1>&6
882 fi
883
884          LIB_NAME=ncurses
885          for p in $HOME /usr/local /usr
886          do
887                 if test -f $p/include/ncurses/curses.h
888                 then
889                         CPPFLAGS="$CPPFLAGS -I$p/include/ncurses"
890                         test $p != /usr && CPPFLAGS="$CPPFLAGS -I$p/include"
891                         test $p != /usr && LIBS="-L$p/lib $LIBS"
892                         break
893                 elif test $p != /usr
894                 then
895                         if test -f $p/include/curses.h
896                         then
897                                 CPPFLAGS="$CPPFLAGS -I$p/include"
898                                 LIBS="-L$p/lib $LIBS"
899                                 break
900                         fi
901                 fi
902          done
903         
904 fi
905
906 fi
907
908
909
910
911 echo $ac_n "checking for initscr""... $ac_c" 1>&6
912 echo "configure:913: checking for initscr" >&5
913 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
914   echo $ac_n "(cached) $ac_c" 1>&6
915 else
916   cat > conftest.$ac_ext <<EOF
917 #line 918 "configure"
918 #include "confdefs.h"
919 /* System header to define __stub macros and hopefully few prototypes,
920     which can conflict with char initscr(); below.  */
921 #include <assert.h>
922 /* Override any gcc2 internal prototype to avoid an error.  */
923 /* We use char because int might match the return type of a gcc2
924     builtin and then its argument prototype would still apply.  */
925 char initscr();
926
927 int main() {
928
929 /* The GNU C library defines this for functions which it implements
930     to always fail with ENOSYS.  Some functions are actually named
931     something starting with __ and the normal name is an alias.  */
932 #if defined (__stub_initscr) || defined (__stub___initscr)
933 choke me
934 #else
935 initscr();
936 #endif
937
938 ; return 0; }
939 EOF
940 if { (eval echo configure:941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
941   rm -rf conftest*
942   eval "ac_cv_func_initscr=yes"
943 else
944   echo "configure: failed program was:" >&5
945   cat conftest.$ac_ext >&5
946   rm -rf conftest*
947   eval "ac_cv_func_initscr=no"
948 fi
949 rm -f conftest*
950 fi
951
952 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
953   echo "$ac_t""yes" 1>&6
954   :
955 else
956   echo "$ac_t""no" 1>&6
957
958 echo $ac_n "checking for initscr in -l$LIB_NAME""... $ac_c" 1>&6
959 echo "configure:960: checking for initscr in -l$LIB_NAME" >&5
960 ac_lib_var=`echo $LIB_NAME'_'initscr | sed 'y%./+-%__p_%'`
961 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
962   echo $ac_n "(cached) $ac_c" 1>&6
963 else
964   ac_save_LIBS="$LIBS"
965 LIBS="-l$LIB_NAME  $LIBS"
966 cat > conftest.$ac_ext <<EOF
967 #line 968 "configure"
968 #include "confdefs.h"
969 /* Override any gcc2 internal prototype to avoid an error.  */
970 /* We use char because int might match the return type of a gcc2
971     builtin and then its argument prototype would still apply.  */
972 char initscr();
973
974 int main() {
975 initscr()
976 ; return 0; }
977 EOF
978 if { (eval echo configure:979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
979   rm -rf conftest*
980   eval "ac_cv_lib_$ac_lib_var=yes"
981 else
982   echo "configure: failed program was:" >&5
983   cat conftest.$ac_ext >&5
984   rm -rf conftest*
985   eval "ac_cv_lib_$ac_lib_var=no"
986 fi
987 rm -f conftest*
988 LIBS="$ac_save_LIBS"
989
990 fi
991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
992   echo "$ac_t""yes" 1>&6
993     ac_tr_lib=HAVE_LIB`echo $LIB_NAME | sed -e 's/[^a-zA-Z0-9_]/_/g' \
994     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
995   cat >> confdefs.h <<EOF
996 #define $ac_tr_lib 1
997 EOF
998
999   LIBS="-l$LIB_NAME $LIBS"
1000
1001 else
1002   echo "$ac_t""no" 1>&6
1003 fi
1004
1005 fi
1006
1007 echo $ac_n "checking for form_driver in -lform""... $ac_c" 1>&6
1008 echo "configure:1009: checking for form_driver in -lform" >&5
1009 ac_lib_var=`echo form'_'form_driver | sed 'y%./+-%__p_%'`
1010 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1011   echo $ac_n "(cached) $ac_c" 1>&6
1012 else
1013   ac_save_LIBS="$LIBS"
1014 LIBS="-lform  $LIBS"
1015 cat > conftest.$ac_ext <<EOF
1016 #line 1017 "configure"
1017 #include "confdefs.h"
1018 /* Override any gcc2 internal prototype to avoid an error.  */
1019 /* We use char because int might match the return type of a gcc2
1020     builtin and then its argument prototype would still apply.  */
1021 char form_driver();
1022
1023 int main() {
1024 form_driver()
1025 ; return 0; }
1026 EOF
1027 if { (eval echo configure:1028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1028   rm -rf conftest*
1029   eval "ac_cv_lib_$ac_lib_var=yes"
1030 else
1031   echo "configure: failed program was:" >&5
1032   cat conftest.$ac_ext >&5
1033   rm -rf conftest*
1034   eval "ac_cv_lib_$ac_lib_var=no"
1035 fi
1036 rm -f conftest*
1037 LIBS="$ac_save_LIBS"
1038
1039 fi
1040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1041   echo "$ac_t""yes" 1>&6
1042     ac_tr_lib=HAVE_LIB`echo form | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1043     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1044   cat >> confdefs.h <<EOF
1045 #define $ac_tr_lib 1
1046 EOF
1047
1048   LIBS="-lform $LIBS"
1049
1050 else
1051   echo "$ac_t""no" 1>&6
1052 fi
1053
1054 echo $ac_n "checking for menu_driver in -lmenu""... $ac_c" 1>&6
1055 echo "configure:1056: checking for menu_driver in -lmenu" >&5
1056 ac_lib_var=`echo menu'_'menu_driver | sed 'y%./+-%__p_%'`
1057 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1058   echo $ac_n "(cached) $ac_c" 1>&6
1059 else
1060   ac_save_LIBS="$LIBS"
1061 LIBS="-lmenu  $LIBS"
1062 cat > conftest.$ac_ext <<EOF
1063 #line 1064 "configure"
1064 #include "confdefs.h"
1065 /* Override any gcc2 internal prototype to avoid an error.  */
1066 /* We use char because int might match the return type of a gcc2
1067     builtin and then its argument prototype would still apply.  */
1068 char menu_driver();
1069
1070 int main() {
1071 menu_driver()
1072 ; return 0; }
1073 EOF
1074 if { (eval echo configure:1075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1075   rm -rf conftest*
1076   eval "ac_cv_lib_$ac_lib_var=yes"
1077 else
1078   echo "configure: failed program was:" >&5
1079   cat conftest.$ac_ext >&5
1080   rm -rf conftest*
1081   eval "ac_cv_lib_$ac_lib_var=no"
1082 fi
1083 rm -f conftest*
1084 LIBS="$ac_save_LIBS"
1085
1086 fi
1087 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1088   echo "$ac_t""yes" 1>&6
1089     ac_tr_lib=HAVE_LIB`echo menu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1090     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1091   cat >> confdefs.h <<EOF
1092 #define $ac_tr_lib 1
1093 EOF
1094
1095   LIBS="-lmenu $LIBS"
1096
1097 else
1098   echo "$ac_t""no" 1>&6
1099 fi
1100
1101 echo $ac_n "checking for new_panel in -lpanel""... $ac_c" 1>&6
1102 echo "configure:1103: checking for new_panel in -lpanel" >&5
1103 ac_lib_var=`echo panel'_'new_panel | sed 'y%./+-%__p_%'`
1104 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1105   echo $ac_n "(cached) $ac_c" 1>&6
1106 else
1107   ac_save_LIBS="$LIBS"
1108 LIBS="-lpanel  $LIBS"
1109 cat > conftest.$ac_ext <<EOF
1110 #line 1111 "configure"
1111 #include "confdefs.h"
1112 /* Override any gcc2 internal prototype to avoid an error.  */
1113 /* We use char because int might match the return type of a gcc2
1114     builtin and then its argument prototype would still apply.  */
1115 char new_panel();
1116
1117 int main() {
1118 new_panel()
1119 ; return 0; }
1120 EOF
1121 if { (eval echo configure:1122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1122   rm -rf conftest*
1123   eval "ac_cv_lib_$ac_lib_var=yes"
1124 else
1125   echo "configure: failed program was:" >&5
1126   cat conftest.$ac_ext >&5
1127   rm -rf conftest*
1128   eval "ac_cv_lib_$ac_lib_var=no"
1129 fi
1130 rm -f conftest*
1131 LIBS="$ac_save_LIBS"
1132
1133 fi
1134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1135   echo "$ac_t""yes" 1>&6
1136     ac_tr_lib=HAVE_LIB`echo panel | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1137     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1138   cat >> confdefs.h <<EOF
1139 #define $ac_tr_lib 1
1140 EOF
1141
1142   LIBS="-lpanel $LIBS"
1143
1144 else
1145   echo "$ac_t""no" 1>&6
1146 fi
1147
1148
1149 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1150 echo "configure:1151: checking return type of signal handlers" >&5
1151 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1152   echo $ac_n "(cached) $ac_c" 1>&6
1153 else
1154   cat > conftest.$ac_ext <<EOF
1155 #line 1156 "configure"
1156 #include "confdefs.h"
1157 #include <sys/types.h>
1158 #include <signal.h>
1159 #ifdef signal
1160 #undef signal
1161 #endif
1162 #ifdef __cplusplus
1163 extern "C" void (*signal (int, void (*)(int)))(int);
1164 #else
1165 void (*signal ()) ();
1166 #endif
1167
1168 int main() {
1169 int i;
1170 ; return 0; }
1171 EOF
1172 if { (eval echo configure:1173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1173   rm -rf conftest*
1174   ac_cv_type_signal=void
1175 else
1176   echo "configure: failed program was:" >&5
1177   cat conftest.$ac_ext >&5
1178   rm -rf conftest*
1179   ac_cv_type_signal=int
1180 fi
1181 rm -f conftest*
1182 fi
1183
1184 echo "$ac_t""$ac_cv_type_signal" 1>&6
1185 cat >> confdefs.h <<EOF
1186 #define RETSIGTYPE $ac_cv_type_signal
1187 EOF
1188
1189
1190
1191 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1192 echo "configure:1193: checking how to run the C preprocessor" >&5
1193 # On Suns, sometimes $CPP names a directory.
1194 if test -n "$CPP" && test -d "$CPP"; then
1195   CPP=
1196 fi
1197 if test -z "$CPP"; then
1198 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1199   echo $ac_n "(cached) $ac_c" 1>&6
1200 else
1201     # This must be in double quotes, not single quotes, because CPP may get
1202   # substituted into the Makefile and "${CC-cc}" will confuse make.
1203   CPP="${CC-cc} -E"
1204   # On the NeXT, cc -E runs the code through the compiler's parser,
1205   # not just through cpp.
1206   cat > conftest.$ac_ext <<EOF
1207 #line 1208 "configure"
1208 #include "confdefs.h"
1209 #include <assert.h>
1210 Syntax Error
1211 EOF
1212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1213 { (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1215 if test -z "$ac_err"; then
1216   :
1217 else
1218   echo "$ac_err" >&5
1219   echo "configure: failed program was:" >&5
1220   cat conftest.$ac_ext >&5
1221   rm -rf conftest*
1222   CPP="${CC-cc} -E -traditional-cpp"
1223   cat > conftest.$ac_ext <<EOF
1224 #line 1225 "configure"
1225 #include "confdefs.h"
1226 #include <assert.h>
1227 Syntax Error
1228 EOF
1229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1230 { (eval echo configure:1231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1232 if test -z "$ac_err"; then
1233   :
1234 else
1235   echo "$ac_err" >&5
1236   echo "configure: failed program was:" >&5
1237   cat conftest.$ac_ext >&5
1238   rm -rf conftest*
1239   CPP="${CC-cc} -nologo -E"
1240   cat > conftest.$ac_ext <<EOF
1241 #line 1242 "configure"
1242 #include "confdefs.h"
1243 #include <assert.h>
1244 Syntax Error
1245 EOF
1246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1247 { (eval echo configure:1248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1249 if test -z "$ac_err"; then
1250   :
1251 else
1252   echo "$ac_err" >&5
1253   echo "configure: failed program was:" >&5
1254   cat conftest.$ac_ext >&5
1255   rm -rf conftest*
1256   CPP=/lib/cpp
1257 fi
1258 rm -f conftest*
1259 fi
1260 rm -f conftest*
1261 fi
1262 rm -f conftest*
1263   ac_cv_prog_CPP="$CPP"
1264 fi
1265   CPP="$ac_cv_prog_CPP"
1266 else
1267   ac_cv_prog_CPP="$CPP"
1268 fi
1269 echo "$ac_t""$CPP" 1>&6
1270
1271 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1272 echo "configure:1273: checking for ANSI C header files" >&5
1273 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1274   echo $ac_n "(cached) $ac_c" 1>&6
1275 else
1276   cat > conftest.$ac_ext <<EOF
1277 #line 1278 "configure"
1278 #include "confdefs.h"
1279 #include <stdlib.h>
1280 #include <stdarg.h>
1281 #include <string.h>
1282 #include <float.h>
1283 EOF
1284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1285 { (eval echo configure:1286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1287 if test -z "$ac_err"; then
1288   rm -rf conftest*
1289   ac_cv_header_stdc=yes
1290 else
1291   echo "$ac_err" >&5
1292   echo "configure: failed program was:" >&5
1293   cat conftest.$ac_ext >&5
1294   rm -rf conftest*
1295   ac_cv_header_stdc=no
1296 fi
1297 rm -f conftest*
1298
1299 if test $ac_cv_header_stdc = yes; then
1300   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1301 cat > conftest.$ac_ext <<EOF
1302 #line 1303 "configure"
1303 #include "confdefs.h"
1304 #include <string.h>
1305 EOF
1306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1307   egrep "memchr" >/dev/null 2>&1; then
1308   :
1309 else
1310   rm -rf conftest*
1311   ac_cv_header_stdc=no
1312 fi
1313 rm -f conftest*
1314
1315 fi
1316
1317 if test $ac_cv_header_stdc = yes; then
1318   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1319 cat > conftest.$ac_ext <<EOF
1320 #line 1321 "configure"
1321 #include "confdefs.h"
1322 #include <stdlib.h>
1323 EOF
1324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1325   egrep "free" >/dev/null 2>&1; then
1326   :
1327 else
1328   rm -rf conftest*
1329   ac_cv_header_stdc=no
1330 fi
1331 rm -f conftest*
1332
1333 fi
1334
1335 if test $ac_cv_header_stdc = yes; then
1336   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1337 if test "$cross_compiling" = yes; then
1338   :
1339 else
1340   cat > conftest.$ac_ext <<EOF
1341 #line 1342 "configure"
1342 #include "confdefs.h"
1343 #include <ctype.h>
1344 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1345 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1346 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1347 int main () { int i; for (i = 0; i < 256; i++)
1348 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1349 exit (0); }
1350
1351 EOF
1352 if { (eval echo configure:1353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1353 then
1354   :
1355 else
1356   echo "configure: failed program was:" >&5
1357   cat conftest.$ac_ext >&5
1358   rm -fr conftest*
1359   ac_cv_header_stdc=no
1360 fi
1361 rm -fr conftest*
1362 fi
1363
1364 fi
1365 fi
1366
1367 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1368 if test $ac_cv_header_stdc = yes; then
1369   cat >> confdefs.h <<\EOF
1370 #define STDC_HEADERS 1
1371 EOF
1372
1373 fi
1374
1375 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1376 echo "configure:1377: checking whether time.h and sys/time.h may both be included" >&5
1377 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1378   echo $ac_n "(cached) $ac_c" 1>&6
1379 else
1380   cat > conftest.$ac_ext <<EOF
1381 #line 1382 "configure"
1382 #include "confdefs.h"
1383 #include <sys/types.h>
1384 #include <sys/time.h>
1385 #include <time.h>
1386 int main() {
1387 struct tm *tp;
1388 ; return 0; }
1389 EOF
1390 if { (eval echo configure:1391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1391   rm -rf conftest*
1392   ac_cv_header_time=yes
1393 else
1394   echo "configure: failed program was:" >&5
1395   cat conftest.$ac_ext >&5
1396   rm -rf conftest*
1397   ac_cv_header_time=no
1398 fi
1399 rm -f conftest*
1400 fi
1401
1402 echo "$ac_t""$ac_cv_header_time" 1>&6
1403 if test $ac_cv_header_time = yes; then
1404   cat >> confdefs.h <<\EOF
1405 #define TIME_WITH_SYS_TIME 1
1406 EOF
1407
1408 fi
1409
1410 for ac_hdr in \
1411 form.h \
1412 getopt.h \
1413 menu.h \
1414 nc_alloc.h \
1415 panel.h \
1416 sys/ioctl.h \
1417 sys/select.h \
1418 sys/time.h \
1419 termios.h \
1420 unistd.h \
1421
1422 do
1423 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1424 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1425 echo "configure:1426: checking for $ac_hdr" >&5
1426 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1427   echo $ac_n "(cached) $ac_c" 1>&6
1428 else
1429   cat > conftest.$ac_ext <<EOF
1430 #line 1431 "configure"
1431 #include "confdefs.h"
1432 #include <$ac_hdr>
1433 EOF
1434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1435 { (eval echo configure:1436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1437 if test -z "$ac_err"; then
1438   rm -rf conftest*
1439   eval "ac_cv_header_$ac_safe=yes"
1440 else
1441   echo "$ac_err" >&5
1442   echo "configure: failed program was:" >&5
1443   cat conftest.$ac_ext >&5
1444   rm -rf conftest*
1445   eval "ac_cv_header_$ac_safe=no"
1446 fi
1447 rm -f conftest*
1448 fi
1449 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1450   echo "$ac_t""yes" 1>&6
1451     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1452   cat >> confdefs.h <<EOF
1453 #define $ac_tr_hdr 1
1454 EOF
1455  
1456 else
1457   echo "$ac_t""no" 1>&6
1458 fi
1459 done
1460
1461
1462 for ac_func in \
1463 gettimeofday \
1464 napms \
1465 resizeterm \
1466 strdup \
1467 use_default_colors \
1468 vsscanf \
1469 wresize \
1470
1471 do
1472 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1473 echo "configure:1474: checking for $ac_func" >&5
1474 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1475   echo $ac_n "(cached) $ac_c" 1>&6
1476 else
1477   cat > conftest.$ac_ext <<EOF
1478 #line 1479 "configure"
1479 #include "confdefs.h"
1480 /* System header to define __stub macros and hopefully few prototypes,
1481     which can conflict with char $ac_func(); below.  */
1482 #include <assert.h>
1483 /* Override any gcc2 internal prototype to avoid an error.  */
1484 /* We use char because int might match the return type of a gcc2
1485     builtin and then its argument prototype would still apply.  */
1486 char $ac_func();
1487
1488 int main() {
1489
1490 /* The GNU C library defines this for functions which it implements
1491     to always fail with ENOSYS.  Some functions are actually named
1492     something starting with __ and the normal name is an alias.  */
1493 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1494 choke me
1495 #else
1496 $ac_func();
1497 #endif
1498
1499 ; return 0; }
1500 EOF
1501 if { (eval echo configure:1502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1502   rm -rf conftest*
1503   eval "ac_cv_func_$ac_func=yes"
1504 else
1505   echo "configure: failed program was:" >&5
1506   cat conftest.$ac_ext >&5
1507   rm -rf conftest*
1508   eval "ac_cv_func_$ac_func=no"
1509 fi
1510 rm -f conftest*
1511 fi
1512
1513 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1514   echo "$ac_t""yes" 1>&6
1515     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1516   cat >> confdefs.h <<EOF
1517 #define $ac_tr_func 1
1518 EOF
1519  
1520 else
1521   echo "$ac_t""no" 1>&6
1522 fi
1523 done
1524
1525
1526 echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
1527 echo "configure:1528: checking for function curses_version" >&5
1528 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
1529   echo $ac_n "(cached) $ac_c" 1>&6
1530 else
1531   
1532 if test "$cross_compiling" = yes; then
1533   cf_cv_func_curses_version=unknown
1534 else
1535   cat > conftest.$ac_ext <<EOF
1536 #line 1537 "configure"
1537 #include "confdefs.h"
1538
1539 #include <curses.h>
1540 int main()
1541 {
1542         char temp[1024];
1543         sprintf(temp, "%s\n", curses_version());
1544         exit(0);
1545 }
1546
1547 EOF
1548 if { (eval echo configure:1549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1549 then
1550   cf_cv_func_curses_version=yes
1551
1552 else
1553   echo "configure: failed program was:" >&5
1554   cat conftest.$ac_ext >&5
1555   rm -fr conftest*
1556   cf_cv_func_curses_version=no
1557
1558 fi
1559 rm -fr conftest*
1560 fi
1561
1562 rm -f core
1563 fi
1564
1565 echo "$ac_t""$cf_cv_func_curses_version" 1>&6
1566 test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
1567 #define HAVE_CURSES_VERSION 1
1568 EOF
1569
1570
1571 echo $ac_n "checking if sys/time.h conflicts with sys/select.h""... $ac_c" 1>&6
1572 echo "configure:1573: checking if sys/time.h conflicts with sys/select.h" >&5
1573 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
1574   echo $ac_n "(cached) $ac_c" 1>&6
1575 else
1576   
1577 cat > conftest.$ac_ext <<EOF
1578 #line 1579 "configure"
1579 #include "confdefs.h"
1580
1581 #if HAVE_SYS_TIME_H
1582 #include <sys/time.h>
1583 #endif
1584 #if HAVE_SYS_SELECT_H
1585 #include <sys/select.h>
1586 #endif
1587
1588 int main() {
1589
1590 ; return 0; }
1591 EOF
1592 if { (eval echo configure:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1593   rm -rf conftest*
1594   cf_cv_sys_time_select=yes
1595 else
1596   echo "configure: failed program was:" >&5
1597   cat conftest.$ac_ext >&5
1598   rm -rf conftest*
1599   cf_cv_sys_time_select=no
1600 fi
1601 rm -f conftest*
1602      
1603 fi
1604
1605 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
1606 test $cf_cv_sys_time_select = yes && cat >> confdefs.h <<\EOF
1607 #define HAVE_SYS_TIME_SELECT 1
1608 EOF
1609
1610
1611 trap '' 1 2 15
1612 cat > confcache <<\EOF
1613 # This file is a shell script that caches the results of configure
1614 # tests run on this system so they can be shared between configure
1615 # scripts and configure runs.  It is not useful on other systems.
1616 # If it contains results you don't want to keep, you may remove or edit it.
1617 #
1618 # By default, configure uses ./config.cache as the cache file,
1619 # creating it if it does not exist already.  You can give configure
1620 # the --cache-file=FILE option to use a different cache file; that is
1621 # what configure does when it calls configure scripts in
1622 # subdirectories, so they share the cache.
1623 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1624 # config.status only pays attention to the cache file if you give it the
1625 # --recheck option to rerun configure.
1626 #
1627 EOF
1628 # The following way of writing the cache mishandles newlines in values,
1629 # but we know of no workaround that is simple, portable, and efficient.
1630 # So, don't put newlines in cache variables' values.
1631 # Ultrix sh set writes to stderr and can't be redirected directly,
1632 # and sets the high bit in the cache file unless we assign to the vars.
1633 (set) 2>&1 |
1634   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1635   *ac_space=\ *)
1636     # `set' does not quote correctly, so add quotes (double-quote substitution
1637     # turns \\\\ into \\, and sed turns \\ into \).
1638     sed -n \
1639       -e "s/'/'\\\\''/g" \
1640       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1641     ;;
1642   *)
1643     # `set' quotes correctly as required by POSIX, so do not add quotes.
1644     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1645     ;;
1646   esac >> confcache
1647 if cmp -s $cache_file confcache; then
1648   :
1649 else
1650   if test -w $cache_file; then
1651     echo "updating cache $cache_file"
1652     cat confcache > $cache_file
1653   else
1654     echo "not updating unwritable cache $cache_file"
1655   fi
1656 fi
1657 rm -f confcache
1658
1659 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1660
1661 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1662 # Let make expand exec_prefix.
1663 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1664
1665 # Any assignment to VPATH causes Sun make to only execute
1666 # the first set of double-colon rules, so remove it if not needed.
1667 # If there is a colon in the path, we need to keep it.
1668 if test "x$srcdir" = x.; then
1669   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1670 fi
1671
1672 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1673
1674 DEFS=-DHAVE_CONFIG_H
1675
1676 # Without the "./", some shells look in PATH for config.status.
1677 : ${CONFIG_STATUS=./config.status}
1678
1679 echo creating $CONFIG_STATUS
1680 rm -f $CONFIG_STATUS
1681 cat > $CONFIG_STATUS <<EOF
1682 #! /bin/sh
1683 # Generated automatically by configure.
1684 # Run this file to recreate the current configuration.
1685 # This directory was configured as follows,
1686 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1687 #
1688 # $0 $ac_configure_args
1689 #
1690 # Compiler output produced by configure, useful for debugging
1691 # configure, is in ./config.log if it exists.
1692
1693 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1694 for ac_option
1695 do
1696   case "\$ac_option" in
1697   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1698     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1699     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1700   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1701     echo "$CONFIG_STATUS generated by autoconf version 2.13.20000819"
1702     exit 0 ;;
1703   -help | --help | --hel | --he | --h)
1704     echo "\$ac_cs_usage"; exit 0 ;;
1705   *) echo "\$ac_cs_usage"; exit 1 ;;
1706   esac
1707 done
1708
1709 ac_given_srcdir=$srcdir
1710
1711 trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1712 EOF
1713 cat >> $CONFIG_STATUS <<EOF
1714
1715 # Protect against being on the right side of a sed subst in config.status.
1716 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1717  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1718 $ac_vpsub
1719 $extrasub
1720 s%@SHELL@%$SHELL%g
1721 s%@CFLAGS@%$CFLAGS%g
1722 s%@CPPFLAGS@%$CPPFLAGS%g
1723 s%@CXXFLAGS@%$CXXFLAGS%g
1724 s%@FFLAGS@%$FFLAGS%g
1725 s%@DEFS@%$DEFS%g
1726 s%@LDFLAGS@%$LDFLAGS%g
1727 s%@LIBS@%$LIBS%g
1728 s%@exec_prefix@%$exec_prefix%g
1729 s%@prefix@%$prefix%g
1730 s%@program_transform_name@%$program_transform_name%g
1731 s%@bindir@%$bindir%g
1732 s%@sbindir@%$sbindir%g
1733 s%@libexecdir@%$libexecdir%g
1734 s%@datadir@%$datadir%g
1735 s%@sysconfdir@%$sysconfdir%g
1736 s%@sharedstatedir@%$sharedstatedir%g
1737 s%@localstatedir@%$localstatedir%g
1738 s%@libdir@%$libdir%g
1739 s%@includedir@%$includedir%g
1740 s%@oldincludedir@%$oldincludedir%g
1741 s%@infodir@%$infodir%g
1742 s%@mandir@%$mandir%g
1743 s%@CC@%$CC%g
1744 s%@CC_G_OPT@%$CC_G_OPT%g
1745 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
1746 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
1747 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
1748 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
1749 s%@ECHO_LINK@%$ECHO_LINK%g
1750 s%@EXTRA_LIBS@%$EXTRA_LIBS%g
1751 s%@LD@%$LD%g
1752 s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
1753 s%@LD_MODEL@%$LD_MODEL%g
1754 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
1755 s%@LIBTOOL@%$LIBTOOL%g
1756 s%@LIB_NAME@%$LIB_NAME%g
1757 s%@LIB_PREFIX@%$LIB_PREFIX%g
1758 s%@LINK_TESTS@%$LINK_TESTS%g
1759 s%@LINT@%$LINT%g
1760 s%@LINT_OPTS@%$LINT_OPTS%g
1761 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
1762 s%@MATH_LIB@%$MATH_LIB%g
1763 s%@PROG_EXT@%$PROG_EXT%g
1764 s%@TEST_ARGS@%$TEST_ARGS%g
1765 s%@TEST_DEPS@%$TEST_DEPS%g
1766 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
1767 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
1768 s%@CPP@%$CPP%g
1769
1770 CEOF
1771 EOF
1772
1773 cat >> $CONFIG_STATUS <<\EOF
1774
1775 # Split the substitutions into bite-sized pieces for seds with
1776 # small command number limits, like on Digital OSF/1 and HP-UX.
1777 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1778 ac_file=1 # Number of current file.
1779 ac_beg=1 # First line for current file.
1780 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1781 ac_more_lines=:
1782 ac_sed_cmds=""
1783 while $ac_more_lines; do
1784   if test $ac_beg -gt 1; then
1785     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1786   else
1787     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1788   fi
1789   if test ! -s conftest.s$ac_file; then
1790     ac_more_lines=false
1791     rm -f conftest.s$ac_file
1792   else
1793     if test -z "$ac_sed_cmds"; then
1794       ac_sed_cmds="sed -f conftest.s$ac_file"
1795     else
1796       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1797     fi
1798     ac_file=`expr $ac_file + 1`
1799     ac_beg=$ac_end
1800     ac_end=`expr $ac_end + $ac_max_sed_cmds`
1801   fi
1802 done
1803 if test -z "$ac_sed_cmds"; then
1804   ac_sed_cmds=cat
1805 fi
1806 EOF
1807
1808 cat >> $CONFIG_STATUS <<EOF
1809
1810 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1811 EOF
1812 cat >> $CONFIG_STATUS <<\EOF
1813 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1814   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1815   case "$ac_file" in
1816   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1817        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1818   *) ac_file_in="${ac_file}.in" ;;
1819   esac
1820
1821   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1822
1823   # Remove last slash and all that follows it.  Not all systems have dirname.
1824   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1825   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1826     # The file is in a subdirectory.
1827     test ! -d "$ac_dir" && mkdir "$ac_dir"
1828     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1829     # A "../" for each directory in $ac_dir_suffix.
1830     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1831   else
1832     ac_dir_suffix= ac_dots=
1833   fi
1834
1835   case "$ac_given_srcdir" in
1836   .)  srcdir=.
1837       if test -z "$ac_dots"; then top_srcdir=.
1838       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1839   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1840   *) # Relative path.
1841     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1842     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1843   esac
1844
1845
1846   echo creating "$ac_file"
1847   rm -f "$ac_file"
1848   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1849   case "$ac_file" in
1850   *Makefile*) ac_comsub="1i\\
1851 # $configure_input" ;;
1852   *) ac_comsub= ;;
1853   esac
1854
1855   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1856   sed -e "$ac_comsub
1857 s%@configure_input@%$configure_input%g
1858 s%@srcdir@%$srcdir%g
1859 s%@top_srcdir@%$top_srcdir%g
1860 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1861 fi; done
1862 rm -f conftest.s*
1863
1864 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1865 # NAME is the cpp macro being defined and VALUE is the value it is being given.
1866 #
1867 # ac_d sets the value in "#define NAME VALUE" lines.
1868 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
1869 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
1870 ac_dC='\3'
1871 ac_dD='%g'
1872 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1873 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1874 ac_uB='\([      ]\)%\1#\2define\3'
1875 ac_uC=' '
1876 ac_uD='\4%g'
1877 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1878 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1879 ac_eB='$%\1#\2define\3'
1880 ac_eC=' '
1881 ac_eD='%g'
1882
1883 if test "${CONFIG_HEADERS+set}" != set; then
1884 EOF
1885 cat >> $CONFIG_STATUS <<EOF
1886   CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
1887 EOF
1888 cat >> $CONFIG_STATUS <<\EOF
1889 fi
1890 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1891   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1892   case "$ac_file" in
1893   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1894        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1895   *) ac_file_in="${ac_file}.in" ;;
1896   esac
1897
1898   echo creating $ac_file
1899
1900   rm -f conftest.frag conftest.in conftest.out
1901   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1902   cat $ac_file_inputs > conftest.in
1903
1904 EOF
1905
1906
1907 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
1908 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
1909 # be either 'cat' or 'sort'.
1910 sort confdefs.h >conftest.vals
1911
1912 # Break up conftest.vals because some shells have a limit on
1913 # the size of here documents, and old seds have small limits too.
1914
1915 rm -f conftest.tail
1916 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
1917 while :
1918 do
1919   ac_lines=`grep -c . conftest.vals`
1920   # grep -c gives empty output for an empty file on some AIX systems.
1921   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1922   # Write chunks of a limited-size here document to conftest.frag.
1923   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
1924   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1925   echo 'CEOF' >> $CONFIG_STATUS
1926   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1927   rm -f conftest.vals
1928   mv conftest.tail conftest.vals
1929 done
1930 rm -f conftest.vals
1931
1932 # Run sed to substitute the contents of conftest.frag into conftest.in at the
1933 # marker @DEFS@.
1934 echo '  cat >> conftest.edit <<CEOF
1935 /@DEFS@/r conftest.frag
1936 /@DEFS@/d
1937 CEOF
1938 sed -f conftest.edit conftest.in > conftest.out
1939 rm -f conftest.in
1940 mv conftest.out conftest.in
1941 rm -f conftest.edit conftest.frag
1942 ' >> $CONFIG_STATUS
1943
1944
1945 cat >> $CONFIG_STATUS <<\EOF
1946   rm -f conftest.frag conftest.h
1947   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
1948   cat conftest.in >> conftest.h
1949   rm -f conftest.in
1950   if cmp -s $ac_file conftest.h 2>/dev/null; then
1951     echo "$ac_file is unchanged"
1952     rm -f conftest.h
1953   else
1954     # Remove last slash and all that follows it.  Not all systems have dirname.
1955       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1956       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1957       # The file is in a subdirectory.
1958       test ! -d "$ac_dir" && mkdir "$ac_dir"
1959     fi
1960     rm -f $ac_file
1961     mv conftest.h $ac_file
1962   fi
1963 fi; done
1964
1965 EOF
1966 cat >> $CONFIG_STATUS <<EOF
1967 # Extra initialization commands, if any
1968
1969 EOF
1970 cat >> $CONFIG_STATUS <<\EOF
1971 # Extra commands, if any
1972
1973         cat >>Makefile <<TEST_EOF
1974
1975 # These rules are generated so we do not rely on suffix rules, which do not
1976 # work consistently for different make-programs (the '\$(MODEL)/' confuses
1977 # some, and the '\$x' confuses others).
1978 TEST_EOF
1979 LIST=`make echo_tests`
1980 LAST=`make echo_suffix`
1981 for n in $LIST
1982 do
1983         N=`echo $n | sed -e s/${LAST}\$//`
1984         cat >>Makefile <<TEST_EOF
1985
1986 \$(MODEL)/$N.o : $N.c \\
1987         test.priv.h \\
1988         ncurses_cfg.h
1989         @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
1990 TEST_EOF
1991 done
1992
1993 exit 0
1994 EOF
1995 chmod +x $CONFIG_STATUS
1996 rm -fr confdefs* $ac_clean_files
1997 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1998