]> ncurses.scripts.mit.edu Git - ncurses.git/blob - test/configure
ncurses 5.1
[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.19990117 
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.19990117"
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 LIB_NAME=curses                         
764 LIB_PREFIX="-l"                         
765 LINK_TESTS=""                           
766 LINT=lint                               
767 LINT_OPTS=""                            
768 LOCAL_LDFLAGS=""                        
769 MATH_LIB="-lm"                          
770 PROG_EXT=""                             
771 TEST_ARGS=""                            
772 TEST_DEPS=""                            
773 cf_cv_abi_version=""                    
774 cf_cv_rel_version=""                    
775
776
777 # Check whether --with-5lib or --without-5lib was given.
778 if test "${with_5lib+set}" = set; then
779   withval="$with_5lib"
780   LIBS="-L/usr/5lib $LIBS"
781          CPPFLAGS="$CPPFLAGS -I/usr/5include"
782 fi
783
784
785
786 # Check whether --with-ncurses or --without-ncurses was given.
787 if test "${with_ncurses+set}" = set; then
788   withval="$with_ncurses"
789   echo $ac_n "checking for initscr""... $ac_c" 1>&6
790 echo "configure:791: checking for initscr" >&5
791 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
792   echo $ac_n "(cached) $ac_c" 1>&6
793 else
794   cat > conftest.$ac_ext <<EOF
795 #line 796 "configure"
796 #include "confdefs.h"
797 /* System header to define __stub macros and hopefully few prototypes,
798     which can conflict with char initscr(); below.  */
799 #include <assert.h>
800 /* Override any gcc2 internal prototype to avoid an error.  */
801 /* We use char because int might match the return type of a gcc2
802     builtin and then its argument prototype would still apply.  */
803 char initscr();
804
805 int main() {
806
807 /* The GNU C library defines this for functions which it implements
808     to always fail with ENOSYS.  Some functions are actually named
809     something starting with __ and the normal name is an alias.  */
810 #if defined (__stub_initscr) || defined (__stub___initscr)
811 choke me
812 #else
813 initscr();
814 #endif
815
816 ; return 0; }
817 EOF
818 if { (eval echo configure:819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
819   rm -rf conftest*
820   eval "ac_cv_func_initscr=yes"
821 else
822   echo "configure: failed program was:" >&5
823   cat conftest.$ac_ext >&5
824   rm -rf conftest*
825   eval "ac_cv_func_initscr=no"
826 fi
827 rm -f conftest*
828 fi
829
830 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
831   echo "$ac_t""yes" 1>&6
832   :
833 else
834   echo "$ac_t""no" 1>&6
835
836          echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
837 echo "configure:838: checking for Gpm_Open in -lgpm" >&5
838 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
839 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
840   echo $ac_n "(cached) $ac_c" 1>&6
841 else
842   ac_save_LIBS="$LIBS"
843 LIBS="-lgpm  $LIBS"
844 cat > conftest.$ac_ext <<EOF
845 #line 846 "configure"
846 #include "confdefs.h"
847 /* Override any gcc2 internal prototype to avoid an error.  */
848 /* We use char because int might match the return type of a gcc2
849     builtin and then its argument prototype would still apply.  */
850 char Gpm_Open();
851
852 int main() {
853 Gpm_Open()
854 ; return 0; }
855 EOF
856 if { (eval echo configure:857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
857   rm -rf conftest*
858   eval "ac_cv_lib_$ac_lib_var=yes"
859 else
860   echo "configure: failed program was:" >&5
861   cat conftest.$ac_ext >&5
862   rm -rf conftest*
863   eval "ac_cv_lib_$ac_lib_var=no"
864 fi
865 rm -f conftest*
866 LIBS="$ac_save_LIBS"
867
868 fi
869 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
870   echo "$ac_t""yes" 1>&6
871     ac_tr_lib=HAVE_LIB`echo gpm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
872     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
873   cat >> confdefs.h <<EOF
874 #define $ac_tr_lib 1
875 EOF
876
877   LIBS="-lgpm $LIBS"
878
879 else
880   echo "$ac_t""no" 1>&6
881 fi
882
883          LIB_NAME=ncurses
884          for p in $HOME /usr/local /usr
885          do
886                 if test -f $p/include/ncurses/curses.h
887                 then
888                         CPPFLAGS="$CPPFLAGS -I$p/include/ncurses"
889                         test $p != /usr && LIBS="-L$p/lib $LIBS"
890                         break
891                 elif test $p != /usr
892                 then
893                         if test -f $p/include/curses.h
894                         then
895                                 CPPFLAGS="$CPPFLAGS -I$p/include"
896                                 LIBS="-L$p/lib $LIBS"
897                                 break
898                         fi
899                 fi
900          done
901         
902 fi
903
904 fi
905
906
907
908
909 echo $ac_n "checking for initscr""... $ac_c" 1>&6
910 echo "configure:911: checking for initscr" >&5
911 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
912   echo $ac_n "(cached) $ac_c" 1>&6
913 else
914   cat > conftest.$ac_ext <<EOF
915 #line 916 "configure"
916 #include "confdefs.h"
917 /* System header to define __stub macros and hopefully few prototypes,
918     which can conflict with char initscr(); below.  */
919 #include <assert.h>
920 /* Override any gcc2 internal prototype to avoid an error.  */
921 /* We use char because int might match the return type of a gcc2
922     builtin and then its argument prototype would still apply.  */
923 char initscr();
924
925 int main() {
926
927 /* The GNU C library defines this for functions which it implements
928     to always fail with ENOSYS.  Some functions are actually named
929     something starting with __ and the normal name is an alias.  */
930 #if defined (__stub_initscr) || defined (__stub___initscr)
931 choke me
932 #else
933 initscr();
934 #endif
935
936 ; return 0; }
937 EOF
938 if { (eval echo configure:939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
939   rm -rf conftest*
940   eval "ac_cv_func_initscr=yes"
941 else
942   echo "configure: failed program was:" >&5
943   cat conftest.$ac_ext >&5
944   rm -rf conftest*
945   eval "ac_cv_func_initscr=no"
946 fi
947 rm -f conftest*
948 fi
949
950 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
951   echo "$ac_t""yes" 1>&6
952   :
953 else
954   echo "$ac_t""no" 1>&6
955
956 echo $ac_n "checking for initscr in -l$LIB_NAME""... $ac_c" 1>&6
957 echo "configure:958: checking for initscr in -l$LIB_NAME" >&5
958 ac_lib_var=`echo $LIB_NAME'_'initscr | sed 'y%./+-%__p_%'`
959 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
960   echo $ac_n "(cached) $ac_c" 1>&6
961 else
962   ac_save_LIBS="$LIBS"
963 LIBS="-l$LIB_NAME  $LIBS"
964 cat > conftest.$ac_ext <<EOF
965 #line 966 "configure"
966 #include "confdefs.h"
967 /* Override any gcc2 internal prototype to avoid an error.  */
968 /* We use char because int might match the return type of a gcc2
969     builtin and then its argument prototype would still apply.  */
970 char initscr();
971
972 int main() {
973 initscr()
974 ; return 0; }
975 EOF
976 if { (eval echo configure:977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
977   rm -rf conftest*
978   eval "ac_cv_lib_$ac_lib_var=yes"
979 else
980   echo "configure: failed program was:" >&5
981   cat conftest.$ac_ext >&5
982   rm -rf conftest*
983   eval "ac_cv_lib_$ac_lib_var=no"
984 fi
985 rm -f conftest*
986 LIBS="$ac_save_LIBS"
987
988 fi
989 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
990   echo "$ac_t""yes" 1>&6
991     ac_tr_lib=HAVE_LIB`echo $LIB_NAME | sed -e 's/[^a-zA-Z0-9_]/_/g' \
992     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
993   cat >> confdefs.h <<EOF
994 #define $ac_tr_lib 1
995 EOF
996
997   LIBS="-l$LIB_NAME $LIBS"
998
999 else
1000   echo "$ac_t""no" 1>&6
1001 fi
1002
1003 fi
1004
1005 echo $ac_n "checking for form_driver in -lform""... $ac_c" 1>&6
1006 echo "configure:1007: checking for form_driver in -lform" >&5
1007 ac_lib_var=`echo form'_'form_driver | sed 'y%./+-%__p_%'`
1008 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1009   echo $ac_n "(cached) $ac_c" 1>&6
1010 else
1011   ac_save_LIBS="$LIBS"
1012 LIBS="-lform  $LIBS"
1013 cat > conftest.$ac_ext <<EOF
1014 #line 1015 "configure"
1015 #include "confdefs.h"
1016 /* Override any gcc2 internal prototype to avoid an error.  */
1017 /* We use char because int might match the return type of a gcc2
1018     builtin and then its argument prototype would still apply.  */
1019 char form_driver();
1020
1021 int main() {
1022 form_driver()
1023 ; return 0; }
1024 EOF
1025 if { (eval echo configure:1026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1026   rm -rf conftest*
1027   eval "ac_cv_lib_$ac_lib_var=yes"
1028 else
1029   echo "configure: failed program was:" >&5
1030   cat conftest.$ac_ext >&5
1031   rm -rf conftest*
1032   eval "ac_cv_lib_$ac_lib_var=no"
1033 fi
1034 rm -f conftest*
1035 LIBS="$ac_save_LIBS"
1036
1037 fi
1038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1039   echo "$ac_t""yes" 1>&6
1040     ac_tr_lib=HAVE_LIB`echo form | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1041     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1042   cat >> confdefs.h <<EOF
1043 #define $ac_tr_lib 1
1044 EOF
1045
1046   LIBS="-lform $LIBS"
1047
1048 else
1049   echo "$ac_t""no" 1>&6
1050 fi
1051
1052 echo $ac_n "checking for menu_driver in -lmenu""... $ac_c" 1>&6
1053 echo "configure:1054: checking for menu_driver in -lmenu" >&5
1054 ac_lib_var=`echo menu'_'menu_driver | sed 'y%./+-%__p_%'`
1055 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1056   echo $ac_n "(cached) $ac_c" 1>&6
1057 else
1058   ac_save_LIBS="$LIBS"
1059 LIBS="-lmenu  $LIBS"
1060 cat > conftest.$ac_ext <<EOF
1061 #line 1062 "configure"
1062 #include "confdefs.h"
1063 /* Override any gcc2 internal prototype to avoid an error.  */
1064 /* We use char because int might match the return type of a gcc2
1065     builtin and then its argument prototype would still apply.  */
1066 char menu_driver();
1067
1068 int main() {
1069 menu_driver()
1070 ; return 0; }
1071 EOF
1072 if { (eval echo configure:1073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1073   rm -rf conftest*
1074   eval "ac_cv_lib_$ac_lib_var=yes"
1075 else
1076   echo "configure: failed program was:" >&5
1077   cat conftest.$ac_ext >&5
1078   rm -rf conftest*
1079   eval "ac_cv_lib_$ac_lib_var=no"
1080 fi
1081 rm -f conftest*
1082 LIBS="$ac_save_LIBS"
1083
1084 fi
1085 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1086   echo "$ac_t""yes" 1>&6
1087     ac_tr_lib=HAVE_LIB`echo menu | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1088     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1089   cat >> confdefs.h <<EOF
1090 #define $ac_tr_lib 1
1091 EOF
1092
1093   LIBS="-lmenu $LIBS"
1094
1095 else
1096   echo "$ac_t""no" 1>&6
1097 fi
1098
1099 echo $ac_n "checking for new_panel in -lpanel""... $ac_c" 1>&6
1100 echo "configure:1101: checking for new_panel in -lpanel" >&5
1101 ac_lib_var=`echo panel'_'new_panel | sed 'y%./+-%__p_%'`
1102 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1103   echo $ac_n "(cached) $ac_c" 1>&6
1104 else
1105   ac_save_LIBS="$LIBS"
1106 LIBS="-lpanel  $LIBS"
1107 cat > conftest.$ac_ext <<EOF
1108 #line 1109 "configure"
1109 #include "confdefs.h"
1110 /* Override any gcc2 internal prototype to avoid an error.  */
1111 /* We use char because int might match the return type of a gcc2
1112     builtin and then its argument prototype would still apply.  */
1113 char new_panel();
1114
1115 int main() {
1116 new_panel()
1117 ; return 0; }
1118 EOF
1119 if { (eval echo configure:1120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1120   rm -rf conftest*
1121   eval "ac_cv_lib_$ac_lib_var=yes"
1122 else
1123   echo "configure: failed program was:" >&5
1124   cat conftest.$ac_ext >&5
1125   rm -rf conftest*
1126   eval "ac_cv_lib_$ac_lib_var=no"
1127 fi
1128 rm -f conftest*
1129 LIBS="$ac_save_LIBS"
1130
1131 fi
1132 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1133   echo "$ac_t""yes" 1>&6
1134     ac_tr_lib=HAVE_LIB`echo panel | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1135     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1136   cat >> confdefs.h <<EOF
1137 #define $ac_tr_lib 1
1138 EOF
1139
1140   LIBS="-lpanel $LIBS"
1141
1142 else
1143   echo "$ac_t""no" 1>&6
1144 fi
1145
1146
1147 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1148 echo "configure:1149: checking return type of signal handlers" >&5
1149 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1150   echo $ac_n "(cached) $ac_c" 1>&6
1151 else
1152   cat > conftest.$ac_ext <<EOF
1153 #line 1154 "configure"
1154 #include "confdefs.h"
1155 #include <sys/types.h>
1156 #include <signal.h>
1157 #ifdef signal
1158 #undef signal
1159 #endif
1160 #ifdef __cplusplus
1161 extern "C" void (*signal (int, void (*)(int)))(int);
1162 #else
1163 void (*signal ()) ();
1164 #endif
1165
1166 int main() {
1167 int i;
1168 ; return 0; }
1169 EOF
1170 if { (eval echo configure:1171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1171   rm -rf conftest*
1172   ac_cv_type_signal=void
1173 else
1174   echo "configure: failed program was:" >&5
1175   cat conftest.$ac_ext >&5
1176   rm -rf conftest*
1177   ac_cv_type_signal=int
1178 fi
1179 rm -f conftest*
1180 fi
1181
1182 echo "$ac_t""$ac_cv_type_signal" 1>&6
1183 cat >> confdefs.h <<EOF
1184 #define RETSIGTYPE $ac_cv_type_signal
1185 EOF
1186
1187
1188
1189 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1190 echo "configure:1191: checking how to run the C preprocessor" >&5
1191 # On Suns, sometimes $CPP names a directory.
1192 if test -n "$CPP" && test -d "$CPP"; then
1193   CPP=
1194 fi
1195 if test -z "$CPP"; then
1196 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1197   echo $ac_n "(cached) $ac_c" 1>&6
1198 else
1199     # This must be in double quotes, not single quotes, because CPP may get
1200   # substituted into the Makefile and "${CC-cc}" will confuse make.
1201   CPP="${CC-cc} -E"
1202   # On the NeXT, cc -E runs the code through the compiler's parser,
1203   # not just through cpp.
1204   cat > conftest.$ac_ext <<EOF
1205 #line 1206 "configure"
1206 #include "confdefs.h"
1207 #include <assert.h>
1208 Syntax Error
1209 EOF
1210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1211 { (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1213 if test -z "$ac_err"; then
1214   :
1215 else
1216   echo "$ac_err" >&5
1217   echo "configure: failed program was:" >&5
1218   cat conftest.$ac_ext >&5
1219   rm -rf conftest*
1220   CPP="${CC-cc} -E -traditional-cpp"
1221   cat > conftest.$ac_ext <<EOF
1222 #line 1223 "configure"
1223 #include "confdefs.h"
1224 #include <assert.h>
1225 Syntax Error
1226 EOF
1227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1228 { (eval echo configure:1229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1230 if test -z "$ac_err"; then
1231   :
1232 else
1233   echo "$ac_err" >&5
1234   echo "configure: failed program was:" >&5
1235   cat conftest.$ac_ext >&5
1236   rm -rf conftest*
1237   CPP="${CC-cc} -nologo -E"
1238   cat > conftest.$ac_ext <<EOF
1239 #line 1240 "configure"
1240 #include "confdefs.h"
1241 #include <assert.h>
1242 Syntax Error
1243 EOF
1244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1245 { (eval echo configure:1246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1247 if test -z "$ac_err"; then
1248   :
1249 else
1250   echo "$ac_err" >&5
1251   echo "configure: failed program was:" >&5
1252   cat conftest.$ac_ext >&5
1253   rm -rf conftest*
1254   CPP=/lib/cpp
1255 fi
1256 rm -f conftest*
1257 fi
1258 rm -f conftest*
1259 fi
1260 rm -f conftest*
1261   ac_cv_prog_CPP="$CPP"
1262 fi
1263   CPP="$ac_cv_prog_CPP"
1264 else
1265   ac_cv_prog_CPP="$CPP"
1266 fi
1267 echo "$ac_t""$CPP" 1>&6
1268
1269 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1270 echo "configure:1271: checking for ANSI C header files" >&5
1271 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1272   echo $ac_n "(cached) $ac_c" 1>&6
1273 else
1274   cat > conftest.$ac_ext <<EOF
1275 #line 1276 "configure"
1276 #include "confdefs.h"
1277 #include <stdlib.h>
1278 #include <stdarg.h>
1279 #include <string.h>
1280 #include <float.h>
1281 EOF
1282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1283 { (eval echo configure:1284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1285 if test -z "$ac_err"; then
1286   rm -rf conftest*
1287   ac_cv_header_stdc=yes
1288 else
1289   echo "$ac_err" >&5
1290   echo "configure: failed program was:" >&5
1291   cat conftest.$ac_ext >&5
1292   rm -rf conftest*
1293   ac_cv_header_stdc=no
1294 fi
1295 rm -f conftest*
1296
1297 if test $ac_cv_header_stdc = yes; then
1298   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1299 cat > conftest.$ac_ext <<EOF
1300 #line 1301 "configure"
1301 #include "confdefs.h"
1302 #include <string.h>
1303 EOF
1304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1305   egrep "memchr" >/dev/null 2>&1; then
1306   :
1307 else
1308   rm -rf conftest*
1309   ac_cv_header_stdc=no
1310 fi
1311 rm -f conftest*
1312
1313 fi
1314
1315 if test $ac_cv_header_stdc = yes; then
1316   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1317 cat > conftest.$ac_ext <<EOF
1318 #line 1319 "configure"
1319 #include "confdefs.h"
1320 #include <stdlib.h>
1321 EOF
1322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1323   egrep "free" >/dev/null 2>&1; then
1324   :
1325 else
1326   rm -rf conftest*
1327   ac_cv_header_stdc=no
1328 fi
1329 rm -f conftest*
1330
1331 fi
1332
1333 if test $ac_cv_header_stdc = yes; then
1334   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1335 if test "$cross_compiling" = yes; then
1336   :
1337 else
1338   cat > conftest.$ac_ext <<EOF
1339 #line 1340 "configure"
1340 #include "confdefs.h"
1341 #include <ctype.h>
1342 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1343 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1344 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1345 int main () { int i; for (i = 0; i < 256; i++)
1346 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1347 exit (0); }
1348
1349 EOF
1350 if { (eval echo configure:1351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1351 then
1352   :
1353 else
1354   echo "configure: failed program was:" >&5
1355   cat conftest.$ac_ext >&5
1356   rm -fr conftest*
1357   ac_cv_header_stdc=no
1358 fi
1359 rm -fr conftest*
1360 fi
1361
1362 fi
1363 fi
1364
1365 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1366 if test $ac_cv_header_stdc = yes; then
1367   cat >> confdefs.h <<\EOF
1368 #define STDC_HEADERS 1
1369 EOF
1370
1371 fi
1372
1373 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1374 echo "configure:1375: checking whether time.h and sys/time.h may both be included" >&5
1375 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1376   echo $ac_n "(cached) $ac_c" 1>&6
1377 else
1378   cat > conftest.$ac_ext <<EOF
1379 #line 1380 "configure"
1380 #include "confdefs.h"
1381 #include <sys/types.h>
1382 #include <sys/time.h>
1383 #include <time.h>
1384 int main() {
1385 struct tm *tp;
1386 ; return 0; }
1387 EOF
1388 if { (eval echo configure:1389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1389   rm -rf conftest*
1390   ac_cv_header_time=yes
1391 else
1392   echo "configure: failed program was:" >&5
1393   cat conftest.$ac_ext >&5
1394   rm -rf conftest*
1395   ac_cv_header_time=no
1396 fi
1397 rm -f conftest*
1398 fi
1399
1400 echo "$ac_t""$ac_cv_header_time" 1>&6
1401 if test $ac_cv_header_time = yes; then
1402   cat >> confdefs.h <<\EOF
1403 #define TIME_WITH_SYS_TIME 1
1404 EOF
1405
1406 fi
1407
1408 for ac_hdr in \
1409 form.h \
1410 getopt.h \
1411 menu.h \
1412 nc_alloc.h \
1413 panel.h \
1414 sys/ioctl.h \
1415 sys/select.h \
1416 sys/time.h \
1417 termios.h \
1418 unistd.h \
1419
1420 do
1421 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1422 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1423 echo "configure:1424: checking for $ac_hdr" >&5
1424 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1425   echo $ac_n "(cached) $ac_c" 1>&6
1426 else
1427   cat > conftest.$ac_ext <<EOF
1428 #line 1429 "configure"
1429 #include "confdefs.h"
1430 #include <$ac_hdr>
1431 EOF
1432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1433 { (eval echo configure:1434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1435 if test -z "$ac_err"; then
1436   rm -rf conftest*
1437   eval "ac_cv_header_$ac_safe=yes"
1438 else
1439   echo "$ac_err" >&5
1440   echo "configure: failed program was:" >&5
1441   cat conftest.$ac_ext >&5
1442   rm -rf conftest*
1443   eval "ac_cv_header_$ac_safe=no"
1444 fi
1445 rm -f conftest*
1446 fi
1447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1448   echo "$ac_t""yes" 1>&6
1449     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1450   cat >> confdefs.h <<EOF
1451 #define $ac_tr_hdr 1
1452 EOF
1453  
1454 else
1455   echo "$ac_t""no" 1>&6
1456 fi
1457 done
1458
1459
1460 for ac_func in \
1461 gettimeofday \
1462 napms \
1463 resizeterm \
1464 strdup \
1465 use_default_colors \
1466 vsscanf \
1467 wresize \
1468
1469 do
1470 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1471 echo "configure:1472: checking for $ac_func" >&5
1472 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1473   echo $ac_n "(cached) $ac_c" 1>&6
1474 else
1475   cat > conftest.$ac_ext <<EOF
1476 #line 1477 "configure"
1477 #include "confdefs.h"
1478 /* System header to define __stub macros and hopefully few prototypes,
1479     which can conflict with char $ac_func(); below.  */
1480 #include <assert.h>
1481 /* Override any gcc2 internal prototype to avoid an error.  */
1482 /* We use char because int might match the return type of a gcc2
1483     builtin and then its argument prototype would still apply.  */
1484 char $ac_func();
1485
1486 int main() {
1487
1488 /* The GNU C library defines this for functions which it implements
1489     to always fail with ENOSYS.  Some functions are actually named
1490     something starting with __ and the normal name is an alias.  */
1491 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1492 choke me
1493 #else
1494 $ac_func();
1495 #endif
1496
1497 ; return 0; }
1498 EOF
1499 if { (eval echo configure:1500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1500   rm -rf conftest*
1501   eval "ac_cv_func_$ac_func=yes"
1502 else
1503   echo "configure: failed program was:" >&5
1504   cat conftest.$ac_ext >&5
1505   rm -rf conftest*
1506   eval "ac_cv_func_$ac_func=no"
1507 fi
1508 rm -f conftest*
1509 fi
1510
1511 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1512   echo "$ac_t""yes" 1>&6
1513     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1514   cat >> confdefs.h <<EOF
1515 #define $ac_tr_func 1
1516 EOF
1517  
1518 else
1519   echo "$ac_t""no" 1>&6
1520 fi
1521 done
1522
1523
1524 echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
1525 echo "configure:1526: checking for function curses_version" >&5
1526 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
1527   echo $ac_n "(cached) $ac_c" 1>&6
1528 else
1529   
1530 if test "$cross_compiling" = yes; then
1531   cf_cv_func_curses_version=unknown
1532 else
1533   cat > conftest.$ac_ext <<EOF
1534 #line 1535 "configure"
1535 #include "confdefs.h"
1536
1537 #include <curses.h>
1538 int main()
1539 {
1540         char temp[1024];
1541         sprintf(temp, "%s\n", curses_version());
1542         exit(0);
1543 }
1544
1545 EOF
1546 if { (eval echo configure:1547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1547 then
1548   cf_cv_func_curses_version=yes
1549
1550 else
1551   echo "configure: failed program was:" >&5
1552   cat conftest.$ac_ext >&5
1553   rm -fr conftest*
1554   cf_cv_func_curses_version=no
1555
1556 fi
1557 rm -fr conftest*
1558 fi
1559
1560 rm -f core
1561 fi
1562
1563 echo "$ac_t""$cf_cv_func_curses_version" 1>&6
1564 test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
1565 #define HAVE_CURSES_VERSION 1
1566 EOF
1567
1568
1569 echo $ac_n "checking if sys/time.h conflicts with sys/select.h""... $ac_c" 1>&6
1570 echo "configure:1571: checking if sys/time.h conflicts with sys/select.h" >&5
1571 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
1572   echo $ac_n "(cached) $ac_c" 1>&6
1573 else
1574   
1575 cat > conftest.$ac_ext <<EOF
1576 #line 1577 "configure"
1577 #include "confdefs.h"
1578
1579 #if HAVE_SYS_TIME_H
1580 #include <sys/time.h>
1581 #endif
1582 #if HAVE_SYS_SELECT_H
1583 #include <sys/select.h>
1584 #endif
1585
1586 int main() {
1587
1588 ; return 0; }
1589 EOF
1590 if { (eval echo configure:1591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1591   rm -rf conftest*
1592   cf_cv_sys_time_select=yes
1593 else
1594   echo "configure: failed program was:" >&5
1595   cat conftest.$ac_ext >&5
1596   rm -rf conftest*
1597   cf_cv_sys_time_select=no
1598 fi
1599 rm -f conftest*
1600      
1601 fi
1602
1603 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
1604 test $cf_cv_sys_time_select = yes && cat >> confdefs.h <<\EOF
1605 #define HAVE_SYS_TIME_SELECT 1
1606 EOF
1607
1608
1609 trap '' 1 2 15
1610 cat > confcache <<\EOF
1611 # This file is a shell script that caches the results of configure
1612 # tests run on this system so they can be shared between configure
1613 # scripts and configure runs.  It is not useful on other systems.
1614 # If it contains results you don't want to keep, you may remove or edit it.
1615 #
1616 # By default, configure uses ./config.cache as the cache file,
1617 # creating it if it does not exist already.  You can give configure
1618 # the --cache-file=FILE option to use a different cache file; that is
1619 # what configure does when it calls configure scripts in
1620 # subdirectories, so they share the cache.
1621 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1622 # config.status only pays attention to the cache file if you give it the
1623 # --recheck option to rerun configure.
1624 #
1625 EOF
1626 # The following way of writing the cache mishandles newlines in values,
1627 # but we know of no workaround that is simple, portable, and efficient.
1628 # So, don't put newlines in cache variables' values.
1629 # Ultrix sh set writes to stderr and can't be redirected directly,
1630 # and sets the high bit in the cache file unless we assign to the vars.
1631 (set) 2>&1 |
1632   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1633   *ac_space=\ *)
1634     # `set' does not quote correctly, so add quotes (double-quote substitution
1635     # turns \\\\ into \\, and sed turns \\ into \).
1636     sed -n \
1637       -e "s/'/'\\\\''/g" \
1638       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1639     ;;
1640   *)
1641     # `set' quotes correctly as required by POSIX, so do not add quotes.
1642     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1643     ;;
1644   esac >> confcache
1645 if cmp -s $cache_file confcache; then
1646   :
1647 else
1648   if test -w $cache_file; then
1649     echo "updating cache $cache_file"
1650     cat confcache > $cache_file
1651   else
1652     echo "not updating unwritable cache $cache_file"
1653   fi
1654 fi
1655 rm -f confcache
1656
1657 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1658
1659 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1660 # Let make expand exec_prefix.
1661 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1662
1663 # Any assignment to VPATH causes Sun make to only execute
1664 # the first set of double-colon rules, so remove it if not needed.
1665 # If there is a colon in the path, we need to keep it.
1666 if test "x$srcdir" = x.; then
1667   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1668 fi
1669
1670 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1671
1672 DEFS=-DHAVE_CONFIG_H
1673
1674 # Without the "./", some shells look in PATH for config.status.
1675 : ${CONFIG_STATUS=./config.status}
1676
1677 echo creating $CONFIG_STATUS
1678 rm -f $CONFIG_STATUS
1679 cat > $CONFIG_STATUS <<EOF
1680 #! /bin/sh
1681 # Generated automatically by configure.
1682 # Run this file to recreate the current configuration.
1683 # This directory was configured as follows,
1684 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1685 #
1686 # $0 $ac_configure_args
1687 #
1688 # Compiler output produced by configure, useful for debugging
1689 # configure, is in ./config.log if it exists.
1690
1691 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1692 for ac_option
1693 do
1694   case "\$ac_option" in
1695   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1696     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1697     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1698   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1699     echo "$CONFIG_STATUS generated by autoconf version 2.13.19990117"
1700     exit 0 ;;
1701   -help | --help | --hel | --he | --h)
1702     echo "\$ac_cs_usage"; exit 0 ;;
1703   *) echo "\$ac_cs_usage"; exit 1 ;;
1704   esac
1705 done
1706
1707 ac_given_srcdir=$srcdir
1708
1709 trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1710 EOF
1711 cat >> $CONFIG_STATUS <<EOF
1712
1713 # Protect against being on the right side of a sed subst in config.status.
1714 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1715  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1716 $ac_vpsub
1717 $extrasub
1718 s%@SHELL@%$SHELL%g
1719 s%@CFLAGS@%$CFLAGS%g
1720 s%@CPPFLAGS@%$CPPFLAGS%g
1721 s%@CXXFLAGS@%$CXXFLAGS%g
1722 s%@FFLAGS@%$FFLAGS%g
1723 s%@DEFS@%$DEFS%g
1724 s%@LDFLAGS@%$LDFLAGS%g
1725 s%@LIBS@%$LIBS%g
1726 s%@exec_prefix@%$exec_prefix%g
1727 s%@prefix@%$prefix%g
1728 s%@program_transform_name@%$program_transform_name%g
1729 s%@bindir@%$bindir%g
1730 s%@sbindir@%$sbindir%g
1731 s%@libexecdir@%$libexecdir%g
1732 s%@datadir@%$datadir%g
1733 s%@sysconfdir@%$sysconfdir%g
1734 s%@sharedstatedir@%$sharedstatedir%g
1735 s%@localstatedir@%$localstatedir%g
1736 s%@libdir@%$libdir%g
1737 s%@includedir@%$includedir%g
1738 s%@oldincludedir@%$oldincludedir%g
1739 s%@infodir@%$infodir%g
1740 s%@mandir@%$mandir%g
1741 s%@CC@%$CC%g
1742 s%@CC_G_OPT@%$CC_G_OPT%g
1743 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
1744 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
1745 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
1746 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
1747 s%@ECHO_LINK@%$ECHO_LINK%g
1748 s%@EXTRA_LIBS@%$EXTRA_LIBS%g
1749 s%@LD@%$LD%g
1750 s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
1751 s%@LD_MODEL@%$LD_MODEL%g
1752 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
1753 s%@LIB_NAME@%$LIB_NAME%g
1754 s%@LIB_PREFIX@%$LIB_PREFIX%g
1755 s%@LINK_TESTS@%$LINK_TESTS%g
1756 s%@LINT@%$LINT%g
1757 s%@LINT_OPTS@%$LINT_OPTS%g
1758 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
1759 s%@MATH_LIB@%$MATH_LIB%g
1760 s%@PROG_EXT@%$PROG_EXT%g
1761 s%@TEST_ARGS@%$TEST_ARGS%g
1762 s%@TEST_DEPS@%$TEST_DEPS%g
1763 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
1764 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
1765 s%@CPP@%$CPP%g
1766
1767 CEOF
1768 EOF
1769
1770 cat >> $CONFIG_STATUS <<\EOF
1771
1772 # Split the substitutions into bite-sized pieces for seds with
1773 # small command number limits, like on Digital OSF/1 and HP-UX.
1774 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1775 ac_file=1 # Number of current file.
1776 ac_beg=1 # First line for current file.
1777 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1778 ac_more_lines=:
1779 ac_sed_cmds=""
1780 while $ac_more_lines; do
1781   if test $ac_beg -gt 1; then
1782     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1783   else
1784     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1785   fi
1786   if test ! -s conftest.s$ac_file; then
1787     ac_more_lines=false
1788     rm -f conftest.s$ac_file
1789   else
1790     if test -z "$ac_sed_cmds"; then
1791       ac_sed_cmds="sed -f conftest.s$ac_file"
1792     else
1793       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1794     fi
1795     ac_file=`expr $ac_file + 1`
1796     ac_beg=$ac_end
1797     ac_end=`expr $ac_end + $ac_max_sed_cmds`
1798   fi
1799 done
1800 if test -z "$ac_sed_cmds"; then
1801   ac_sed_cmds=cat
1802 fi
1803 EOF
1804
1805 cat >> $CONFIG_STATUS <<EOF
1806
1807 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1808 EOF
1809 cat >> $CONFIG_STATUS <<\EOF
1810 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1811   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1812   case "$ac_file" in
1813   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1814        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1815   *) ac_file_in="${ac_file}.in" ;;
1816   esac
1817
1818   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1819
1820   # Remove last slash and all that follows it.  Not all systems have dirname.
1821   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1822   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1823     # The file is in a subdirectory.
1824     test ! -d "$ac_dir" && mkdir "$ac_dir"
1825     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1826     # A "../" for each directory in $ac_dir_suffix.
1827     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1828   else
1829     ac_dir_suffix= ac_dots=
1830   fi
1831
1832   case "$ac_given_srcdir" in
1833   .)  srcdir=.
1834       if test -z "$ac_dots"; then top_srcdir=.
1835       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1836   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1837   *) # Relative path.
1838     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1839     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1840   esac
1841
1842
1843   echo creating "$ac_file"
1844   rm -f "$ac_file"
1845   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1846   case "$ac_file" in
1847   *Makefile*) ac_comsub="1i\\
1848 # $configure_input" ;;
1849   *) ac_comsub= ;;
1850   esac
1851
1852   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1853   sed -e "$ac_comsub
1854 s%@configure_input@%$configure_input%g
1855 s%@srcdir@%$srcdir%g
1856 s%@top_srcdir@%$top_srcdir%g
1857 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1858 fi; done
1859 rm -f conftest.s*
1860
1861 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1862 # NAME is the cpp macro being defined and VALUE is the value it is being given.
1863 #
1864 # ac_d sets the value in "#define NAME VALUE" lines.
1865 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
1866 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
1867 ac_dC='\3'
1868 ac_dD='%g'
1869 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1870 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1871 ac_uB='\([      ]\)%\1#\2define\3'
1872 ac_uC=' '
1873 ac_uD='\4%g'
1874 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1875 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1876 ac_eB='$%\1#\2define\3'
1877 ac_eC=' '
1878 ac_eD='%g'
1879
1880 if test "${CONFIG_HEADERS+set}" != set; then
1881 EOF
1882 cat >> $CONFIG_STATUS <<EOF
1883   CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
1884 EOF
1885 cat >> $CONFIG_STATUS <<\EOF
1886 fi
1887 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1888   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1889   case "$ac_file" in
1890   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1891        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1892   *) ac_file_in="${ac_file}.in" ;;
1893   esac
1894
1895   echo creating $ac_file
1896
1897   rm -f conftest.frag conftest.in conftest.out
1898   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1899   cat $ac_file_inputs > conftest.in
1900
1901 EOF
1902
1903
1904 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
1905 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
1906 # be either 'cat' or 'sort'.
1907 sort confdefs.h >conftest.vals
1908
1909 # Break up conftest.vals because some shells have a limit on
1910 # the size of here documents, and old seds have small limits too.
1911
1912 rm -f conftest.tail
1913 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
1914 while :
1915 do
1916   ac_lines=`grep -c . conftest.vals`
1917   # grep -c gives empty output for an empty file on some AIX systems.
1918   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1919   # Write chunks of a limited-size here document to conftest.frag.
1920   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
1921   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1922   echo 'CEOF' >> $CONFIG_STATUS
1923   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1924   rm -f conftest.vals
1925   mv conftest.tail conftest.vals
1926 done
1927 rm -f conftest.vals
1928
1929 # Run sed to substitute the contents of conftest.frag into conftest.in at the
1930 # marker @DEFS@.
1931 echo '  cat >> conftest.edit <<CEOF
1932 /@DEFS@/r conftest.frag
1933 /@DEFS@/d
1934 CEOF
1935 sed -f conftest.edit conftest.in > conftest.out
1936 rm -f conftest.in
1937 mv conftest.out conftest.in
1938 rm -f conftest.edit conftest.frag
1939 ' >> $CONFIG_STATUS
1940
1941
1942 cat >> $CONFIG_STATUS <<\EOF
1943   rm -f conftest.frag conftest.h
1944   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
1945   cat conftest.in >> conftest.h
1946   rm -f conftest.in
1947   if cmp -s $ac_file conftest.h 2>/dev/null; then
1948     echo "$ac_file is unchanged"
1949     rm -f conftest.h
1950   else
1951     # Remove last slash and all that follows it.  Not all systems have dirname.
1952       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1953       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1954       # The file is in a subdirectory.
1955       test ! -d "$ac_dir" && mkdir "$ac_dir"
1956     fi
1957     rm -f $ac_file
1958     mv conftest.h $ac_file
1959   fi
1960 fi; done
1961
1962 EOF
1963 cat >> $CONFIG_STATUS <<EOF
1964 # Extra initialization commands, if any
1965
1966 EOF
1967 cat >> $CONFIG_STATUS <<\EOF
1968 # Extra commands, if any
1969
1970         cat >>Makefile <<TEST_EOF
1971
1972 # These rules are generated so we do not rely on suffix rules, which do not
1973 # work consistently for different make-programs (the '\$(MODEL)/' confuses
1974 # some, and the '\$x' confuses others).
1975 TEST_EOF
1976 LIST=`make echo_tests`
1977 LAST=`make echo_suffix`
1978 for n in $LIST
1979 do
1980         N=`echo $n | sed -e s/${LAST}\$//`
1981         cat >>Makefile <<TEST_EOF
1982
1983 \$(MODEL)/$N.o : $N.c \\
1984         test.priv.h \\
1985         ncurses_cfg.h
1986         @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
1987 TEST_EOF
1988 done
1989
1990 exit 0
1991 EOF
1992 chmod +x $CONFIG_STATUS
1993 rm -fr confdefs* $ac_clean_files
1994 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1995