Actually hook powernow.4 into the build.
[dragonfly.git] / contrib / nvi / build / configure
blobe2055d113ca8194dd4cb979d27f932566eab1a4c
1 #! /bin/sh
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.7
5 # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --enable-debug Build a debugging version."
16 ac_help="$ac_help
17 --with-x use the X Window System"
18 ac_help="$ac_help
19 --enable-perlinterp Include a Perl interpreter in vi."
20 ac_help="$ac_help
21 --enable-tknvi Build a Tk/Tcl front-end for vi."
22 ac_help="$ac_help
23 --enable-tclinterp Include a Tk/Tcl interpreter in vi."
24 ac_help="$ac_help
25 --disable-curses DON'T use the nvi-provided curses routines."
26 ac_help="$ac_help
27 --disable-db DON'T use the nvi-provided DB routines."
28 ac_help="$ac_help
29 --disable-re DON'T use the nvi-provided RE routines."
31 # Initialize some variables set by options.
32 # The variables have the same names as the options, with
33 # dashes changed to underlines.
34 build=NONE
35 cache_file=./config.cache
36 exec_prefix=NONE
37 host=NONE
38 no_create=
39 nonopt=NONE
40 no_recursion=
41 prefix=NONE
42 program_prefix=NONE
43 program_suffix=NONE
44 program_transform_name=s,x,x,
45 silent=
46 site=
47 srcdir=
48 target=NONE
49 verbose=
50 x_includes=NONE
51 x_libraries=NONE
52 bindir='${exec_prefix}/bin'
53 sbindir='${exec_prefix}/sbin'
54 libexecdir='${exec_prefix}/libexec'
55 datadir='${prefix}/share'
56 sysconfdir='${prefix}/etc'
57 sharedstatedir='${prefix}/com'
58 localstatedir='${prefix}/var'
59 libdir='${exec_prefix}/lib'
60 includedir='${prefix}/include'
61 oldincludedir='/usr/include'
62 infodir='${prefix}/info'
63 mandir='${prefix}/man'
65 # Initialize some other variables.
66 subdirs=
67 MFLAGS= MAKEFLAGS=
69 ac_prev=
70 for ac_option
73 # If the previous option needs an argument, assign it.
74 if test -n "$ac_prev"; then
75 eval "$ac_prev=\$ac_option"
76 ac_prev=
77 continue
80 case "$ac_option" in
81 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
82 *) ac_optarg= ;;
83 esac
85 # Accept the important Cygnus configure options, so we can diagnose typos.
87 case "$ac_option" in
89 -bindir | --bindir | --bindi | --bind | --bin | --bi)
90 ac_prev=bindir ;;
91 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
92 bindir="$ac_optarg" ;;
94 -build | --build | --buil | --bui | --bu)
95 ac_prev=build ;;
96 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
97 build="$ac_optarg" ;;
99 -cache-file | --cache-file | --cache-fil | --cache-fi \
100 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
101 ac_prev=cache_file ;;
102 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
103 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
104 cache_file="$ac_optarg" ;;
106 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
107 ac_prev=datadir ;;
108 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
109 | --da=*)
110 datadir="$ac_optarg" ;;
112 -disable-* | --disable-*)
113 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
114 # Reject names that are not valid shell variable names.
115 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
116 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
118 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119 eval "enable_${ac_feature}=no" ;;
121 -enable-* | --enable-*)
122 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
123 # Reject names that are not valid shell variable names.
124 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
125 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
127 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
128 case "$ac_option" in
129 *=*) ;;
130 *) ac_optarg=yes ;;
131 esac
132 eval "enable_${ac_feature}='$ac_optarg'" ;;
134 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
135 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
136 | --exec | --exe | --ex)
137 ac_prev=exec_prefix ;;
138 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
139 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
140 | --exec=* | --exe=* | --ex=*)
141 exec_prefix="$ac_optarg" ;;
143 -gas | --gas | --ga | --g)
144 # Obsolete; use --with-gas.
145 with_gas=yes ;;
147 -help | --help | --hel | --he)
148 # Omit some internal or obsolete options to make the list less imposing.
149 # This message is too long to be a string in the A/UX 3.1 sh.
150 cat << EOF
151 Usage: configure [options] [host]
152 Options: [defaults in brackets after descriptions]
153 Configuration:
154 --cache-file=FILE cache test results in FILE
155 --help print this message
156 --no-create do not create output files
157 --quiet, --silent do not print \`checking...' messages
158 --version print the version of autoconf that created configure
159 Directory and file names:
160 --prefix=PREFIX install architecture-independent files in PREFIX
161 [$ac_default_prefix]
162 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
163 [same as prefix]
164 --bindir=DIR user executables in DIR [EPREFIX/bin]
165 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
166 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
167 --datadir=DIR read-only architecture-independent data in DIR
168 [PREFIX/share]
169 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
170 --sharedstatedir=DIR modifiable architecture-independent data in DIR
171 [PREFIX/com]
172 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
173 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
174 --includedir=DIR C header files in DIR [PREFIX/include]
175 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
176 --infodir=DIR info documentation in DIR [PREFIX/info]
177 --mandir=DIR man documentation in DIR [PREFIX/man]
178 --srcdir=DIR find the sources in DIR [configure dir or ..]
179 --program-prefix=PREFIX prepend PREFIX to installed program names
180 --program-suffix=SUFFIX append SUFFIX to installed program names
181 --program-transform-name=PROGRAM
182 run sed PROGRAM on installed program names
184 cat << EOF
185 Host type:
186 --build=BUILD configure for building on BUILD [BUILD=HOST]
187 --host=HOST configure for HOST [guessed]
188 --target=TARGET configure for TARGET [TARGET=HOST]
189 Features and packages:
190 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
191 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
192 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
193 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
194 --x-includes=DIR X include files are in DIR
195 --x-libraries=DIR X library files are in DIR
197 if test -n "$ac_help"; then
198 echo "--enable and --with options recognized:$ac_help"
200 exit 0 ;;
202 -host | --host | --hos | --ho)
203 ac_prev=host ;;
204 -host=* | --host=* | --hos=* | --ho=*)
205 host="$ac_optarg" ;;
207 -includedir | --includedir | --includedi | --included | --include \
208 | --includ | --inclu | --incl | --inc)
209 ac_prev=includedir ;;
210 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
211 | --includ=* | --inclu=* | --incl=* | --inc=*)
212 includedir="$ac_optarg" ;;
214 -infodir | --infodir | --infodi | --infod | --info | --inf)
215 ac_prev=infodir ;;
216 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
217 infodir="$ac_optarg" ;;
219 -libdir | --libdir | --libdi | --libd)
220 ac_prev=libdir ;;
221 -libdir=* | --libdir=* | --libdi=* | --libd=*)
222 libdir="$ac_optarg" ;;
224 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
225 | --libexe | --libex | --libe)
226 ac_prev=libexecdir ;;
227 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
228 | --libexe=* | --libex=* | --libe=*)
229 libexecdir="$ac_optarg" ;;
231 -localstatedir | --localstatedir | --localstatedi | --localstated \
232 | --localstate | --localstat | --localsta | --localst \
233 | --locals | --local | --loca | --loc | --lo)
234 ac_prev=localstatedir ;;
235 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
236 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
237 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
238 localstatedir="$ac_optarg" ;;
240 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
241 ac_prev=mandir ;;
242 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
243 mandir="$ac_optarg" ;;
245 -nfp | --nfp | --nf)
246 # Obsolete; use --without-fp.
247 with_fp=no ;;
249 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
250 | --no-cr | --no-c)
251 no_create=yes ;;
253 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
254 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
255 no_recursion=yes ;;
257 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
258 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
259 | --oldin | --oldi | --old | --ol | --o)
260 ac_prev=oldincludedir ;;
261 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
262 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
263 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
264 oldincludedir="$ac_optarg" ;;
266 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
267 ac_prev=prefix ;;
268 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
269 prefix="$ac_optarg" ;;
271 -program-prefix | --program-prefix | --program-prefi | --program-pref \
272 | --program-pre | --program-pr | --program-p)
273 ac_prev=program_prefix ;;
274 -program-prefix=* | --program-prefix=* | --program-prefi=* \
275 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
276 program_prefix="$ac_optarg" ;;
278 -program-suffix | --program-suffix | --program-suffi | --program-suff \
279 | --program-suf | --program-su | --program-s)
280 ac_prev=program_suffix ;;
281 -program-suffix=* | --program-suffix=* | --program-suffi=* \
282 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
283 program_suffix="$ac_optarg" ;;
285 -program-transform-name | --program-transform-name \
286 | --program-transform-nam | --program-transform-na \
287 | --program-transform-n | --program-transform- \
288 | --program-transform | --program-transfor \
289 | --program-transfo | --program-transf \
290 | --program-trans | --program-tran \
291 | --progr-tra | --program-tr | --program-t)
292 ac_prev=program_transform_name ;;
293 -program-transform-name=* | --program-transform-name=* \
294 | --program-transform-nam=* | --program-transform-na=* \
295 | --program-transform-n=* | --program-transform-=* \
296 | --program-transform=* | --program-transfor=* \
297 | --program-transfo=* | --program-transf=* \
298 | --program-trans=* | --program-tran=* \
299 | --progr-tra=* | --program-tr=* | --program-t=*)
300 program_transform_name="$ac_optarg" ;;
302 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
303 | -silent | --silent | --silen | --sile | --sil)
304 silent=yes ;;
306 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
307 ac_prev=sbindir ;;
308 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
309 | --sbi=* | --sb=*)
310 sbindir="$ac_optarg" ;;
312 -sharedstatedir | --sharedstatedir | --sharedstatedi \
313 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
314 | --sharedst | --shareds | --shared | --share | --shar \
315 | --sha | --sh)
316 ac_prev=sharedstatedir ;;
317 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
318 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
319 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
320 | --sha=* | --sh=*)
321 sharedstatedir="$ac_optarg" ;;
323 -site | --site | --sit)
324 ac_prev=site ;;
325 -site=* | --site=* | --sit=*)
326 site="$ac_optarg" ;;
328 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
329 ac_prev=srcdir ;;
330 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
331 srcdir="$ac_optarg" ;;
333 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
334 | --syscon | --sysco | --sysc | --sys | --sy)
335 ac_prev=sysconfdir ;;
336 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
337 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
338 sysconfdir="$ac_optarg" ;;
340 -target | --target | --targe | --targ | --tar | --ta | --t)
341 ac_prev=target ;;
342 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
343 target="$ac_optarg" ;;
345 -v | -verbose | --verbose | --verbos | --verbo | --verb)
346 verbose=yes ;;
348 -version | --version | --versio | --versi | --vers)
349 echo "configure generated by autoconf version 2.7"
350 exit 0 ;;
352 -with-* | --with-*)
353 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
354 # Reject names that are not valid shell variable names.
355 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
356 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
358 ac_package=`echo $ac_package| sed 's/-/_/g'`
359 case "$ac_option" in
360 *=*) ;;
361 *) ac_optarg=yes ;;
362 esac
363 eval "with_${ac_package}='$ac_optarg'" ;;
365 -without-* | --without-*)
366 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
367 # Reject names that are not valid shell variable names.
368 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
369 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
371 ac_package=`echo $ac_package| sed 's/-/_/g'`
372 eval "with_${ac_package}=no" ;;
374 --x)
375 # Obsolete; use --with-x.
376 with_x=yes ;;
378 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
379 | --x-incl | --x-inc | --x-in | --x-i)
380 ac_prev=x_includes ;;
381 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
382 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
383 x_includes="$ac_optarg" ;;
385 -x-libraries | --x-libraries | --x-librarie | --x-librari \
386 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
387 ac_prev=x_libraries ;;
388 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
389 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
390 x_libraries="$ac_optarg" ;;
392 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
396 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
397 echo "configure: warning: $ac_option: invalid host type" 1>&2
399 if test "x$nonopt" != xNONE; then
400 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
402 nonopt="$ac_option"
405 esac
406 done
408 if test -n "$ac_prev"; then
409 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
412 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
414 # File descriptor usage:
415 # 0 standard input
416 # 1 file creation
417 # 2 errors and warnings
418 # 3 some systems may open it to /dev/tty
419 # 4 used on the Kubota Titan
420 # 6 checking for... messages and results
421 # 5 compiler messages saved in config.log
422 if test "$silent" = yes; then
423 exec 6>/dev/null
424 else
425 exec 6>&1
427 exec 5>./config.log
429 echo "\
430 This file contains any messages produced by compilers while
431 running configure, to aid debugging if configure makes a mistake.
432 " 1>&5
434 # Strip out --no-create and --no-recursion so they do not pile up.
435 # Also quote any args containing shell metacharacters.
436 ac_configure_args=
437 for ac_arg
439 case "$ac_arg" in
440 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
441 | --no-cr | --no-c) ;;
442 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
443 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
444 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
445 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
446 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
447 esac
448 done
450 # NLS nuisances.
451 # Only set LANG and LC_ALL to C if already set.
452 # These must not be set unconditionally because not all systems understand
453 # e.g. LANG=C (notably SCO).
454 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
455 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
457 # confdefs.h avoids OS command line length limits that DEFS can exceed.
458 rm -rf conftest* confdefs.h
459 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
460 echo > confdefs.h
462 # A filename unique to this package, relative to the directory that
463 # configure is in, which we can look for to find out if srcdir is correct.
464 ac_unique_file=../common/main.c
466 # Find the source files, if location was not specified.
467 if test -z "$srcdir"; then
468 ac_srcdir_defaulted=yes
469 # Try the directory containing this script, then its parent.
470 ac_prog=$0
471 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
472 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
473 srcdir=$ac_confdir
474 if test ! -r $srcdir/$ac_unique_file; then
475 srcdir=..
477 else
478 ac_srcdir_defaulted=no
480 if test ! -r $srcdir/$ac_unique_file; then
481 if test "$ac_srcdir_defaulted" = yes; then
482 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
483 else
484 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
487 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
489 # Prefer explicitly selected file to automatically selected ones.
490 if test -z "$CONFIG_SITE"; then
491 if test "x$prefix" != xNONE; then
492 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
493 else
494 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
497 for ac_site_file in $CONFIG_SITE; do
498 if test -r "$ac_site_file"; then
499 echo "loading site script $ac_site_file"
500 . "$ac_site_file"
502 done
504 if test -r "$cache_file"; then
505 echo "loading cache $cache_file"
506 . $cache_file
507 else
508 echo "creating cache $cache_file"
509 > $cache_file
512 ac_ext=c
513 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
514 ac_cpp='echo $CPP $CPPFLAGS 1>&5;
515 $CPP $CPPFLAGS'
516 ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
517 ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
518 ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
519 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
521 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
522 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
523 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
524 ac_n= ac_c='
525 ' ac_t=' '
526 else
527 ac_n=-n ac_c= ac_t=
529 else
530 ac_n= ac_c='\c' ac_t=
536 ac_aux_dir=
537 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
538 if test -f $ac_dir/install-sh; then
539 ac_aux_dir=$ac_dir
540 ac_install_sh="$ac_aux_dir/install-sh -c"
541 break
542 elif test -f $ac_dir/install.sh; then
543 ac_aux_dir=$ac_dir
544 ac_install_sh="$ac_aux_dir/install.sh -c"
545 break
547 done
548 if test -z "$ac_aux_dir"; then
549 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
551 ac_config_guess=$ac_aux_dir/config.guess
552 ac_config_sub=$ac_aux_dir/config.sub
553 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
555 # Find a good install program. We prefer a C program (faster),
556 # so one script is as good as another. But avoid the broken or
557 # incompatible versions:
558 # SysV /etc/install, /usr/sbin/install
559 # SunOS /usr/etc/install
560 # IRIX /sbin/install
561 # AIX /bin/install
562 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
563 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
564 # ./install, which can be erroneously created by make from ./install.sh.
565 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
566 if test -z "$INSTALL"; then
567 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
568 echo $ac_n "(cached) $ac_c" 1>&6
569 else
570 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
571 for ac_dir in $PATH; do
572 # Account for people who put trailing slashes in PATH elements.
573 case "$ac_dir/" in
574 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
576 # OSF1 and SCO ODT 3.0 have their own names for install.
577 for ac_prog in ginstall installbsd scoinst install; do
578 if test -f $ac_dir/$ac_prog; then
579 if test $ac_prog = install &&
580 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
581 # AIX install. It has an incompatible calling convention.
582 # OSF/1 installbsd also uses dspmsg, but is usable.
584 else
585 ac_cv_path_install="$ac_dir/$ac_prog -c"
586 break 2
589 done
591 esac
592 done
593 IFS="$ac_save_ifs"
596 if test "${ac_cv_path_install+set}" = set; then
597 INSTALL="$ac_cv_path_install"
598 else
599 # As a last resort, use the slow shell script. We don't cache a
600 # path for INSTALL within a source directory, because that will
601 # break other packages using the cache if that directory is
602 # removed, or if the path is relative.
603 INSTALL="$ac_install_sh"
606 echo "$ac_t""$INSTALL" 1>&6
608 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
609 # It thinks the first close brace ends the variable substitution.
610 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
612 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
615 # Make sure we can run config.sub.
616 if $ac_config_sub sun4 >/dev/null 2>&1; then :
617 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
620 echo $ac_n "checking host system type""... $ac_c" 1>&6
622 host_alias=$host
623 case "$host_alias" in
624 NONE)
625 case $nonopt in
626 NONE)
627 if host_alias=`$ac_config_guess`; then :
628 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
629 fi ;;
630 *) host_alias=$nonopt ;;
631 esac ;;
632 esac
634 host=`$ac_config_sub $host_alias`
635 host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
636 host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
637 host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
638 echo "$ac_t""$host" 1>&6
640 if test "$program_transform_name" = s,x,x,; then
641 program_transform_name=
642 else
643 # Double any \ or $. echo might interpret backslashes.
644 cat <<\EOF_SED > conftestsed
645 s,\\,\\\\,g; s,\$,$$,g
646 EOF_SED
647 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
648 rm -f conftestsed
650 test "$program_prefix" != NONE &&
651 program_transform_name="s,^,${program_prefix},; $program_transform_name"
652 # Use a double $ so make ignores it.
653 test "$program_suffix" != NONE &&
654 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
656 # sed with no file args requires a program.
657 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
660 echo $ac_n "checking if --enable-debug option specified""... $ac_c" 1>&6
661 # Check whether --enable-debug or --disable-debug was given.
662 if test "${enable_debug+set}" = set; then
663 enableval="$enable_debug"
664 vi_cv_debug="yes"
665 else
666 vi_cv_debug="no"
669 if test "$vi_cv_debug" = yes; then
670 cat >> confdefs.h <<\EOF
671 #define DEBUG 1
674 OPTFLAG=${OPTFLAG-"-g"}
675 no_op_OPTFLAG=${no_op_OPTFLAG-"-g"}
677 echo "$ac_t""$vi_cv_debug" 1>&6
681 case "$host_os" in
682 aix3.2.5) OPTFLAG=${OPTFLAG-"-O"};;
683 aix4.1*) CFLAGS=${CFLAGS-"-qstrict"}
684 OPTFLAG=${OPTFLAG-"-O3"};;
685 aux*) CPPFLAGS=${CPPFLAGS-"-ZP -D_BSD_SOURCE -D_SYSV_SOURCE -D_AUX_SOURCE"}
686 LDFLAGS=${LDFLAGS-"-ZP"}
687 OPTFLAG=${OPTFLAG-"-O"};;
688 bsd4.4) OPTFLAG=${OPTFLAG-"-O2"};;
689 bsdi*) CC=${CC-"shlicc"}
690 OPTFLAG=${OPTFLAG-"-O2"};;
691 irix6*) OPTFLAG=${OPTFLAG-"-O2"};;
692 irix*) OPTFLAG=${OPTFLAG-"-O2"};;
693 lynxos*) # Extract the first word of "gcc", so it can be a program name with args.
694 set dummy gcc; ac_word=$2
695 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
696 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698 else
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
701 else
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
703 for ac_dir in $PATH; do
704 test -z "$ac_dir" && ac_dir=.
705 if test -f $ac_dir/$ac_word; then
706 ac_cv_prog_CC="gcc"
707 break
709 done
710 IFS="$ac_save_ifs"
711 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
714 CC="$ac_cv_prog_CC"
715 if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
717 else
718 echo "$ac_t""no" 1>&6
722 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
723 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
724 echo $ac_n "(cached) $ac_c" 1>&6
725 else
726 cat > conftest.c <<EOF
727 #ifdef __GNUC__
728 yes;
729 #endif
731 if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
732 ac_cv_prog_gcc=yes
733 else
734 ac_cv_prog_gcc=no
738 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
739 if test $ac_cv_prog_gcc = yes; then
740 GCC=yes
741 if test "${CFLAGS+set}" != set; then
742 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
743 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
744 echo $ac_n "(cached) $ac_c" 1>&6
745 else
746 echo 'void f(){}' > conftest.c
747 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
748 ac_cv_prog_gcc_g=yes
749 else
750 ac_cv_prog_gcc_g=no
752 rm -f conftest*
756 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
757 if test $ac_cv_prog_gcc_g = yes; then
758 CFLAGS="-g -O"
759 else
760 CFLAGS="-O"
763 else
764 GCC=
765 test "${CFLAGS+set}" = set || CFLAGS="-g"
768 echo $ac_n "checking for GNU C (gcc) version 2.x""... $ac_c" 1>&6
769 ac_cv_gcc_vers=`${CC-cc} -v 2>&1 | \
770 grep "gcc version " | sed 's/.*version //'`
771 ac_cv_gcc_major=`echo "$ac_cv_gcc_vers" | sed 's/\..*//'`
772 if test "$ac_cv_gcc_major" = "2" ; then
773 echo "$ac_t""yes" 1>&6
774 else
775 echo "$ac_t""no" 1>&6
776 echo "Fatal error: Nvi requires gcc 2.x to build on LynxOS."
777 echo "See build/README.LynxOS for more information."
778 exit 1
779 fi;;
780 nextstep3) CPPFLAGS=${CPPFLAGS-"-w -pipe -posix"}
781 LDFLAGS=${LDFLAGS-"-posix"}
782 OPTFLAG=${OPTFLAG-"-O9"};;
783 osf*) CFLAGS=${CFLAGS-"-Olimit 1000"};;
784 solaris*) no_op_OPTFLAG=${no_op_OPTFLAG-""};;
785 sunos*) no_op_OPTFLAG=${no_op_OPTFLAG-""};;
786 esac
789 CC=${CC-cc}
792 OPTFLAG=${OPTFLAG-"-O"}
795 no_op_OPTFLAG=${no_op_OPTFLAG-"$OPTFLAG"}
797 case "$host_os" in
798 bsdi2.1) LIBS=${LIBS-"-lipc"};;
799 dgux*) LIBS=${LIBS-"-ldgc"};;
800 irix6*) LIBS=${LIBS-"-lbsd"};;
801 irix*) LIBS=${LIBS-"-lc_s -lbsd"};;
802 isc*) LIBS=${LIBS-"-lcposix -linet"};;
803 netbsd1*) LIBS=${LIBS-"-lcrypt"};;
804 ptx*) LIBS=${LIBS-"-lseq -linet -lsocket"};;
805 sco3.2*) LIBS=${LIBS-"-lsocket"};;
806 sinix*) LIBS=${LIBS-"-lelf -lc"};;
807 solaris*) LIBS=${LIBS-"-lsocket -lnsl -ldl"}
808 RLIBS=yes;;
809 wgs*) LIBS=${LIBS-"-lnsl"};;
810 esac
812 case "$host_os" in
813 aux*) LIBOBJS="getopt.o strpbrk.o $LIBOBJS";;
814 esac
816 case "$host_os" in
817 ultrix*) cat >> confdefs.h <<\EOF
818 #define HAVE_BROKEN_VDISABLE 1
821 esac
823 CPPFLAGS="$ADDCPPFLAGS $CPPFLAGS"
825 LDFLAGS="$ADDLDFLAGS $LDFLAGS"
827 LIBS="$ADDLIBS $LIBS"
829 # If we cannot run a trivial program, we must be cross compiling.
830 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
831 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
832 echo $ac_n "(cached) $ac_c" 1>&6
833 else
834 if test "$cross_compiling" = yes; then
835 ac_cv_c_cross=yes
836 else
837 cat > conftest.$ac_ext <<EOF
838 #line 839 "configure"
839 #include "confdefs.h"
840 main(){return(0);}
842 eval $ac_link
843 if test -s conftest && (./conftest; exit) 2>/dev/null; then
844 ac_cv_c_cross=no
845 else
846 ac_cv_c_cross=yes
849 rm -fr conftest*
852 echo "$ac_t""$ac_cv_c_cross" 1>&6
853 cross_compiling=$ac_cv_c_cross
855 echo $ac_n "checking whether the compiler ($CC $CFLAGS $LDFLAGS) actually works""... $ac_c" 1>&6
857 ac_ext=c
858 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
859 ac_cpp='echo $CPP $CPPFLAGS 1>&5;
860 $CPP $CPPFLAGS'
861 ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
862 ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
863 ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
864 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
866 if test "$cross_compiling" = yes; then
867 cat > conftest.$ac_ext <<EOF
868 #line 869 "configure"
869 #include "confdefs.h"
871 int main() { return 0; }
872 int t() {
874 ; return 0; }
876 if eval $ac_link; then
877 rm -rf conftest*
878 am_cv_prog_cc_works=yes
879 else
880 rm -rf conftest*
881 am_cv_prog_cc_works=no
883 rm -f conftest*
885 else
886 cat > conftest.$ac_ext <<EOF
887 #line 888 "configure"
888 #include "confdefs.h"
889 main() { exit(0); }
891 eval $ac_link
892 if test -s conftest && (./conftest; exit) 2>/dev/null; then
893 am_cv_prog_cc_works=yes
894 else
895 am_cv_prog_cc_works=no
898 rm -fr conftest*
900 case "$am_cv_prog_cc_works" in
901 *no) { echo "configure: error: Installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } ;;
902 *yes) ;;
903 esac
904 echo "$ac_t""yes" 1>&6
907 PATH="$PATH:/usr/bin:/usr/sbin:/sbin:/etc:/usr/etc:/usr/lib:/usr/ucblib:"
909 # Extract the first word of "sh", so it can be a program name with args.
910 set dummy sh; ac_word=$2
911 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
912 if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_shell'+set}'`\" = set"; then
913 echo $ac_n "(cached) $ac_c" 1>&6
914 else
915 case "$vi_cv_path_shell" in
917 ac_cv_path_vi_cv_path_shell="$vi_cv_path_shell" # Let the user override the test with a path.
920 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
921 for ac_dir in $PATH; do
922 test -z "$ac_dir" && ac_dir=.
923 if test -f $ac_dir/$ac_word; then
924 ac_cv_path_vi_cv_path_shell="$ac_dir/$ac_word"
925 break
927 done
928 IFS="$ac_save_ifs"
929 test -z "$ac_cv_path_vi_cv_path_shell" && ac_cv_path_vi_cv_path_shell="no"
931 esac
933 vi_cv_path_shell="$ac_cv_path_vi_cv_path_shell"
934 if test -n "$vi_cv_path_shell"; then
935 echo "$ac_t""$vi_cv_path_shell" 1>&6
936 else
937 echo "$ac_t""no" 1>&6
940 if test "$vi_cv_path_shell" = no; then
941 echo "Fatal error: the shell utility not found."
942 exit 1
945 # Extract the first word of "sendmail", so it can be a program name with args.
946 set dummy sendmail; ac_word=$2
947 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
948 if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_sendmail'+set}'`\" = set"; then
949 echo $ac_n "(cached) $ac_c" 1>&6
950 else
951 case "$vi_cv_path_sendmail" in
953 ac_cv_path_vi_cv_path_sendmail="$vi_cv_path_sendmail" # Let the user override the test with a path.
956 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
957 for ac_dir in $PATH; do
958 test -z "$ac_dir" && ac_dir=.
959 if test -f $ac_dir/$ac_word; then
960 ac_cv_path_vi_cv_path_sendmail="$ac_dir/$ac_word"
961 break
963 done
964 IFS="$ac_save_ifs"
965 test -z "$ac_cv_path_vi_cv_path_sendmail" && ac_cv_path_vi_cv_path_sendmail="no"
967 esac
969 vi_cv_path_sendmail="$ac_cv_path_vi_cv_path_sendmail"
970 if test -n "$vi_cv_path_sendmail"; then
971 echo "$ac_t""$vi_cv_path_sendmail" 1>&6
972 else
973 echo "$ac_t""no" 1>&6
976 if test "$vi_cv_path_sendmail" = no; then
977 echo "WARNING: The sendmail utility was not found!"
978 echo "WARNING: Users will not be told of saved files."
982 for ac_prog in perl5 perl
984 # Extract the first word of "$ac_prog", so it can be a program name with args.
985 set dummy $ac_prog; ac_word=$2
986 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
987 if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_perl'+set}'`\" = set"; then
988 echo $ac_n "(cached) $ac_c" 1>&6
989 else
990 case "$vi_cv_path_perl" in
992 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
995 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
996 for ac_dir in $PATH; do
997 test -z "$ac_dir" && ac_dir=.
998 if test -f $ac_dir/$ac_word; then
999 ac_cv_path_vi_cv_path_perl="$ac_dir/$ac_word"
1000 break
1002 done
1003 IFS="$ac_save_ifs"
1005 esac
1007 vi_cv_path_perl="$ac_cv_path_vi_cv_path_perl"
1008 if test -n "$vi_cv_path_perl"; then
1009 echo "$ac_t""$vi_cv_path_perl" 1>&6
1010 else
1011 echo "$ac_t""no" 1>&6
1014 test -n "$vi_cv_path_perl" && break
1015 done
1016 test -n "$vi_cv_path_perl" || vi_cv_path_perl="no"
1020 echo $ac_n "checking for preserve directory""... $ac_c" 1>&6
1021 if eval "test \"`echo '$''{'vi_cv_path_preserve'+set}'`\" = set"; then
1022 echo $ac_n "(cached) $ac_c" 1>&6
1023 else
1024 dirlist="/var/preserve /var/tmp /usr/tmp"
1025 vi_cv_path_preserve=no
1026 for i in $dirlist; do
1027 if test -d $i/vi.recover; then
1028 vi_cv_path_preserve=$i/vi.recover
1029 break;
1031 done
1032 if test "$vi_cv_path_preserve" = no; then
1033 for i in $dirlist; do
1034 if test -d $i -a -w $i; then
1035 vi_cv_path_preserve=$i/vi.recover
1036 break;
1038 done
1043 if test "$vi_cv_path_preserve" = no; then
1044 echo "Fatal error: no writeable preserve directory found."
1045 exit 1
1047 echo "$ac_t""$vi_cv_path_preserve" 1>&6
1049 # Extract the first word of "chmod", so it can be a program name with args.
1050 set dummy chmod; ac_word=$2
1051 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1052 if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_chmod'+set}'`\" = set"; then
1053 echo $ac_n "(cached) $ac_c" 1>&6
1054 else
1055 case "$vi_cv_path_chmod" in
1057 ac_cv_path_vi_cv_path_chmod="$vi_cv_path_chmod" # Let the user override the test with a path.
1060 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1061 for ac_dir in $PATH; do
1062 test -z "$ac_dir" && ac_dir=.
1063 if test -f $ac_dir/$ac_word; then
1064 ac_cv_path_vi_cv_path_chmod="$ac_dir/$ac_word"
1065 break
1067 done
1068 IFS="$ac_save_ifs"
1069 test -z "$ac_cv_path_vi_cv_path_chmod" && ac_cv_path_vi_cv_path_chmod="missing_chmod"
1071 esac
1073 vi_cv_path_chmod="$ac_cv_path_vi_cv_path_chmod"
1074 if test -n "$vi_cv_path_chmod"; then
1075 echo "$ac_t""$vi_cv_path_chmod" 1>&6
1076 else
1077 echo "$ac_t""no" 1>&6
1080 # Extract the first word of "cp", so it can be a program name with args.
1081 set dummy cp; ac_word=$2
1082 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1083 if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_cp'+set}'`\" = set"; then
1084 echo $ac_n "(cached) $ac_c" 1>&6
1085 else
1086 case "$vi_cv_path_cp" in
1088 ac_cv_path_vi_cv_path_cp="$vi_cv_path_cp" # Let the user override the test with a path.
1091 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1092 for ac_dir in $PATH; do
1093 test -z "$ac_dir" && ac_dir=.
1094 if test -f $ac_dir/$ac_word; then
1095 ac_cv_path_vi_cv_path_cp="$ac_dir/$ac_word"
1096 break
1098 done
1099 IFS="$ac_save_ifs"
1100 test -z "$ac_cv_path_vi_cv_path_cp" && ac_cv_path_vi_cv_path_cp="missing_cp"
1102 esac
1104 vi_cv_path_cp="$ac_cv_path_vi_cv_path_cp"
1105 if test -n "$vi_cv_path_cp"; then
1106 echo "$ac_t""$vi_cv_path_cp" 1>&6
1107 else
1108 echo "$ac_t""no" 1>&6
1111 # Extract the first word of "ln", so it can be a program name with args.
1112 set dummy ln; ac_word=$2
1113 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1114 if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_ln'+set}'`\" = set"; then
1115 echo $ac_n "(cached) $ac_c" 1>&6
1116 else
1117 case "$vi_cv_path_ln" in
1119 ac_cv_path_vi_cv_path_ln="$vi_cv_path_ln" # Let the user override the test with a path.
1122 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1123 for ac_dir in $PATH; do
1124 test -z "$ac_dir" && ac_dir=.
1125 if test -f $ac_dir/$ac_word; then
1126 ac_cv_path_vi_cv_path_ln="$ac_dir/$ac_word"
1127 break
1129 done
1130 IFS="$ac_save_ifs"
1131 test -z "$ac_cv_path_vi_cv_path_ln" && ac_cv_path_vi_cv_path_ln="missing_ln"
1133 esac
1135 vi_cv_path_ln="$ac_cv_path_vi_cv_path_ln"
1136 if test -n "$vi_cv_path_ln"; then
1137 echo "$ac_t""$vi_cv_path_ln" 1>&6
1138 else
1139 echo "$ac_t""no" 1>&6
1142 # Extract the first word of "mkdir", so it can be a program name with args.
1143 set dummy mkdir; ac_word=$2
1144 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1145 if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_mkdir'+set}'`\" = set"; then
1146 echo $ac_n "(cached) $ac_c" 1>&6
1147 else
1148 case "$vi_cv_path_mkdir" in
1150 ac_cv_path_vi_cv_path_mkdir="$vi_cv_path_mkdir" # Let the user override the test with a path.
1153 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1154 for ac_dir in $PATH; do
1155 test -z "$ac_dir" && ac_dir=.
1156 if test -f $ac_dir/$ac_word; then
1157 ac_cv_path_vi_cv_path_mkdir="$ac_dir/$ac_word"
1158 break
1160 done
1161 IFS="$ac_save_ifs"
1162 test -z "$ac_cv_path_vi_cv_path_mkdir" && ac_cv_path_vi_cv_path_mkdir="missing_mkdir"
1164 esac
1166 vi_cv_path_mkdir="$ac_cv_path_vi_cv_path_mkdir"
1167 if test -n "$vi_cv_path_mkdir"; then
1168 echo "$ac_t""$vi_cv_path_mkdir" 1>&6
1169 else
1170 echo "$ac_t""no" 1>&6
1173 # Extract the first word of "rm", so it can be a program name with args.
1174 set dummy rm; ac_word=$2
1175 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1176 if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_rm'+set}'`\" = set"; then
1177 echo $ac_n "(cached) $ac_c" 1>&6
1178 else
1179 case "$vi_cv_path_rm" in
1181 ac_cv_path_vi_cv_path_rm="$vi_cv_path_rm" # Let the user override the test with a path.
1184 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1185 for ac_dir in $PATH; do
1186 test -z "$ac_dir" && ac_dir=.
1187 if test -f $ac_dir/$ac_word; then
1188 ac_cv_path_vi_cv_path_rm="$ac_dir/$ac_word"
1189 break
1191 done
1192 IFS="$ac_save_ifs"
1193 test -z "$ac_cv_path_vi_cv_path_rm" && ac_cv_path_vi_cv_path_rm="missing_rm"
1195 esac
1197 vi_cv_path_rm="$ac_cv_path_vi_cv_path_rm"
1198 if test -n "$vi_cv_path_rm"; then
1199 echo "$ac_t""$vi_cv_path_rm" 1>&6
1200 else
1201 echo "$ac_t""no" 1>&6
1204 # Extract the first word of "strip", so it can be a program name with args.
1205 set dummy strip; ac_word=$2
1206 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1207 if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_strip'+set}'`\" = set"; then
1208 echo $ac_n "(cached) $ac_c" 1>&6
1209 else
1210 case "$vi_cv_path_strip" in
1212 ac_cv_path_vi_cv_path_strip="$vi_cv_path_strip" # Let the user override the test with a path.
1215 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1216 for ac_dir in $PATH; do
1217 test -z "$ac_dir" && ac_dir=.
1218 if test -f $ac_dir/$ac_word; then
1219 ac_cv_path_vi_cv_path_strip="$ac_dir/$ac_word"
1220 break
1222 done
1223 IFS="$ac_save_ifs"
1224 test -z "$ac_cv_path_vi_cv_path_strip" && ac_cv_path_vi_cv_path_strip="missing_strip"
1226 esac
1228 vi_cv_path_strip="$ac_cv_path_vi_cv_path_strip"
1229 if test -n "$vi_cv_path_strip"; then
1230 echo "$ac_t""$vi_cv_path_strip" 1>&6
1231 else
1232 echo "$ac_t""no" 1>&6
1236 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1237 # On Suns, sometimes $CPP names a directory.
1238 if test -n "$CPP" && test -d "$CPP"; then
1239 CPP=
1241 if test -z "$CPP"; then
1242 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1243 echo $ac_n "(cached) $ac_c" 1>&6
1244 else
1245 # This must be in double quotes, not single quotes, because CPP may get
1246 # substituted into the Makefile and "${CC-cc}" will confuse make.
1247 CPP="${CC-cc} -E"
1248 # On the NeXT, cc -E runs the code through the compiler's parser,
1249 # not just through cpp.
1250 cat > conftest.$ac_ext <<EOF
1251 #line 1252 "configure"
1252 #include "confdefs.h"
1253 #include <assert.h>
1254 Syntax Error
1256 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1257 ac_err=`grep -v '^ *+' conftest.out`
1258 if test -z "$ac_err"; then
1260 else
1261 echo "$ac_err" >&5
1262 rm -rf conftest*
1263 CPP="${CC-cc} -E -traditional-cpp"
1264 cat > conftest.$ac_ext <<EOF
1265 #line 1266 "configure"
1266 #include "confdefs.h"
1267 #include <assert.h>
1268 Syntax Error
1270 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1271 ac_err=`grep -v '^ *+' conftest.out`
1272 if test -z "$ac_err"; then
1274 else
1275 echo "$ac_err" >&5
1276 rm -rf conftest*
1277 CPP=/lib/cpp
1279 rm -f conftest*
1281 rm -f conftest*
1282 ac_cv_prog_CPP="$CPP"
1284 CPP="$ac_cv_prog_CPP"
1285 else
1286 ac_cv_prog_CPP="$CPP"
1288 echo "$ac_t""$CPP" 1>&6
1290 # If we find X, set shell vars x_includes and x_libraries to the
1291 # paths, otherwise set no_x=yes.
1292 # Uses ac_ vars as temps to allow command line to override cache and checks.
1293 # --without-x overrides everything else, but does not touch the cache.
1294 echo $ac_n "checking for X""... $ac_c" 1>&6
1296 # Check whether --with-x or --without-x was given.
1297 if test "${with_x+set}" = set; then
1298 withval="$with_x"
1302 if test "x$with_x" = xno; then
1303 no_x=yes
1304 else
1305 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1306 no_x=
1307 else
1308 if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then
1309 echo $ac_n "(cached) $ac_c" 1>&6
1310 else
1311 # One or both of the vars are not set, and there is no cached value.
1312 no_x=yes
1313 rm -fr conftestdir
1314 if mkdir conftestdir; then
1315 cd conftestdir
1316 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1317 cat > Imakefile <<'EOF'
1318 acfindx:
1319 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1321 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1322 no_x=
1323 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1324 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
1325 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
1326 for ac_extension in a so sl; do
1327 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1328 test -f $ac_im_libdir/libX11.$ac_extension; then
1329 ac_im_usrlibdir=$ac_im_libdir; break
1331 done
1332 # Screen out bogus values from the imake configuration.
1333 case "$ac_im_incroot" in
1334 /usr/include) ;;
1335 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1336 esac
1337 case "$ac_im_usrlibdir" in
1338 /usr/lib | /lib) ;;
1339 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1340 esac
1342 cd ..
1343 rm -fr conftestdir
1346 if test "$no_x" = yes; then
1347 test -z "$x_direct_test_library" && x_direct_test_library=Xt
1348 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1349 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1350 cat > conftest.$ac_ext <<EOF
1351 #line 1352 "configure"
1352 #include "confdefs.h"
1353 #include <$x_direct_test_include>
1355 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1356 ac_err=`grep -v '^ *+' conftest.out`
1357 if test -z "$ac_err"; then
1358 rm -rf conftest*
1359 no_x= ac_x_includes=
1360 else
1361 echo "$ac_err" >&5
1362 rm -rf conftest*
1363 for ac_dir in \
1364 /usr/X11R6/include \
1365 /usr/X11R5/include \
1366 /usr/X11R4/include \
1368 /usr/include/X11R6 \
1369 /usr/include/X11R5 \
1370 /usr/include/X11R4 \
1372 /usr/local/X11R6/include \
1373 /usr/local/X11R5/include \
1374 /usr/local/X11R4/include \
1376 /usr/local/include/X11R6 \
1377 /usr/local/include/X11R5 \
1378 /usr/local/include/X11R4 \
1380 /usr/X11/include \
1381 /usr/include/X11 \
1382 /usr/local/X11/include \
1383 /usr/local/include/X11 \
1385 /usr/X386/include \
1386 /usr/x386/include \
1387 /usr/XFree86/include/X11 \
1389 /usr/include \
1390 /usr/local/include \
1391 /usr/unsupported/include \
1392 /usr/athena/include \
1393 /usr/local/x11r5/include \
1394 /usr/lpp/Xamples/include \
1396 /usr/openwin/include \
1397 /usr/openwin/share/include \
1400 if test -r "$ac_dir/$x_direct_test_include"; then
1401 no_x= ac_x_includes=$ac_dir
1402 break
1404 done
1406 rm -f conftest*
1408 # Check for the libraries.
1409 # See if we find them without any special options.
1410 # Don't add to $LIBS permanently.
1411 ac_save_LIBS="$LIBS"
1412 LIBS="-l$x_direct_test_library $LIBS"
1413 cat > conftest.$ac_ext <<EOF
1414 #line 1415 "configure"
1415 #include "confdefs.h"
1417 int main() { return 0; }
1418 int t() {
1419 ${x_direct_test_function}()
1420 ; return 0; }
1422 if eval $ac_link; then
1423 rm -rf conftest*
1424 LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
1425 else
1426 rm -rf conftest*
1427 LIBS="$ac_save_LIBS"
1428 # First see if replacing the include by lib works.
1429 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1430 /usr/X11R6/lib \
1431 /usr/X11R5/lib \
1432 /usr/X11R4/lib \
1434 /usr/lib/X11R6 \
1435 /usr/lib/X11R5 \
1436 /usr/lib/X11R4 \
1438 /usr/local/X11R6/lib \
1439 /usr/local/X11R5/lib \
1440 /usr/local/X11R4/lib \
1442 /usr/local/lib/X11R6 \
1443 /usr/local/lib/X11R5 \
1444 /usr/local/lib/X11R4 \
1446 /usr/X11/lib \
1447 /usr/lib/X11 \
1448 /usr/local/X11/lib \
1449 /usr/local/lib/X11 \
1451 /usr/X386/lib \
1452 /usr/x386/lib \
1453 /usr/XFree86/lib/X11 \
1455 /usr/lib \
1456 /usr/local/lib \
1457 /usr/unsupported/lib \
1458 /usr/athena/lib \
1459 /usr/local/x11r5/lib \
1460 /usr/lpp/Xamples/lib \
1462 /usr/openwin/lib \
1463 /usr/openwin/share/lib \
1466 for ac_extension in a so sl; do
1467 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1468 no_x= ac_x_libraries=$ac_dir
1469 break 2
1471 done
1472 done
1474 rm -f conftest*
1477 if test "$no_x" = yes; then
1478 ac_cv_path_x="no_x=yes"
1479 else
1480 ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1484 eval "$ac_cv_path_x"
1485 fi # $with_x != no
1487 if test "$no_x" = yes; then
1488 echo "$ac_t""no" 1>&6
1489 else
1490 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1491 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1492 ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1493 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1497 if test "$no_x" != yes; then
1498 if test "X$x_libraries" != "X"; then
1499 if test "X$RLIBS" = "Xyes"; then
1500 XLIBS="-R$x_libraries -L$x_libraries $XLIBS"
1501 else
1502 XLIBS="-L$x_libraries $XLIBS"
1505 XLIBS="$XLIBS -lX11"
1506 if test "X$x_includes" != "X"; then
1507 XINCS="-I$x_includes"
1513 echo $ac_n "checking if --enable-perlinterp option specified""... $ac_c" 1>&6
1514 # Check whether --enable-perlinterp or --disable-perlinterp was given.
1515 if test "${enable_perlinterp+set}" = set; then
1516 enableval="$enable_perlinterp"
1517 vi_cv_perlinterp="yes"
1518 else
1519 vi_cv_perlinterp="no"
1522 echo "$ac_t""$vi_cv_perlinterp" 1>&6
1523 if test "$vi_cv_perlinterp" = "yes"; then
1524 if test "$vi_cv_path_perl" = no; then
1525 echo "Fatal error: no perl5 utility found."
1526 exit 1
1528 $vi_cv_path_perl -e 'require 5.002' || {
1529 echo "Fatal error: perl5 must be version 5.002 or later."
1530 exit 1
1532 $vi_cv_path_perl -e 'close(STDERR);require 5.003_01' &&
1533 cat >> confdefs.h <<\EOF
1534 #define HAVE_PERL_5_003_01 1
1538 eval `$vi_cv_path_perl -V:shrpenv`
1539 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
1540 shrpenv=""
1542 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlib}'`
1543 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
1544 -e 'ccflags;perl_inc'`
1545 if test "X$perlcppflags" != "X"; then
1546 CPPFLAGS="$perlcppflags $CPPFLAGS"
1548 perllibs=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \
1549 -e 'ldopts'`
1550 if test "X$perllibs" != "X"; then
1551 LIBS="$perllibs $LIBS"
1553 perlldflags=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \
1554 -e 'ccdlflags'`
1555 if test "X$perlldflags" != "X"; then
1556 LDFLAGS="$perlldflags $LDFLAGS"
1558 LIBOBJS="perl.o perlsfio.o $LIBOBJS"
1559 cat >> confdefs.h <<\EOF
1560 #define HAVE_PERL_INTERP 1
1567 echo $ac_n "checking if --enable-tknvi option specified""... $ac_c" 1>&6
1568 # Check whether --enable-tknvi or --disable-tknvi was given.
1569 if test "${enable_tknvi+set}" = set; then
1570 enableval="$enable_tknvi"
1571 vi_cv_tknvi="yes"
1572 else
1573 vi_cv_tknvi="no"
1576 echo "$ac_t""$vi_cv_tknvi" 1>&6
1577 if test "$vi_cv_tknvi" = "yes"; then
1578 tknvi=tknvi
1579 TKLIBS="-ltk -ltcl -lm $XLIBS $LIBS"
1582 echo $ac_n "checking if --enable-tclinterp option specified""... $ac_c" 1>&6
1583 # Check whether --enable-tclinterp or --disable-tclinterp was given.
1584 if test "${enable_tclinterp+set}" = set; then
1585 enableval="$enable_tclinterp"
1586 vi_cv_tclinterp="yes"
1587 else
1588 vi_cv_tclinterp="no"
1591 echo "$ac_t""$vi_cv_tclinterp" 1>&6
1592 if test "$vi_cv_tclinterp" = "yes"; then
1593 LIBOBJS="tcl.o $LIBOBJS"
1594 LIBS="-ltk -ltcl -lm $XLIBS $LIBS"
1595 cat >> confdefs.h <<\EOF
1596 #define HAVE_TCL_INTERP 1
1601 if test "$vi_cv_tknvi" = "yes" || test "$vi_cv_tclinterp" = "yes"; then
1602 echo $ac_n "checking for -ltcl""... $ac_c" 1>&6
1603 ac_lib_var=`echo tcl | tr '.-/+' '___p'`
1604 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1605 echo $ac_n "(cached) $ac_c" 1>&6
1606 else
1607 ac_save_LIBS="$LIBS"
1608 LIBS="-ltcl -ltk -lm $LIBS"
1609 cat > conftest.$ac_ext <<EOF
1610 #line 1611 "configure"
1611 #include "confdefs.h"
1613 int main() { return 0; }
1614 int t() {
1615 main()
1616 ; return 0; }
1618 if eval $ac_link; then
1619 rm -rf conftest*
1620 eval "ac_cv_lib_$ac_lib_var=yes"
1621 else
1622 rm -rf conftest*
1623 eval "ac_cv_lib_$ac_lib_var=no"
1625 rm -f conftest*
1626 LIBS="$ac_save_LIBS"
1629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1630 echo "$ac_t""yes" 1>&6
1631 vi_cv_tkfatal="no"
1632 else
1633 echo "$ac_t""no" 1>&6
1634 vi_cv_tkfatal="yes"
1637 if test "$vi_cv_tkfatal" = "yes"; then
1638 echo "Fatal error: no Tk/Tcl library; see the section"
1639 echo "ADDING LIBRARIES AND INCLUDE FILES in the README file."
1640 exit 1
1644 if test "$vi_cv_tclinterp" = yes || test "$vi_cv_perlinterp" = yes; then
1645 LIBOBJS="api.o $LIBOBJS"
1648 echo $ac_n "checking for -ltermlib""... $ac_c" 1>&6
1649 ac_lib_var=`echo termlib | tr '.-/+' '___p'`
1650 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1651 echo $ac_n "(cached) $ac_c" 1>&6
1652 else
1653 ac_save_LIBS="$LIBS"
1654 LIBS="-ltermlib $LIBS"
1655 cat > conftest.$ac_ext <<EOF
1656 #line 1657 "configure"
1657 #include "confdefs.h"
1659 int main() { return 0; }
1660 int t() {
1661 tgetent()
1662 ; return 0; }
1664 if eval $ac_link; then
1665 rm -rf conftest*
1666 eval "ac_cv_lib_$ac_lib_var=yes"
1667 else
1668 rm -rf conftest*
1669 eval "ac_cv_lib_$ac_lib_var=no"
1671 rm -f conftest*
1672 LIBS="$ac_save_LIBS"
1675 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1676 echo "$ac_t""yes" 1>&6
1677 vi_cv_termlib=-ltermlib
1678 else
1679 echo "$ac_t""no" 1>&6
1680 vi_cv_termlib=no
1683 if test "$vi_cv_termlib" = no; then
1684 echo $ac_n "checking for -ltermcap""... $ac_c" 1>&6
1685 ac_lib_var=`echo termcap | tr '.-/+' '___p'`
1686 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1687 echo $ac_n "(cached) $ac_c" 1>&6
1688 else
1689 ac_save_LIBS="$LIBS"
1690 LIBS="-ltermcap $LIBS"
1691 cat > conftest.$ac_ext <<EOF
1692 #line 1693 "configure"
1693 #include "confdefs.h"
1695 int main() { return 0; }
1696 int t() {
1697 tgetent()
1698 ; return 0; }
1700 if eval $ac_link; then
1701 rm -rf conftest*
1702 eval "ac_cv_lib_$ac_lib_var=yes"
1703 else
1704 rm -rf conftest*
1705 eval "ac_cv_lib_$ac_lib_var=no"
1707 rm -f conftest*
1708 LIBS="$ac_save_LIBS"
1711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1712 echo "$ac_t""yes" 1>&6
1713 vi_cv_termlib=-ltermcap
1714 else
1715 echo "$ac_t""no" 1>&6
1716 vi_cv_termlib=no
1720 if test "$vi_cv_termlib" != no; then
1721 LIBS="$vi_cv_termlib $LIBS"
1724 echo $ac_n "checking if --disable-curses option specified""... $ac_c" 1>&6
1725 # Check whether --enable-curses or --disable-curses was given.
1726 if test "${enable_curses+set}" = set; then
1727 enableval="$enable_curses"
1728 vi_cv_curses="other curses"
1729 else
1730 vi_cv_curses="bundled curses"
1733 echo "$ac_t""$vi_cv_curses" 1>&6
1734 case "$vi_cv_curses" in
1735 "bundled curses")
1736 CPPFLAGS="-I\$(srcdir)/curses $CPPFLAGS"
1737 cobjs="\$(COBJS)";;
1738 "other curses")
1739 LIBS="-lcurses $LIBS";;
1740 esac
1742 echo $ac_n "checking for sys/mman.h""... $ac_c" 1>&6
1743 if eval "test \"`echo '$''{'vi_cv_include_sys_mman'+set}'`\" = set"; then
1744 echo $ac_n "(cached) $ac_c" 1>&6
1745 else
1746 cat > conftest.$ac_ext <<EOF
1747 #line 1748 "configure"
1748 #include "confdefs.h"
1749 #include <sys/mman.h>
1751 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1752 ac_err=`grep -v '^ *+' conftest.out`
1753 if test -z "$ac_err"; then
1754 rm -rf conftest*
1755 vi_cv_include_sys_mman=yes
1756 else
1757 echo "$ac_err" >&5
1758 rm -rf conftest*
1759 vi_cv_include_sys_mman=no
1761 rm -f conftest*
1764 if test "$vi_cv_include_sys_mman" = yes; then
1765 cat >> confdefs.h <<\EOF
1766 #define HAVE_SYS_MMAN_H 1
1770 echo "$ac_t""$vi_cv_include_sys_mman" 1>&6
1772 echo $ac_n "checking for sys/select.h""... $ac_c" 1>&6
1773 if eval "test \"`echo '$''{'vi_cv_include_sys_select'+set}'`\" = set"; then
1774 echo $ac_n "(cached) $ac_c" 1>&6
1775 else
1776 cat > conftest.$ac_ext <<EOF
1777 #line 1778 "configure"
1778 #include "confdefs.h"
1779 #include <sys/select.h>
1781 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1782 ac_err=`grep -v '^ *+' conftest.out`
1783 if test -z "$ac_err"; then
1784 rm -rf conftest*
1785 vi_cv_include_sys_select=yes
1786 else
1787 echo "$ac_err" >&5
1788 rm -rf conftest*
1789 vi_cv_include_sys_select=no
1791 rm -f conftest*
1794 if test "$vi_cv_include_sys_select" = yes; then
1795 cat >> confdefs.h <<\EOF
1796 #define HAVE_SYS_SELECT_H 1
1800 echo "$ac_t""$vi_cv_include_sys_select" 1>&6
1802 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1803 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1804 echo $ac_n "(cached) $ac_c" 1>&6
1805 else
1806 cat > conftest.$ac_ext <<EOF
1807 #line 1808 "configure"
1808 #include "confdefs.h"
1809 #include <stdlib.h>
1810 #include <stdarg.h>
1811 #include <string.h>
1812 #include <float.h>
1814 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1815 ac_err=`grep -v '^ *+' conftest.out`
1816 if test -z "$ac_err"; then
1817 rm -rf conftest*
1818 ac_cv_header_stdc=yes
1819 else
1820 echo "$ac_err" >&5
1821 rm -rf conftest*
1822 ac_cv_header_stdc=no
1824 rm -f conftest*
1826 if test $ac_cv_header_stdc = yes; then
1827 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1828 cat > conftest.$ac_ext <<EOF
1829 #line 1830 "configure"
1830 #include "confdefs.h"
1831 #include <string.h>
1833 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1834 egrep "memchr" >/dev/null 2>&1; then
1836 else
1837 rm -rf conftest*
1838 ac_cv_header_stdc=no
1840 rm -f conftest*
1844 if test $ac_cv_header_stdc = yes; then
1845 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1846 cat > conftest.$ac_ext <<EOF
1847 #line 1848 "configure"
1848 #include "confdefs.h"
1849 #include <stdlib.h>
1851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1852 egrep "free" >/dev/null 2>&1; then
1854 else
1855 rm -rf conftest*
1856 ac_cv_header_stdc=no
1858 rm -f conftest*
1862 if test $ac_cv_header_stdc = yes; then
1863 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1864 if test "$cross_compiling" = yes; then
1866 else
1867 cat > conftest.$ac_ext <<EOF
1868 #line 1869 "configure"
1869 #include "confdefs.h"
1870 #include <ctype.h>
1871 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1872 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1873 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1874 int main () { int i; for (i = 0; i < 256; i++)
1875 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1876 exit (0); }
1879 eval $ac_link
1880 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1882 else
1883 ac_cv_header_stdc=no
1886 rm -fr conftest*
1890 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1891 if test $ac_cv_header_stdc = yes; then
1892 cat >> confdefs.h <<\EOF
1893 #define STDC_HEADERS 1
1898 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
1899 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
1900 echo $ac_n "(cached) $ac_c" 1>&6
1901 else
1902 cat > conftest.$ac_ext <<EOF
1903 #line 1904 "configure"
1904 #include "confdefs.h"
1905 #include <sys/types.h>
1906 #if STDC_HEADERS
1907 #include <stdlib.h>
1908 #endif
1910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1911 egrep "ssize_t" >/dev/null 2>&1; then
1912 rm -rf conftest*
1913 ac_cv_type_ssize_t=yes
1914 else
1915 rm -rf conftest*
1916 ac_cv_type_ssize_t=no
1918 rm -f conftest*
1921 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
1922 if test $ac_cv_type_ssize_t = no; then
1923 cat >> confdefs.h <<\EOF
1924 #define ssize_t int
1929 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1930 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
1931 echo $ac_n "(cached) $ac_c" 1>&6
1932 else
1933 ac_cv_c_bigendian=unknown
1934 # See if sys/param.h defines the BYTE_ORDER macro.
1935 cat > conftest.$ac_ext <<EOF
1936 #line 1937 "configure"
1937 #include "confdefs.h"
1938 #include <sys/types.h>
1939 #include <sys/param.h>
1940 int main() { return 0; }
1941 int t() {
1943 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1944 bogus endian macros
1945 #endif
1946 ; return 0; }
1948 if eval $ac_compile; then
1949 rm -rf conftest*
1950 # It does; now see whether it defined to BIG_ENDIAN or not.
1951 cat > conftest.$ac_ext <<EOF
1952 #line 1953 "configure"
1953 #include "confdefs.h"
1954 #include <sys/types.h>
1955 #include <sys/param.h>
1956 int main() { return 0; }
1957 int t() {
1959 #if BYTE_ORDER != BIG_ENDIAN
1960 not big endian
1961 #endif
1962 ; return 0; }
1964 if eval $ac_compile; then
1965 rm -rf conftest*
1966 ac_cv_c_bigendian=yes
1967 else
1968 rm -rf conftest*
1969 ac_cv_c_bigendian=no
1971 rm -f conftest*
1974 rm -f conftest*
1976 if test $ac_cv_c_bigendian = unknown; then
1977 if test "$cross_compiling" = yes; then
1978 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1979 else
1980 cat > conftest.$ac_ext <<EOF
1981 #line 1982 "configure"
1982 #include "confdefs.h"
1983 main () {
1984 /* Are we little or big endian? From Harbison&Steele. */
1985 union
1987 long l;
1988 char c[sizeof (long)];
1989 } u;
1990 u.l = 1;
1991 exit (u.c[sizeof (long) - 1] == 1);
1994 eval $ac_link
1995 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1996 ac_cv_c_bigendian=no
1997 else
1998 ac_cv_c_bigendian=yes
2001 rm -fr conftest*
2005 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2006 if test $ac_cv_c_bigendian = yes; then
2007 cat >> confdefs.h <<\EOF
2008 #define WORDS_BIGENDIAN 1
2013 echo $ac_n "checking for working const""... $ac_c" 1>&6
2014 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2015 echo $ac_n "(cached) $ac_c" 1>&6
2016 else
2017 cat > conftest.$ac_ext <<EOF
2018 #line 2019 "configure"
2019 #include "confdefs.h"
2021 int main() { return 0; }
2022 int t() {
2024 /* Ultrix mips cc rejects this. */
2025 typedef int charset[2]; const charset x;
2026 /* SunOS 4.1.1 cc rejects this. */
2027 char const *const *ccp;
2028 char **p;
2029 /* NEC SVR4.0.2 mips cc rejects this. */
2030 struct point {int x, y;};
2031 static struct point const zero = {0,0};
2032 /* AIX XL C 1.02.0.0 rejects this.
2033 It does not let you subtract one const X* pointer from another in an arm
2034 of an if-expression whose if-part is not a constant expression */
2035 const char *g = "string";
2036 ccp = &g + (g ? g-g : 0);
2037 /* HPUX 7.0 cc rejects these. */
2038 ++ccp;
2039 p = (char**) ccp;
2040 ccp = (char const *const *) p;
2041 { /* SCO 3.2v4 cc rejects this. */
2042 char *t;
2043 char const *s = 0 ? (char *) 0 : (char const *) 0;
2045 *t++ = 0;
2047 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2048 int x[] = {25, 17};
2049 const int *foo = &x[0];
2050 ++foo;
2052 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2053 typedef const int *iptr;
2054 iptr p = 0;
2055 ++p;
2057 { /* AIX XL C 1.02.0.0 rejects this saying
2058 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2059 struct s { int j; const int *ap[3]; };
2060 struct s *b; b->j = 5;
2062 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2063 const int foo = 10;
2066 ; return 0; }
2068 if eval $ac_compile; then
2069 rm -rf conftest*
2070 ac_cv_c_const=yes
2071 else
2072 rm -rf conftest*
2073 ac_cv_c_const=no
2075 rm -f conftest*
2079 echo "$ac_t""$ac_cv_c_const" 1>&6
2080 if test $ac_cv_c_const = no; then
2081 cat >> confdefs.h <<\EOF
2082 #define const
2087 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
2088 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
2089 echo $ac_n "(cached) $ac_c" 1>&6
2090 else
2091 cat > conftest.$ac_ext <<EOF
2092 #line 2093 "configure"
2093 #include "confdefs.h"
2094 #include <sys/types.h>
2095 #include <sys/stat.h>
2096 int main() { return 0; }
2097 int t() {
2098 struct stat s; s.st_blksize;
2099 ; return 0; }
2101 if eval $ac_compile; then
2102 rm -rf conftest*
2103 ac_cv_struct_st_blksize=yes
2104 else
2105 rm -rf conftest*
2106 ac_cv_struct_st_blksize=no
2108 rm -f conftest*
2112 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
2113 if test $ac_cv_struct_st_blksize = yes; then
2114 cat >> confdefs.h <<\EOF
2115 #define HAVE_ST_BLKSIZE 1
2120 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2121 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2122 echo $ac_n "(cached) $ac_c" 1>&6
2123 else
2124 cat > conftest.$ac_ext <<EOF
2125 #line 2126 "configure"
2126 #include "confdefs.h"
2127 #include <sys/types.h>
2128 #if STDC_HEADERS
2129 #include <stdlib.h>
2130 #endif
2132 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2133 egrep "mode_t" >/dev/null 2>&1; then
2134 rm -rf conftest*
2135 ac_cv_type_mode_t=yes
2136 else
2137 rm -rf conftest*
2138 ac_cv_type_mode_t=no
2140 rm -f conftest*
2143 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2144 if test $ac_cv_type_mode_t = no; then
2145 cat >> confdefs.h <<\EOF
2146 #define mode_t int
2151 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2152 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2153 echo $ac_n "(cached) $ac_c" 1>&6
2154 else
2155 cat > conftest.$ac_ext <<EOF
2156 #line 2157 "configure"
2157 #include "confdefs.h"
2158 #include <sys/types.h>
2159 #if STDC_HEADERS
2160 #include <stdlib.h>
2161 #endif
2163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2164 egrep "off_t" >/dev/null 2>&1; then
2165 rm -rf conftest*
2166 ac_cv_type_off_t=yes
2167 else
2168 rm -rf conftest*
2169 ac_cv_type_off_t=no
2171 rm -f conftest*
2174 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2175 if test $ac_cv_type_off_t = no; then
2176 cat >> confdefs.h <<\EOF
2177 #define off_t long
2182 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2183 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2184 echo $ac_n "(cached) $ac_c" 1>&6
2185 else
2186 cat > conftest.$ac_ext <<EOF
2187 #line 2188 "configure"
2188 #include "confdefs.h"
2189 #include <sys/types.h>
2190 #if STDC_HEADERS
2191 #include <stdlib.h>
2192 #endif
2194 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2195 egrep "pid_t" >/dev/null 2>&1; then
2196 rm -rf conftest*
2197 ac_cv_type_pid_t=yes
2198 else
2199 rm -rf conftest*
2200 ac_cv_type_pid_t=no
2202 rm -f conftest*
2205 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2206 if test $ac_cv_type_pid_t = no; then
2207 cat >> confdefs.h <<\EOF
2208 #define pid_t int
2213 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2214 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2215 echo $ac_n "(cached) $ac_c" 1>&6
2216 else
2217 cat > conftest.$ac_ext <<EOF
2218 #line 2219 "configure"
2219 #include "confdefs.h"
2220 #include <sys/types.h>
2221 #if STDC_HEADERS
2222 #include <stdlib.h>
2223 #endif
2225 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2226 egrep "size_t" >/dev/null 2>&1; then
2227 rm -rf conftest*
2228 ac_cv_type_size_t=yes
2229 else
2230 rm -rf conftest*
2231 ac_cv_type_size_t=no
2233 rm -f conftest*
2236 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2237 if test $ac_cv_type_size_t = no; then
2238 cat >> confdefs.h <<\EOF
2239 #define size_t unsigned
2244 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
2245 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
2246 echo $ac_n "(cached) $ac_c" 1>&6
2247 else
2248 cat > conftest.$ac_ext <<EOF
2249 #line 2250 "configure"
2250 #include "confdefs.h"
2251 #include <sys/types.h>
2252 #include <time.h>
2253 int main() { return 0; }
2254 int t() {
2255 struct tm *tp; tp->tm_sec;
2256 ; return 0; }
2258 if eval $ac_compile; then
2259 rm -rf conftest*
2260 ac_cv_struct_tm=time.h
2261 else
2262 rm -rf conftest*
2263 ac_cv_struct_tm=sys/time.h
2265 rm -f conftest*
2269 echo "$ac_t""$ac_cv_struct_tm" 1>&6
2270 if test $ac_cv_struct_tm = sys/time.h; then
2271 cat >> confdefs.h <<\EOF
2272 #define TM_IN_SYS_TIME 1
2278 for ac_func in bsearch gethostname getopt memchr memcpy memmove memset
2280 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2281 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2282 echo $ac_n "(cached) $ac_c" 1>&6
2283 else
2284 cat > conftest.$ac_ext <<EOF
2285 #line 2286 "configure"
2286 #include "confdefs.h"
2287 /* System header to define __stub macros and hopefully few prototypes,
2288 which can conflict with char $ac_func(); below. */
2289 #include <assert.h>
2290 /* Override any gcc2 internal prototype to avoid an error. */
2291 char $ac_func();
2293 int main() { return 0; }
2294 int t() {
2296 /* The GNU C library defines this for functions which it implements
2297 to always fail with ENOSYS. Some functions are actually named
2298 something starting with __ and the normal name is an alias. */
2299 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2300 choke me
2301 #else
2302 $ac_func();
2303 #endif
2305 ; return 0; }
2307 if eval $ac_link; then
2308 rm -rf conftest*
2309 eval "ac_cv_func_$ac_func=yes"
2310 else
2311 rm -rf conftest*
2312 eval "ac_cv_func_$ac_func=no"
2314 rm -f conftest*
2317 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2318 echo "$ac_t""yes" 1>&6
2319 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2320 cat >> confdefs.h <<EOF
2321 #define $ac_tr_func 1
2324 else
2325 echo "$ac_t""no" 1>&6
2327 done
2329 for ac_func in bsearch gethostname getopt memchr memcpy memmove memset
2331 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2332 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2333 echo $ac_n "(cached) $ac_c" 1>&6
2334 else
2335 cat > conftest.$ac_ext <<EOF
2336 #line 2337 "configure"
2337 #include "confdefs.h"
2338 /* System header to define __stub macros and hopefully few prototypes,
2339 which can conflict with char $ac_func(); below. */
2340 #include <assert.h>
2341 /* Override any gcc2 internal prototype to avoid an error. */
2342 char $ac_func();
2344 int main() { return 0; }
2345 int t() {
2347 /* The GNU C library defines this for functions which it implements
2348 to always fail with ENOSYS. Some functions are actually named
2349 something starting with __ and the normal name is an alias. */
2350 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2351 choke me
2352 #else
2353 $ac_func();
2354 #endif
2356 ; return 0; }
2358 if eval $ac_link; then
2359 rm -rf conftest*
2360 eval "ac_cv_func_$ac_func=yes"
2361 else
2362 rm -rf conftest*
2363 eval "ac_cv_func_$ac_func=no"
2365 rm -f conftest*
2368 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2369 echo "$ac_t""yes" 1>&6
2371 else
2372 echo "$ac_t""no" 1>&6
2373 LIBOBJS="$LIBOBJS ${ac_func}.o"
2376 done
2378 for ac_func in mkstemp mmap snprintf strdup strerror strpbrk strtol
2380 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2381 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2382 echo $ac_n "(cached) $ac_c" 1>&6
2383 else
2384 cat > conftest.$ac_ext <<EOF
2385 #line 2386 "configure"
2386 #include "confdefs.h"
2387 /* System header to define __stub macros and hopefully few prototypes,
2388 which can conflict with char $ac_func(); below. */
2389 #include <assert.h>
2390 /* Override any gcc2 internal prototype to avoid an error. */
2391 char $ac_func();
2393 int main() { return 0; }
2394 int t() {
2396 /* The GNU C library defines this for functions which it implements
2397 to always fail with ENOSYS. Some functions are actually named
2398 something starting with __ and the normal name is an alias. */
2399 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2400 choke me
2401 #else
2402 $ac_func();
2403 #endif
2405 ; return 0; }
2407 if eval $ac_link; then
2408 rm -rf conftest*
2409 eval "ac_cv_func_$ac_func=yes"
2410 else
2411 rm -rf conftest*
2412 eval "ac_cv_func_$ac_func=no"
2414 rm -f conftest*
2417 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2418 echo "$ac_t""yes" 1>&6
2419 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2420 cat >> confdefs.h <<EOF
2421 #define $ac_tr_func 1
2424 else
2425 echo "$ac_t""no" 1>&6
2427 done
2429 for ac_func in mkstemp mmap snprintf strdup strerror strpbrk strtol
2431 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2432 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2433 echo $ac_n "(cached) $ac_c" 1>&6
2434 else
2435 cat > conftest.$ac_ext <<EOF
2436 #line 2437 "configure"
2437 #include "confdefs.h"
2438 /* System header to define __stub macros and hopefully few prototypes,
2439 which can conflict with char $ac_func(); below. */
2440 #include <assert.h>
2441 /* Override any gcc2 internal prototype to avoid an error. */
2442 char $ac_func();
2444 int main() { return 0; }
2445 int t() {
2447 /* The GNU C library defines this for functions which it implements
2448 to always fail with ENOSYS. Some functions are actually named
2449 something starting with __ and the normal name is an alias. */
2450 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2451 choke me
2452 #else
2453 $ac_func();
2454 #endif
2456 ; return 0; }
2458 if eval $ac_link; then
2459 rm -rf conftest*
2460 eval "ac_cv_func_$ac_func=yes"
2461 else
2462 rm -rf conftest*
2463 eval "ac_cv_func_$ac_func=no"
2465 rm -f conftest*
2468 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2469 echo "$ac_t""yes" 1>&6
2471 else
2472 echo "$ac_t""no" 1>&6
2473 LIBOBJS="$LIBOBJS ${ac_func}.o"
2476 done
2478 for ac_func in strtoul vsnprintf
2480 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2481 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2482 echo $ac_n "(cached) $ac_c" 1>&6
2483 else
2484 cat > conftest.$ac_ext <<EOF
2485 #line 2486 "configure"
2486 #include "confdefs.h"
2487 /* System header to define __stub macros and hopefully few prototypes,
2488 which can conflict with char $ac_func(); below. */
2489 #include <assert.h>
2490 /* Override any gcc2 internal prototype to avoid an error. */
2491 char $ac_func();
2493 int main() { return 0; }
2494 int t() {
2496 /* The GNU C library defines this for functions which it implements
2497 to always fail with ENOSYS. Some functions are actually named
2498 something starting with __ and the normal name is an alias. */
2499 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2500 choke me
2501 #else
2502 $ac_func();
2503 #endif
2505 ; return 0; }
2507 if eval $ac_link; then
2508 rm -rf conftest*
2509 eval "ac_cv_func_$ac_func=yes"
2510 else
2511 rm -rf conftest*
2512 eval "ac_cv_func_$ac_func=no"
2514 rm -f conftest*
2517 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2518 echo "$ac_t""yes" 1>&6
2519 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2520 cat >> confdefs.h <<EOF
2521 #define $ac_tr_func 1
2524 else
2525 echo "$ac_t""no" 1>&6
2527 done
2529 for ac_func in strtoul vsnprintf
2531 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2532 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2533 echo $ac_n "(cached) $ac_c" 1>&6
2534 else
2535 cat > conftest.$ac_ext <<EOF
2536 #line 2537 "configure"
2537 #include "confdefs.h"
2538 /* System header to define __stub macros and hopefully few prototypes,
2539 which can conflict with char $ac_func(); below. */
2540 #include <assert.h>
2541 /* Override any gcc2 internal prototype to avoid an error. */
2542 char $ac_func();
2544 int main() { return 0; }
2545 int t() {
2547 /* The GNU C library defines this for functions which it implements
2548 to always fail with ENOSYS. Some functions are actually named
2549 something starting with __ and the normal name is an alias. */
2550 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2551 choke me
2552 #else
2553 $ac_func();
2554 #endif
2556 ; return 0; }
2558 if eval $ac_link; then
2559 rm -rf conftest*
2560 eval "ac_cv_func_$ac_func=yes"
2561 else
2562 rm -rf conftest*
2563 eval "ac_cv_func_$ac_func=no"
2565 rm -f conftest*
2568 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2569 echo "$ac_t""yes" 1>&6
2571 else
2572 echo "$ac_t""no" 1>&6
2573 LIBOBJS="$LIBOBJS ${ac_func}.o"
2576 done
2579 for ac_func in select
2581 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2582 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2583 echo $ac_n "(cached) $ac_c" 1>&6
2584 else
2585 cat > conftest.$ac_ext <<EOF
2586 #line 2587 "configure"
2587 #include "confdefs.h"
2588 /* System header to define __stub macros and hopefully few prototypes,
2589 which can conflict with char $ac_func(); below. */
2590 #include <assert.h>
2591 /* Override any gcc2 internal prototype to avoid an error. */
2592 char $ac_func();
2594 int main() { return 0; }
2595 int t() {
2597 /* The GNU C library defines this for functions which it implements
2598 to always fail with ENOSYS. Some functions are actually named
2599 something starting with __ and the normal name is an alias. */
2600 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2601 choke me
2602 #else
2603 $ac_func();
2604 #endif
2606 ; return 0; }
2608 if eval $ac_link; then
2609 rm -rf conftest*
2610 eval "ac_cv_func_$ac_func=yes"
2611 else
2612 rm -rf conftest*
2613 eval "ac_cv_func_$ac_func=no"
2615 rm -f conftest*
2618 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2619 echo "$ac_t""yes" 1>&6
2620 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2621 cat >> confdefs.h <<EOF
2622 #define $ac_tr_func 1
2625 else
2626 echo "$ac_t""no" 1>&6
2628 done
2630 for ac_func in setenv
2632 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2633 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2634 echo $ac_n "(cached) $ac_c" 1>&6
2635 else
2636 cat > conftest.$ac_ext <<EOF
2637 #line 2638 "configure"
2638 #include "confdefs.h"
2639 /* System header to define __stub macros and hopefully few prototypes,
2640 which can conflict with char $ac_func(); below. */
2641 #include <assert.h>
2642 /* Override any gcc2 internal prototype to avoid an error. */
2643 char $ac_func();
2645 int main() { return 0; }
2646 int t() {
2648 /* The GNU C library defines this for functions which it implements
2649 to always fail with ENOSYS. Some functions are actually named
2650 something starting with __ and the normal name is an alias. */
2651 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2652 choke me
2653 #else
2654 $ac_func();
2655 #endif
2657 ; return 0; }
2659 if eval $ac_link; then
2660 rm -rf conftest*
2661 eval "ac_cv_func_$ac_func=yes"
2662 else
2663 rm -rf conftest*
2664 eval "ac_cv_func_$ac_func=no"
2666 rm -f conftest*
2669 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2670 echo "$ac_t""yes" 1>&6
2671 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2672 cat >> confdefs.h <<EOF
2673 #define $ac_tr_func 1
2675 need_env=no
2676 else
2677 echo "$ac_t""no" 1>&6
2678 need_env=yes
2680 done
2682 for ac_func in strsep
2684 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2685 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2686 echo $ac_n "(cached) $ac_c" 1>&6
2687 else
2688 cat > conftest.$ac_ext <<EOF
2689 #line 2690 "configure"
2690 #include "confdefs.h"
2691 /* System header to define __stub macros and hopefully few prototypes,
2692 which can conflict with char $ac_func(); below. */
2693 #include <assert.h>
2694 /* Override any gcc2 internal prototype to avoid an error. */
2695 char $ac_func();
2697 int main() { return 0; }
2698 int t() {
2700 /* The GNU C library defines this for functions which it implements
2701 to always fail with ENOSYS. Some functions are actually named
2702 something starting with __ and the normal name is an alias. */
2703 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2704 choke me
2705 #else
2706 $ac_func();
2707 #endif
2709 ; return 0; }
2711 if eval $ac_link; then
2712 rm -rf conftest*
2713 eval "ac_cv_func_$ac_func=yes"
2714 else
2715 rm -rf conftest*
2716 eval "ac_cv_func_$ac_func=no"
2718 rm -f conftest*
2721 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2722 echo "$ac_t""yes" 1>&6
2723 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2724 cat >> confdefs.h <<EOF
2725 #define $ac_tr_func 1
2727 need_strsep=no
2728 else
2729 echo "$ac_t""no" 1>&6
2730 need_strsep=yes
2732 done
2734 for ac_func in unsetenv
2736 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2737 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2738 echo $ac_n "(cached) $ac_c" 1>&6
2739 else
2740 cat > conftest.$ac_ext <<EOF
2741 #line 2742 "configure"
2742 #include "confdefs.h"
2743 /* System header to define __stub macros and hopefully few prototypes,
2744 which can conflict with char $ac_func(); below. */
2745 #include <assert.h>
2746 /* Override any gcc2 internal prototype to avoid an error. */
2747 char $ac_func();
2749 int main() { return 0; }
2750 int t() {
2752 /* The GNU C library defines this for functions which it implements
2753 to always fail with ENOSYS. Some functions are actually named
2754 something starting with __ and the normal name is an alias. */
2755 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2756 choke me
2757 #else
2758 $ac_func();
2759 #endif
2761 ; return 0; }
2763 if eval $ac_link; then
2764 rm -rf conftest*
2765 eval "ac_cv_func_$ac_func=yes"
2766 else
2767 rm -rf conftest*
2768 eval "ac_cv_func_$ac_func=no"
2770 rm -f conftest*
2773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2774 echo "$ac_t""yes" 1>&6
2775 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2776 cat >> confdefs.h <<EOF
2777 #define $ac_tr_func 1
2780 else
2781 echo "$ac_t""no" 1>&6
2782 need_env=yes
2784 done
2787 for ac_func in valloc getpagesize
2789 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2790 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2791 echo $ac_n "(cached) $ac_c" 1>&6
2792 else
2793 cat > conftest.$ac_ext <<EOF
2794 #line 2795 "configure"
2795 #include "confdefs.h"
2796 /* System header to define __stub macros and hopefully few prototypes,
2797 which can conflict with char $ac_func(); below. */
2798 #include <assert.h>
2799 /* Override any gcc2 internal prototype to avoid an error. */
2800 char $ac_func();
2802 int main() { return 0; }
2803 int t() {
2805 /* The GNU C library defines this for functions which it implements
2806 to always fail with ENOSYS. Some functions are actually named
2807 something starting with __ and the normal name is an alias. */
2808 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2809 choke me
2810 #else
2811 $ac_func();
2812 #endif
2814 ; return 0; }
2816 if eval $ac_link; then
2817 rm -rf conftest*
2818 eval "ac_cv_func_$ac_func=yes"
2819 else
2820 rm -rf conftest*
2821 eval "ac_cv_func_$ac_func=no"
2823 rm -f conftest*
2826 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2827 echo "$ac_t""yes" 1>&6
2828 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2829 cat >> confdefs.h <<EOF
2830 #define $ac_tr_func 1
2833 else
2834 echo "$ac_t""no" 1>&6
2836 done
2838 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2839 if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
2840 echo $ac_n "(cached) $ac_c" 1>&6
2841 else
2842 if test "$cross_compiling" = yes; then
2843 ac_cv_func_mmap=no
2844 else
2845 cat > conftest.$ac_ext <<EOF
2846 #line 2847 "configure"
2847 #include "confdefs.h"
2849 /* Thanks to Mike Haertel and Jim Avera for this test. */
2850 #include <sys/types.h>
2851 #include <fcntl.h>
2852 #include <sys/mman.h>
2854 #ifndef HAVE_GETPAGESIZE
2855 # include <sys/param.h>
2856 # ifdef EXEC_PAGESIZE
2857 # define getpagesize() EXEC_PAGESIZE
2858 # else
2859 # ifdef NBPG
2860 # define getpagesize() NBPG * CLSIZE
2861 # ifndef CLSIZE
2862 # define CLSIZE 1
2863 # endif
2864 # else
2865 # ifdef NBPC
2866 # define getpagesize() NBPC
2867 # else
2868 # define getpagesize() PAGESIZE /* SVR4 */
2869 # endif
2870 # endif
2871 # endif
2872 #endif
2874 #ifndef HAVE_VALLOC
2875 # define valloc malloc
2876 #endif
2878 #ifdef __cplusplus
2879 extern "C" { void *valloc(unsigned), *malloc(unsigned); }
2880 #else
2881 char *valloc(), *malloc();
2882 #endif
2885 main()
2887 char *buf1, *buf2, *buf3;
2888 int i = getpagesize(), j;
2889 int i2 = i * 2;
2890 int fd;
2892 buf1 = (char *)valloc(i2);
2893 buf2 = (char *)valloc(i);
2894 buf3 = (char *)malloc(i2);
2895 for (j = 0; j < i2; ++j)
2896 *(buf1 + j) = rand();
2897 fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
2898 write(fd, buf1, i2);
2899 mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
2900 for (j = 0; j < i; ++j)
2901 if (*(buf1 + j) != *(buf2 + j))
2902 exit(1);
2903 lseek(fd, (long)i, 0);
2904 read(fd, buf2, i); /* read into mapped memory -- file should not change */
2905 /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
2906 lseek(fd, (long)0, 0);
2907 read(fd, buf3, i2);
2908 for (j = 0; j < i2; ++j)
2909 if (*(buf1 + j) != *(buf3 + j))
2910 exit(1);
2911 exit(0);
2915 eval $ac_link
2916 if test -s conftest && (./conftest; exit) 2>/dev/null; then
2917 ac_cv_func_mmap=yes
2918 else
2919 ac_cv_func_mmap=no
2922 rm -fr conftest*
2925 echo "$ac_t""$ac_cv_func_mmap" 1>&6
2926 if test $ac_cv_func_mmap = yes; then
2927 cat >> confdefs.h <<\EOF
2928 #define HAVE_MMAP 1
2933 ac_safe=`echo "vfork.h" | tr './\055' '___'`
2934 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
2935 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2936 echo $ac_n "(cached) $ac_c" 1>&6
2937 else
2938 cat > conftest.$ac_ext <<EOF
2939 #line 2940 "configure"
2940 #include "confdefs.h"
2941 #include <vfork.h>
2943 eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2944 ac_err=`grep -v '^ *+' conftest.out`
2945 if test -z "$ac_err"; then
2946 rm -rf conftest*
2947 eval "ac_cv_header_$ac_safe=yes"
2948 else
2949 echo "$ac_err" >&5
2950 rm -rf conftest*
2951 eval "ac_cv_header_$ac_safe=no"
2953 rm -f conftest*
2955 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2956 echo "$ac_t""yes" 1>&6
2957 cat >> confdefs.h <<\EOF
2958 #define HAVE_VFORK_H 1
2961 else
2962 echo "$ac_t""no" 1>&6
2965 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
2966 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2967 echo $ac_n "(cached) $ac_c" 1>&6
2968 else
2969 if test "$cross_compiling" = yes; then
2970 echo $ac_n "checking for vfork""... $ac_c" 1>&6
2971 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2972 echo $ac_n "(cached) $ac_c" 1>&6
2973 else
2974 cat > conftest.$ac_ext <<EOF
2975 #line 2976 "configure"
2976 #include "confdefs.h"
2977 /* System header to define __stub macros and hopefully few prototypes,
2978 which can conflict with char vfork(); below. */
2979 #include <assert.h>
2980 /* Override any gcc2 internal prototype to avoid an error. */
2981 char vfork();
2983 int main() { return 0; }
2984 int t() {
2986 /* The GNU C library defines this for functions which it implements
2987 to always fail with ENOSYS. Some functions are actually named
2988 something starting with __ and the normal name is an alias. */
2989 #if defined (__stub_vfork) || defined (__stub___vfork)
2990 choke me
2991 #else
2992 vfork();
2993 #endif
2995 ; return 0; }
2997 if eval $ac_link; then
2998 rm -rf conftest*
2999 eval "ac_cv_func_vfork=yes"
3000 else
3001 rm -rf conftest*
3002 eval "ac_cv_func_vfork=no"
3004 rm -f conftest*
3007 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3008 echo "$ac_t""yes" 1>&6
3010 else
3011 echo "$ac_t""no" 1>&6
3014 else
3015 cat > conftest.$ac_ext <<EOF
3016 #line 3017 "configure"
3017 #include "confdefs.h"
3018 /* Thanks to Paul Eggert for this test. */
3019 #include <stdio.h>
3020 #include <sys/types.h>
3021 #include <sys/stat.h>
3022 #ifdef HAVE_UNISTD_H
3023 #include <unistd.h>
3024 #endif
3025 #ifdef HAVE_VFORK_H
3026 #include <vfork.h>
3027 #endif
3028 /* On some sparc systems, changes by the child to local and incoming
3029 argument registers are propagated back to the parent.
3030 The compiler is told about this with #include <vfork.h>,
3031 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3032 Test for this by using a static variable whose address
3033 is put into a register that is clobbered by the vfork. */
3034 static
3035 #ifdef __cplusplus
3036 sparc_address_test (int arg)
3037 #else
3038 sparc_address_test (arg) int arg;
3039 #endif
3041 static pid_t child;
3042 if (!child) {
3043 child = vfork ();
3044 if (child < 0)
3045 perror ("vfork");
3046 if (!child) {
3047 arg = getpid();
3048 write(-1, "", 0);
3049 _exit (arg);
3053 main() {
3054 pid_t parent = getpid ();
3055 pid_t child;
3057 sparc_address_test ();
3059 child = vfork ();
3061 if (child == 0) {
3062 /* Here is another test for sparc vfork register problems.
3063 This test uses lots of local variables, at least
3064 as many local variables as main has allocated so far
3065 including compiler temporaries. 4 locals are enough for
3066 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3067 A buggy compiler should reuse the register of parent
3068 for one of the local variables, since it will think that
3069 parent can't possibly be used any more in this routine.
3070 Assigning to the local variable will thus munge parent
3071 in the parent process. */
3072 pid_t
3073 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3074 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3075 /* Convince the compiler that p..p7 are live; otherwise, it might
3076 use the same hardware register for all 8 local variables. */
3077 if (p != p1 || p != p2 || p != p3 || p != p4
3078 || p != p5 || p != p6 || p != p7)
3079 _exit(1);
3081 /* On some systems (e.g. IRIX 3.3),
3082 vfork doesn't separate parent from child file descriptors.
3083 If the child closes a descriptor before it execs or exits,
3084 this munges the parent's descriptor as well.
3085 Test for this by closing stdout in the child. */
3086 _exit(close(fileno(stdout)) != 0);
3087 } else {
3088 int status;
3089 struct stat st;
3091 while (wait(&status) != child)
3093 exit(
3094 /* Was there some problem with vforking? */
3095 child < 0
3097 /* Did the child fail? (This shouldn't happen.) */
3098 || status
3100 /* Did the vfork/compiler bug occur? */
3101 || parent != getpid()
3103 /* Did the file descriptor bug occur? */
3104 || fstat(fileno(stdout), &st) != 0
3109 eval $ac_link
3110 if test -s conftest && (./conftest; exit) 2>/dev/null; then
3111 ac_cv_func_vfork=yes
3112 else
3113 ac_cv_func_vfork=no
3116 rm -fr conftest*
3119 echo "$ac_t""$ac_cv_func_vfork" 1>&6
3120 if test $ac_cv_func_vfork = no; then
3121 cat >> confdefs.h <<\EOF
3122 #define vfork fork
3128 if test "$need_env" = yes; then
3129 LIBOBJS="env.o $LIBOBJS"
3132 if test "$need_strsep" = yes; then
3133 LIBOBJS="strsep.o $LIBOBJS"
3136 echo $ac_n "checking for fcntl/flock""... $ac_c" 1>&6
3137 if eval "test \"`echo '$''{'vi_cv_lock'+set}'`\" = set"; then
3138 echo $ac_n "(cached) $ac_c" 1>&6
3139 else
3140 vi_cv_lock=none
3141 case "$host_os" in
3142 dgux*);;
3143 irix*);;
3145 cat > conftest.$ac_ext <<EOF
3146 #line 3147 "configure"
3147 #include "confdefs.h"
3148 #include <fcntl.h>
3149 int main() { return 0; }
3150 int t() {
3151 flock(0, 0);
3152 ; return 0; }
3154 if eval $ac_link; then
3155 rm -rf conftest*
3156 vi_cv_lock=flock
3158 rm -f conftest*
3160 esac
3161 if test "$vi_cv_lock" = none; then
3162 cat > conftest.$ac_ext <<EOF
3163 #line 3164 "configure"
3164 #include "confdefs.h"
3165 #include <fcntl.h>
3166 int main() { return 0; }
3167 int t() {
3168 fcntl(0, F_SETLK, 0);
3169 ; return 0; }
3171 if eval $ac_link; then
3172 rm -rf conftest*
3173 vi_cv_lock=fcntl
3175 rm -f conftest*
3181 if test "$vi_cv_lock" = flock; then
3182 cat >> confdefs.h <<\EOF
3183 #define HAVE_LOCK_FLOCK 1
3187 if test "$vi_cv_lock" = fcntl; then
3188 cat >> confdefs.h <<\EOF
3189 #define HAVE_LOCK_FCNTL 1
3193 echo "$ac_t""$vi_cv_lock" 1>&6
3195 echo $ac_n "checking for ftruncate/chsize""... $ac_c" 1>&6
3196 if eval "test \"`echo '$''{'vi_cv_ftruncate'+set}'`\" = set"; then
3197 echo $ac_n "(cached) $ac_c" 1>&6
3198 else
3199 cat > conftest.$ac_ext <<EOF
3200 #line 3201 "configure"
3201 #include "confdefs.h"
3202 #include <unistd.h>
3203 int main() { return 0; }
3204 int t() {
3205 ftruncate(0, 0);
3206 ; return 0; }
3208 if eval $ac_link; then
3209 rm -rf conftest*
3210 vi_cv_ftruncate=ftruncate
3211 else
3212 rm -rf conftest*
3213 cat > conftest.$ac_ext <<EOF
3214 #line 3215 "configure"
3215 #include "confdefs.h"
3216 #include <unistd.h>
3217 int main() { return 0; }
3218 int t() {
3219 chsize(0, 0);
3220 ; return 0; }
3222 if eval $ac_link; then
3223 rm -rf conftest*
3224 vi_cv_ftruncate=chsize
3225 else
3226 rm -rf conftest*
3227 vi_cv_ftruncate=no
3229 rm -f conftest*
3232 rm -f conftest*
3236 if test "$vi_cv_ftruncate" = ftruncate; then
3237 cat >> confdefs.h <<\EOF
3238 #define HAVE_FTRUNCATE_FTRUNCATE 1
3242 if test "$vi_cv_ftruncate" = chsize; then
3243 cat >> confdefs.h <<\EOF
3244 #define HAVE_FTRUNCATE_CHSIZE 1
3248 if test "$vi_cv_ftruncate" = no; then
3249 echo
3250 echo "Fatal error: no file truncation system call."
3251 exit 1
3253 echo "$ac_t""$vi_cv_ftruncate" 1>&6
3255 echo $ac_n "checking for tigetstr/tigetnum""... $ac_c" 1>&6
3256 if eval "test \"`echo '$''{'vi_cv_have_curses_tigetstr'+set}'`\" = set"; then
3257 echo $ac_n "(cached) $ac_c" 1>&6
3258 else
3259 cat > conftest.$ac_ext <<EOF
3260 #line 3261 "configure"
3261 #include "confdefs.h"
3262 #include <curses.h>
3263 int main() { return 0; }
3264 int t() {
3265 tigetstr(0);
3266 ; return 0; }
3268 if eval $ac_link; then
3269 rm -rf conftest*
3270 vi_cv_have_curses_tigetstr=yes
3271 else
3272 rm -rf conftest*
3273 vi_cv_have_curses_tigetstr=no
3275 rm -f conftest*
3279 if test "$vi_cv_have_curses_tigetstr" = yes; then
3280 cat >> confdefs.h <<\EOF
3281 #define HAVE_CURSES_TIGETSTR 1
3285 echo "$ac_t""$vi_cv_have_curses_tigetstr" 1>&6
3287 if test "$vi_cv_curses" = "bundled curses"; then
3288 cat >> confdefs.h <<\EOF
3289 #define HAVE_BSD_CURSES 1
3292 cat >> confdefs.h <<\EOF
3293 #define HAVE_CURSES_ADDNSTR 1
3296 cat >> confdefs.h <<\EOF
3297 #define HAVE_CURSES_IDLOK 1
3300 else
3301 echo $ac_n "checking for addnstr""... $ac_c" 1>&6
3302 if eval "test \"`echo '$''{'vi_cv_have_curses_addnstr'+set}'`\" = set"; then
3303 echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305 cat > conftest.$ac_ext <<EOF
3306 #line 3307 "configure"
3307 #include "confdefs.h"
3308 #include <curses.h>
3309 int main() { return 0; }
3310 int t() {
3311 addnstr(0, 0);
3312 ; return 0; }
3314 if eval $ac_link; then
3315 rm -rf conftest*
3316 vi_cv_have_curses_addnstr=yes
3317 else
3318 rm -rf conftest*
3319 vi_cv_have_curses_addnstr=no
3321 rm -f conftest*
3325 if test "$vi_cv_have_curses_addnstr" = yes; then
3326 cat >> confdefs.h <<\EOF
3327 #define HAVE_CURSES_ADDNSTR 1
3331 echo "$ac_t""$vi_cv_have_curses_addnstr" 1>&6
3333 echo $ac_n "checking for beep""... $ac_c" 1>&6
3334 if eval "test \"`echo '$''{'vi_cv_have_curses_beep'+set}'`\" = set"; then
3335 echo $ac_n "(cached) $ac_c" 1>&6
3336 else
3337 cat > conftest.$ac_ext <<EOF
3338 #line 3339 "configure"
3339 #include "confdefs.h"
3340 #include <curses.h>
3341 int main() { return 0; }
3342 int t() {
3343 beep();
3344 ; return 0; }
3346 if eval $ac_link; then
3347 rm -rf conftest*
3348 vi_cv_have_curses_beep=yes
3349 else
3350 rm -rf conftest*
3351 vi_cv_have_curses_beep=no
3353 rm -f conftest*
3357 if test "$vi_cv_have_curses_beep" = yes; then
3358 cat >> confdefs.h <<\EOF
3359 #define HAVE_CURSES_BEEP 1
3363 echo "$ac_t""$vi_cv_have_curses_beep" 1>&6
3365 echo $ac_n "checking for flash""... $ac_c" 1>&6
3366 if eval "test \"`echo '$''{'vi_cv_have_curses_flash'+set}'`\" = set"; then
3367 echo $ac_n "(cached) $ac_c" 1>&6
3368 else
3369 cat > conftest.$ac_ext <<EOF
3370 #line 3371 "configure"
3371 #include "confdefs.h"
3372 #include <curses.h>
3373 int main() { return 0; }
3374 int t() {
3375 flash();
3376 ; return 0; }
3378 if eval $ac_link; then
3379 rm -rf conftest*
3380 vi_cv_have_curses_flash=yes
3381 else
3382 rm -rf conftest*
3383 vi_cv_have_curses_flash=no
3385 rm -f conftest*
3389 if test "$vi_cv_have_curses_flash" = yes; then
3390 cat >> confdefs.h <<\EOF
3391 #define HAVE_CURSES_FLASH 1
3395 echo "$ac_t""$vi_cv_have_curses_flash" 1>&6
3397 echo $ac_n "checking for idlok""... $ac_c" 1>&6
3398 if eval "test \"`echo '$''{'vi_cv_have_curses_idlok'+set}'`\" = set"; then
3399 echo $ac_n "(cached) $ac_c" 1>&6
3400 else
3401 cat > conftest.$ac_ext <<EOF
3402 #line 3403 "configure"
3403 #include "confdefs.h"
3404 #include <curses.h>
3405 int main() { return 0; }
3406 int t() {
3407 idlok(0, 0);
3408 ; return 0; }
3410 if eval $ac_link; then
3411 rm -rf conftest*
3412 vi_cv_have_curses_idlok=yes
3413 else
3414 rm -rf conftest*
3415 vi_cv_have_curses_idlok=no
3417 rm -f conftest*
3421 if test "$vi_cv_have_curses_idlok" = yes; then
3422 cat >> confdefs.h <<\EOF
3423 #define HAVE_CURSES_IDLOK 1
3427 echo "$ac_t""$vi_cv_have_curses_idlok" 1>&6
3429 echo $ac_n "checking for keypad""... $ac_c" 1>&6
3430 if eval "test \"`echo '$''{'vi_cv_have_curses_keypad'+set}'`\" = set"; then
3431 echo $ac_n "(cached) $ac_c" 1>&6
3432 else
3433 cat > conftest.$ac_ext <<EOF
3434 #line 3435 "configure"
3435 #include "confdefs.h"
3436 #include <curses.h>
3437 int main() { return 0; }
3438 int t() {
3439 keypad(0, 0);
3440 ; return 0; }
3442 if eval $ac_link; then
3443 rm -rf conftest*
3444 vi_cv_have_curses_keypad=yes
3445 else
3446 rm -rf conftest*
3447 vi_cv_have_curses_keypad=no
3449 rm -f conftest*
3453 if test "$vi_cv_have_curses_keypad" = yes; then
3454 cat >> confdefs.h <<\EOF
3455 #define HAVE_CURSES_KEYPAD 1
3459 echo "$ac_t""$vi_cv_have_curses_keypad" 1>&6
3461 echo $ac_n "checking for newterm""... $ac_c" 1>&6
3462 if eval "test \"`echo '$''{'vi_cv_have_curses_newterm'+set}'`\" = set"; then
3463 echo $ac_n "(cached) $ac_c" 1>&6
3464 else
3465 cat > conftest.$ac_ext <<EOF
3466 #line 3467 "configure"
3467 #include "confdefs.h"
3468 #include <curses.h>
3469 int main() { return 0; }
3470 int t() {
3471 newterm(0, 0, 0);
3472 ; return 0; }
3474 if eval $ac_link; then
3475 rm -rf conftest*
3476 vi_cv_have_curses_newterm=yes
3477 else
3478 rm -rf conftest*
3479 vi_cv_have_curses_newterm=no
3481 rm -f conftest*
3485 if test "$vi_cv_have_curses_newterm" = yes; then
3486 cat >> confdefs.h <<\EOF
3487 #define HAVE_CURSES_NEWTERM 1
3491 echo "$ac_t""$vi_cv_have_curses_newterm" 1>&6
3493 if test "$vi_cv_have_curses_newterm" = no; then
3494 cat >> confdefs.h <<\EOF
3495 #define HAVE_BSD_CURSES 1
3501 echo $ac_n "checking for setupterm""... $ac_c" 1>&6
3502 if eval "test \"`echo '$''{'vi_cv_have_curses_setupterm'+set}'`\" = set"; then
3503 echo $ac_n "(cached) $ac_c" 1>&6
3504 else
3505 cat > conftest.$ac_ext <<EOF
3506 #line 3507 "configure"
3507 #include "confdefs.h"
3508 #include <curses.h>
3509 int main() { return 0; }
3510 int t() {
3511 setupterm(0, 0, 0);
3512 ; return 0; }
3514 if eval $ac_link; then
3515 rm -rf conftest*
3516 vi_cv_have_curses_setupterm=yes
3517 else
3518 rm -rf conftest*
3519 vi_cv_have_curses_setupterm=no
3521 rm -f conftest*
3525 if test "$vi_cv_have_curses_setupterm" = yes; then
3526 cat >> confdefs.h <<\EOF
3527 #define HAVE_CURSES_SETUPTERM 1
3531 echo "$ac_t""$vi_cv_have_curses_setupterm" 1>&6
3533 echo $ac_n "checking for broken gettimeofday system call""... $ac_c" 1>&6
3534 if eval "test \"`echo '$''{'vi_cv_gettimeofday'+set}'`\" = set"; then
3535 echo $ac_n "(cached) $ac_c" 1>&6
3536 else
3537 cat > conftest.$ac_ext <<EOF
3538 #line 3539 "configure"
3539 #include "confdefs.h"
3540 #include <sys/types.h>
3541 #include <sys/time.h>
3542 int main() { return 0; }
3543 int t() {
3544 gettimeofday(0, 0);
3545 ; return 0; }
3547 if eval $ac_link; then
3548 rm -rf conftest*
3549 vi_cv_gettimeofday=okay
3550 else
3551 rm -rf conftest*
3552 vi_cv_gettimeofday=broken
3554 rm -f conftest*
3558 if test "$vi_cv_gettimeofday" = broken; then
3559 cat >> confdefs.h <<\EOF
3560 #define HAVE_BROKEN_GETTIMEOFDAY 1
3564 echo "$ac_t""$vi_cv_gettimeofday" 1>&6
3566 echo $ac_n "checking for System V pty calls""... $ac_c" 1>&6
3567 if eval "test \"`echo '$''{'vi_cv_sys5_pty'+set}'`\" = set"; then
3568 echo $ac_n "(cached) $ac_c" 1>&6
3569 else
3570 cat > conftest.$ac_ext <<EOF
3571 #line 3572 "configure"
3572 #include "confdefs.h"
3574 int main() { return 0; }
3575 int t() {
3576 grantpt(0);
3577 ; return 0; }
3579 if eval $ac_link; then
3580 rm -rf conftest*
3581 vi_cv_sys5_pty=yes
3582 else
3583 rm -rf conftest*
3584 vi_cv_sys5_pty=no
3586 rm -f conftest*
3590 if test "$vi_cv_sys5_pty" = yes; then
3591 cat >> confdefs.h <<\EOF
3592 #define HAVE_SYS5_PTY 1
3596 echo "$ac_t""$vi_cv_sys5_pty" 1>&6
3598 echo $ac_n "checking for revoke system call""... $ac_c" 1>&6
3599 if eval "test \"`echo '$''{'vi_cv_revoke'+set}'`\" = set"; then
3600 echo $ac_n "(cached) $ac_c" 1>&6
3601 else
3602 cat > conftest.$ac_ext <<EOF
3603 #line 3604 "configure"
3604 #include "confdefs.h"
3606 int main() { return 0; }
3607 int t() {
3608 revoke("a");
3609 ; return 0; }
3611 if eval $ac_link; then
3612 rm -rf conftest*
3613 vi_cv_revoke=yes
3614 else
3615 rm -rf conftest*
3616 vi_cv_revoke=no
3618 rm -f conftest*
3622 if test "$vi_cv_revoke" = yes; then
3623 cat >> confdefs.h <<\EOF
3624 #define HAVE_REVOKE 1
3628 echo "$ac_t""$vi_cv_revoke" 1>&6
3630 echo $ac_n "checking for int type sprintf return value""... $ac_c" 1>&6
3631 if eval "test \"`echo '$''{'vi_cv_sprintf_count'+set}'`\" = set"; then
3632 echo $ac_n "(cached) $ac_c" 1>&6
3633 else
3634 if test "$cross_compiling" = yes; then
3635 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3636 else
3637 cat > conftest.$ac_ext <<EOF
3638 #line 3639 "configure"
3639 #include "confdefs.h"
3640 main(){char buf[20]; exit(sprintf(buf, "XXX") != 3);}
3642 eval $ac_link
3643 if test -s conftest && (./conftest; exit) 2>/dev/null; then
3644 vi_cv_sprintf_count=yes
3645 else
3646 vi_cv_sprintf_count=no
3649 rm -fr conftest*
3652 if test "$vi_cv_sprintf_count" = no; then
3653 cat >> confdefs.h <<\EOF
3654 #define SPRINTF_RET_CHARPNT 1
3658 echo "$ac_t""$vi_cv_sprintf_count" 1>&6
3660 echo $ac_n "checking if --disable-db option specified""... $ac_c" 1>&6
3661 # Check whether --enable-db or --disable-db was given.
3662 if test "${enable_db+set}" = set; then
3663 enableval="$enable_db"
3664 vi_cv_db_lib="other DB"
3665 else
3666 vi_cv_db_lib="bundled DB"
3669 echo "$ac_t""$vi_cv_db_lib" 1>&6
3670 case "$vi_cv_db_lib" in
3671 "bundled DB")
3672 CPPFLAGS="-I\$(srcdir)/db/include $CPPFLAGS"
3673 LIBOBJS="\$(DBOBJS) $LIBOBJS";;
3674 "other DB")
3676 esac
3678 echo $ac_n "checking if --disable-re option specified""... $ac_c" 1>&6
3679 # Check whether --enable-re or --disable-re was given.
3680 if test "${enable_re+set}" = set; then
3681 enableval="$enable_re"
3682 vi_cv_re_lib="other RE"
3683 else
3684 vi_cv_re_lib="bundled RE"
3687 echo "$ac_t""$vi_cv_re_lib" 1>&6
3688 case "$vi_cv_re_lib" in
3689 "bundled RE")
3690 CPPFLAGS="-I\$(srcdir)/regex $CPPFLAGS"
3691 LIBOBJS="\$(REOBJS) $LIBOBJS";;
3692 "other RE")
3694 esac
3697 echo $ac_n "checking for u_char""... $ac_c" 1>&6
3698 if eval "test \"`echo '$''{'vi_cv_uchar'+set}'`\" = set"; then
3699 echo $ac_n "(cached) $ac_c" 1>&6
3700 else
3701 cat > conftest.$ac_ext <<EOF
3702 #line 3703 "configure"
3703 #include "confdefs.h"
3704 #include <sys/types.h>
3705 int main() { return 0; }
3706 int t() {
3707 u_char foo;
3708 ; return 0; }
3710 if eval $ac_compile; then
3711 rm -rf conftest*
3712 vi_cv_uchar=yes
3713 else
3714 rm -rf conftest*
3715 vi_cv_uchar=no
3717 rm -f conftest*
3721 echo "$ac_t""$vi_cv_uchar" 1>&6
3722 if test "$vi_cv_uchar" = no; then
3723 u_char_decl="typedef unsigned char u_char;"
3727 echo $ac_n "checking for u_short""... $ac_c" 1>&6
3728 if eval "test \"`echo '$''{'vi_cv_ushort'+set}'`\" = set"; then
3729 echo $ac_n "(cached) $ac_c" 1>&6
3730 else
3731 cat > conftest.$ac_ext <<EOF
3732 #line 3733 "configure"
3733 #include "confdefs.h"
3734 #include <sys/types.h>
3735 int main() { return 0; }
3736 int t() {
3737 u_short foo;
3738 ; return 0; }
3740 if eval $ac_compile; then
3741 rm -rf conftest*
3742 vi_cv_ushort=yes
3743 else
3744 rm -rf conftest*
3745 vi_cv_ushort=no
3747 rm -f conftest*
3751 echo "$ac_t""$vi_cv_ushort" 1>&6
3752 if test "$vi_cv_ushort" = no; then
3753 u_short_decl="typedef unsigned short u_short;"
3757 echo $ac_n "checking for u_int""... $ac_c" 1>&6
3758 if eval "test \"`echo '$''{'vi_cv_uint'+set}'`\" = set"; then
3759 echo $ac_n "(cached) $ac_c" 1>&6
3760 else
3761 cat > conftest.$ac_ext <<EOF
3762 #line 3763 "configure"
3763 #include "confdefs.h"
3764 #include <sys/types.h>
3765 int main() { return 0; }
3766 int t() {
3767 u_int foo;
3768 ; return 0; }
3770 if eval $ac_compile; then
3771 rm -rf conftest*
3772 vi_cv_uint=yes
3773 else
3774 rm -rf conftest*
3775 vi_cv_uint=no
3777 rm -f conftest*
3781 echo "$ac_t""$vi_cv_uint" 1>&6
3782 if test "$vi_cv_uint" = no; then
3783 u_int_decl="typedef unsigned int u_int;"
3787 echo $ac_n "checking for u_long""... $ac_c" 1>&6
3788 if eval "test \"`echo '$''{'vi_cv_ulong'+set}'`\" = set"; then
3789 echo $ac_n "(cached) $ac_c" 1>&6
3790 else
3791 cat > conftest.$ac_ext <<EOF
3792 #line 3793 "configure"
3793 #include "confdefs.h"
3794 #include <sys/types.h>
3795 int main() { return 0; }
3796 int t() {
3797 u_long foo;
3798 ; return 0; }
3800 if eval $ac_compile; then
3801 rm -rf conftest*
3802 vi_cv_ulong=yes
3803 else
3804 rm -rf conftest*
3805 vi_cv_ulong=no
3807 rm -f conftest*
3811 echo "$ac_t""$vi_cv_ulong" 1>&6
3812 if test "$vi_cv_ulong" = no; then
3813 u_long_decl="typedef unsigned long u_long;"
3817 echo $ac_n "checking for u_int8_t""... $ac_c" 1>&6
3818 if eval "test \"`echo '$''{'vi_cv_uint8'+set}'`\" = set"; then
3819 echo $ac_n "(cached) $ac_c" 1>&6
3820 else
3821 cat > conftest.$ac_ext <<EOF
3822 #line 3823 "configure"
3823 #include "confdefs.h"
3824 #include <sys/types.h>
3825 int main() { return 0; }
3826 int t() {
3827 u_int8_t foo;
3828 ; return 0; }
3830 if eval $ac_compile; then
3831 rm -rf conftest*
3832 vi_cv_uint8=yes
3833 else
3834 rm -rf conftest*
3835 if test "$cross_compiling" = yes; then
3836 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3837 else
3838 cat > conftest.$ac_ext <<EOF
3839 #line 3840 "configure"
3840 #include "confdefs.h"
3841 main(){exit(sizeof(unsigned char) != 1);}
3843 eval $ac_link
3844 if test -s conftest && (./conftest; exit) 2>/dev/null; then
3845 vi_cv_uint8="unsigned char"
3846 else
3847 vi_cv_uint8=no
3850 rm -fr conftest*
3852 rm -f conftest*
3856 echo "$ac_t""$vi_cv_uint8" 1>&6
3857 if test "$vi_cv_uint8" = no; then
3858 echo
3859 echo "Fatal error: no unsigned, 8-bit integral type."
3860 exit 1
3862 if test "$vi_cv_uint8" != yes; then
3863 u_int8_decl="typedef $vi_cv_uint8 u_int8_t;"
3867 echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
3868 if eval "test \"`echo '$''{'vi_cv_uint16'+set}'`\" = set"; then
3869 echo $ac_n "(cached) $ac_c" 1>&6
3870 else
3871 cat > conftest.$ac_ext <<EOF
3872 #line 3873 "configure"
3873 #include "confdefs.h"
3874 #include <sys/types.h>
3875 int main() { return 0; }
3876 int t() {
3877 u_int16_t foo;
3878 ; return 0; }
3880 if eval $ac_compile; then
3881 rm -rf conftest*
3882 vi_cv_uint16=yes
3883 else
3884 rm -rf conftest*
3885 if test "$cross_compiling" = yes; then
3886 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3887 else
3888 cat > conftest.$ac_ext <<EOF
3889 #line 3890 "configure"
3890 #include "confdefs.h"
3891 main(){exit(sizeof(unsigned short) != 2);}
3893 eval $ac_link
3894 if test -s conftest && (./conftest; exit) 2>/dev/null; then
3895 vi_cv_uint16="unsigned short"
3896 else
3897 if test "$cross_compiling" = yes; then
3898 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3899 else
3900 cat > conftest.$ac_ext <<EOF
3901 #line 3902 "configure"
3902 #include "confdefs.h"
3903 main(){exit(sizeof(unsigned int) != 2);}
3905 eval $ac_link
3906 if test -s conftest && (./conftest; exit) 2>/dev/null; then
3907 vi_cv_uint16="unsigned int"
3908 else
3909 vi_cv_uint16=no
3912 rm -fr conftest*
3915 rm -fr conftest*
3917 rm -f conftest*
3921 echo "$ac_t""$vi_cv_uint16" 1>&6
3922 if test "$vi_cv_uint16" = no; then
3923 echo
3924 echo "Fatal error: no unsigned, 16-bit integral type."
3925 exit 1
3927 if test "$vi_cv_uint16" != yes; then
3928 u_int16_decl="typedef $vi_cv_uint16 u_int16_t;"
3932 echo $ac_n "checking for int16_t""... $ac_c" 1>&6
3933 if eval "test \"`echo '$''{'vi_cv_int16'+set}'`\" = set"; then
3934 echo $ac_n "(cached) $ac_c" 1>&6
3935 else
3936 cat > conftest.$ac_ext <<EOF
3937 #line 3938 "configure"
3938 #include "confdefs.h"
3939 #include <sys/types.h>
3940 int main() { return 0; }
3941 int t() {
3942 int16_t foo;
3943 ; return 0; }
3945 if eval $ac_compile; then
3946 rm -rf conftest*
3947 vi_cv_int16=yes
3948 else
3949 rm -rf conftest*
3950 if test "$cross_compiling" = yes; then
3951 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3952 else
3953 cat > conftest.$ac_ext <<EOF
3954 #line 3955 "configure"
3955 #include "confdefs.h"
3956 main(){exit(sizeof(short) != 2);}
3958 eval $ac_link
3959 if test -s conftest && (./conftest; exit) 2>/dev/null; then
3960 vi_cv_int16="short"
3961 else
3962 if test "$cross_compiling" = yes; then
3963 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3964 else
3965 cat > conftest.$ac_ext <<EOF
3966 #line 3967 "configure"
3967 #include "confdefs.h"
3968 main(){exit(sizeof(int) != 2);}
3970 eval $ac_link
3971 if test -s conftest && (./conftest; exit) 2>/dev/null; then
3972 vi_cv_int16="int"
3973 else
3974 vi_cv_int16=no
3977 rm -fr conftest*
3980 rm -fr conftest*
3982 rm -f conftest*
3986 echo "$ac_t""$vi_cv_int16" 1>&6
3987 if test "$vi_cv_int16" = no; then
3988 echo
3989 echo "Fatal error: no signed, 16-bit integral type."
3990 exit 1
3992 if test "$vi_cv_int16" != yes; then
3993 int16_decl="typedef $vi_cv_int16 int16_t;"
3997 echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
3998 if eval "test \"`echo '$''{'vi_cv_uint32'+set}'`\" = set"; then
3999 echo $ac_n "(cached) $ac_c" 1>&6
4000 else
4001 cat > conftest.$ac_ext <<EOF
4002 #line 4003 "configure"
4003 #include "confdefs.h"
4004 #include <sys/types.h>
4005 int main() { return 0; }
4006 int t() {
4007 u_int32_t foo;
4008 ; return 0; }
4010 if eval $ac_compile; then
4011 rm -rf conftest*
4012 vi_cv_uint32=yes
4013 else
4014 rm -rf conftest*
4015 if test "$cross_compiling" = yes; then
4016 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4017 else
4018 cat > conftest.$ac_ext <<EOF
4019 #line 4020 "configure"
4020 #include "confdefs.h"
4021 main(){exit(sizeof(unsigned int) != 4);}
4023 eval $ac_link
4024 if test -s conftest && (./conftest; exit) 2>/dev/null; then
4025 vi_cv_uint32="unsigned int"
4026 else
4027 if test "$cross_compiling" = yes; then
4028 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4029 else
4030 cat > conftest.$ac_ext <<EOF
4031 #line 4032 "configure"
4032 #include "confdefs.h"
4033 main(){exit(sizeof(unsigned long) != 4);}
4035 eval $ac_link
4036 if test -s conftest && (./conftest; exit) 2>/dev/null; then
4037 vi_cv_uint32="unsigned long"
4038 else
4039 vi_cv_uint32=no
4042 rm -fr conftest*
4045 rm -fr conftest*
4047 rm -f conftest*
4051 echo "$ac_t""$vi_cv_uint32" 1>&6
4052 if test "$vi_cv_uint32" = no; then
4053 echo
4054 echo "Fatal error: no unsigned, 32-bit integral type."
4055 exit 1
4057 if test "$vi_cv_uint32" != yes; then
4058 u_int32_decl="typedef $vi_cv_uint32 u_int32_t;"
4062 echo $ac_n "checking for int32_t""... $ac_c" 1>&6
4063 if eval "test \"`echo '$''{'vi_cv_int32'+set}'`\" = set"; then
4064 echo $ac_n "(cached) $ac_c" 1>&6
4065 else
4066 cat > conftest.$ac_ext <<EOF
4067 #line 4068 "configure"
4068 #include "confdefs.h"
4069 #include <sys/types.h>
4070 int main() { return 0; }
4071 int t() {
4072 int32_t foo;
4073 ; return 0; }
4075 if eval $ac_compile; then
4076 rm -rf conftest*
4077 vi_cv_int32=yes
4078 else
4079 rm -rf conftest*
4080 if test "$cross_compiling" = yes; then
4081 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4082 else
4083 cat > conftest.$ac_ext <<EOF
4084 #line 4085 "configure"
4085 #include "confdefs.h"
4086 main(){exit(sizeof(int) != 4);}
4088 eval $ac_link
4089 if test -s conftest && (./conftest; exit) 2>/dev/null; then
4090 vi_cv_int32="int"
4091 else
4092 if test "$cross_compiling" = yes; then
4093 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4094 else
4095 cat > conftest.$ac_ext <<EOF
4096 #line 4097 "configure"
4097 #include "confdefs.h"
4098 main(){exit(sizeof(long) != 4);}
4100 eval $ac_link
4101 if test -s conftest && (./conftest; exit) 2>/dev/null; then
4102 vi_cv_int32="long"
4103 else
4104 vi_cv_int32=no
4107 rm -fr conftest*
4110 rm -fr conftest*
4112 rm -f conftest*
4116 echo "$ac_t""$vi_cv_int32" 1>&6
4117 if test "$vi_cv_int32" = no; then
4118 echo
4119 echo "Fatal error: no signed, 32-bit integral type."
4120 exit 1
4122 if test "$vi_cv_int32" != yes; then
4123 int32_decl="typedef $vi_cv_int32 int32_t;"
4126 trap '' 1 2 15
4127 cat > confcache <<\EOF
4128 # This file is a shell script that caches the results of configure
4129 # tests run on this system so they can be shared between configure
4130 # scripts and configure runs. It is not useful on other systems.
4131 # If it contains results you don't want to keep, you may remove or edit it.
4133 # By default, configure uses ./config.cache as the cache file,
4134 # creating it if it does not exist already. You can give configure
4135 # the --cache-file=FILE option to use a different cache file; that is
4136 # what configure does when it calls configure scripts in
4137 # subdirectories, so they share the cache.
4138 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4139 # config.status only pays attention to the cache file if you give it the
4140 # --recheck option to rerun configure.
4143 # Ultrix sh set writes to stderr and can't be redirected directly,
4144 # and sets the high bit in the cache file unless we assign to the vars.
4145 (set) 2>&1 |
4146 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
4147 >> confcache
4148 if cmp -s $cache_file confcache; then
4150 else
4151 if test -w $cache_file; then
4152 echo "updating cache $cache_file"
4153 cat confcache > $cache_file
4154 else
4155 echo "not updating unwritable cache $cache_file"
4158 rm -f confcache
4160 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4162 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4163 # Let make expand exec_prefix.
4164 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4166 # Any assignment to VPATH causes Sun make to only execute
4167 # the first set of double-colon rules, so remove it if not needed.
4168 # If there is a colon in the path, we need to keep it.
4169 if test "x$srcdir" = x.; then
4170 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4173 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4175 DEFS=-DHAVE_CONFIG_H
4177 # Without the "./", some shells look in PATH for config.status.
4178 : ${CONFIG_STATUS=./config.status}
4180 echo creating $CONFIG_STATUS
4181 rm -f $CONFIG_STATUS
4182 cat > $CONFIG_STATUS <<EOF
4183 #! /bin/sh
4184 # Generated automatically by configure.
4185 # Run this file to recreate the current configuration.
4186 # This directory was configured as follows,
4187 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4189 # $0 $ac_configure_args
4191 # Compiler output produced by configure, useful for debugging
4192 # configure, is in ./config.log if it exists.
4194 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4195 for ac_option
4197 case "\$ac_option" in
4198 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4199 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4200 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4201 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4202 echo "$CONFIG_STATUS generated by autoconf version 2.7"
4203 exit 0 ;;
4204 -help | --help | --hel | --he | --h)
4205 echo "\$ac_cs_usage"; exit 0 ;;
4206 *) echo "\$ac_cs_usage"; exit 1 ;;
4207 esac
4208 done
4210 ac_given_srcdir=$srcdir
4211 ac_given_INSTALL="$INSTALL"
4213 trap 'rm -fr `echo "Makefile port.h:port.h.in
4214 pathnames.h:pathnames.h.in recover:recover.in config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4216 cat >> $CONFIG_STATUS <<EOF
4218 # Protect against being on the right side of a sed subst in config.status.
4219 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4220 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4221 $ac_vpsub
4222 $extrasub
4223 s%@CFLAGS@%$CFLAGS%g
4224 s%@CPPFLAGS@%$CPPFLAGS%g
4225 s%@CXXFLAGS@%$CXXFLAGS%g
4226 s%@DEFS@%$DEFS%g
4227 s%@LDFLAGS@%$LDFLAGS%g
4228 s%@LIBS@%$LIBS%g
4229 s%@exec_prefix@%$exec_prefix%g
4230 s%@prefix@%$prefix%g
4231 s%@program_transform_name@%$program_transform_name%g
4232 s%@bindir@%$bindir%g
4233 s%@sbindir@%$sbindir%g
4234 s%@libexecdir@%$libexecdir%g
4235 s%@datadir@%$datadir%g
4236 s%@sysconfdir@%$sysconfdir%g
4237 s%@sharedstatedir@%$sharedstatedir%g
4238 s%@localstatedir@%$localstatedir%g
4239 s%@libdir@%$libdir%g
4240 s%@includedir@%$includedir%g
4241 s%@oldincludedir@%$oldincludedir%g
4242 s%@infodir@%$infodir%g
4243 s%@mandir@%$mandir%g
4244 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4245 s%@INSTALL_DATA@%$INSTALL_DATA%g
4246 s%@host@%$host%g
4247 s%@host_alias@%$host_alias%g
4248 s%@host_cpu@%$host_cpu%g
4249 s%@host_vendor@%$host_vendor%g
4250 s%@host_os@%$host_os%g
4251 s%@CC@%$CC%g
4252 s%@OPTFLAG@%$OPTFLAG%g
4253 s%@no_op_OPTFLAG@%$no_op_OPTFLAG%g
4254 s%@vi_cv_path_shell@%$vi_cv_path_shell%g
4255 s%@vi_cv_path_sendmail@%$vi_cv_path_sendmail%g
4256 s%@vi_cv_path_perl@%$vi_cv_path_perl%g
4257 s%@vi_cv_path_preserve@%$vi_cv_path_preserve%g
4258 s%@vi_cv_path_chmod@%$vi_cv_path_chmod%g
4259 s%@vi_cv_path_cp@%$vi_cv_path_cp%g
4260 s%@vi_cv_path_ln@%$vi_cv_path_ln%g
4261 s%@vi_cv_path_mkdir@%$vi_cv_path_mkdir%g
4262 s%@vi_cv_path_rm@%$vi_cv_path_rm%g
4263 s%@vi_cv_path_strip@%$vi_cv_path_strip%g
4264 s%@CPP@%$CPP%g
4265 s%@XINCS@%$XINCS%g
4266 s%@shrpenv@%$shrpenv%g
4267 s%@vi_cv_perllib@%$vi_cv_perllib%g
4268 s%@tknvi@%$tknvi%g
4269 s%@TKLIBS@%$TKLIBS%g
4270 s%@cobjs@%$cobjs%g
4271 s%@LIBOBJS@%$LIBOBJS%g
4272 s%@u_char_decl@%$u_char_decl%g
4273 s%@u_short_decl@%$u_short_decl%g
4274 s%@u_int_decl@%$u_int_decl%g
4275 s%@u_long_decl@%$u_long_decl%g
4276 s%@u_int8_decl@%$u_int8_decl%g
4277 s%@u_int16_decl@%$u_int16_decl%g
4278 s%@int16_decl@%$int16_decl%g
4279 s%@u_int32_decl@%$u_int32_decl%g
4280 s%@int32_decl@%$int32_decl%g
4282 CEOF
4284 cat >> $CONFIG_STATUS <<EOF
4286 CONFIG_FILES=\${CONFIG_FILES-"Makefile port.h:port.h.in
4287 pathnames.h:pathnames.h.in recover:recover.in"}
4289 cat >> $CONFIG_STATUS <<\EOF
4290 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4291 # Support "outfile[:infile]", defaulting infile="outfile.in".
4292 case "$ac_file" in
4293 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
4294 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4295 *) ac_file_in="${ac_file}.in" ;;
4296 esac
4298 # Adjust relative srcdir, etc. for subdirectories.
4300 # Remove last slash and all that follows it. Not all systems have dirname.
4301 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4302 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4303 # The file is in a subdirectory.
4304 test ! -d "$ac_dir" && mkdir "$ac_dir"
4305 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4306 # A "../" for each directory in $ac_dir_suffix.
4307 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4308 else
4309 ac_dir_suffix= ac_dots=
4312 case "$ac_given_srcdir" in
4313 .) srcdir=.
4314 if test -z "$ac_dots"; then top_srcdir=.
4315 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4316 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4317 *) # Relative path.
4318 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4319 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4320 esac
4322 case "$ac_given_INSTALL" in
4323 [/$]*) INSTALL="$ac_given_INSTALL" ;;
4324 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4325 esac
4326 echo creating "$ac_file"
4327 rm -f "$ac_file"
4328 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4329 case "$ac_file" in
4330 *Makefile*) ac_comsub="1i\\
4331 # $configure_input" ;;
4332 *) ac_comsub= ;;
4333 esac
4334 sed -e "$ac_comsub
4335 s%@configure_input@%$configure_input%g
4336 s%@srcdir@%$srcdir%g
4337 s%@top_srcdir@%$top_srcdir%g
4338 s%@INSTALL@%$INSTALL%g
4339 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
4340 fi; done
4341 rm -f conftest.subs
4343 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4344 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4346 # ac_d sets the value in "#define NAME VALUE" lines.
4347 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4348 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4349 ac_dC='\3'
4350 ac_dD='%g'
4351 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4352 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4353 ac_uB='\([ ]\)%\1#\2define\3'
4354 ac_uC=' '
4355 ac_uD='\4%g'
4356 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4357 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4358 ac_eB='$%\1#\2define\3'
4359 ac_eC=' '
4360 ac_eD='%g'
4362 CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
4363 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4364 # Support "outfile[:infile]", defaulting infile="outfile.in".
4365 case "$ac_file" in
4366 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
4367 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4368 *) ac_file_in="${ac_file}.in" ;;
4369 esac
4371 echo creating $ac_file
4373 rm -f conftest.frag conftest.in conftest.out
4374 cp $ac_given_srcdir/$ac_file_in conftest.in
4378 # Transform confdefs.h into a sed script conftest.vals that substitutes
4379 # the proper values into config.h.in to produce config.h. And first:
4380 # Protect against being on the right side of a sed subst in config.status.
4381 # Protect against being in an unquoted here document in config.status.
4382 rm -f conftest.vals
4383 cat > conftest.hdr <<\EOF
4384 s/[\\&%]/\\&/g
4385 s%[\\$`]%\\&%g
4386 s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4387 s%ac_d%ac_u%gp
4388 s%ac_u%ac_e%gp
4390 sed -n -f conftest.hdr confdefs.h > conftest.vals
4391 rm -f conftest.hdr
4393 # This sed command replaces #undef with comments. This is necessary, for
4394 # example, in the case of _POSIX_SOURCE, which is predefined and required
4395 # on some systems where configure will not decide to define it.
4396 cat >> conftest.vals <<\EOF
4397 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4400 # Break up conftest.vals because some shells have a limit on
4401 # the size of here documents, and old seds have small limits too.
4402 # Maximum number of lines to put in a single here document.
4403 ac_max_here_lines=12
4405 rm -f conftest.tail
4406 while :
4408 ac_lines=`grep -c . conftest.vals`
4409 # grep -c gives empty output for an empty file on some AIX systems.
4410 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4411 # Write a limited-size here document to conftest.frag.
4412 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4413 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4414 echo 'CEOF
4415 sed -f conftest.frag conftest.in > conftest.out
4416 rm -f conftest.in
4417 mv conftest.out conftest.in
4418 ' >> $CONFIG_STATUS
4419 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4420 rm -f conftest.vals
4421 mv conftest.tail conftest.vals
4422 done
4423 rm -f conftest.vals
4425 cat >> $CONFIG_STATUS <<\EOF
4426 rm -f conftest.frag conftest.h
4427 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
4428 cat conftest.in >> conftest.h
4429 rm -f conftest.in
4430 if cmp -s $ac_file conftest.h 2>/dev/null; then
4431 echo "$ac_file is unchanged"
4432 rm -f conftest.h
4433 else
4434 rm -f $ac_file
4435 mv conftest.h $ac_file
4437 fi; done
4441 exit 0
4443 chmod +x $CONFIG_STATUS
4444 rm -fr confdefs* $ac_clean_files
4445 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1