blob: e9e5637f241b3880c381dfc2df395a9daa7001d2 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --disable-darwin Disable Darwin (Mac OS X) support."
16ac_help="$ac_help
17 --with-vim-name=NAME what to call the Vim executable"
18ac_help="$ac_help
19 --with-ex-name=NAME what to call the Ex executable"
20ac_help="$ac_help
21 --with-view-name=NAME what to call the View executable"
22ac_help="$ac_help
23 --with-global-runtime=DIR global runtime directory in 'runtimepath'"
24ac_help="$ac_help
25 --with-modified-by=NAME name of who modified a release version"
26ac_help="$ac_help
27 --with-features=TYPE tiny, small, normal, big or huge (default: normal)"
28ac_help="$ac_help
29 --with-compiledby=NAME name to show in :version message"
30ac_help="$ac_help
31 --disable-xsmp Disable XSMP session management"
32ac_help="$ac_help
33 --disable-xsmp-interact Disable XSMP interaction"
34ac_help="$ac_help
35 --enable-perlinterp Include Perl interpreter."
36ac_help="$ac_help
37 --enable-pythoninterp Include Python interpreter."
38ac_help="$ac_help
39 --with-python-config-dir=PATH Python's config directory"
40ac_help="$ac_help
41 --enable-tclinterp Include Tcl interpreter."
42ac_help="$ac_help
43 --with-tclsh=PATH which tclsh to use (default: tclsh8.0)"
44ac_help="$ac_help
45 --enable-rubyinterp Include Ruby interpreter."
46ac_help="$ac_help
47 --enable-cscope Include cscope interface."
48ac_help="$ac_help
49 --enable-workshop Include Sun Visual Workshop support."
50ac_help="$ac_help
51 --disable-netbeans Disable NetBeans integration support."
52ac_help="$ac_help
53 --enable-sniff Include Sniff interface."
54ac_help="$ac_help
55 --enable-multibyte Include multibyte editing support."
56ac_help="$ac_help
57 --enable-hangulinput Include Hangul input support."
58ac_help="$ac_help
59 --enable-xim Include XIM input support."
60ac_help="$ac_help
61 --enable-fontset Include X fontset output support."
62ac_help="$ac_help
63 --with-x use the X Window System"
64ac_help="$ac_help
Bram Moolenaar843ee412004-06-30 16:16:41 +000065 --enable-gui[=OPTS] X11 GUI [default=auto] [OPTS=auto/no/gtk/gtk2/gnome/gnome2/kde/motif/athena/neXtaw/beos/photon/carbon]"
66ac_help="$ac_help
67 --enable-kde-check If auto-select GUI, check for KDE [default=no]"
Bram Moolenaar071d4272004-06-13 20:20:40 +000068ac_help="$ac_help
69 --enable-gtk-check If auto-select GUI, check for GTK [default=yes]"
70ac_help="$ac_help
71 --enable-gtk2-check If GTK GUI, check for GTK+ 2 [default=yes]"
72ac_help="$ac_help
73 --enable-gnome-check If GTK GUI, check for GNOME [default=no]"
74ac_help="$ac_help
75 --enable-motif-check If auto-select GUI, check for Motif [default=yes]"
76ac_help="$ac_help
77 --enable-athena-check If auto-select GUI, check for Athena [default=yes]"
78ac_help="$ac_help
79 --enable-nextaw-check If auto-select GUI, check for neXtaw [default=yes]"
80ac_help="$ac_help
81 --enable-carbon-check If auto-select GUI, check for Carbon [default=yes]"
82ac_help="$ac_help
Bram Moolenaar843ee412004-06-30 16:16:41 +000083 --with-qt-dir=DIR Specify prefix of QT files"
84ac_help="$ac_help
85 --with-qt-includes=DIR Specify location of Qt headers"
86ac_help="$ac_help
87 --with-qt-libs=DIR Specify location of Qt libraries"
88ac_help="$ac_help
89 --enable-kde-toolbar if KDE GUI is selected, enable a KDE-look toolbar [default=no]"
90ac_help="$ac_help
91 --disable-rpath Disable rpath."
92ac_help="$ac_help
93 --with-kde-prefix=PFX Prefix where KDE is installed (optional)"
94ac_help="$ac_help
95 --with-kde-includes=DIR Specify location of KDE headers"
96ac_help="$ac_help
97 --with-kde-libs=DIR Specify location of KDE libraries"
98ac_help="$ac_help
99 --disable-kdetest Do not try to compile and run a test KDE program"
100ac_help="$ac_help
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101 --with-gtk-prefix=PFX Prefix where GTK is installed (optional)"
102ac_help="$ac_help
103 --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)"
104ac_help="$ac_help
105 --disable-gtktest Do not try to compile and run a test GTK program"
106ac_help="$ac_help
107 --with-gnome-includes=DIR Specify location of GNOME headers"
108ac_help="$ac_help
109 --with-gnome-libs=DIR Specify location of GNOME libs"
110ac_help="$ac_help
111 --with-gnome Specify prefix for GNOME files"
112ac_help="$ac_help
113 --with-motif-lib=STRING Library for Motif "
114ac_help="$ac_help
115 --with-tlib=library terminal library to be used "
116ac_help="$ac_help
117 --disable-acl Don't check for ACL support."
118ac_help="$ac_help
119 --disable-gpm Don't use gpm (Linux mouse daemon)."
120ac_help="$ac_help
121 --disable-nls Don't support NLS (gettext())."
122
123# Initialize some variables set by options.
124# The variables have the same names as the options, with
125# dashes changed to underlines.
126build=NONE
127cache_file=./config.cache
128exec_prefix=NONE
129host=NONE
130no_create=
131nonopt=NONE
132no_recursion=
133prefix=NONE
134program_prefix=NONE
135program_suffix=NONE
136program_transform_name=s,x,x,
137silent=
138site=
139srcdir=
140target=NONE
141verbose=
142x_includes=NONE
143x_libraries=NONE
144bindir='${exec_prefix}/bin'
145sbindir='${exec_prefix}/sbin'
146libexecdir='${exec_prefix}/libexec'
147datadir='${prefix}/share'
148sysconfdir='${prefix}/etc'
149sharedstatedir='${prefix}/com'
150localstatedir='${prefix}/var'
151libdir='${exec_prefix}/lib'
152includedir='${prefix}/include'
153oldincludedir='/usr/include'
154infodir='${prefix}/info'
155mandir='${prefix}/man'
156
157# Initialize some other variables.
158subdirs=
159MFLAGS= MAKEFLAGS=
160SHELL=${CONFIG_SHELL-/bin/sh}
161# Maximum number of lines to put in a shell here document.
162ac_max_here_lines=12
163
164ac_prev=
165for ac_option
166do
167
168 # If the previous option needs an argument, assign it.
169 if test -n "$ac_prev"; then
170 eval "$ac_prev=\$ac_option"
171 ac_prev=
172 continue
173 fi
174
175 case "$ac_option" in
176 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
177 *) ac_optarg= ;;
178 esac
179
180 # Accept the important Cygnus configure options, so we can diagnose typos.
181
182 case "$ac_option" in
183
184 -bindir | --bindir | --bindi | --bind | --bin | --bi)
185 ac_prev=bindir ;;
186 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
187 bindir="$ac_optarg" ;;
188
189 -build | --build | --buil | --bui | --bu)
190 ac_prev=build ;;
191 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
192 build="$ac_optarg" ;;
193
194 -cache-file | --cache-file | --cache-fil | --cache-fi \
195 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
196 ac_prev=cache_file ;;
197 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
198 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
199 cache_file="$ac_optarg" ;;
200
201 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
202 ac_prev=datadir ;;
203 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
204 | --da=*)
205 datadir="$ac_optarg" ;;
206
207 -disable-* | --disable-*)
208 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
209 # Reject names that are not valid shell variable names.
210 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
211 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
212 fi
213 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
214 eval "enable_${ac_feature}=no" ;;
215
216 -enable-* | --enable-*)
217 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
218 # Reject names that are not valid shell variable names.
219 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
220 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
221 fi
222 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
223 case "$ac_option" in
224 *=*) ;;
225 *) ac_optarg=yes ;;
226 esac
227 eval "enable_${ac_feature}='$ac_optarg'" ;;
228
229 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
230 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
231 | --exec | --exe | --ex)
232 ac_prev=exec_prefix ;;
233 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
234 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
235 | --exec=* | --exe=* | --ex=*)
236 exec_prefix="$ac_optarg" ;;
237
238 -gas | --gas | --ga | --g)
239 # Obsolete; use --with-gas.
240 with_gas=yes ;;
241
242 -help | --help | --hel | --he)
243 # Omit some internal or obsolete options to make the list less imposing.
244 # This message is too long to be a string in the A/UX 3.1 sh.
245 cat << EOF
246Usage: configure [options] [host]
247Options: [defaults in brackets after descriptions]
248Configuration:
249 --cache-file=FILE cache test results in FILE
250 --help print this message
251 --no-create do not create output files
252 --quiet, --silent do not print \`checking...' messages
253 --version print the version of autoconf that created configure
254Directory and file names:
255 --prefix=PREFIX install architecture-independent files in PREFIX
256 [$ac_default_prefix]
257 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
258 [same as prefix]
259 --bindir=DIR user executables in DIR [EPREFIX/bin]
260 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
261 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
262 --datadir=DIR read-only architecture-independent data in DIR
263 [PREFIX/share]
264 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
265 --sharedstatedir=DIR modifiable architecture-independent data in DIR
266 [PREFIX/com]
267 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
268 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
269 --includedir=DIR C header files in DIR [PREFIX/include]
270 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
271 --infodir=DIR info documentation in DIR [PREFIX/info]
272 --mandir=DIR man documentation in DIR [PREFIX/man]
273 --srcdir=DIR find the sources in DIR [configure dir or ..]
274 --program-prefix=PREFIX prepend PREFIX to installed program names
275 --program-suffix=SUFFIX append SUFFIX to installed program names
276 --program-transform-name=PROGRAM
277 run sed PROGRAM on installed program names
278EOF
279 cat << EOF
280Host type:
281 --build=BUILD configure for building on BUILD [BUILD=HOST]
282 --host=HOST configure for HOST [guessed]
283 --target=TARGET configure for TARGET [TARGET=HOST]
284Features and packages:
285 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
286 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
287 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
288 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
289 --x-includes=DIR X include files are in DIR
290 --x-libraries=DIR X library files are in DIR
291EOF
292 if test -n "$ac_help"; then
293 echo "--enable and --with options recognized:$ac_help"
294 fi
295 exit 0 ;;
296
297 -host | --host | --hos | --ho)
298 ac_prev=host ;;
299 -host=* | --host=* | --hos=* | --ho=*)
300 host="$ac_optarg" ;;
301
302 -includedir | --includedir | --includedi | --included | --include \
303 | --includ | --inclu | --incl | --inc)
304 ac_prev=includedir ;;
305 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
306 | --includ=* | --inclu=* | --incl=* | --inc=*)
307 includedir="$ac_optarg" ;;
308
309 -infodir | --infodir | --infodi | --infod | --info | --inf)
310 ac_prev=infodir ;;
311 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
312 infodir="$ac_optarg" ;;
313
314 -libdir | --libdir | --libdi | --libd)
315 ac_prev=libdir ;;
316 -libdir=* | --libdir=* | --libdi=* | --libd=*)
317 libdir="$ac_optarg" ;;
318
319 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
320 | --libexe | --libex | --libe)
321 ac_prev=libexecdir ;;
322 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
323 | --libexe=* | --libex=* | --libe=*)
324 libexecdir="$ac_optarg" ;;
325
326 -localstatedir | --localstatedir | --localstatedi | --localstated \
327 | --localstate | --localstat | --localsta | --localst \
328 | --locals | --local | --loca | --loc | --lo)
329 ac_prev=localstatedir ;;
330 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
331 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
332 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
333 localstatedir="$ac_optarg" ;;
334
335 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
336 ac_prev=mandir ;;
337 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
338 mandir="$ac_optarg" ;;
339
340 -nfp | --nfp | --nf)
341 # Obsolete; use --without-fp.
342 with_fp=no ;;
343
344 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
345 | --no-cr | --no-c)
346 no_create=yes ;;
347
348 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
349 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
350 no_recursion=yes ;;
351
352 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
353 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
354 | --oldin | --oldi | --old | --ol | --o)
355 ac_prev=oldincludedir ;;
356 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
357 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
358 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
359 oldincludedir="$ac_optarg" ;;
360
361 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
362 ac_prev=prefix ;;
363 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
364 prefix="$ac_optarg" ;;
365
366 -program-prefix | --program-prefix | --program-prefi | --program-pref \
367 | --program-pre | --program-pr | --program-p)
368 ac_prev=program_prefix ;;
369 -program-prefix=* | --program-prefix=* | --program-prefi=* \
370 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
371 program_prefix="$ac_optarg" ;;
372
373 -program-suffix | --program-suffix | --program-suffi | --program-suff \
374 | --program-suf | --program-su | --program-s)
375 ac_prev=program_suffix ;;
376 -program-suffix=* | --program-suffix=* | --program-suffi=* \
377 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
378 program_suffix="$ac_optarg" ;;
379
380 -program-transform-name | --program-transform-name \
381 | --program-transform-nam | --program-transform-na \
382 | --program-transform-n | --program-transform- \
383 | --program-transform | --program-transfor \
384 | --program-transfo | --program-transf \
385 | --program-trans | --program-tran \
386 | --progr-tra | --program-tr | --program-t)
387 ac_prev=program_transform_name ;;
388 -program-transform-name=* | --program-transform-name=* \
389 | --program-transform-nam=* | --program-transform-na=* \
390 | --program-transform-n=* | --program-transform-=* \
391 | --program-transform=* | --program-transfor=* \
392 | --program-transfo=* | --program-transf=* \
393 | --program-trans=* | --program-tran=* \
394 | --progr-tra=* | --program-tr=* | --program-t=*)
395 program_transform_name="$ac_optarg" ;;
396
397 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
398 | -silent | --silent | --silen | --sile | --sil)
399 silent=yes ;;
400
401 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
402 ac_prev=sbindir ;;
403 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
404 | --sbi=* | --sb=*)
405 sbindir="$ac_optarg" ;;
406
407 -sharedstatedir | --sharedstatedir | --sharedstatedi \
408 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
409 | --sharedst | --shareds | --shared | --share | --shar \
410 | --sha | --sh)
411 ac_prev=sharedstatedir ;;
412 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
413 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
414 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
415 | --sha=* | --sh=*)
416 sharedstatedir="$ac_optarg" ;;
417
418 -site | --site | --sit)
419 ac_prev=site ;;
420 -site=* | --site=* | --sit=*)
421 site="$ac_optarg" ;;
422
423 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
424 ac_prev=srcdir ;;
425 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
426 srcdir="$ac_optarg" ;;
427
428 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
429 | --syscon | --sysco | --sysc | --sys | --sy)
430 ac_prev=sysconfdir ;;
431 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
432 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
433 sysconfdir="$ac_optarg" ;;
434
435 -target | --target | --targe | --targ | --tar | --ta | --t)
436 ac_prev=target ;;
437 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
438 target="$ac_optarg" ;;
439
440 -v | -verbose | --verbose | --verbos | --verbo | --verb)
441 verbose=yes ;;
442
443 -version | --version | --versio | --versi | --vers)
444 echo "configure generated by autoconf version 2.13"
445 exit 0 ;;
446
447 -with-* | --with-*)
448 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
449 # Reject names that are not valid shell variable names.
450 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
451 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
452 fi
453 ac_package=`echo $ac_package| sed 's/-/_/g'`
454 case "$ac_option" in
455 *=*) ;;
456 *) ac_optarg=yes ;;
457 esac
458 eval "with_${ac_package}='$ac_optarg'" ;;
459
460 -without-* | --without-*)
461 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
462 # Reject names that are not valid shell variable names.
463 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
464 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
465 fi
466 ac_package=`echo $ac_package| sed 's/-/_/g'`
467 eval "with_${ac_package}=no" ;;
468
469 --x)
470 # Obsolete; use --with-x.
471 with_x=yes ;;
472
473 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
474 | --x-incl | --x-inc | --x-in | --x-i)
475 ac_prev=x_includes ;;
476 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
477 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
478 x_includes="$ac_optarg" ;;
479
480 -x-libraries | --x-libraries | --x-librarie | --x-librari \
481 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
482 ac_prev=x_libraries ;;
483 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
484 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
485 x_libraries="$ac_optarg" ;;
486
487 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
488 ;;
489
490 *)
491 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
492 echo "configure: warning: $ac_option: invalid host type" 1>&2
493 fi
494 if test "x$nonopt" != xNONE; then
495 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
496 fi
497 nonopt="$ac_option"
498 ;;
499
500 esac
501done
502
503if test -n "$ac_prev"; then
504 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
505fi
506
507trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
508
509# File descriptor usage:
510# 0 standard input
511# 1 file creation
512# 2 errors and warnings
513# 3 some systems may open it to /dev/tty
514# 4 used on the Kubota Titan
515# 6 checking for... messages and results
516# 5 compiler messages saved in config.log
517if test "$silent" = yes; then
518 exec 6>/dev/null
519else
520 exec 6>&1
521fi
522exec 5>auto/config.log
523
524echo "\
525This file contains any messages produced by compilers while
526running configure, to aid debugging if configure makes a mistake.
527" 1>&5
528
529# Strip out --no-create and --no-recursion so they do not pile up.
530# Also quote any args containing shell metacharacters.
531ac_configure_args=
532for ac_arg
533do
534 case "$ac_arg" in
535 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
536 | --no-cr | --no-c) ;;
537 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
538 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
539 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
540 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
541 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
542 esac
543done
544
545# NLS nuisances.
546# Only set these to C if already set. These must not be set unconditionally
547# because not all systems understand e.g. LANG=C (notably SCO).
548# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
549# Non-C LC_CTYPE values break the ctype check.
550if test "${LANG+set}" = set; then LANG=C; export LANG; fi
551if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
552if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
553if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
554
555# confdefs.h avoids OS command line length limits that DEFS can exceed.
556rm -rf conftest* confdefs.h
557# AIX cpp loses on an empty file, so make sure it contains at least a newline.
558echo > confdefs.h
559
560# A filename unique to this package, relative to the directory that
561# configure is in, which we can look for to find out if srcdir is correct.
562ac_unique_file=vim.h
563
564# Find the source files, if location was not specified.
565if test -z "$srcdir"; then
566 ac_srcdir_defaulted=yes
567 # Try the directory containing this script, then its parent.
568 ac_prog=$0
569 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
570 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
571 srcdir=$ac_confdir
572 if test ! -r $srcdir/$ac_unique_file; then
573 srcdir=..
574 fi
575else
576 ac_srcdir_defaulted=no
577fi
578if test ! -r $srcdir/$ac_unique_file; then
579 if test "$ac_srcdir_defaulted" = yes; then
580 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
581 else
582 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
583 fi
584fi
585srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
586
587# Prefer explicitly selected file to automatically selected ones.
588if test -z "$CONFIG_SITE"; then
589 if test "x$prefix" != xNONE; then
590 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
591 else
592 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
593 fi
594fi
595for ac_site_file in $CONFIG_SITE; do
596 if test -r "$ac_site_file"; then
597 echo "loading site script $ac_site_file"
598 . "$ac_site_file"
599 fi
600done
601
602if test -r "$cache_file"; then
603 echo "loading cache $cache_file"
604 . $cache_file
605else
606 echo "creating cache $cache_file"
607 > $cache_file
608fi
609
610ac_ext=c
611# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
612ac_cpp='$CPP $CPPFLAGS'
613ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
614ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
615cross_compiling=$ac_cv_prog_cc_cross
616
617ac_exeext=
618ac_objext=o
619if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
620 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
621 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
622 ac_n= ac_c='
623' ac_t=' '
624 else
625 ac_n=-n ac_c= ac_t=
626 fi
627else
628 ac_n= ac_c='\c' ac_t=
629fi
630
631
632
633
634cat >> confdefs.h <<\EOF
635#define UNIX 1
636EOF
637
638echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +0000639echo "configure:640: checking whether ${MAKE-make} sets \${MAKE}" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000640set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
641if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
642 echo $ac_n "(cached) $ac_c" 1>&6
643else
644 cat > conftestmake <<\EOF
645all:
646 @echo 'ac_maketemp="${MAKE}"'
647EOF
648# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
649eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
650if test -n "$ac_maketemp"; then
651 eval ac_cv_prog_make_${ac_make}_set=yes
652else
653 eval ac_cv_prog_make_${ac_make}_set=no
654fi
655rm -f conftestmake
656fi
657if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
658 echo "$ac_t""yes" 1>&6
659 SET_MAKE=
660else
661 echo "$ac_t""no" 1>&6
662 SET_MAKE="MAKE=${MAKE-make}"
663fi
664
665
666# Extract the first word of "gcc", so it can be a program name with args.
667set dummy gcc; ac_word=$2
668echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +0000669echo "configure:670: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000670if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
671 echo $ac_n "(cached) $ac_c" 1>&6
672else
673 if test -n "$CC"; then
674 ac_cv_prog_CC="$CC" # Let the user override the test.
675else
676 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
677 ac_dummy="$PATH"
678 for ac_dir in $ac_dummy; do
679 test -z "$ac_dir" && ac_dir=.
680 if test -f $ac_dir/$ac_word; then
681 ac_cv_prog_CC="gcc"
682 break
683 fi
684 done
685 IFS="$ac_save_ifs"
686fi
687fi
688CC="$ac_cv_prog_CC"
689if test -n "$CC"; then
690 echo "$ac_t""$CC" 1>&6
691else
692 echo "$ac_t""no" 1>&6
693fi
694
695if test -z "$CC"; then
696 # Extract the first word of "cc", so it can be a program name with args.
697set dummy cc; ac_word=$2
698echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +0000699echo "configure:700: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000700if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
701 echo $ac_n "(cached) $ac_c" 1>&6
702else
703 if test -n "$CC"; then
704 ac_cv_prog_CC="$CC" # Let the user override the test.
705else
706 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
707 ac_prog_rejected=no
708 ac_dummy="$PATH"
709 for ac_dir in $ac_dummy; do
710 test -z "$ac_dir" && ac_dir=.
711 if test -f $ac_dir/$ac_word; then
712 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
713 ac_prog_rejected=yes
714 continue
715 fi
716 ac_cv_prog_CC="cc"
717 break
718 fi
719 done
720 IFS="$ac_save_ifs"
721if test $ac_prog_rejected = yes; then
722 # We found a bogon in the path, so make sure we never use it.
723 set dummy $ac_cv_prog_CC
724 shift
725 if test $# -gt 0; then
726 # We chose a different compiler from the bogus one.
727 # However, it has the same basename, so the bogon will be chosen
728 # first if we set CC to just the basename; use the full file name.
729 shift
730 set dummy "$ac_dir/$ac_word" "$@"
731 shift
732 ac_cv_prog_CC="$@"
733 fi
734fi
735fi
736fi
737CC="$ac_cv_prog_CC"
738if test -n "$CC"; then
739 echo "$ac_t""$CC" 1>&6
740else
741 echo "$ac_t""no" 1>&6
742fi
743
744 if test -z "$CC"; then
745 case "`uname -s`" in
746 *win32* | *WIN32*)
747 # Extract the first word of "cl", so it can be a program name with args.
748set dummy cl; ac_word=$2
749echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +0000750echo "configure:751: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000751if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
752 echo $ac_n "(cached) $ac_c" 1>&6
753else
754 if test -n "$CC"; then
755 ac_cv_prog_CC="$CC" # Let the user override the test.
756else
757 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
758 ac_dummy="$PATH"
759 for ac_dir in $ac_dummy; do
760 test -z "$ac_dir" && ac_dir=.
761 if test -f $ac_dir/$ac_word; then
762 ac_cv_prog_CC="cl"
763 break
764 fi
765 done
766 IFS="$ac_save_ifs"
767fi
768fi
769CC="$ac_cv_prog_CC"
770if test -n "$CC"; then
771 echo "$ac_t""$CC" 1>&6
772else
773 echo "$ac_t""no" 1>&6
774fi
775 ;;
776 esac
777 fi
778 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
779fi
780
781echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +0000782echo "configure:783: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000783
784ac_ext=c
785# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
786ac_cpp='$CPP $CPPFLAGS'
787ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
788ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
789cross_compiling=$ac_cv_prog_cc_cross
790
791cat > conftest.$ac_ext << EOF
792
Bram Moolenaar843ee412004-06-30 16:16:41 +0000793#line 794 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000794#include "confdefs.h"
795
796main(){return(0);}
797EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +0000798if { (eval echo configure:799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +0000799 ac_cv_prog_cc_works=yes
800 # If we can't run a trivial program, we are probably using a cross compiler.
801 if (./conftest; exit) 2>/dev/null; then
802 ac_cv_prog_cc_cross=no
803 else
804 ac_cv_prog_cc_cross=yes
805 fi
806else
807 echo "configure: failed program was:" >&5
808 cat conftest.$ac_ext >&5
809 ac_cv_prog_cc_works=no
810fi
811rm -fr conftest*
812ac_ext=c
813# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
814ac_cpp='$CPP $CPPFLAGS'
815ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
816ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
817cross_compiling=$ac_cv_prog_cc_cross
818
819echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
820if test $ac_cv_prog_cc_works = no; then
821 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
822fi
823echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +0000824echo "configure:825: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000825echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
826cross_compiling=$ac_cv_prog_cc_cross
827
828echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +0000829echo "configure:830: checking whether we are using GNU C" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000830if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
831 echo $ac_n "(cached) $ac_c" 1>&6
832else
833 cat > conftest.c <<EOF
834#ifdef __GNUC__
835 yes;
836#endif
837EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +0000838if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Bram Moolenaar071d4272004-06-13 20:20:40 +0000839 ac_cv_prog_gcc=yes
840else
841 ac_cv_prog_gcc=no
842fi
843fi
844
845echo "$ac_t""$ac_cv_prog_gcc" 1>&6
846
847if test $ac_cv_prog_gcc = yes; then
848 GCC=yes
849else
850 GCC=
851fi
852
853ac_test_CFLAGS="${CFLAGS+set}"
854ac_save_CFLAGS="$CFLAGS"
855CFLAGS=
856echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +0000857echo "configure:858: checking whether ${CC-cc} accepts -g" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000858if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
859 echo $ac_n "(cached) $ac_c" 1>&6
860else
861 echo 'void f(){}' > conftest.c
862if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
863 ac_cv_prog_cc_g=yes
864else
865 ac_cv_prog_cc_g=no
866fi
867rm -f conftest*
868
869fi
870
871echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
872if test "$ac_test_CFLAGS" = set; then
873 CFLAGS="$ac_save_CFLAGS"
874elif test $ac_cv_prog_cc_g = yes; then
875 if test "$GCC" = yes; then
876 CFLAGS="-g -O2"
877 else
878 CFLAGS="-g"
879 fi
880else
881 if test "$GCC" = yes; then
882 CFLAGS="-O2"
883 else
884 CFLAGS=
885 fi
886fi
887 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +0000888echo "configure:889: checking how to run the C preprocessor" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000889# On Suns, sometimes $CPP names a directory.
890if test -n "$CPP" && test -d "$CPP"; then
891 CPP=
892fi
893if test -z "$CPP"; then
894if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
895 echo $ac_n "(cached) $ac_c" 1>&6
896else
897 # This must be in double quotes, not single quotes, because CPP may get
898 # substituted into the Makefile and "${CC-cc}" will confuse make.
899 CPP="${CC-cc} -E"
900 # On the NeXT, cc -E runs the code through the compiler's parser,
901 # not just through cpp.
902 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +0000903#line 904 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000904#include "confdefs.h"
905#include <assert.h>
906Syntax Error
907EOF
908ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +0000909{ (eval echo configure:910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +0000910ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
911if test -z "$ac_err"; then
912 :
913else
914 echo "$ac_err" >&5
915 echo "configure: failed program was:" >&5
916 cat conftest.$ac_ext >&5
917 rm -rf conftest*
918 CPP="${CC-cc} -E -traditional-cpp"
919 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +0000920#line 921 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000921#include "confdefs.h"
922#include <assert.h>
923Syntax Error
924EOF
925ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +0000926{ (eval echo configure:927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +0000927ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
928if test -z "$ac_err"; then
929 :
930else
931 echo "$ac_err" >&5
932 echo "configure: failed program was:" >&5
933 cat conftest.$ac_ext >&5
934 rm -rf conftest*
935 CPP="${CC-cc} -nologo -E"
936 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +0000937#line 938 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000938#include "confdefs.h"
939#include <assert.h>
940Syntax Error
941EOF
942ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +0000943{ (eval echo configure:944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +0000944ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
945if test -z "$ac_err"; then
946 :
947else
948 echo "$ac_err" >&5
949 echo "configure: failed program was:" >&5
950 cat conftest.$ac_ext >&5
951 rm -rf conftest*
952 CPP=/lib/cpp
953fi
954rm -f conftest*
955fi
956rm -f conftest*
957fi
958rm -f conftest*
959 ac_cv_prog_CPP="$CPP"
960fi
961 CPP="$ac_cv_prog_CPP"
962else
963 ac_cv_prog_CPP="$CPP"
964fi
965echo "$ac_t""$CPP" 1>&6
966 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +0000967#line 968 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000968#include "confdefs.h"
969
970EOF
971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
972 egrep "" >/dev/null 2>&1; then
973 :
974fi
975rm -f conftest*
976 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +0000977echo "configure:978: checking for POSIXized ISC" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000978if test -d /etc/conf/kconfig.d &&
979 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
980then
981 echo "$ac_t""yes" 1>&6
982 ISC=yes # If later tests want to check for ISC.
983 cat >> confdefs.h <<\EOF
984#define _POSIX_SOURCE 1
985EOF
986
987 if test "$GCC" = yes; then
988 CC="$CC -posix"
989 else
990 CC="$CC -Xp"
991 fi
992else
993 echo "$ac_t""no" 1>&6
994 ISC=
995fi
996 for ac_prog in mawk gawk nawk awk
997do
998# Extract the first word of "$ac_prog", so it can be a program name with args.
999set dummy $ac_prog; ac_word=$2
1000echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001001echo "configure:1002: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001002if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1003 echo $ac_n "(cached) $ac_c" 1>&6
1004else
1005 if test -n "$AWK"; then
1006 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1007else
1008 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1009 ac_dummy="$PATH"
1010 for ac_dir in $ac_dummy; do
1011 test -z "$ac_dir" && ac_dir=.
1012 if test -f $ac_dir/$ac_word; then
1013 ac_cv_prog_AWK="$ac_prog"
1014 break
1015 fi
1016 done
1017 IFS="$ac_save_ifs"
1018fi
1019fi
1020AWK="$ac_cv_prog_AWK"
1021if test -n "$AWK"; then
1022 echo "$ac_t""$AWK" 1>&6
1023else
1024 echo "$ac_t""no" 1>&6
1025fi
1026
1027test -n "$AWK" && break
1028done
1029
1030# Extract the first word of "strip", so it can be a program name with args.
1031set dummy strip; ac_word=$2
1032echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001033echo "configure:1034: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001034if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1035 echo $ac_n "(cached) $ac_c" 1>&6
1036else
1037 if test -n "$STRIP"; then
1038 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1039else
1040 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1041 ac_dummy="$PATH"
1042 for ac_dir in $ac_dummy; do
1043 test -z "$ac_dir" && ac_dir=.
1044 if test -f $ac_dir/$ac_word; then
1045 ac_cv_prog_STRIP="strip"
1046 break
1047 fi
1048 done
1049 IFS="$ac_save_ifs"
1050 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
1051fi
1052fi
1053STRIP="$ac_cv_prog_STRIP"
1054if test -n "$STRIP"; then
1055 echo "$ac_t""$STRIP" 1>&6
1056else
1057 echo "$ac_t""no" 1>&6
1058fi
1059
1060
1061echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001062echo "configure:1063: checking for Cygwin environment" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001063if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1064 echo $ac_n "(cached) $ac_c" 1>&6
1065else
1066 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00001067#line 1068 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001068#include "confdefs.h"
1069
1070int main() {
1071
1072#ifndef __CYGWIN__
1073#define __CYGWIN__ __CYGWIN32__
1074#endif
1075return __CYGWIN__;
1076; return 0; }
1077EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00001078if { (eval echo configure:1079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001079 rm -rf conftest*
1080 ac_cv_cygwin=yes
1081else
1082 echo "configure: failed program was:" >&5
1083 cat conftest.$ac_ext >&5
1084 rm -rf conftest*
1085 ac_cv_cygwin=no
1086fi
1087rm -f conftest*
1088rm -f conftest*
1089fi
1090
1091echo "$ac_t""$ac_cv_cygwin" 1>&6
1092CYGWIN=
1093test "$ac_cv_cygwin" = yes && CYGWIN=yes
1094echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001095echo "configure:1096: checking for mingw32 environment" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001096if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1097 echo $ac_n "(cached) $ac_c" 1>&6
1098else
1099 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00001100#line 1101 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001101#include "confdefs.h"
1102
1103int main() {
1104return __MINGW32__;
1105; return 0; }
1106EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00001107if { (eval echo configure:1108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001108 rm -rf conftest*
1109 ac_cv_mingw32=yes
1110else
1111 echo "configure: failed program was:" >&5
1112 cat conftest.$ac_ext >&5
1113 rm -rf conftest*
1114 ac_cv_mingw32=no
1115fi
1116rm -f conftest*
1117rm -f conftest*
1118fi
1119
1120echo "$ac_t""$ac_cv_mingw32" 1>&6
1121MINGW32=
1122test "$ac_cv_mingw32" = yes && MINGW32=yes
1123
1124
1125echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001126echo "configure:1127: checking for executable suffix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001127if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1128 echo $ac_n "(cached) $ac_c" 1>&6
1129else
1130 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1131 ac_cv_exeext=.exe
1132else
1133 rm -f conftest*
1134 echo 'int main () { return 0; }' > conftest.$ac_ext
1135 ac_cv_exeext=
Bram Moolenaar843ee412004-06-30 16:16:41 +00001136 if { (eval echo configure:1137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001137 for file in conftest.*; do
1138 case $file in
1139 *.c | *.o | *.obj) ;;
1140 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1141 esac
1142 done
1143 else
1144 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1145 fi
1146 rm -f conftest*
1147 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1148fi
1149fi
1150
1151EXEEXT=""
1152test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1153echo "$ac_t""${ac_cv_exeext}" 1>&6
1154ac_exeext=$EXEEXT
1155
1156
1157if test -z "$CFLAGS"; then
1158 CFLAGS="-O"
1159 test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
1160fi
1161if test "$GCC" = yes; then
1162 gccversion=`"$CC" --version | sed -e '2,$d;s/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'`
1163 if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2"; then
1164 echo 'GCC 3.0.x has a bug in the optimizer, disabling "-O#"'
1165 CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
1166 else
1167 if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
1168 echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
1169 CFLAGS="$CFLAGS -fno-strength-reduce"
1170 fi
1171 fi
1172fi
1173
1174if test "$cross_compiling" = yes; then
1175 { echo "configure: error: cannot compile a simple program, check CC and CFLAGS
1176 (cross compiling doesn't work)" 1>&2; exit 1; }
1177fi
1178
1179test "$GCC" = yes && CPP_MM=M;
1180
1181if test -f ./toolcheck; then
1182 echo "checking for buggy tools" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001183echo "configure:1184: checking for buggy tools" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001184 sh ./toolcheck 1>&6
1185fi
1186
1187OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
1188
1189echo $ac_n "checking for BeOS""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001190echo "configure:1191: checking for BeOS" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001191case `uname` in
1192 BeOS) OS_EXTRA_SRC=os_beos.c; OS_EXTRA_OBJ=objects/os_beos.o
1193 BEOS=yes; echo "$ac_t""yes" 1>&6;;
1194 *) BEOS=no; echo "$ac_t""no" 1>&6;;
1195esac
1196
1197echo $ac_n "checking for QNX""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001198echo "configure:1199: checking for QNX" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001199case `uname` in
1200 QNX) OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
1201 test -z "$with_x" && with_x=no
1202 QNX=yes; echo "$ac_t""yes" 1>&6;;
1203 *) QNX=no; echo "$ac_t""no" 1>&6;;
1204esac
1205
1206DEFAULT_VIMNAME=vim
1207echo $ac_n "checking for Darwin (Mac OS X)""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001208echo "configure:1209: checking for Darwin (Mac OS X)" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001209if test "`(uname) 2>/dev/null`" = Darwin; then
1210 echo "$ac_t""yes" 1>&6
1211
1212 echo $ac_n "checking --disable-darwin argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001213echo "configure:1214: checking --disable-darwin argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001214 # Check whether --enable-darwin or --disable-darwin was given.
1215if test "${enable_darwin+set}" = set; then
1216 enableval="$enable_darwin"
1217 :
1218else
1219 enable_darwin="yes"
1220fi
1221
1222 if test "$enable_darwin" = "yes"; then
1223 echo "$ac_t""no" 1>&6
1224 echo $ac_n "checking if Darwin files are there""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001225echo "configure:1226: checking if Darwin files are there" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001226 if test -f os_macosx.c; then
1227 echo "$ac_t""yes" 1>&6
1228 else
1229 echo "$ac_t""no, Darwin support disabled" 1>&6
1230 enable_darwin=no
1231 fi
1232 else
1233 echo "$ac_t""yes, Darwin support excluded" 1>&6
1234 fi
1235
1236 if test "$enable_darwin" = "yes"; then
1237 MACOSX=yes
1238 OS_EXTRA_SCR="os_macosx.c";
1239 OS_EXTRA_OBJ="objects/os_macosx.o"
1240 CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -I/Developer/Headers/FlatCarbon -no-cpp-precomp"
1241
1242 ac_safe=`echo "Carbon/Carbon.h" | sed 'y%./+-%__p_%'`
1243echo $ac_n "checking for Carbon/Carbon.h""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001244echo "configure:1245: checking for Carbon/Carbon.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001245if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1246 echo $ac_n "(cached) $ac_c" 1>&6
1247else
1248 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00001249#line 1250 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001250#include "confdefs.h"
1251#include <Carbon/Carbon.h>
1252EOF
1253ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +00001254{ (eval echo configure:1255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00001255ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1256if test -z "$ac_err"; then
1257 rm -rf conftest*
1258 eval "ac_cv_header_$ac_safe=yes"
1259else
1260 echo "$ac_err" >&5
1261 echo "configure: failed program was:" >&5
1262 cat conftest.$ac_ext >&5
1263 rm -rf conftest*
1264 eval "ac_cv_header_$ac_safe=no"
1265fi
1266rm -f conftest*
1267fi
1268if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1269 echo "$ac_t""yes" 1>&6
1270 CARBON=yes
1271else
1272 echo "$ac_t""no" 1>&6
1273fi
1274
1275 if test "x$CARBON" = "xyes"; then
1276 if test -z "$with_x"; then
1277 with_x=no
1278 DEFAULT_VIMNAME=Vim
1279 fi
1280 fi
1281 fi
1282else
1283 echo "$ac_t""no" 1>&6
1284fi
1285
1286
1287
1288
1289have_local_include=''
1290have_local_lib=''
1291if test "$GCC" = yes; then
1292 echo 'void f(){}' > conftest.c
1293 have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 2>&1 | grep '/usr/local/include'`
1294 have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep '/usr/local/lib'`
1295 rm -f conftest.c conftest.o
1296fi
1297if test -z "$have_local_lib" -a -d /usr/local/lib; then
1298 tt=`echo "$LDFLAGS" | sed -e 's+-L/usr/local/lib ++g' -e 's+-L/usr/local/lib$++g'`
1299 if test "$tt" = "$LDFLAGS"; then
1300 LDFLAGS="$LDFLAGS -L/usr/local/lib"
1301 fi
1302fi
1303if test -z "$have_local_include" -a -d /usr/local/include; then
1304 tt=`echo "$CPPFLAGS" | sed -e 's+-I/usr/local/include ++g' -e 's+-I/usr/local/include$++g'`
1305 if test "$tt" = "$CPPFLAGS"; then
1306 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
1307 fi
1308fi
1309
1310echo $ac_n "checking --with-vim-name argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001311echo "configure:1312: checking --with-vim-name argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001312# Check whether --with-vim-name or --without-vim-name was given.
1313if test "${with_vim_name+set}" = set; then
1314 withval="$with_vim_name"
1315 VIMNAME="$withval"; echo "$ac_t""$VIMNAME" 1>&6
1316else
1317 VIMNAME="$DEFAULT_VIMNAME"; echo "$ac_t""Defaulting to $VIMNAME" 1>&6
1318fi
1319
1320
1321echo $ac_n "checking --with-ex-name argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001322echo "configure:1323: checking --with-ex-name argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001323# Check whether --with-ex-name or --without-ex-name was given.
1324if test "${with_ex_name+set}" = set; then
1325 withval="$with_ex_name"
1326 EXNAME="$withval"; echo "$ac_t""$EXNAME" 1>&6
1327else
1328 EXNAME="ex"; echo "$ac_t""Defaulting to ex" 1>&6
1329fi
1330
1331
1332echo $ac_n "checking --with-view-name argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001333echo "configure:1334: checking --with-view-name argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001334# Check whether --with-view-name or --without-view-name was given.
1335if test "${with_view_name+set}" = set; then
1336 withval="$with_view_name"
1337 VIEWNAME="$withval"; echo "$ac_t""$VIEWNAME" 1>&6
1338else
1339 VIEWNAME="view"; echo "$ac_t""Defaulting to view" 1>&6
1340fi
1341
1342
1343
1344echo $ac_n "checking --with-global-runtime argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001345echo "configure:1346: checking --with-global-runtime argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001346# Check whether --with-global-runtime or --without-global-runtime was given.
1347if test "${with_global_runtime+set}" = set; then
1348 withval="$with_global_runtime"
1349 echo "$ac_t""$withval" 1>&6; cat >> confdefs.h <<EOF
1350#define RUNTIME_GLOBAL "$withval"
1351EOF
1352
1353else
1354 echo "$ac_t""no" 1>&6
1355fi
1356
1357
1358echo $ac_n "checking --with-modified-by argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001359echo "configure:1360: checking --with-modified-by argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001360# Check whether --with-modified-by or --without-modified-by was given.
1361if test "${with_modified_by+set}" = set; then
1362 withval="$with_modified_by"
1363 echo "$ac_t""$withval" 1>&6; cat >> confdefs.h <<EOF
1364#define MODIFIED_BY "$withval"
1365EOF
1366
1367else
1368 echo "$ac_t""no" 1>&6
1369fi
1370
1371
1372echo $ac_n "checking if character set is EBCDIC""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001373echo "configure:1374: checking if character set is EBCDIC" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001374cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00001375#line 1376 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001376#include "confdefs.h"
1377
1378int main() {
1379 /* TryCompile function for CharSet.
1380 Treat any failure as ASCII for compatibility with existing art.
1381 Use compile-time rather than run-time tests for cross-compiler
1382 tolerance. */
1383#if '0'!=240
1384make an error "Character set is not EBCDIC"
1385#endif
1386; return 0; }
1387EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00001388if { (eval echo configure:1389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001389 rm -rf conftest*
1390 # TryCompile action if true
1391cf_cv_ebcdic=yes
1392else
1393 echo "configure: failed program was:" >&5
1394 cat conftest.$ac_ext >&5
1395 rm -rf conftest*
1396 # TryCompile action if false
1397cf_cv_ebcdic=no
1398fi
1399rm -f conftest*
1400# end of TryCompile ])
1401# end of CacheVal CvEbcdic
1402echo "$ac_t""$cf_cv_ebcdic" 1>&6
1403case "$cf_cv_ebcdic" in #(vi
1404 yes) cat >> confdefs.h <<\EOF
1405#define EBCDIC 1
1406EOF
1407
1408 line_break='"\\n"'
1409 ;;
1410 *) line_break='"\\012"';;
1411esac
1412
1413
1414if test "$cf_cv_ebcdic" = "yes"; then
1415echo $ac_n "checking for OS/390 Unix""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001416echo "configure:1417: checking for OS/390 Unix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001417case `uname` in
1418 OS/390) OS390Unix="yes";
1419 if test "$CC" = "cc"; then
1420 ccm="$_CC_CCMODE"
1421 ccn="CC"
1422 else
1423 if test "$CC" = "c89"; then
1424 ccm="$_CC_C89MODE"
1425 ccn="C89"
1426 else
1427 ccm=1
1428 fi
1429 fi
1430 if test "$ccm" != "1"; then
1431 echo ""
1432 echo "------------------------------------------"
1433 echo " On OS/390 Unix, the environment variable"
1434 echo " __CC_${ccn}MODE must be set to \"1\"!"
1435 echo " Do:"
1436 echo " export _CC_${ccn}MODE=1"
1437 echo " and then call configure again."
1438 echo "------------------------------------------"
1439 exit 1
1440 fi
1441 CFLAGS="$CFLAGS -D_ALL_SOURCE"; LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
1442 echo "$ac_t""yes" 1>&6
1443 ;;
1444 *) OS390Unix="no";
1445 echo "$ac_t""no" 1>&6
1446 ;;
1447esac
1448fi
1449
1450
1451
1452echo $ac_n "checking --with-features argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001453echo "configure:1454: checking --with-features argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001454# Check whether --with-features or --without-features was given.
1455if test "${with_features+set}" = set; then
1456 withval="$with_features"
1457 features="$withval"; echo "$ac_t""$features" 1>&6
1458else
1459 features="normal"; echo "$ac_t""Defaulting to normal" 1>&6
1460fi
1461
1462
1463dovimdiff=""
1464dogvimdiff=""
1465case "$features" in
1466 tiny) cat >> confdefs.h <<\EOF
1467#define FEAT_TINY 1
1468EOF
1469 ;;
1470 small) cat >> confdefs.h <<\EOF
1471#define FEAT_SMALL 1
1472EOF
1473 ;;
1474 normal) cat >> confdefs.h <<\EOF
1475#define FEAT_NORMAL 1
1476EOF
1477 dovimdiff="installvimdiff";
1478 dogvimdiff="installgvimdiff" ;;
1479 big) cat >> confdefs.h <<\EOF
1480#define FEAT_BIG 1
1481EOF
1482 dovimdiff="installvimdiff";
1483 dogvimdiff="installgvimdiff" ;;
1484 huge) cat >> confdefs.h <<\EOF
1485#define FEAT_HUGE 1
1486EOF
1487 dovimdiff="installvimdiff";
1488 dogvimdiff="installgvimdiff" ;;
1489 *) echo "$ac_t""Sorry, $features is not supported" 1>&6 ;;
1490esac
1491
1492
1493
1494
1495echo $ac_n "checking --with-compiledby argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001496echo "configure:1497: checking --with-compiledby argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001497# Check whether --with-compiledby or --without-compiledby was given.
1498if test "${with_compiledby+set}" = set; then
1499 withval="$with_compiledby"
1500 compiledby="$withval"; echo "$ac_t""$withval" 1>&6
1501else
1502 compiledby=""; echo "$ac_t""no" 1>&6
1503fi
1504
1505
1506
1507echo $ac_n "checking --disable-xsmp argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001508echo "configure:1509: checking --disable-xsmp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001509# Check whether --enable-xsmp or --disable-xsmp was given.
1510if test "${enable_xsmp+set}" = set; then
1511 enableval="$enable_xsmp"
1512 :
1513else
1514 enable_xsmp="yes"
1515fi
1516
1517
1518if test "$enable_xsmp" = "yes"; then
1519 echo "$ac_t""no" 1>&6
1520 echo $ac_n "checking --disable-xsmp-interact argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001521echo "configure:1522: checking --disable-xsmp-interact argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001522 # Check whether --enable-xsmp-interact or --disable-xsmp-interact was given.
1523if test "${enable_xsmp_interact+set}" = set; then
1524 enableval="$enable_xsmp_interact"
1525 :
1526else
1527 enable_xsmp_interact="yes"
1528fi
1529
1530 if test "$enable_xsmp_interact" = "yes"; then
1531 echo "$ac_t""no" 1>&6
1532 cat >> confdefs.h <<\EOF
1533#define USE_XSMP_INTERACT 1
1534EOF
1535
1536 else
1537 echo "$ac_t""yes" 1>&6
1538 fi
1539else
1540 echo "$ac_t""yes" 1>&6
1541fi
1542
1543echo $ac_n "checking --enable-perlinterp argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001544echo "configure:1545: checking --enable-perlinterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001545# Check whether --enable-perlinterp or --disable-perlinterp was given.
1546if test "${enable_perlinterp+set}" = set; then
1547 enableval="$enable_perlinterp"
1548 :
1549else
1550 enable_perlinterp="no"
1551fi
1552
1553echo "$ac_t""$enable_perlinterp" 1>&6
1554if test "$enable_perlinterp" = "yes"; then
1555
1556 # Extract the first word of "perl", so it can be a program name with args.
1557set dummy perl; ac_word=$2
1558echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001559echo "configure:1560: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001560if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_perl'+set}'`\" = set"; then
1561 echo $ac_n "(cached) $ac_c" 1>&6
1562else
1563 case "$vi_cv_path_perl" in
1564 /*)
1565 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
1566 ;;
1567 ?:/*)
1568 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a dos path.
1569 ;;
1570 *)
1571 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1572 ac_dummy="$PATH"
1573 for ac_dir in $ac_dummy; do
1574 test -z "$ac_dir" && ac_dir=.
1575 if test -f $ac_dir/$ac_word; then
1576 ac_cv_path_vi_cv_path_perl="$ac_dir/$ac_word"
1577 break
1578 fi
1579 done
1580 IFS="$ac_save_ifs"
1581 ;;
1582esac
1583fi
1584vi_cv_path_perl="$ac_cv_path_vi_cv_path_perl"
1585if test -n "$vi_cv_path_perl"; then
1586 echo "$ac_t""$vi_cv_path_perl" 1>&6
1587else
1588 echo "$ac_t""no" 1>&6
1589fi
1590
1591 if test "X$vi_cv_path_perl" != "X"; then
1592 echo $ac_n "checking Perl version""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001593echo "configure:1594: checking Perl version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001594 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
1595 eval `$vi_cv_path_perl -V:usethreads`
1596 if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
1597 badthreads=no
1598 else
1599 if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
1600 eval `$vi_cv_path_perl -V:use5005threads`
1601 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
1602 badthreads=no
1603 else
1604 badthreads=yes
1605 echo "$ac_t"">>> Perl > 5.6 with 5.5 threads cannot be used <<<" 1>&6
1606 fi
1607 else
1608 badthreads=yes
1609 echo "$ac_t"">>> Perl 5.5 with threads cannot be used <<<" 1>&6
1610 fi
1611 fi
1612 if test $badthreads = no; then
1613 echo "$ac_t""OK" 1>&6
1614 eval `$vi_cv_path_perl -V:shrpenv`
1615 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
1616 shrpenv=""
1617 fi
1618 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
1619
1620 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
1621 -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//'`
1622 perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
1623 sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
1624 -e 's/-bE:perl.exp//' -e 's/-lc //'`
1625 perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
1626 -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
1627
1628 echo $ac_n "checking if compile and link flags for Perl are sane""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001629echo "configure:1630: checking if compile and link flags for Perl are sane" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001630 cflags_save=$CFLAGS
1631 libs_save=$LIBS
1632 ldflags_save=$LDFLAGS
1633 CFLAGS="$CFLAGS $perlcppflags"
1634 LIBS="$LIBS $perllibs"
1635 LDFLAGS="$perlldflags $LDFLAGS"
1636 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00001637#line 1638 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001638#include "confdefs.h"
1639
1640int main() {
1641
1642; return 0; }
1643EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00001644if { (eval echo configure:1645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001645 rm -rf conftest*
1646 echo "$ac_t""yes" 1>&6; perl_ok=yes
1647else
1648 echo "configure: failed program was:" >&5
1649 cat conftest.$ac_ext >&5
1650 rm -rf conftest*
1651 echo "$ac_t""no: PERL DISABLED" 1>&6; perl_ok=no
1652fi
1653rm -f conftest*
1654 CFLAGS=$cflags_save
1655 LIBS=$libs_save
1656 LDFLAGS=$ldflags_save
1657 if test $perl_ok = yes; then
1658 if test "X$perlcppflags" != "X"; then
1659 PERL_CFLAGS="$perlcppflags"
1660 fi
1661 if test "X$perlldflags" != "X"; then
1662 LDFLAGS="$perlldflags $LDFLAGS"
1663 fi
1664 PERL_LIBS=$perllibs
1665 PERL_SRC="auto/if_perl.c if_perlsfio.c"
1666 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
1667 PERL_PRO="if_perl.pro if_perlsfio.pro"
1668 cat >> confdefs.h <<\EOF
1669#define FEAT_PERL 1
1670EOF
1671
1672 fi
1673 fi
1674 else
1675 echo "$ac_t"">>> too old; need Perl version 5.003_01 or later <<<" 1>&6
1676 fi
1677 fi
1678
1679 if test "x$MACOSX" = "xyes"; then
1680 dir=/System/Library/Perl
1681 darwindir=$dir/darwin
1682 if test -d $darwindir; then
1683 PERL=/usr/bin/perl
1684 else
1685 dir=/System/Library/Perl/5.8.1
1686 darwindir=$dir/darwin-thread-multi-2level
1687 if test -d $darwindir; then
1688 PERL=/usr/bin/perl
1689 fi
1690 fi
1691 if test -n "$PERL"; then
1692 PERL_DIR="$dir"
1693 PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
1694 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
1695 PERL_LIBS="-L$darwindir/CORE -lperl"
1696 fi
1697 fi
1698fi
1699
1700
1701
1702
1703
1704
1705
1706echo $ac_n "checking --enable-pythoninterp argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001707echo "configure:1708: checking --enable-pythoninterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001708# Check whether --enable-pythoninterp or --disable-pythoninterp was given.
1709if test "${enable_pythoninterp+set}" = set; then
1710 enableval="$enable_pythoninterp"
1711 :
1712else
1713 enable_pythoninterp="no"
1714fi
1715
1716echo "$ac_t""$enable_pythoninterp" 1>&6
1717if test "$enable_pythoninterp" = "yes"; then
1718 # Extract the first word of "python", so it can be a program name with args.
1719set dummy python; ac_word=$2
1720echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001721echo "configure:1722: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001722if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_python'+set}'`\" = set"; then
1723 echo $ac_n "(cached) $ac_c" 1>&6
1724else
1725 case "$vi_cv_path_python" in
1726 /*)
1727 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
1728 ;;
1729 ?:/*)
1730 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a dos path.
1731 ;;
1732 *)
1733 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1734 ac_dummy="$PATH"
1735 for ac_dir in $ac_dummy; do
1736 test -z "$ac_dir" && ac_dir=.
1737 if test -f $ac_dir/$ac_word; then
1738 ac_cv_path_vi_cv_path_python="$ac_dir/$ac_word"
1739 break
1740 fi
1741 done
1742 IFS="$ac_save_ifs"
1743 ;;
1744esac
1745fi
1746vi_cv_path_python="$ac_cv_path_vi_cv_path_python"
1747if test -n "$vi_cv_path_python"; then
1748 echo "$ac_t""$vi_cv_path_python" 1>&6
1749else
1750 echo "$ac_t""no" 1>&6
1751fi
1752
1753 if test "X$vi_cv_path_python" != "X"; then
1754
1755 echo $ac_n "checking Python version""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001756echo "configure:1757: checking Python version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001757if eval "test \"`echo '$''{'vi_cv_var_python_version'+set}'`\" = set"; then
1758 echo $ac_n "(cached) $ac_c" 1>&6
1759else
1760 vi_cv_var_python_version=`
1761 ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
1762
1763fi
1764
1765echo "$ac_t""$vi_cv_var_python_version" 1>&6
1766
1767 echo $ac_n "checking Python is 1.4 or better""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001768echo "configure:1769: checking Python is 1.4 or better" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001769 if ${vi_cv_path_python} -c \
1770 "import sys; sys.exit(${vi_cv_var_python_version} < 1.4)"
1771 then
1772 echo "$ac_t""yep" 1>&6
1773
1774 echo $ac_n "checking Python's install prefix""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001775echo "configure:1776: checking Python's install prefix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001776if eval "test \"`echo '$''{'vi_cv_path_python_pfx'+set}'`\" = set"; then
1777 echo $ac_n "(cached) $ac_c" 1>&6
1778else
1779 vi_cv_path_python_pfx=`
1780 ${vi_cv_path_python} -c \
1781 "import sys; print sys.prefix"`
1782fi
1783
1784echo "$ac_t""$vi_cv_path_python_pfx" 1>&6
1785
1786 echo $ac_n "checking Python's execution prefix""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001787echo "configure:1788: checking Python's execution prefix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001788if eval "test \"`echo '$''{'vi_cv_path_python_epfx'+set}'`\" = set"; then
1789 echo $ac_n "(cached) $ac_c" 1>&6
1790else
1791 vi_cv_path_python_epfx=`
1792 ${vi_cv_path_python} -c \
1793 "import sys; print sys.exec_prefix"`
1794fi
1795
1796echo "$ac_t""$vi_cv_path_python_epfx" 1>&6
1797
1798
1799 if eval "test \"`echo '$''{'vi_cv_path_pythonpath'+set}'`\" = set"; then
1800 echo $ac_n "(cached) $ac_c" 1>&6
1801else
1802 vi_cv_path_pythonpath=`
1803 unset PYTHONPATH;
1804 ${vi_cv_path_python} -c \
1805 "import sys, string; print string.join(sys.path,':')"`
1806fi
1807
1808
1809
1810 # Check whether --with-python-config-dir or --without-python-config-dir was given.
1811if test "${with_python_config_dir+set}" = set; then
1812 withval="$with_python_config_dir"
1813 vi_cv_path_python_conf="${withval}"
1814fi
1815
1816
1817 echo $ac_n "checking Python's configuration directory""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001818echo "configure:1819: checking Python's configuration directory" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001819if eval "test \"`echo '$''{'vi_cv_path_python_conf'+set}'`\" = set"; then
1820 echo $ac_n "(cached) $ac_c" 1>&6
1821else
1822
1823 vi_cv_path_python_conf=
1824 for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
1825 for subdir in lib share; do
1826 d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
1827 if test -d "$d" && test -f "$d/config.c"; then
1828 vi_cv_path_python_conf="$d"
1829 fi
1830 done
1831 done
1832
1833fi
1834
1835echo "$ac_t""$vi_cv_path_python_conf" 1>&6
1836
1837 PYTHON_CONFDIR="${vi_cv_path_python_conf}"
1838
1839 if test "X$PYTHON_CONFDIR" = "X"; then
1840 echo "$ac_t""can't find it!" 1>&6
1841 else
1842
1843 if eval "test \"`echo '$''{'vi_cv_path_python_plibs'+set}'`\" = set"; then
1844 echo $ac_n "(cached) $ac_c" 1>&6
1845else
1846
1847 tmp_mkf="/tmp/Makefile-conf$$"
1848 cat ${PYTHON_CONFDIR}/Makefile - <<'eof' >${tmp_mkf}
1849__:
1850 @echo "python_MODLIBS='$(MODLIBS)'"
1851 @echo "python_LIBS='$(LIBS)'"
1852 @echo "python_SYSLIBS='$(SYSLIBS)'"
1853 @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
1854eof
1855 eval "`cd ${PYTHON_CONFDIR} && make -f ${tmp_mkf} __ | sed '/ directory /d'`"
1856 rm -f ${tmp_mkf}
1857 if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
1858 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
1859 vi_cv_path_python_plibs="-framework Python"
1860 else
1861 if test "${vi_cv_var_python_version}" = "1.4"; then
1862 vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
1863 else
1864 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
1865 fi
1866 vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_MODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
1867 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
1868 fi
1869
1870fi
1871
1872
1873 PYTHON_LIBS="${vi_cv_path_python_plibs}"
1874 if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
1875 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
1876 else
1877 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version} -I${vi_cv_path_python_epfx}/include/python${vi_cv_var_python_version}"
1878 fi
1879 PYTHON_SRC="if_python.c"
1880 if test "x$MACOSX" = "xyes"; then
1881 PYTHON_OBJ="objects/if_python.o"
1882 else
1883 PYTHON_OBJ="objects/if_python.o objects/py_config.o"
1884 fi
1885 if test "${vi_cv_var_python_version}" = "1.4"; then
1886 PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o"
1887 fi
1888 PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'"
1889
1890 echo $ac_n "checking if -pthread should be used""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001891echo "configure:1892: checking if -pthread should be used" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001892 threadsafe_flag=
1893 thread_lib=
1894 if test "x$MACOSX" != "xyes"; then
1895 test "$GCC" = yes && threadsafe_flag="-pthread"
1896 if test "`(uname) 2>/dev/null`" = FreeBSD; then
1897 threadsafe_flag="-D_THREAD_SAFE"
1898 thread_lib="-pthread"
1899 fi
1900 fi
1901 libs_save_old=$LIBS
1902 if test -n "$threadsafe_flag"; then
1903 cflags_save=$CFLAGS
1904 CFLAGS="$CFLAGS $threadsafe_flag"
1905 LIBS="$LIBS $thread_lib"
1906 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00001907#line 1908 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001908#include "confdefs.h"
1909
1910int main() {
1911
1912; return 0; }
1913EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00001914if { (eval echo configure:1915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001915 rm -rf conftest*
1916 echo "$ac_t""yes" 1>&6; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
1917else
1918 echo "configure: failed program was:" >&5
1919 cat conftest.$ac_ext >&5
1920 rm -rf conftest*
1921 echo "$ac_t""no" 1>&6; LIBS=$libs_save_old
1922
1923fi
1924rm -f conftest*
1925 CFLAGS=$cflags_save
1926 else
1927 echo "$ac_t""no" 1>&6
1928 fi
1929
1930 echo $ac_n "checking if compile and link flags for Python are sane""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001931echo "configure:1932: checking if compile and link flags for Python are sane" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001932 cflags_save=$CFLAGS
1933 libs_save=$LIBS
1934 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
1935 LIBS="$LIBS $PYTHON_LIBS"
1936 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00001937#line 1938 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001938#include "confdefs.h"
1939
1940int main() {
1941
1942; return 0; }
1943EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00001944if { (eval echo configure:1945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001945 rm -rf conftest*
1946 echo "$ac_t""yes" 1>&6; python_ok=yes
1947else
1948 echo "configure: failed program was:" >&5
1949 cat conftest.$ac_ext >&5
1950 rm -rf conftest*
1951 echo "$ac_t""no: PYTHON DISABLED" 1>&6; python_ok=no
1952fi
1953rm -f conftest*
1954 CFLAGS=$cflags_save
1955 LIBS=$libs_save
1956 if test $python_ok = yes; then
1957 cat >> confdefs.h <<\EOF
1958#define FEAT_PYTHON 1
1959EOF
1960
1961 else
1962 LIBS=$libs_save_old
1963 PYTHON_SRC=
1964 PYTHON_OBJ=
1965 PYTHON_LIBS=
1966 PYTHON_CFLAGS=
1967 fi
1968
1969 fi
1970 else
1971 echo "$ac_t""too old" 1>&6
1972 fi
1973 fi
1974fi
1975
1976
1977
1978
1979
1980
1981
1982echo $ac_n "checking --enable-tclinterp argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001983echo "configure:1984: checking --enable-tclinterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001984# Check whether --enable-tclinterp or --disable-tclinterp was given.
1985if test "${enable_tclinterp+set}" = set; then
1986 enableval="$enable_tclinterp"
1987 :
1988else
1989 enable_tclinterp="no"
1990fi
1991
1992echo "$ac_t""$enable_tclinterp" 1>&6
1993
1994if test "$enable_tclinterp" = "yes"; then
1995
1996 echo $ac_n "checking --with-tclsh argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00001997echo "configure:1998: checking --with-tclsh argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001998 # Check whether --with-tclsh or --without-tclsh was given.
1999if test "${with_tclsh+set}" = set; then
2000 withval="$with_tclsh"
2001 tclsh_name="$withval"; echo "$ac_t""$tclsh_name" 1>&6
2002else
2003 tclsh_name="tclsh8.0"; echo "$ac_t""no" 1>&6
2004fi
2005
2006 # Extract the first word of "$tclsh_name", so it can be a program name with args.
2007set dummy $tclsh_name; ac_word=$2
2008echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002009echo "configure:2010: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002010if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
2011 echo $ac_n "(cached) $ac_c" 1>&6
2012else
2013 case "$vi_cv_path_tcl" in
2014 /*)
2015 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
2016 ;;
2017 ?:/*)
2018 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
2019 ;;
2020 *)
2021 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2022 ac_dummy="$PATH"
2023 for ac_dir in $ac_dummy; do
2024 test -z "$ac_dir" && ac_dir=.
2025 if test -f $ac_dir/$ac_word; then
2026 ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
2027 break
2028 fi
2029 done
2030 IFS="$ac_save_ifs"
2031 ;;
2032esac
2033fi
2034vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
2035if test -n "$vi_cv_path_tcl"; then
2036 echo "$ac_t""$vi_cv_path_tcl" 1>&6
2037else
2038 echo "$ac_t""no" 1>&6
2039fi
2040
2041
2042
2043 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.0"; then
2044 tclsh_name="tclsh8.2"
2045 # Extract the first word of "$tclsh_name", so it can be a program name with args.
2046set dummy $tclsh_name; ac_word=$2
2047echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002048echo "configure:2049: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002049if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
2050 echo $ac_n "(cached) $ac_c" 1>&6
2051else
2052 case "$vi_cv_path_tcl" in
2053 /*)
2054 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
2055 ;;
2056 ?:/*)
2057 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
2058 ;;
2059 *)
2060 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2061 ac_dummy="$PATH"
2062 for ac_dir in $ac_dummy; do
2063 test -z "$ac_dir" && ac_dir=.
2064 if test -f $ac_dir/$ac_word; then
2065 ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
2066 break
2067 fi
2068 done
2069 IFS="$ac_save_ifs"
2070 ;;
2071esac
2072fi
2073vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
2074if test -n "$vi_cv_path_tcl"; then
2075 echo "$ac_t""$vi_cv_path_tcl" 1>&6
2076else
2077 echo "$ac_t""no" 1>&6
2078fi
2079
2080 fi
2081 if test "X$vi_cv_path_tcl" = "X"; then
2082 tclsh_name="tclsh"
2083 # Extract the first word of "$tclsh_name", so it can be a program name with args.
2084set dummy $tclsh_name; ac_word=$2
2085echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002086echo "configure:2087: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002087if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
2088 echo $ac_n "(cached) $ac_c" 1>&6
2089else
2090 case "$vi_cv_path_tcl" in
2091 /*)
2092 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
2093 ;;
2094 ?:/*)
2095 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
2096 ;;
2097 *)
2098 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2099 ac_dummy="$PATH"
2100 for ac_dir in $ac_dummy; do
2101 test -z "$ac_dir" && ac_dir=.
2102 if test -f $ac_dir/$ac_word; then
2103 ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
2104 break
2105 fi
2106 done
2107 IFS="$ac_save_ifs"
2108 ;;
2109esac
2110fi
2111vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
2112if test -n "$vi_cv_path_tcl"; then
2113 echo "$ac_t""$vi_cv_path_tcl" 1>&6
2114else
2115 echo "$ac_t""no" 1>&6
2116fi
2117
2118 fi
2119 if test "X$vi_cv_path_tcl" != "X"; then
2120 echo $ac_n "checking Tcl version""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002121echo "configure:2122: checking Tcl version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002122 if echo 'exit [expr [info tclversion] < 8.0]' | $vi_cv_path_tcl - ; then
2123 tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
2124 echo "$ac_t""$tclver - OK" 1>&6;
2125 tclloc=`echo 'set l [info library];set i [string last lib $l];incr i -2;puts [string range $l 0 $i]' | $vi_cv_path_tcl -`
2126
2127 echo $ac_n "checking for location of Tcl include""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002128echo "configure:2129: checking for location of Tcl include" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002129 if test "x$MACOSX" != "xyes"; then
2130 tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include"
2131 else
2132 tclinc="/System/Library/Frameworks/Tcl.framework/Headers"
2133 fi
2134 for try in $tclinc; do
2135 if test -f "$try/tcl.h"; then
2136 echo "$ac_t""$try/tcl.h" 1>&6
2137 TCL_INC=$try
2138 break
2139 fi
2140 done
2141 if test -z "$TCL_INC"; then
2142 echo "$ac_t""<not found>" 1>&6
2143 SKIP_TCL=YES
2144 fi
2145 if test -z "$SKIP_TCL"; then
2146 echo $ac_n "checking for location of tclConfig.sh script""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002147echo "configure:2148: checking for location of tclConfig.sh script" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002148 if test "x$MACOSX" != "xyes"; then
2149 tclcnf=`echo $tclinc | sed s/include/lib/g`
2150 else
2151 tclcnf="/System/Library/Frameworks/Tcl.framework"
2152 fi
2153 for try in $tclcnf; do
2154 if test -f $try/tclConfig.sh; then
2155 echo "$ac_t""$try/tclConfig.sh" 1>&6
2156 . $try/tclConfig.sh
2157 TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
2158 TCL_DEFS=`echo $TCL_DEFS | tr ' ' '\012' | sed -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr -d '\012'`
2159 break
2160 fi
2161 done
2162 if test -z "$TCL_LIBS"; then
2163 echo "$ac_t""<not found>" 1>&6
2164 echo $ac_n "checking for Tcl library by myself""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002165echo "configure:2166: checking for Tcl library by myself" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002166 tcllib=`echo $tclinc | sed s/include/lib/g`
2167 for ext in .so .a ; do
2168 for ver in "" $tclver ; do
2169 for try in $tcllib ; do
2170 trylib=tcl$ver$ext
2171 if test -f $try/lib$trylib ; then
2172 echo "$ac_t""$try/lib$trylib" 1>&6
2173 TCL_LIBS="-L$try -ltcl$ver -ldl -lm"
2174 if test "`(uname) 2>/dev/null`" = SunOS &&
2175 uname -r | grep '^5' >/dev/null; then
2176 TCL_LIBS="$TCL_LIBS -R $try"
2177 fi
2178 break 3
2179 fi
2180 done
2181 done
2182 done
2183 if test -z "$TCL_LIBS"; then
2184 echo "$ac_t""<not found>" 1>&6
2185 SKIP_TCL=YES
2186 fi
2187 fi
2188 if test -z "$SKIP_TCL"; then
2189 cat >> confdefs.h <<\EOF
2190#define FEAT_TCL 1
2191EOF
2192
2193 TCL_SRC=if_tcl.c
2194 TCL_OBJ=objects/if_tcl.o
2195 TCL_PRO=if_tcl.pro
2196 TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
2197 fi
2198 fi
2199 else
2200 echo "$ac_t""too old; need Tcl version 8.0 or later" 1>&6
2201 fi
2202 fi
2203fi
2204
2205
2206
2207
2208
2209
2210echo $ac_n "checking --enable-rubyinterp argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002211echo "configure:2212: checking --enable-rubyinterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002212# Check whether --enable-rubyinterp or --disable-rubyinterp was given.
2213if test "${enable_rubyinterp+set}" = set; then
2214 enableval="$enable_rubyinterp"
2215 :
2216else
2217 enable_rubyinterp="no"
2218fi
2219
2220echo "$ac_t""$enable_rubyinterp" 1>&6
2221if test "$enable_rubyinterp" = "yes"; then
2222
2223 # Extract the first word of "ruby", so it can be a program name with args.
2224set dummy ruby; ac_word=$2
2225echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002226echo "configure:2227: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002227if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_ruby'+set}'`\" = set"; then
2228 echo $ac_n "(cached) $ac_c" 1>&6
2229else
2230 case "$vi_cv_path_ruby" in
2231 /*)
2232 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
2233 ;;
2234 ?:/*)
2235 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a dos path.
2236 ;;
2237 *)
2238 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2239 ac_dummy="$PATH"
2240 for ac_dir in $ac_dummy; do
2241 test -z "$ac_dir" && ac_dir=.
2242 if test -f $ac_dir/$ac_word; then
2243 ac_cv_path_vi_cv_path_ruby="$ac_dir/$ac_word"
2244 break
2245 fi
2246 done
2247 IFS="$ac_save_ifs"
2248 ;;
2249esac
2250fi
2251vi_cv_path_ruby="$ac_cv_path_vi_cv_path_ruby"
2252if test -n "$vi_cv_path_ruby"; then
2253 echo "$ac_t""$vi_cv_path_ruby" 1>&6
2254else
2255 echo "$ac_t""no" 1>&6
2256fi
2257
2258 if test "X$vi_cv_path_ruby" != "X"; then
2259 echo $ac_n "checking Ruby version""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002260echo "configure:2261: checking Ruby version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002261 if $vi_cv_path_ruby -e 'VERSION >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
2262 echo "$ac_t""OK" 1>&6
2263 echo $ac_n "checking Ruby header files""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002264echo "configure:2265: checking Ruby header files" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002265 rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null`
2266 if test "X$rubyhdrdir" != "X"; then
2267 echo "$ac_t""$rubyhdrdir" 1>&6
2268 RUBY_CFLAGS="-I$rubyhdrdir"
2269 rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'`
2270 if test "X$rubylibs" != "X"; then
2271 RUBY_LIBS="$rubylibs"
2272 fi
2273 librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'`
2274 if test -f "$rubyhdrdir/$librubyarg"; then
2275 librubyarg="$rubyhdrdir/$librubyarg"
2276 else
2277 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'`
2278 if test -f "$rubylibdir/$librubyarg"; then
2279 librubyarg="$rubylibdir/$librubyarg"
2280 elif test "$librubyarg" = "libruby.a"; then
2281 librubyarg="-lruby"
2282 else
2283 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"`
2284 fi
2285 fi
2286
2287 if test "X$librubyarg" != "X"; then
2288 RUBY_LIBS="$librubyarg $RUBY_LIBS"
2289 fi
2290 rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'`
2291 if test "X$rubyldflags" != "X"; then
2292 LDFLAGS="$rubyldflags $LDFLAGS"
2293 fi
2294 RUBY_SRC="if_ruby.c"
2295 RUBY_OBJ="objects/if_ruby.o"
2296 RUBY_PRO="if_ruby.pro"
2297 cat >> confdefs.h <<\EOF
2298#define FEAT_RUBY 1
2299EOF
2300
2301 else
2302 echo "$ac_t""not found" 1>&6
2303 fi
2304 else
2305 echo "$ac_t""too old; need Ruby version 1.6.0 or later" 1>&6
2306 fi
2307 fi
2308fi
2309
2310
2311
2312
2313
2314
2315echo $ac_n "checking --enable-cscope argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002316echo "configure:2317: checking --enable-cscope argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002317# Check whether --enable-cscope or --disable-cscope was given.
2318if test "${enable_cscope+set}" = set; then
2319 enableval="$enable_cscope"
2320 :
2321else
2322 enable_cscope="no"
2323fi
2324
2325echo "$ac_t""$enable_cscope" 1>&6
2326if test "$enable_cscope" = "yes"; then
2327 cat >> confdefs.h <<\EOF
2328#define FEAT_CSCOPE 1
2329EOF
2330
2331fi
2332
2333echo $ac_n "checking --enable-workshop argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002334echo "configure:2335: checking --enable-workshop argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002335# Check whether --enable-workshop or --disable-workshop was given.
2336if test "${enable_workshop+set}" = set; then
2337 enableval="$enable_workshop"
2338 :
2339else
2340 enable_workshop="no"
2341fi
2342
2343echo "$ac_t""$enable_workshop" 1>&6
2344if test "$enable_workshop" = "yes"; then
2345 cat >> confdefs.h <<\EOF
2346#define FEAT_SUN_WORKSHOP 1
2347EOF
2348
2349 WORKSHOP_SRC="workshop.c integration.c"
2350
2351 WORKSHOP_OBJ="objects/workshop.o objects/integration.o"
2352
2353 if test "${enable_gui-xxx}" = xxx; then
2354 enable_gui=motif
2355 fi
2356fi
2357
2358echo $ac_n "checking --disable-netbeans argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002359echo "configure:2360: checking --disable-netbeans argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002360# Check whether --enable-netbeans or --disable-netbeans was given.
2361if test "${enable_netbeans+set}" = set; then
2362 enableval="$enable_netbeans"
2363 :
2364else
2365 enable_netbeans="yes"
2366fi
2367
2368if test "$enable_netbeans" = "yes"; then
2369 echo "$ac_t""no" 1>&6
2370 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002371echo "configure:2372: checking for socket in -lsocket" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002372ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
2373if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2374 echo $ac_n "(cached) $ac_c" 1>&6
2375else
2376 ac_save_LIBS="$LIBS"
2377LIBS="-lsocket $LIBS"
2378cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002379#line 2380 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002380#include "confdefs.h"
2381/* Override any gcc2 internal prototype to avoid an error. */
2382/* We use char because int might match the return type of a gcc2
2383 builtin and then its argument prototype would still apply. */
2384char socket();
2385
2386int main() {
2387socket()
2388; return 0; }
2389EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002390if { (eval echo configure:2391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002391 rm -rf conftest*
2392 eval "ac_cv_lib_$ac_lib_var=yes"
2393else
2394 echo "configure: failed program was:" >&5
2395 cat conftest.$ac_ext >&5
2396 rm -rf conftest*
2397 eval "ac_cv_lib_$ac_lib_var=no"
2398fi
2399rm -f conftest*
2400LIBS="$ac_save_LIBS"
2401
2402fi
2403if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2404 echo "$ac_t""yes" 1>&6
2405 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2406 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2407 cat >> confdefs.h <<EOF
2408#define $ac_tr_lib 1
2409EOF
2410
2411 LIBS="-lsocket $LIBS"
2412
2413else
2414 echo "$ac_t""no" 1>&6
2415fi
2416
2417 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002418echo "configure:2419: checking for gethostbyname in -lnsl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002419ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2420if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2421 echo $ac_n "(cached) $ac_c" 1>&6
2422else
2423 ac_save_LIBS="$LIBS"
2424LIBS="-lnsl $LIBS"
2425cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002426#line 2427 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002427#include "confdefs.h"
2428/* Override any gcc2 internal prototype to avoid an error. */
2429/* We use char because int might match the return type of a gcc2
2430 builtin and then its argument prototype would still apply. */
2431char gethostbyname();
2432
2433int main() {
2434gethostbyname()
2435; return 0; }
2436EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002437if { (eval echo configure:2438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002438 rm -rf conftest*
2439 eval "ac_cv_lib_$ac_lib_var=yes"
2440else
2441 echo "configure: failed program was:" >&5
2442 cat conftest.$ac_ext >&5
2443 rm -rf conftest*
2444 eval "ac_cv_lib_$ac_lib_var=no"
2445fi
2446rm -f conftest*
2447LIBS="$ac_save_LIBS"
2448
2449fi
2450if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2451 echo "$ac_t""yes" 1>&6
2452 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2453 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2454 cat >> confdefs.h <<EOF
2455#define $ac_tr_lib 1
2456EOF
2457
2458 LIBS="-lnsl $LIBS"
2459
2460else
2461 echo "$ac_t""no" 1>&6
2462fi
2463
2464 echo $ac_n "checking whether compiling netbeans integration is possible""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002465echo "configure:2466: checking whether compiling netbeans integration is possible" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002466 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002467#line 2468 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002468#include "confdefs.h"
2469
2470#include <stdio.h>
2471#include <stdlib.h>
2472#include <stdarg.h>
2473#include <fcntl.h>
2474#include <netdb.h>
2475#include <netinet/in.h>
2476#include <errno.h>
2477#include <sys/types.h>
2478#include <sys/socket.h>
2479 /* Check bitfields */
2480 struct nbbuf {
2481 unsigned int initDone:1;
2482 ushort signmaplen;
2483 };
2484
2485int main() {
2486
2487 /* Check creating a socket. */
2488 struct sockaddr_in server;
2489 (void)socket(AF_INET, SOCK_STREAM, 0);
2490 (void)htons(100);
2491 (void)gethostbyname("microsoft.com");
2492 if (errno == ECONNREFUSED)
2493 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
2494
2495; return 0; }
2496EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002497if { (eval echo configure:2498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002498 rm -rf conftest*
2499 echo "$ac_t""yes" 1>&6
2500else
2501 echo "configure: failed program was:" >&5
2502 cat conftest.$ac_ext >&5
2503 rm -rf conftest*
2504 echo "$ac_t""no" 1>&6; enable_netbeans="no"
2505fi
2506rm -f conftest*
2507else
2508 echo "$ac_t""yes" 1>&6
2509fi
2510if test "$enable_netbeans" = "yes"; then
2511 cat >> confdefs.h <<\EOF
2512#define FEAT_NETBEANS_INTG 1
2513EOF
2514
2515 NETBEANS_SRC="netbeans.c"
2516
2517 NETBEANS_OBJ="objects/netbeans.o"
2518
2519fi
2520
2521echo $ac_n "checking --enable-sniff argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002522echo "configure:2523: checking --enable-sniff argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002523# Check whether --enable-sniff or --disable-sniff was given.
2524if test "${enable_sniff+set}" = set; then
2525 enableval="$enable_sniff"
2526 :
2527else
2528 enable_sniff="no"
2529fi
2530
2531echo "$ac_t""$enable_sniff" 1>&6
2532if test "$enable_sniff" = "yes"; then
2533 cat >> confdefs.h <<\EOF
2534#define FEAT_SNIFF 1
2535EOF
2536
2537 SNIFF_SRC="if_sniff.c"
2538
2539 SNIFF_OBJ="objects/if_sniff.o"
2540
2541fi
2542
2543echo $ac_n "checking --enable-multibyte argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002544echo "configure:2545: checking --enable-multibyte argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002545# Check whether --enable-multibyte or --disable-multibyte was given.
2546if test "${enable_multibyte+set}" = set; then
2547 enableval="$enable_multibyte"
2548 :
2549else
2550 enable_multibyte="no"
2551fi
2552
2553echo "$ac_t""$enable_multibyte" 1>&6
2554if test "$enable_multibyte" = "yes"; then
2555 cat >> confdefs.h <<\EOF
2556#define FEAT_MBYTE 1
2557EOF
2558
2559fi
2560
2561echo $ac_n "checking --enable-hangulinput argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002562echo "configure:2563: checking --enable-hangulinput argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002563# Check whether --enable-hangulinput or --disable-hangulinput was given.
2564if test "${enable_hangulinput+set}" = set; then
2565 enableval="$enable_hangulinput"
2566 :
2567else
2568 enable_hangulinput="no"
2569fi
2570
2571echo "$ac_t""$enable_hangulinput" 1>&6
2572
2573echo $ac_n "checking --enable-xim argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002574echo "configure:2575: checking --enable-xim argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002575# Check whether --enable-xim or --disable-xim was given.
2576if test "${enable_xim+set}" = set; then
2577 enableval="$enable_xim"
2578 echo "$ac_t""$enable_xim" 1>&6
2579else
2580 enable_xim="auto"; echo "$ac_t""defaulting to auto" 1>&6
2581fi
2582
2583
2584echo $ac_n "checking --enable-fontset argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002585echo "configure:2586: checking --enable-fontset argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002586# Check whether --enable-fontset or --disable-fontset was given.
2587if test "${enable_fontset+set}" = set; then
2588 enableval="$enable_fontset"
2589 :
2590else
2591 enable_fontset="no"
2592fi
2593
2594echo "$ac_t""$enable_fontset" 1>&6
2595
2596test -z "$with_x" && with_x=yes
2597test "${enable_gui-yes}" != no -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
2598if test "$with_x" = no; then
2599 echo "$ac_t""defaulting to: don't HAVE_X11" 1>&6
2600else
2601
2602 # Extract the first word of "xmkmf", so it can be a program name with args.
2603set dummy xmkmf; ac_word=$2
2604echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002605echo "configure:2606: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002606if eval "test \"`echo '$''{'ac_cv_path_xmkmfpath'+set}'`\" = set"; then
2607 echo $ac_n "(cached) $ac_c" 1>&6
2608else
2609 case "$xmkmfpath" in
2610 /*)
2611 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
2612 ;;
2613 ?:/*)
2614 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a dos path.
2615 ;;
2616 *)
2617 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2618 ac_dummy="$PATH"
2619 for ac_dir in $ac_dummy; do
2620 test -z "$ac_dir" && ac_dir=.
2621 if test -f $ac_dir/$ac_word; then
2622 ac_cv_path_xmkmfpath="$ac_dir/$ac_word"
2623 break
2624 fi
2625 done
2626 IFS="$ac_save_ifs"
2627 ;;
2628esac
2629fi
2630xmkmfpath="$ac_cv_path_xmkmfpath"
2631if test -n "$xmkmfpath"; then
2632 echo "$ac_t""$xmkmfpath" 1>&6
2633else
2634 echo "$ac_t""no" 1>&6
2635fi
2636
2637
2638 # If we find X, set shell vars x_includes and x_libraries to the
2639# paths, otherwise set no_x=yes.
2640# Uses ac_ vars as temps to allow command line to override cache and checks.
2641# --without-x overrides everything else, but does not touch the cache.
2642echo $ac_n "checking for X""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002643echo "configure:2644: checking for X" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002644
2645# Check whether --with-x or --without-x was given.
2646if test "${with_x+set}" = set; then
2647 withval="$with_x"
2648 :
2649fi
2650
2651# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2652if test "x$with_x" = xno; then
2653 # The user explicitly disabled X.
2654 have_x=disabled
2655else
2656 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2657 # Both variables are already set.
2658 have_x=yes
2659 else
2660if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2661 echo $ac_n "(cached) $ac_c" 1>&6
2662else
2663 # One or both of the vars are not set, and there is no cached value.
2664ac_x_includes=NO ac_x_libraries=NO
2665rm -fr conftestdir
2666if mkdir conftestdir; then
2667 cd conftestdir
2668 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2669 cat > Imakefile <<'EOF'
2670acfindx:
2671 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2672EOF
2673 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2674 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2675 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2676 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2677 for ac_extension in a so sl; do
2678 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2679 test -f $ac_im_libdir/libX11.$ac_extension; then
2680 ac_im_usrlibdir=$ac_im_libdir; break
2681 fi
2682 done
2683 # Screen out bogus values from the imake configuration. They are
2684 # bogus both because they are the default anyway, and because
2685 # using them would break gcc on systems where it needs fixed includes.
2686 case "$ac_im_incroot" in
2687 /usr/include) ;;
2688 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2689 esac
2690 case "$ac_im_usrlibdir" in
2691 /usr/lib | /lib) ;;
2692 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2693 esac
2694 fi
2695 cd ..
2696 rm -fr conftestdir
2697fi
2698
2699if test "$ac_x_includes" = NO; then
2700 # Guess where to find include files, by looking for this one X11 .h file.
2701 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2702
2703 # First, try using that file with no special directory specified.
2704cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002705#line 2706 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002706#include "confdefs.h"
2707#include <$x_direct_test_include>
2708EOF
2709ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +00002710{ (eval echo configure:2711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00002711ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2712if test -z "$ac_err"; then
2713 rm -rf conftest*
2714 # We can compile using X headers with no special include directory.
2715ac_x_includes=
2716else
2717 echo "$ac_err" >&5
2718 echo "configure: failed program was:" >&5
2719 cat conftest.$ac_ext >&5
2720 rm -rf conftest*
2721 # Look for the header file in a standard set of common directories.
2722# Check X11 before X11Rn because it is often a symlink to the current release.
2723 for ac_dir in \
2724 /usr/X11/include \
2725 /usr/X11R6/include \
2726 /usr/X11R5/include \
2727 /usr/X11R4/include \
2728 \
2729 /usr/include/X11 \
2730 /usr/include/X11R6 \
2731 /usr/include/X11R5 \
2732 /usr/include/X11R4 \
2733 \
2734 /usr/local/X11/include \
2735 /usr/local/X11R6/include \
2736 /usr/local/X11R5/include \
2737 /usr/local/X11R4/include \
2738 \
2739 /usr/local/include/X11 \
2740 /usr/local/include/X11R6 \
2741 /usr/local/include/X11R5 \
2742 /usr/local/include/X11R4 \
2743 \
2744 /usr/X386/include \
2745 /usr/x386/include \
2746 /usr/XFree86/include/X11 \
2747 \
2748 /usr/include \
2749 /usr/local/include \
2750 /usr/unsupported/include \
2751 /usr/athena/include \
2752 /usr/local/x11r5/include \
2753 /usr/lpp/Xamples/include \
2754 \
2755 /usr/openwin/include \
2756 /usr/openwin/share/include \
2757 ; \
2758 do
2759 if test -r "$ac_dir/$x_direct_test_include"; then
2760 ac_x_includes=$ac_dir
2761 break
2762 fi
2763 done
2764fi
2765rm -f conftest*
2766fi # $ac_x_includes = NO
2767
2768if test "$ac_x_libraries" = NO; then
2769 # Check for the libraries.
2770
2771 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2772 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2773
2774 # See if we find them without any special options.
2775 # Don't add to $LIBS permanently.
2776 ac_save_LIBS="$LIBS"
2777 LIBS="-l$x_direct_test_library $LIBS"
2778cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002779#line 2780 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002780#include "confdefs.h"
2781
2782int main() {
2783${x_direct_test_function}()
2784; return 0; }
2785EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002786if { (eval echo configure:2787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002787 rm -rf conftest*
2788 LIBS="$ac_save_LIBS"
2789# We can link X programs with no special library path.
2790ac_x_libraries=
2791else
2792 echo "configure: failed program was:" >&5
2793 cat conftest.$ac_ext >&5
2794 rm -rf conftest*
2795 LIBS="$ac_save_LIBS"
2796# First see if replacing the include by lib works.
2797# Check X11 before X11Rn because it is often a symlink to the current release.
2798for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2799 /usr/X11/lib \
2800 /usr/X11R6/lib \
2801 /usr/X11R5/lib \
2802 /usr/X11R4/lib \
2803 \
2804 /usr/lib/X11 \
2805 /usr/lib/X11R6 \
2806 /usr/lib/X11R5 \
2807 /usr/lib/X11R4 \
2808 \
2809 /usr/local/X11/lib \
2810 /usr/local/X11R6/lib \
2811 /usr/local/X11R5/lib \
2812 /usr/local/X11R4/lib \
2813 \
2814 /usr/local/lib/X11 \
2815 /usr/local/lib/X11R6 \
2816 /usr/local/lib/X11R5 \
2817 /usr/local/lib/X11R4 \
2818 \
2819 /usr/X386/lib \
2820 /usr/x386/lib \
2821 /usr/XFree86/lib/X11 \
2822 \
2823 /usr/lib \
2824 /usr/local/lib \
2825 /usr/unsupported/lib \
2826 /usr/athena/lib \
2827 /usr/local/x11r5/lib \
2828 /usr/lpp/Xamples/lib \
2829 /lib/usr/lib/X11 \
2830 \
2831 /usr/openwin/lib \
2832 /usr/openwin/share/lib \
2833 ; \
2834do
2835 for ac_extension in a so sl; do
2836 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2837 ac_x_libraries=$ac_dir
2838 break 2
2839 fi
2840 done
2841done
2842fi
2843rm -f conftest*
2844fi # $ac_x_libraries = NO
2845
2846if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2847 # Didn't find X anywhere. Cache the known absence of X.
2848 ac_cv_have_x="have_x=no"
2849else
2850 # Record where we found X for the cache.
2851 ac_cv_have_x="have_x=yes \
2852 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2853fi
2854fi
2855 fi
2856 eval "$ac_cv_have_x"
2857fi # $with_x != no
2858
2859if test "$have_x" != yes; then
2860 echo "$ac_t""$have_x" 1>&6
2861 no_x=yes
2862else
2863 # If each of the values was on the command line, it overrides each guess.
2864 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
2865 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
2866 # Update the cache value to reflect the command line values.
2867 ac_cv_have_x="have_x=yes \
2868 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
2869 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
2870fi
2871
2872if test "$no_x" = yes; then
2873 # Not all programs may use this symbol, but it does not hurt to define it.
2874 cat >> confdefs.h <<\EOF
2875#define X_DISPLAY_MISSING 1
2876EOF
2877
2878 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
2879else
2880 if test -n "$x_includes"; then
2881 X_CFLAGS="$X_CFLAGS -I$x_includes"
2882 fi
2883
2884 # It would also be nice to do this for all -L options, not just this one.
2885 if test -n "$x_libraries"; then
2886 X_LIBS="$X_LIBS -L$x_libraries"
2887 # For Solaris; some versions of Sun CC require a space after -R and
2888 # others require no space. Words are not sufficient . . . .
2889 case "`(uname -sr) 2>/dev/null`" in
2890 "SunOS 5"*)
2891 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002892echo "configure:2893: checking whether -R must be followed by a space" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002893 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
2894 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002895#line 2896 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002896#include "confdefs.h"
2897
2898int main() {
2899
2900; return 0; }
2901EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002902if { (eval echo configure:2903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002903 rm -rf conftest*
2904 ac_R_nospace=yes
2905else
2906 echo "configure: failed program was:" >&5
2907 cat conftest.$ac_ext >&5
2908 rm -rf conftest*
2909 ac_R_nospace=no
2910fi
2911rm -f conftest*
2912 if test $ac_R_nospace = yes; then
2913 echo "$ac_t""no" 1>&6
2914 X_LIBS="$X_LIBS -R$x_libraries"
2915 else
2916 LIBS="$ac_xsave_LIBS -R $x_libraries"
2917 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002918#line 2919 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002919#include "confdefs.h"
2920
2921int main() {
2922
2923; return 0; }
2924EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002925if { (eval echo configure:2926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002926 rm -rf conftest*
2927 ac_R_space=yes
2928else
2929 echo "configure: failed program was:" >&5
2930 cat conftest.$ac_ext >&5
2931 rm -rf conftest*
2932 ac_R_space=no
2933fi
2934rm -f conftest*
2935 if test $ac_R_space = yes; then
2936 echo "$ac_t""yes" 1>&6
2937 X_LIBS="$X_LIBS -R $x_libraries"
2938 else
2939 echo "$ac_t""neither works" 1>&6
2940 fi
2941 fi
2942 LIBS="$ac_xsave_LIBS"
2943 esac
2944 fi
2945
2946 # Check for system-dependent libraries X programs must link with.
2947 # Do this before checking for the system-independent R6 libraries
2948 # (-lICE), since we may need -lsocket or whatever for X linking.
2949
2950 if test "$ISC" = yes; then
2951 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2952 else
2953 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2954 # libraries were built with DECnet support. And karl@cs.umb.edu says
2955 # the Alpha needs dnet_stub (dnet does not exist).
2956 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002957echo "configure:2958: checking for dnet_ntoa in -ldnet" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002958ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
2959if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2960 echo $ac_n "(cached) $ac_c" 1>&6
2961else
2962 ac_save_LIBS="$LIBS"
2963LIBS="-ldnet $LIBS"
2964cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002965#line 2966 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002966#include "confdefs.h"
2967/* Override any gcc2 internal prototype to avoid an error. */
2968/* We use char because int might match the return type of a gcc2
2969 builtin and then its argument prototype would still apply. */
2970char dnet_ntoa();
2971
2972int main() {
2973dnet_ntoa()
2974; return 0; }
2975EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00002976if { (eval echo configure:2977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002977 rm -rf conftest*
2978 eval "ac_cv_lib_$ac_lib_var=yes"
2979else
2980 echo "configure: failed program was:" >&5
2981 cat conftest.$ac_ext >&5
2982 rm -rf conftest*
2983 eval "ac_cv_lib_$ac_lib_var=no"
2984fi
2985rm -f conftest*
2986LIBS="$ac_save_LIBS"
2987
2988fi
2989if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2990 echo "$ac_t""yes" 1>&6
2991 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2992else
2993 echo "$ac_t""no" 1>&6
2994fi
2995
2996 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
2997 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00002998echo "configure:2999: checking for dnet_ntoa in -ldnet_stub" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002999ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3000if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3001 echo $ac_n "(cached) $ac_c" 1>&6
3002else
3003 ac_save_LIBS="$LIBS"
3004LIBS="-ldnet_stub $LIBS"
3005cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003006#line 3007 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003007#include "confdefs.h"
3008/* Override any gcc2 internal prototype to avoid an error. */
3009/* We use char because int might match the return type of a gcc2
3010 builtin and then its argument prototype would still apply. */
3011char dnet_ntoa();
3012
3013int main() {
3014dnet_ntoa()
3015; return 0; }
3016EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003017if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003018 rm -rf conftest*
3019 eval "ac_cv_lib_$ac_lib_var=yes"
3020else
3021 echo "configure: failed program was:" >&5
3022 cat conftest.$ac_ext >&5
3023 rm -rf conftest*
3024 eval "ac_cv_lib_$ac_lib_var=no"
3025fi
3026rm -f conftest*
3027LIBS="$ac_save_LIBS"
3028
3029fi
3030if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3031 echo "$ac_t""yes" 1>&6
3032 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
3033else
3034 echo "$ac_t""no" 1>&6
3035fi
3036
3037 fi
3038
3039 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
3040 # to get the SysV transport functions.
3041 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
3042 # needs -lnsl.
3043 # The nsl library prevents programs from opening the X display
3044 # on Irix 5.2, according to dickey@clark.net.
3045 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003046echo "configure:3047: checking for gethostbyname" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003047if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3048 echo $ac_n "(cached) $ac_c" 1>&6
3049else
3050 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003051#line 3052 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003052#include "confdefs.h"
3053/* System header to define __stub macros and hopefully few prototypes,
3054 which can conflict with char gethostbyname(); below. */
3055#include <assert.h>
3056/* Override any gcc2 internal prototype to avoid an error. */
3057/* We use char because int might match the return type of a gcc2
3058 builtin and then its argument prototype would still apply. */
3059char gethostbyname();
3060
3061int main() {
3062
3063/* The GNU C library defines this for functions which it implements
3064 to always fail with ENOSYS. Some functions are actually named
3065 something starting with __ and the normal name is an alias. */
3066#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3067choke me
3068#else
3069gethostbyname();
3070#endif
3071
3072; return 0; }
3073EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003074if { (eval echo configure:3075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003075 rm -rf conftest*
3076 eval "ac_cv_func_gethostbyname=yes"
3077else
3078 echo "configure: failed program was:" >&5
3079 cat conftest.$ac_ext >&5
3080 rm -rf conftest*
3081 eval "ac_cv_func_gethostbyname=no"
3082fi
3083rm -f conftest*
3084fi
3085
3086if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3087 echo "$ac_t""yes" 1>&6
3088 :
3089else
3090 echo "$ac_t""no" 1>&6
3091fi
3092
3093 if test $ac_cv_func_gethostbyname = no; then
3094 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003095echo "configure:3096: checking for gethostbyname in -lnsl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003096ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3097if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3098 echo $ac_n "(cached) $ac_c" 1>&6
3099else
3100 ac_save_LIBS="$LIBS"
3101LIBS="-lnsl $LIBS"
3102cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003103#line 3104 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003104#include "confdefs.h"
3105/* Override any gcc2 internal prototype to avoid an error. */
3106/* We use char because int might match the return type of a gcc2
3107 builtin and then its argument prototype would still apply. */
3108char gethostbyname();
3109
3110int main() {
3111gethostbyname()
3112; return 0; }
3113EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003114if { (eval echo configure:3115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003115 rm -rf conftest*
3116 eval "ac_cv_lib_$ac_lib_var=yes"
3117else
3118 echo "configure: failed program was:" >&5
3119 cat conftest.$ac_ext >&5
3120 rm -rf conftest*
3121 eval "ac_cv_lib_$ac_lib_var=no"
3122fi
3123rm -f conftest*
3124LIBS="$ac_save_LIBS"
3125
3126fi
3127if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3128 echo "$ac_t""yes" 1>&6
3129 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
3130else
3131 echo "$ac_t""no" 1>&6
3132fi
3133
3134 fi
3135
3136 # lieder@skyler.mavd.honeywell.com says without -lsocket,
3137 # socket/setsockopt and other routines are undefined under SCO ODT
3138 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
3139 # on later versions), says simon@lia.di.epfl.ch: it contains
3140 # gethostby* variants that don't use the nameserver (or something).
3141 # -lsocket must be given before -lnsl if both are needed.
3142 # We assume that if connect needs -lnsl, so does gethostbyname.
3143 echo $ac_n "checking for connect""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003144echo "configure:3145: checking for connect" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003145if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3146 echo $ac_n "(cached) $ac_c" 1>&6
3147else
3148 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003149#line 3150 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003150#include "confdefs.h"
3151/* System header to define __stub macros and hopefully few prototypes,
3152 which can conflict with char connect(); below. */
3153#include <assert.h>
3154/* Override any gcc2 internal prototype to avoid an error. */
3155/* We use char because int might match the return type of a gcc2
3156 builtin and then its argument prototype would still apply. */
3157char connect();
3158
3159int main() {
3160
3161/* The GNU C library defines this for functions which it implements
3162 to always fail with ENOSYS. Some functions are actually named
3163 something starting with __ and the normal name is an alias. */
3164#if defined (__stub_connect) || defined (__stub___connect)
3165choke me
3166#else
3167connect();
3168#endif
3169
3170; return 0; }
3171EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003172if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003173 rm -rf conftest*
3174 eval "ac_cv_func_connect=yes"
3175else
3176 echo "configure: failed program was:" >&5
3177 cat conftest.$ac_ext >&5
3178 rm -rf conftest*
3179 eval "ac_cv_func_connect=no"
3180fi
3181rm -f conftest*
3182fi
3183
3184if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3185 echo "$ac_t""yes" 1>&6
3186 :
3187else
3188 echo "$ac_t""no" 1>&6
3189fi
3190
3191 if test $ac_cv_func_connect = no; then
3192 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003193echo "configure:3194: checking for connect in -lsocket" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003194ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3195if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3196 echo $ac_n "(cached) $ac_c" 1>&6
3197else
3198 ac_save_LIBS="$LIBS"
3199LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
3200cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003201#line 3202 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003202#include "confdefs.h"
3203/* Override any gcc2 internal prototype to avoid an error. */
3204/* We use char because int might match the return type of a gcc2
3205 builtin and then its argument prototype would still apply. */
3206char connect();
3207
3208int main() {
3209connect()
3210; return 0; }
3211EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003212if { (eval echo configure:3213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003213 rm -rf conftest*
3214 eval "ac_cv_lib_$ac_lib_var=yes"
3215else
3216 echo "configure: failed program was:" >&5
3217 cat conftest.$ac_ext >&5
3218 rm -rf conftest*
3219 eval "ac_cv_lib_$ac_lib_var=no"
3220fi
3221rm -f conftest*
3222LIBS="$ac_save_LIBS"
3223
3224fi
3225if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3226 echo "$ac_t""yes" 1>&6
3227 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3228else
3229 echo "$ac_t""no" 1>&6
3230fi
3231
3232 fi
3233
3234 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3235 echo $ac_n "checking for remove""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003236echo "configure:3237: checking for remove" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003237if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3238 echo $ac_n "(cached) $ac_c" 1>&6
3239else
3240 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003241#line 3242 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003242#include "confdefs.h"
3243/* System header to define __stub macros and hopefully few prototypes,
3244 which can conflict with char remove(); below. */
3245#include <assert.h>
3246/* Override any gcc2 internal prototype to avoid an error. */
3247/* We use char because int might match the return type of a gcc2
3248 builtin and then its argument prototype would still apply. */
3249char remove();
3250
3251int main() {
3252
3253/* The GNU C library defines this for functions which it implements
3254 to always fail with ENOSYS. Some functions are actually named
3255 something starting with __ and the normal name is an alias. */
3256#if defined (__stub_remove) || defined (__stub___remove)
3257choke me
3258#else
3259remove();
3260#endif
3261
3262; return 0; }
3263EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003264if { (eval echo configure:3265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003265 rm -rf conftest*
3266 eval "ac_cv_func_remove=yes"
3267else
3268 echo "configure: failed program was:" >&5
3269 cat conftest.$ac_ext >&5
3270 rm -rf conftest*
3271 eval "ac_cv_func_remove=no"
3272fi
3273rm -f conftest*
3274fi
3275
3276if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3277 echo "$ac_t""yes" 1>&6
3278 :
3279else
3280 echo "$ac_t""no" 1>&6
3281fi
3282
3283 if test $ac_cv_func_remove = no; then
3284 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003285echo "configure:3286: checking for remove in -lposix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003286ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3287if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3288 echo $ac_n "(cached) $ac_c" 1>&6
3289else
3290 ac_save_LIBS="$LIBS"
3291LIBS="-lposix $LIBS"
3292cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003293#line 3294 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003294#include "confdefs.h"
3295/* Override any gcc2 internal prototype to avoid an error. */
3296/* We use char because int might match the return type of a gcc2
3297 builtin and then its argument prototype would still apply. */
3298char remove();
3299
3300int main() {
3301remove()
3302; return 0; }
3303EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003304if { (eval echo configure:3305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003305 rm -rf conftest*
3306 eval "ac_cv_lib_$ac_lib_var=yes"
3307else
3308 echo "configure: failed program was:" >&5
3309 cat conftest.$ac_ext >&5
3310 rm -rf conftest*
3311 eval "ac_cv_lib_$ac_lib_var=no"
3312fi
3313rm -f conftest*
3314LIBS="$ac_save_LIBS"
3315
3316fi
3317if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3318 echo "$ac_t""yes" 1>&6
3319 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3320else
3321 echo "$ac_t""no" 1>&6
3322fi
3323
3324 fi
3325
3326 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3327 echo $ac_n "checking for shmat""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003328echo "configure:3329: checking for shmat" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003329if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3330 echo $ac_n "(cached) $ac_c" 1>&6
3331else
3332 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003333#line 3334 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003334#include "confdefs.h"
3335/* System header to define __stub macros and hopefully few prototypes,
3336 which can conflict with char shmat(); below. */
3337#include <assert.h>
3338/* Override any gcc2 internal prototype to avoid an error. */
3339/* We use char because int might match the return type of a gcc2
3340 builtin and then its argument prototype would still apply. */
3341char shmat();
3342
3343int main() {
3344
3345/* The GNU C library defines this for functions which it implements
3346 to always fail with ENOSYS. Some functions are actually named
3347 something starting with __ and the normal name is an alias. */
3348#if defined (__stub_shmat) || defined (__stub___shmat)
3349choke me
3350#else
3351shmat();
3352#endif
3353
3354; return 0; }
3355EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003356if { (eval echo configure:3357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003357 rm -rf conftest*
3358 eval "ac_cv_func_shmat=yes"
3359else
3360 echo "configure: failed program was:" >&5
3361 cat conftest.$ac_ext >&5
3362 rm -rf conftest*
3363 eval "ac_cv_func_shmat=no"
3364fi
3365rm -f conftest*
3366fi
3367
3368if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3369 echo "$ac_t""yes" 1>&6
3370 :
3371else
3372 echo "$ac_t""no" 1>&6
3373fi
3374
3375 if test $ac_cv_func_shmat = no; then
3376 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003377echo "configure:3378: checking for shmat in -lipc" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003378ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3379if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3380 echo $ac_n "(cached) $ac_c" 1>&6
3381else
3382 ac_save_LIBS="$LIBS"
3383LIBS="-lipc $LIBS"
3384cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003385#line 3386 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003386#include "confdefs.h"
3387/* Override any gcc2 internal prototype to avoid an error. */
3388/* We use char because int might match the return type of a gcc2
3389 builtin and then its argument prototype would still apply. */
3390char shmat();
3391
3392int main() {
3393shmat()
3394; return 0; }
3395EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003396if { (eval echo configure:3397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003397 rm -rf conftest*
3398 eval "ac_cv_lib_$ac_lib_var=yes"
3399else
3400 echo "configure: failed program was:" >&5
3401 cat conftest.$ac_ext >&5
3402 rm -rf conftest*
3403 eval "ac_cv_lib_$ac_lib_var=no"
3404fi
3405rm -f conftest*
3406LIBS="$ac_save_LIBS"
3407
3408fi
3409if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3410 echo "$ac_t""yes" 1>&6
3411 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3412else
3413 echo "$ac_t""no" 1>&6
3414fi
3415
3416 fi
3417 fi
3418
3419 # Check for libraries that X11R6 Xt/Xaw programs need.
3420 ac_save_LDFLAGS="$LDFLAGS"
3421 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3422 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3423 # check for ICE first), but we must link in the order -lSM -lICE or
3424 # we get undefined symbols. So assume we have SM if we have ICE.
3425 # These have to be linked with before -lX11, unlike the other
3426 # libraries we check for below, so use a different variable.
3427 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3428 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003429echo "configure:3430: checking for IceConnectionNumber in -lICE" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003430ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3431if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3432 echo $ac_n "(cached) $ac_c" 1>&6
3433else
3434 ac_save_LIBS="$LIBS"
3435LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3436cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003437#line 3438 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003438#include "confdefs.h"
3439/* Override any gcc2 internal prototype to avoid an error. */
3440/* We use char because int might match the return type of a gcc2
3441 builtin and then its argument prototype would still apply. */
3442char IceConnectionNumber();
3443
3444int main() {
3445IceConnectionNumber()
3446; return 0; }
3447EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003448if { (eval echo configure:3449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003449 rm -rf conftest*
3450 eval "ac_cv_lib_$ac_lib_var=yes"
3451else
3452 echo "configure: failed program was:" >&5
3453 cat conftest.$ac_ext >&5
3454 rm -rf conftest*
3455 eval "ac_cv_lib_$ac_lib_var=no"
3456fi
3457rm -f conftest*
3458LIBS="$ac_save_LIBS"
3459
3460fi
3461if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3462 echo "$ac_t""yes" 1>&6
3463 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3464else
3465 echo "$ac_t""no" 1>&6
3466fi
3467
3468 LDFLAGS="$ac_save_LDFLAGS"
3469
3470fi
3471
3472
3473 if test "$OS390Unix" = "yes"; then
3474 CFLAGS="$CFLAGS -W c,dll"
3475 LDFLAGS="$LDFLAGS -W l,dll"
3476 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
3477 fi
3478
3479
3480 if test -d "$x_includes" && test ! -d "$x_libraries"; then
3481 x_libraries=`echo "$x_includes" | sed s/include/lib/`
3482 echo "$ac_t""Corrected X libraries to $x_libraries" 1>&6
3483 X_LIBS="$X_LIBS -L$x_libraries"
3484 if test "`(uname) 2>/dev/null`" = SunOS &&
3485 uname -r | grep '^5' >/dev/null; then
3486 X_LIBS="$X_LIBS -R $x_libraries"
3487 fi
3488 fi
3489
3490 if test -d "$x_libraries" && test ! -d "$x_includes"; then
3491 x_includes=`echo "$x_libraries" | sed s/lib/include/`
3492 echo "$ac_t""Corrected X includes to $x_includes" 1>&6
3493 X_CFLAGS="$X_CFLAGS -I$x_includes"
3494 fi
3495
3496 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`"
3497 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`"
3498 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
3499
3500
3501 echo $ac_n "checking if X11 header files can be found""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003502echo "configure:3503: checking if X11 header files can be found" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003503 cflags_save=$CFLAGS
3504 CFLAGS="$CFLAGS $X_CFLAGS"
3505 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003506#line 3507 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003507#include "confdefs.h"
3508#include <X11/Xlib.h>
3509int main() {
3510
3511; return 0; }
3512EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003513if { (eval echo configure:3514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003514 rm -rf conftest*
3515 echo "$ac_t""yes" 1>&6
3516else
3517 echo "configure: failed program was:" >&5
3518 cat conftest.$ac_ext >&5
3519 rm -rf conftest*
3520 echo "$ac_t""no" 1>&6; no_x=yes
3521fi
3522rm -f conftest*
3523 CFLAGS=$cflags_save
3524
3525 if test "${no_x-no}" = yes; then
3526 with_x=no
3527 else
3528 cat >> confdefs.h <<\EOF
3529#define HAVE_X11 1
3530EOF
3531
3532 X_LIB="-lXt -lX11";
3533
3534
3535 ac_save_LDFLAGS="$LDFLAGS"
3536 LDFLAGS="-L$x_libraries $LDFLAGS"
3537
3538 echo $ac_n "checking for _XdmcpAuthDoIt in -lXdmcp""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003539echo "configure:3540: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003540ac_lib_var=`echo Xdmcp'_'_XdmcpAuthDoIt | sed 'y%./+-%__p_%'`
3541if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3542 echo $ac_n "(cached) $ac_c" 1>&6
3543else
3544 ac_save_LIBS="$LIBS"
3545LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
3546cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003547#line 3548 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003548#include "confdefs.h"
3549/* Override any gcc2 internal prototype to avoid an error. */
3550/* We use char because int might match the return type of a gcc2
3551 builtin and then its argument prototype would still apply. */
3552char _XdmcpAuthDoIt();
3553
3554int main() {
3555_XdmcpAuthDoIt()
3556; return 0; }
3557EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003558if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003559 rm -rf conftest*
3560 eval "ac_cv_lib_$ac_lib_var=yes"
3561else
3562 echo "configure: failed program was:" >&5
3563 cat conftest.$ac_ext >&5
3564 rm -rf conftest*
3565 eval "ac_cv_lib_$ac_lib_var=no"
3566fi
3567rm -f conftest*
3568LIBS="$ac_save_LIBS"
3569
3570fi
3571if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3572 echo "$ac_t""yes" 1>&6
3573 X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
3574else
3575 echo "$ac_t""no" 1>&6
3576fi
3577
3578
3579 echo $ac_n "checking for IceOpenConnection in -lICE""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003580echo "configure:3581: checking for IceOpenConnection in -lICE" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003581ac_lib_var=`echo ICE'_'IceOpenConnection | sed 'y%./+-%__p_%'`
3582if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3583 echo $ac_n "(cached) $ac_c" 1>&6
3584else
3585 ac_save_LIBS="$LIBS"
3586LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3587cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003588#line 3589 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003589#include "confdefs.h"
3590/* Override any gcc2 internal prototype to avoid an error. */
3591/* We use char because int might match the return type of a gcc2
3592 builtin and then its argument prototype would still apply. */
3593char IceOpenConnection();
3594
3595int main() {
3596IceOpenConnection()
3597; return 0; }
3598EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003599if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003600 rm -rf conftest*
3601 eval "ac_cv_lib_$ac_lib_var=yes"
3602else
3603 echo "configure: failed program was:" >&5
3604 cat conftest.$ac_ext >&5
3605 rm -rf conftest*
3606 eval "ac_cv_lib_$ac_lib_var=no"
3607fi
3608rm -f conftest*
3609LIBS="$ac_save_LIBS"
3610
3611fi
3612if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3613 echo "$ac_t""yes" 1>&6
3614 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
3615else
3616 echo "$ac_t""no" 1>&6
3617fi
3618
3619
3620 LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
3621 echo $ac_n "checking for XpmCreatePixmapFromData in -lXpm""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003622echo "configure:3623: checking for XpmCreatePixmapFromData in -lXpm" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003623ac_lib_var=`echo Xpm'_'XpmCreatePixmapFromData | sed 'y%./+-%__p_%'`
3624if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3625 echo $ac_n "(cached) $ac_c" 1>&6
3626else
3627 ac_save_LIBS="$LIBS"
3628LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
3629cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003630#line 3631 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003631#include "confdefs.h"
3632/* Override any gcc2 internal prototype to avoid an error. */
3633/* We use char because int might match the return type of a gcc2
3634 builtin and then its argument prototype would still apply. */
3635char XpmCreatePixmapFromData();
3636
3637int main() {
3638XpmCreatePixmapFromData()
3639; return 0; }
3640EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003641if { (eval echo configure:3642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003642 rm -rf conftest*
3643 eval "ac_cv_lib_$ac_lib_var=yes"
3644else
3645 echo "configure: failed program was:" >&5
3646 cat conftest.$ac_ext >&5
3647 rm -rf conftest*
3648 eval "ac_cv_lib_$ac_lib_var=no"
3649fi
3650rm -f conftest*
3651LIBS="$ac_save_LIBS"
3652
3653fi
3654if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3655 echo "$ac_t""yes" 1>&6
3656 X_PRE_LIBS="$X_PRE_LIBS -lXpm"
3657else
3658 echo "$ac_t""no" 1>&6
3659fi
3660
3661
3662 echo $ac_n "checking if X11 header files implicitly declare return values""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003663echo "configure:3664: checking if X11 header files implicitly declare return values" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003664 cflags_save=$CFLAGS
3665 CFLAGS="$CFLAGS $X_CFLAGS -Werror"
3666 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003667#line 3668 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003668#include "confdefs.h"
3669#include <X11/Xlib.h>
3670int main() {
3671
3672; return 0; }
3673EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003674if { (eval echo configure:3675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003675 rm -rf conftest*
3676 echo "$ac_t""no" 1>&6
3677else
3678 echo "configure: failed program was:" >&5
3679 cat conftest.$ac_ext >&5
3680 rm -rf conftest*
3681 CFLAGS="$CFLAGS -Wno-implicit-int"
3682 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003683#line 3684 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003684#include "confdefs.h"
3685#include <X11/Xlib.h>
3686int main() {
3687
3688; return 0; }
3689EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00003690if { (eval echo configure:3691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003691 rm -rf conftest*
3692 echo "$ac_t""yes" 1>&6; cflags_save="$cflags_save -Wno-implicit-int"
3693else
3694 echo "configure: failed program was:" >&5
3695 cat conftest.$ac_ext >&5
3696 rm -rf conftest*
3697 echo "$ac_t""test failed" 1>&6
3698
3699fi
3700rm -f conftest*
3701
3702fi
3703rm -f conftest*
3704 CFLAGS=$cflags_save
3705
3706 LDFLAGS="$ac_save_LDFLAGS"
3707
3708 fi
3709fi
3710
3711test "x$with_x" = xno -a "x$BEOS" != "xyes" -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
3712
3713echo $ac_n "checking --enable-gui argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003714echo "configure:3715: checking --enable-gui argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003715# Check whether --enable-gui or --disable-gui was given.
3716if test "${enable_gui+set}" = set; then
3717 enableval="$enable_gui"
3718 :
3719else
3720 enable_gui="auto"
3721fi
3722
3723
3724enable_gui_canon=`echo "_$enable_gui" | \
3725 sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
3726
3727SKIP_GTK=YES
3728SKIP_GTK2=YES
3729SKIP_GNOME=YES
3730SKIP_MOTIF=YES
3731SKIP_ATHENA=YES
3732SKIP_NEXTAW=YES
3733SKIP_PHOTON=YES
3734SKIP_BEOS=YES
3735SKIP_CARBON=YES
3736GUITYPE=NONE
3737
3738if test "x$BEOS" = "xyes"; then
3739 SKIP_BEOS=
3740 case "$enable_gui_canon" in
3741 no) echo "$ac_t""no GUI support" 1>&6
3742 SKIP_BEOS=YES ;;
3743 yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
3744 auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
3745 beos) echo "$ac_t""BeOS GUI support" 1>&6 ;;
3746 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
3747 SKIP_BEOS=YES ;;
3748 esac
3749
3750elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
3751 SKIP_PHOTON=
3752 case "$enable_gui_canon" in
3753 no) echo "$ac_t""no GUI support" 1>&6
3754 SKIP_PHOTON=YES ;;
3755 yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
3756 auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
3757 photon) echo "$ac_t""Photon GUI support" 1>&6 ;;
3758 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
3759 SKIP_PHOTON=YES ;;
3760 esac
3761
3762elif test "x$MACOSX" = "xyes" -a "x$with_x" = "xno" ; then
3763 SKIP_CARBON=
3764 case "$enable_gui_canon" in
3765 no) echo "$ac_t""no GUI support" 1>&6
3766 SKIP_CARBON=YES ;;
3767 yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
3768 auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
3769 carbon) echo "$ac_t""Carbon GUI support" 1>&6 ;;
3770 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
3771 SKIP_CARBON=YES ;;
3772 esac
3773
3774else
3775
Bram Moolenaar071d4272004-06-13 20:20:40 +00003776 case "$enable_gui_canon" in
3777 no|none) echo "$ac_t""no GUI support" 1>&6 ;;
3778 yes|""|auto) echo "$ac_t""yes/auto - automatic GUI support" 1>&6
3779 SKIP_GTK=
3780 SKIP_GTK2=
3781 SKIP_GNOME=
3782 SKIP_MOTIF=
3783 SKIP_ATHENA=
3784 SKIP_NEXTAW=
3785 SKIP_CARBON=;;
Bram Moolenaar843ee412004-06-30 16:16:41 +00003786 kde|Kde|KDE) echo "$ac_t""KDE 2.x or 3.x GUI support" 1>&6
3787 SKIP_KDE=;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00003788 gtk) echo "$ac_t""GTK+ 1.x GUI support" 1>&6
3789 SKIP_GTK=;;
3790 gtk2) echo "$ac_t""GTK+ 2.x GUI support" 1>&6
3791 SKIP_GTK=
3792 SKIP_GTK2=;;
3793 gnome) echo "$ac_t""GNOME 1.x GUI support" 1>&6
3794 SKIP_GNOME=
3795 SKIP_GTK=;;
3796 gnome2) echo "$ac_t""GNOME 2.x GUI support" 1>&6
3797 SKIP_GNOME=
3798 SKIP_GTK=
3799 SKIP_GTK2=;;
3800 motif) echo "$ac_t""Motif GUI support" 1>&6
3801 SKIP_MOTIF=;;
3802 athena) echo "$ac_t""Athena GUI support" 1>&6
3803 SKIP_ATHENA=;;
3804 nextaw) echo "$ac_t""neXtaw GUI support" 1>&6
3805 SKIP_NEXTAW=;;
3806 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;;
3807 esac
3808
3809fi
3810
Bram Moolenaar843ee412004-06-30 16:16:41 +00003811if test "x$SKIP_KDE" != "xYES" -a "$enable_gui_canon" != "kde"; then
3812 echo $ac_n "checking whether or not to look for KDE""... $ac_c" 1>&6
3813echo "configure:3814: checking whether or not to look for KDE" >&5
3814 # Check whether --enable-kde-check or --disable-kde-check was given.
3815if test "${enable_kde_check+set}" = set; then
3816 enableval="$enable_kde_check"
3817 :
3818else
3819 enable_kde_check="no"
3820fi
3821
3822 echo "$ac_t""$enable_kde_check" 1>&6;
3823 if test "x$enable_kde_check" = "xno"; then
3824 SKIP_KDE=YES
3825 fi
3826fi
3827
Bram Moolenaar071d4272004-06-13 20:20:40 +00003828if test "x$SKIP_GTK" != "xYES" -a "$enable_gui_canon" != "gtk" -a "$enable_gui_canon" != "gtk2"; then
3829 echo $ac_n "checking whether or not to look for GTK""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003830echo "configure:3831: checking whether or not to look for GTK" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003831 # Check whether --enable-gtk-check or --disable-gtk-check was given.
3832if test "${enable_gtk_check+set}" = set; then
3833 enableval="$enable_gtk_check"
3834 :
3835else
3836 enable_gtk_check="yes"
3837fi
3838
3839 echo "$ac_t""$enable_gtk_check" 1>&6
3840 if test "x$enable_gtk_check" = "xno"; then
3841 SKIP_GTK=YES
3842 SKIP_GNOME=YES
3843 fi
3844fi
3845
3846if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
3847 -a "$enable_gui_canon" != "gnome2"; then
3848 echo $ac_n "checking whether or not to look for GTK+ 2""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003849echo "configure:3850: checking whether or not to look for GTK+ 2" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003850 # Check whether --enable-gtk2-check or --disable-gtk2-check was given.
3851if test "${enable_gtk2_check+set}" = set; then
3852 enableval="$enable_gtk2_check"
3853 :
3854else
3855 enable_gtk2_check="yes"
3856fi
3857
3858 echo "$ac_t""$enable_gtk2_check" 1>&6
3859 if test "x$enable_gtk2_check" = "xno"; then
3860 SKIP_GTK2=YES
3861 fi
3862fi
3863
3864if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome" \
3865 -a "$enable_gui_canon" != "gnome2"; then
3866 echo $ac_n "checking whether or not to look for GNOME""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003867echo "configure:3868: checking whether or not to look for GNOME" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003868 # Check whether --enable-gnome-check or --disable-gnome-check was given.
3869if test "${enable_gnome_check+set}" = set; then
3870 enableval="$enable_gnome_check"
3871 :
3872else
3873 enable_gnome_check="no"
3874fi
3875
3876 echo "$ac_t""$enable_gnome_check" 1>&6
3877 if test "x$enable_gnome_check" = "xno"; then
3878 SKIP_GNOME=YES
3879 fi
3880fi
3881
3882if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
3883 echo $ac_n "checking whether or not to look for Motif""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003884echo "configure:3885: checking whether or not to look for Motif" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003885 # Check whether --enable-motif-check or --disable-motif-check was given.
3886if test "${enable_motif_check+set}" = set; then
3887 enableval="$enable_motif_check"
3888 :
3889else
3890 enable_motif_check="yes"
3891fi
3892
3893 echo "$ac_t""$enable_motif_check" 1>&6
3894 if test "x$enable_motif_check" = "xno"; then
3895 SKIP_MOTIF=YES
3896 fi
3897fi
3898
3899if test "x$SKIP_ATHENA" != "xYES" -a "$enable_gui_canon" != "athena"; then
3900 echo $ac_n "checking whether or not to look for Athena""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003901echo "configure:3902: checking whether or not to look for Athena" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003902 # Check whether --enable-athena-check or --disable-athena-check was given.
3903if test "${enable_athena_check+set}" = set; then
3904 enableval="$enable_athena_check"
3905 :
3906else
3907 enable_athena_check="yes"
3908fi
3909
3910 echo "$ac_t""$enable_athena_check" 1>&6
3911 if test "x$enable_athena_check" = "xno"; then
3912 SKIP_ATHENA=YES
3913 fi
3914fi
3915
3916if test "x$SKIP_NEXTAW" != "xYES" -a "$enable_gui_canon" != "nextaw"; then
3917 echo $ac_n "checking whether or not to look for neXtaw""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003918echo "configure:3919: checking whether or not to look for neXtaw" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003919 # Check whether --enable-nextaw-check or --disable-nextaw-check was given.
3920if test "${enable_nextaw_check+set}" = set; then
3921 enableval="$enable_nextaw_check"
3922 :
3923else
3924 enable_nextaw_check="yes"
3925fi
3926
3927 echo "$ac_t""$enable_nextaw_check" 1>&6;
3928 if test "x$enable_nextaw_check" = "xno"; then
3929 SKIP_NEXTAW=YES
3930 fi
3931fi
3932
3933if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
3934 echo $ac_n "checking whether or not to look for Carbon""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00003935echo "configure:3936: checking whether or not to look for Carbon" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003936 # Check whether --enable-carbon-check or --disable-carbon-check was given.
3937if test "${enable_carbon_check+set}" = set; then
3938 enableval="$enable_carbon_check"
3939 :
3940else
3941 enable_carbon_check="yes"
3942fi
3943
3944 echo "$ac_t""$enable_carbon_check" 1>&6;
3945 if test "x$enable_carbon_check" = "xno"; then
3946 SKIP_CARBON=YES
3947 fi
3948fi
3949
Bram Moolenaar843ee412004-06-30 16:16:41 +00003950
3951if test -z "$SKIP_KDE"; then
3952# Check whether --with-qt-dir or --without-qt-dir was given.
3953if test "${with_qt_dir+set}" = set; then
3954 withval="$with_qt_dir"
3955
3956 ROOTQT="$withval"
3957 MOC="$withval"/bin/moc
3958 QT_INCLUDES="$withval"/include
3959 QT_LIBS="$withval"/lib
3960
3961fi
3962
3963
3964if test "x$ROOTQT" = "x"; then
3965 if test -z "$QTDIR"; then
3966 # Extract the first word of "moc", so it can be a program name with args.
3967set dummy moc; ac_word=$2
3968echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3969echo "configure:3970: checking for $ac_word" >&5
3970if eval "test \"`echo '$''{'ac_cv_path_MOC'+set}'`\" = set"; then
3971 echo $ac_n "(cached) $ac_c" 1>&6
3972else
3973 case "$MOC" in
3974 /*)
3975 ac_cv_path_MOC="$MOC" # Let the user override the test with a path.
3976 ;;
3977 ?:/*)
3978 ac_cv_path_MOC="$MOC" # Let the user override the test with a dos path.
3979 ;;
3980 *)
3981 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3982 ac_dummy="$PATH"
3983 for ac_dir in $ac_dummy; do
3984 test -z "$ac_dir" && ac_dir=.
3985 if test -f $ac_dir/$ac_word; then
3986 ac_cv_path_MOC="$ac_dir/$ac_word"
3987 break
3988 fi
3989 done
3990 IFS="$ac_save_ifs"
3991 test -z "$ac_cv_path_MOC" && ac_cv_path_MOC="no"
3992 ;;
3993esac
3994fi
3995MOC="$ac_cv_path_MOC"
3996if test -n "$MOC"; then
3997 echo "$ac_t""$MOC" 1>&6
3998else
3999 echo "$ac_t""no" 1>&6
4000fi
4001
4002 if text"x$MOC" = "x"; then
4003 { echo "configure: error: could not find Qt directory" 1>&2; exit 1; }
4004 else
4005 ROOTQT=`echo $MOC | sed 's+/bin/moc++'`
4006 fi
4007 else
4008 ROOTQT="$QTDIR"
4009 fi
4010fi
4011MOC="$ROOTQT"/bin/moc
4012QT_INCLUDES="$ROOTQT"/include
4013QT_LIBS="$ROOTQT"/lib
4014
4015# Check whether --with-qt-includes or --without-qt-includes was given.
4016if test "${with_qt_includes+set}" = set; then
4017 withval="$with_qt_includes"
4018 QT_INCLUDES="$withval"
4019
4020fi
4021
4022
4023# Check whether --with-qt-libraries or --without-qt-libraries was given.
4024if test "${with_qt_libraries+set}" = set; then
4025 withval="$with_qt_libraries"
4026 QT_LIBS="$withval"
4027
4028fi
4029
4030
4031if test "x$QT_LIBS" = "x" ; then
4032 QT_LIBS="$ROOTQT"/lib
4033fi
4034if test "x$QT_INCLUDES" = "x" ; then
4035 QT_INCLUDES="$ROOTQT"/include
4036fi
4037
4038echo $ac_n "checking whether or not to use a KDE Toolbar in KVim""... $ac_c" 1>&6
4039echo "configure:4040: checking whether or not to use a KDE Toolbar in KVim" >&5
4040# Check whether --enable-kde-toolbar or --disable-kde-toolbar was given.
4041if test "${enable_kde_toolbar+set}" = set; then
4042 enableval="$enable_kde_toolbar"
4043 :
4044else
4045 enable_kde_toolbar="no"
4046fi
4047
4048if test "x$enable_kde_toolbar" != "xno"; then
4049 cat >> confdefs.h <<\EOF
4050#define FEAT_KDETOOLBAR 1
4051EOF
4052
4053fi
4054echo "$ac_t""$enable_kde_toolbar" 1>&6;
4055fi
4056
4057
4058if test -z "$SKIP_KDE"; then
4059
4060
4061echo $ac_n "checking --disable-rpath argument""... $ac_c" 1>&6
4062echo "configure:4063: checking --disable-rpath argument" >&5
4063# Check whether --enable-rpath or --disable-rpath was given.
4064if test "${enable_rpath+set}" = set; then
4065 enableval="$enable_rpath"
4066 :
4067else
4068 enable_rpath="yes"
4069fi
4070
4071if test "$enable_rpath" = "yes"; then
4072 echo "$ac_t""no" 1>&6
4073else
4074 echo "$ac_t""yes" 1>&6
4075fi
4076
4077echo $ac_n "checking --with-kde-prefix argument""... $ac_c" 1>&6
4078echo "configure:4079: checking --with-kde-prefix argument" >&5
4079# Check whether --with-kde-prefix or --without-kde-prefix was given.
4080if test "${with_kde_prefix+set}" = set; then
4081 withval="$with_kde_prefix"
4082 kde_config_prefix="$withval";
4083echo "$ac_t""$kde_config_prefix" 1>&6
4084else
4085 kde_config_prefix="";echo "$ac_t""no" 1>&6
4086fi
4087
4088
4089# Check whether --with-kde-includes or --without-kde-includes was given.
4090if test "${with_kde_includes+set}" = set; then
4091 withval="$with_kde_includes"
4092 KDE_INCLUDES="$withval"
4093
4094fi
4095
4096
4097# Check whether --with-kde-libraries or --without-kde-libraries was given.
4098if test "${with_kde_libraries+set}" = set; then
4099 withval="$with_kde_libraries"
4100 KDE_LIBS="$withval"
4101
4102fi
4103
4104
4105echo $ac_n "checking --disable-kdetest argument""... $ac_c" 1>&6
4106echo "configure:4107: checking --disable-kdetest argument" >&5
4107# Check whether --enable-kdetest or --disable-kdetest was given.
4108if test "${enable_kdetest+set}" = set; then
4109 enableval="$enable_kdetest"
4110 enable_kdetest=yes
4111fi
4112
4113
4114if test "x$enable_kdetest" = "xyes" ; then
4115 echo "$ac_t""kde test enabled" 1>&6
4116else
4117 echo "$ac_t""kde test disabled" 1>&6
4118fi
4119
4120if test "x$kde_config_prefix" != "x" ; then
4121 kde_config_args=""
4122 KDE_CONFIG=$kde_config_prefix/bin/kde-config
4123fi
4124
4125if test "X$KDE_CONFIG" = "X"; then
4126 # Extract the first word of "kde-config", so it can be a program name with args.
4127set dummy kde-config; ac_word=$2
4128echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4129echo "configure:4130: checking for $ac_word" >&5
4130if eval "test \"`echo '$''{'ac_cv_path_KDE_CONFIG'+set}'`\" = set"; then
4131 echo $ac_n "(cached) $ac_c" 1>&6
4132else
4133 case "$KDE_CONFIG" in
4134 /*)
4135 ac_cv_path_KDE_CONFIG="$KDE_CONFIG" # Let the user override the test with a path.
4136 ;;
4137 ?:/*)
4138 ac_cv_path_KDE_CONFIG="$KDE_CONFIG" # Let the user override the test with a dos path.
4139 ;;
4140 *)
4141 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4142 ac_dummy="$PATH"
4143 for ac_dir in $ac_dummy; do
4144 test -z "$ac_dir" && ac_dir=.
4145 if test -f $ac_dir/$ac_word; then
4146 ac_cv_path_KDE_CONFIG="$ac_dir/$ac_word"
4147 break
4148 fi
4149 done
4150 IFS="$ac_save_ifs"
4151 test -z "$ac_cv_path_KDE_CONFIG" && ac_cv_path_KDE_CONFIG="no"
4152 ;;
4153esac
4154fi
4155KDE_CONFIG="$ac_cv_path_KDE_CONFIG"
4156if test -n "$KDE_CONFIG"; then
4157 echo "$ac_t""$KDE_CONFIG" 1>&6
4158else
4159 echo "$ac_t""no" 1>&6
4160fi
4161
4162else
4163 echo "$ac_t""Using KDE configuration program $KDE_CONFIG" 1>&6
4164fi
4165
4166if test "X$KDE_CONFIG" != "X" ; then
4167
4168 if test "X$KDE_CONFIG" != "X"; then
4169 min_kde_version=2.0.0
4170 echo $ac_n "checking for KDE version >= $min_kde_version""... $ac_c" 1>&6
4171echo "configure:4172: checking for KDE version >= $min_kde_version" >&5
4172 no_kde=""
4173 if test "$KDE_CONFIG" = "no" ; then
4174 no_kde=yes
4175 else
4176 KDE_PREFIX=`$KDE_CONFIG $kde_config_args --prefix`
4177 if test "x$KDE_LIBS" = "x"; then
4178 KDE_LIBS="$KDE_PREFIX/lib"
4179 fi
4180 if test "x$KDE_INCLUDES" = "x"; then
4181 KDE_INCLUDES="$KDE_PREFIX/include"
4182 fi
4183 kde_major_version=`$KDE_CONFIG --version | grep KDE | \
4184sed 's/KDE:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\1/'`
4185 kde_minor_version=`$KDE_CONFIG --version | grep KDE | \
4186sed 's/KDE:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\2/'`
4187
4188 qt_major_version=`$KDE_CONFIG --version | grep Qt | sed -e \
4189's/Qt:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\1/'`
4190 qt_minor_version=`$KDE_CONFIG --version | grep Qt | sed -e \
4191's/Qt:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\2/'`
4192
4193 if test "x$enable-kdetest" = "xyes" ; then
4194 ac_save_LIBS="$LIBS"
4195 LIBS="$LIBS $KDE_LIBS"
4196
4197 if test "$cross_compiling" = yes; then
4198 echo $ac_n "cross compiling KDE ? ? how can i remove that ? :)"
4199else
4200 cat > conftest.$ac_ext <<EOF
4201#line 4202 "configure"
4202#include "confdefs.h"
4203
4204#include <stdio.h>
4205int
4206main()
4207{ return 0; }
4208
4209EOF
4210if { (eval echo configure:4211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4211then
4212 :
4213else
4214 echo "configure: failed program was:" >&5
4215 cat conftest.$ac_ext >&5
4216 rm -fr conftest*
4217 no_kde=yes
4218fi
4219rm -fr conftest*
4220fi
4221
4222 LIBS="$ac_save_LIBS"
4223 fi
4224 fi
4225 if test "x$no_kde" = x ; then
4226 echo "$ac_t""found KDE $kde_major_version.$kde_minor_version" 1>&6
4227 GUI_LIB_LOC="-L$KDE_LIBS -lkdeui -lkdecore -lDCOP"
4228 GUI_INC_LOC="-I$KDE_INCLUDES"
4229 KDEDIR="$KDE_PREFIX"
4230 else
4231 echo "$ac_t""no" 1>&6
4232 KDE_LIBS=""
4233 :
4234 fi
4235else
4236 echo "$ac_t""no" 1>&6
4237 KDE_LIBS=""
4238 :
4239fi
4240
4241
4242
4243
4244 if test "x$KDE_PREFIX" != "x"; then
4245 echo $ac_n "checking for QT version $qt_major_version.x""... $ac_c" 1>&6
4246echo "configure:4247: checking for QT version $qt_major_version.x" >&5
4247 if test "x$ROOTQT" != "x" ; then
4248 GUI_INC_LOC="-I$QT_INCLUDES $GUI_INC_LOC"
4249 if test $qt_major_version -lt 2; then
4250 { echo "configure: error: Your QT version is prior to 2.0; KDE 2.x and 3.x require at least QT 2" 1>&2; exit 1; }
4251 fi
4252 if test "`(uname) 2>/dev/null`" = "FreeBSD"; then
4253 CFLAGS="$CFLAGS -D_THREAD_SAFE"
4254 CXXFLAGS="$CXXFLAGS -D_THREAD_SAFE"
4255 GUI_LIB_LOC="$GUI_LIB_LOC -pthread"
4256 LIBS="$LIBS -pthread"
4257 fi
4258
4259 if test "x$enable_rpath" = "xyes"; then
4260 if test $qt_major_version = 2; then
4261 GUI_LIB_LOC="-L$KDE_LIBS -lkfile -L$QT_LIBS -lqt $GUI_LIB_LOC \
4262-Wl,--rpath -Wl,$KDE_LIBS -Wl,--rpath -Wl,$QT_LIBS"
4263 else
4264 GUI_LIB_LOC="-L$KDE_LIBS -lkio -L$QT_LIBS -lqt-mt $GUI_LIB_LOC \
4265-Wl,--rpath -Wl,$KDE_LIBS -Wl,--rpath -Wl,$QT_LIBS"
4266 fi
4267 else
4268 if test $qt_major_version = 2; then
4269 GUI_LIB_LOC="-L$KDE_LIBS -lkfile -L$QT_LIBS -lqt $GUI_LIB_LOC"
4270 else
4271 GUI_LIB_LOC="-L$KDE_LIBS -lkio -L$QT_LIBS -lqt-mt $GUI_LIB_LOC"
4272 fi
4273 fi
4274
4275 GUI_INC_LOC="`echo $GUI_INC_LOC\ | sed 's%-I/usr/include %%'`"
4276
4277 echo "$ac_t""found $qt_major_version.$qt_minor_version in $ROOTQT" 1>&6
4278 SKIP_GTK=YES
4279 SKIP_ATHENA=YES
4280 SKIP_MOTIF=YES
4281 GUITYPE=KDE
4282
4283
4284
4285
4286
4287 cat >> confdefs.h <<\EOF
4288#define FEAT_GUI_KDE 1
4289EOF
4290
4291 else
4292 { echo "configure: error: Detected QT version mismatched" 1>&2; exit 1; }
4293 fi
4294 else
4295 { echo "configure: error: Could not find KDE installation prefix" 1>&2; exit 1; }
4296 fi
4297fi
4298fi
4299
Bram Moolenaar071d4272004-06-13 20:20:40 +00004300if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
4301 echo $ac_n "checking for Carbon GUI""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004302echo "configure:4303: checking for Carbon GUI" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004303 echo "$ac_t""yes" 1>&6;
4304 GUITYPE=CARBONGUI
4305 SKIP_GTK=YES;
4306 SKIP_GTK2=YES;
4307 SKIP_GNOME=YES;
4308 SKIP_MOTIF=YES;
4309 SKIP_ATHENA=YES;
4310 SKIP_NEXTAW=YES;
4311 SKIP_PHOTON=YES;
4312 SKIP_BEOS=YES;
4313 SKIP_CARBON=YES
4314fi
4315
4316
4317
4318
4319
4320
4321
4322
4323
Bram Moolenaar071d4272004-06-13 20:20:40 +00004324if test -z "$SKIP_GTK"; then
4325
4326 echo $ac_n "checking --with-gtk-prefix argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004327echo "configure:4328: checking --with-gtk-prefix argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004328 # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
4329if test "${with_gtk_prefix+set}" = set; then
4330 withval="$with_gtk_prefix"
4331 gtk_config_prefix="$withval"; echo "$ac_t""$gtk_config_prefix" 1>&6
4332else
4333 gtk_config_prefix=""; echo "$ac_t""no" 1>&6
4334fi
4335
4336
4337 echo $ac_n "checking --with-gtk-exec-prefix argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004338echo "configure:4339: checking --with-gtk-exec-prefix argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004339 # Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
4340if test "${with_gtk_exec_prefix+set}" = set; then
4341 withval="$with_gtk_exec_prefix"
4342 gtk_config_exec_prefix="$withval"; echo "$ac_t""$gtk_config_prefix" 1>&6
4343else
4344 gtk_config_exec_prefix=""; echo "$ac_t""no" 1>&6
4345fi
4346
4347
4348 echo $ac_n "checking --disable-gtktest argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004349echo "configure:4350: checking --disable-gtktest argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004350 # Check whether --enable-gtktest or --disable-gtktest was given.
4351if test "${enable_gtktest+set}" = set; then
4352 enableval="$enable_gtktest"
4353 :
4354else
4355 enable_gtktest=yes
4356fi
4357
4358 if test "x$enable_gtktest" = "xyes" ; then
4359 echo "$ac_t""gtk test enabled" 1>&6
4360 else
4361 echo "$ac_t""gtk test disabled" 1>&6
4362 fi
4363
4364 if test "x$gtk_config_prefix" != "x" ; then
4365 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
4366 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
4367 fi
4368 if test "x$gtk_config_exec_prefix" != "x" ; then
4369 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
4370 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
4371 fi
4372 if test "X$GTK_CONFIG" = "X"; then
4373 # Extract the first word of "gtk-config", so it can be a program name with args.
4374set dummy gtk-config; ac_word=$2
4375echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004376echo "configure:4377: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004377if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
4378 echo $ac_n "(cached) $ac_c" 1>&6
4379else
4380 case "$GTK_CONFIG" in
4381 /*)
4382 ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
4383 ;;
4384 ?:/*)
4385 ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
4386 ;;
4387 *)
4388 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4389 ac_dummy="$PATH"
4390 for ac_dir in $ac_dummy; do
4391 test -z "$ac_dir" && ac_dir=.
4392 if test -f $ac_dir/$ac_word; then
4393 ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
4394 break
4395 fi
4396 done
4397 IFS="$ac_save_ifs"
4398 test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
4399 ;;
4400esac
4401fi
4402GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
4403if test -n "$GTK_CONFIG"; then
4404 echo "$ac_t""$GTK_CONFIG" 1>&6
4405else
4406 echo "$ac_t""no" 1>&6
4407fi
4408
4409 if test "X$GTK_CONFIG" = "Xno"; then
4410 # Extract the first word of "gtk12-config", so it can be a program name with args.
4411set dummy gtk12-config; ac_word=$2
4412echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004413echo "configure:4414: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004414if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
4415 echo $ac_n "(cached) $ac_c" 1>&6
4416else
4417 case "$GTK12_CONFIG" in
4418 /*)
4419 ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a path.
4420 ;;
4421 ?:/*)
4422 ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a dos path.
4423 ;;
4424 *)
4425 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4426 ac_dummy="$PATH"
4427 for ac_dir in $ac_dummy; do
4428 test -z "$ac_dir" && ac_dir=.
4429 if test -f $ac_dir/$ac_word; then
4430 ac_cv_path_GTK12_CONFIG="$ac_dir/$ac_word"
4431 break
4432 fi
4433 done
4434 IFS="$ac_save_ifs"
4435 test -z "$ac_cv_path_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
4436 ;;
4437esac
4438fi
4439GTK12_CONFIG="$ac_cv_path_GTK12_CONFIG"
4440if test -n "$GTK12_CONFIG"; then
4441 echo "$ac_t""$GTK12_CONFIG" 1>&6
4442else
4443 echo "$ac_t""no" 1>&6
4444fi
4445
4446 GTK_CONFIG="$GTK12_CONFIG"
4447 fi
4448 else
4449 echo "$ac_t""Using GTK configuration program $GTK_CONFIG" 1>&6
4450 fi
4451 if test "X$PKG_CONFIG" = "X"; then
4452 # Extract the first word of "pkg-config", so it can be a program name with args.
4453set dummy pkg-config; ac_word=$2
4454echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004455echo "configure:4456: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004456if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
4457 echo $ac_n "(cached) $ac_c" 1>&6
4458else
4459 case "$PKG_CONFIG" in
4460 /*)
4461 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4462 ;;
4463 ?:/*)
4464 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
4465 ;;
4466 *)
4467 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4468 ac_dummy="$PATH"
4469 for ac_dir in $ac_dummy; do
4470 test -z "$ac_dir" && ac_dir=.
4471 if test -f $ac_dir/$ac_word; then
4472 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4473 break
4474 fi
4475 done
4476 IFS="$ac_save_ifs"
4477 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
4478 ;;
4479esac
4480fi
4481PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4482if test -n "$PKG_CONFIG"; then
4483 echo "$ac_t""$PKG_CONFIG" 1>&6
4484else
4485 echo "$ac_t""no" 1>&6
4486fi
4487
4488 fi
4489
4490 if test "x$GTK_CONFIG:$PKG_CONFIG" != "xno:no"; then
4491 if test "X$SKIP_GTK2" != "XYES"; then
4492
4493 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
4494 {
4495 min_gtk_version=2.2.0
4496 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004497echo "configure:4498: checking for GTK - version >= $min_gtk_version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004498 no_gtk=""
4499 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
4500 && $PKG_CONFIG --exists gtk+-2.0; then
4501 {
4502 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
4503 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
4504 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4505 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4506 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4507 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4508 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4509 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4510 }
4511 elif test "X$GTK_CONFIG" != "Xno"; then
4512 {
4513 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
4514 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
4515 gtk_major_version=`$GTK_CONFIG $gtk_config_args --version | \
4516 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4517 gtk_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
4518 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4519 gtk_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
4520 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4521 }
4522 else
4523 no_gtk=yes
4524 fi
4525
4526 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
4527 {
4528 ac_save_CFLAGS="$CFLAGS"
4529 ac_save_LIBS="$LIBS"
4530 CFLAGS="$CFLAGS $GTK_CFLAGS"
4531 LIBS="$LIBS $GTK_LIBS"
4532
4533 rm -f conf.gtktest
4534 if test "$cross_compiling" = yes; then
4535 echo $ac_n "cross compiling; assumed OK... $ac_c"
4536else
4537 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00004538#line 4539 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00004539#include "confdefs.h"
4540
4541#include <gtk/gtk.h>
4542#include <stdio.h>
4543
4544int
4545main ()
4546{
4547int major, minor, micro;
4548char *tmp_version;
4549
4550system ("touch conf.gtktest");
4551
4552/* HP/UX 9 (%@#!) writes to sscanf strings */
4553tmp_version = g_strdup("$min_gtk_version");
4554if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
4555 printf("%s, bad version string\n", "$min_gtk_version");
4556 exit(1);
4557 }
4558
4559if ((gtk_major_version > major) ||
4560 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
4561 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
4562 (gtk_micro_version >= micro)))
4563{
4564 return 0;
4565}
4566return 1;
4567}
4568
4569EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00004570if { (eval echo configure:4571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00004571then
4572 :
4573else
4574 echo "configure: failed program was:" >&5
4575 cat conftest.$ac_ext >&5
4576 rm -fr conftest*
4577 no_gtk=yes
4578fi
4579rm -fr conftest*
4580fi
4581
4582 CFLAGS="$ac_save_CFLAGS"
4583 LIBS="$ac_save_LIBS"
4584 }
4585 fi
4586 if test "x$no_gtk" = x ; then
4587 if test "x$enable_gtktest" = "xyes"; then
4588 echo "$ac_t""yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4589 else
4590 echo "$ac_t""found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4591 fi
4592 GTK_LIBNAME="$GTK_LIBS"
4593 GUI_INC_LOC="$GTK_CFLAGS"
4594 else
4595 {
4596 echo "$ac_t""no" 1>&6
4597 GTK_CFLAGS=""
4598 GTK_LIBS=""
4599 :
4600 }
4601 fi
4602 }
4603 else
4604 GTK_CFLAGS=""
4605 GTK_LIBS=""
4606 :
4607 fi
4608
4609
4610 rm -f conf.gtktest
4611
4612 if test "x$GTK_CFLAGS" != "x"; then
4613 SKIP_ATHENA=YES
4614 SKIP_NEXTAW=YES
4615 SKIP_MOTIF=YES
4616 GUITYPE=GTK
4617
4618 fi
4619 fi
4620
4621 if test "x$GUITYPE" != "xGTK"; then
4622 SKIP_GTK2=YES
4623
4624 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
4625 {
4626 min_gtk_version=1.1.16
4627 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004628echo "configure:4629: checking for GTK - version >= $min_gtk_version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004629 no_gtk=""
4630 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
4631 && $PKG_CONFIG --exists gtk+-2.0; then
4632 {
4633 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
4634 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
4635 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4636 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4637 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4638 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4639 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4640 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4641 }
4642 elif test "X$GTK_CONFIG" != "Xno"; then
4643 {
4644 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
4645 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
4646 gtk_major_version=`$GTK_CONFIG $gtk_config_args --version | \
4647 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4648 gtk_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
4649 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4650 gtk_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
4651 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4652 }
4653 else
4654 no_gtk=yes
4655 fi
4656
4657 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
4658 {
4659 ac_save_CFLAGS="$CFLAGS"
4660 ac_save_LIBS="$LIBS"
4661 CFLAGS="$CFLAGS $GTK_CFLAGS"
4662 LIBS="$LIBS $GTK_LIBS"
4663
4664 rm -f conf.gtktest
4665 if test "$cross_compiling" = yes; then
4666 echo $ac_n "cross compiling; assumed OK... $ac_c"
4667else
4668 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00004669#line 4670 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00004670#include "confdefs.h"
4671
4672#include <gtk/gtk.h>
4673#include <stdio.h>
4674
4675int
4676main ()
4677{
4678int major, minor, micro;
4679char *tmp_version;
4680
4681system ("touch conf.gtktest");
4682
4683/* HP/UX 9 (%@#!) writes to sscanf strings */
4684tmp_version = g_strdup("$min_gtk_version");
4685if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
4686 printf("%s, bad version string\n", "$min_gtk_version");
4687 exit(1);
4688 }
4689
4690if ((gtk_major_version > major) ||
4691 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
4692 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
4693 (gtk_micro_version >= micro)))
4694{
4695 return 0;
4696}
4697return 1;
4698}
4699
4700EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00004701if { (eval echo configure:4702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00004702then
4703 :
4704else
4705 echo "configure: failed program was:" >&5
4706 cat conftest.$ac_ext >&5
4707 rm -fr conftest*
4708 no_gtk=yes
4709fi
4710rm -fr conftest*
4711fi
4712
4713 CFLAGS="$ac_save_CFLAGS"
4714 LIBS="$ac_save_LIBS"
4715 }
4716 fi
4717 if test "x$no_gtk" = x ; then
4718 if test "x$enable_gtktest" = "xyes"; then
4719 echo "$ac_t""yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4720 else
4721 echo "$ac_t""found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4722 fi
4723 GTK_LIBNAME="$GTK_LIBS"
4724 GUI_INC_LOC="$GTK_CFLAGS"
4725 else
4726 {
4727 echo "$ac_t""no" 1>&6
4728 GTK_CFLAGS=""
4729 GTK_LIBS=""
4730 :
4731 }
4732 fi
4733 }
4734 else
4735 GTK_CFLAGS=""
4736 GTK_LIBS=""
4737 :
4738 fi
4739
4740
4741 rm -f conf.gtktest
4742
4743 if test "x$GTK_CFLAGS" != "x"; then
4744 SKIP_ATHENA=YES
4745 SKIP_NEXTAW=YES
4746 SKIP_MOTIF=YES
4747 GUITYPE=GTK
4748
4749 fi
4750 fi
4751 fi
4752 if test "x$GUITYPE" = "xGTK"; then
4753 if test "$gtk_major_version" = 1 -a "0$gtk_minor_version" -lt 2 \
4754 -o "$gtk_major_version" = 1 -a "$gtk_minor_version" = 2 -a "0$gtk_micro_version" -lt 3; then
4755 echo "$ac_t""this GTK version is old; version 1.2.3 or later is recommended" 1>&6
4756 else
4757 {
4758 if test "0$gtk_major_version" -ge 2; then
4759 cat >> confdefs.h <<\EOF
4760#define HAVE_GTK2 1
4761EOF
4762
4763 if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \
4764 || test "0$gtk_minor_version" -ge 2 \
4765 || test "0$gtk_major_version" -gt 2; then
4766 cat >> confdefs.h <<\EOF
4767#define HAVE_GTK_MULTIHEAD 1
4768EOF
4769
4770 fi
4771 fi
4772 if test -z "$SKIP_GNOME"; then
4773 {
4774
4775
4776
4777
4778
4779 # Check whether --with-gnome-includes or --without-gnome-includes was given.
4780if test "${with_gnome_includes+set}" = set; then
4781 withval="$with_gnome_includes"
4782 CFLAGS="$CFLAGS -I$withval"
4783
4784fi
4785
4786
4787 # Check whether --with-gnome-libs or --without-gnome-libs was given.
4788if test "${with_gnome_libs+set}" = set; then
4789 withval="$with_gnome_libs"
4790 LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
4791
4792fi
4793
4794
4795 # Check whether --with-gnome or --without-gnome was given.
4796if test "${with_gnome+set}" = set; then
4797 withval="$with_gnome"
4798 if test x$withval = xyes; then
4799 want_gnome=yes
4800 have_gnome=yes
4801 else
4802 if test "x$withval" = xno; then
4803 want_gnome=no
4804 else
4805 want_gnome=yes
4806 LDFLAGS="$LDFLAGS -L$withval/lib"
4807 CFLAGS="$CFLAGS -I$withval/include"
4808 gnome_prefix=$withval/lib
4809 fi
4810 fi
4811else
4812 want_gnome=yes
4813fi
4814
4815
4816 if test "x$want_gnome" = xyes -a "0$gtk_major_version" -ge 2; then
4817 {
4818 echo $ac_n "checking for libgnomeui-2.0""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004819echo "configure:4820: checking for libgnomeui-2.0" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004820 if $PKG_CONFIG --exists libgnomeui-2.0; then
4821 echo "$ac_t""yes" 1>&6
4822 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
4823 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
4824 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
4825 have_gnome=yes
4826 else
4827 echo "$ac_t""not found" 1>&6
4828 if test "x" = xfail; then
4829 { echo "configure: error: Could not find libgnomeui-2.0 via pkg-config" 1>&2; exit 1; }
4830 fi
4831 fi
4832 }
4833 elif test "x$want_gnome" = xyes; then
4834 {
4835 # Extract the first word of "gnome-config", so it can be a program name with args.
4836set dummy gnome-config; ac_word=$2
4837echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004838echo "configure:4839: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004839if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
4840 echo $ac_n "(cached) $ac_c" 1>&6
4841else
4842 case "$GNOME_CONFIG" in
4843 /*)
4844 ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
4845 ;;
4846 ?:/*)
4847 ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
4848 ;;
4849 *)
4850 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4851 ac_dummy="$PATH"
4852 for ac_dir in $ac_dummy; do
4853 test -z "$ac_dir" && ac_dir=.
4854 if test -f $ac_dir/$ac_word; then
4855 ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
4856 break
4857 fi
4858 done
4859 IFS="$ac_save_ifs"
4860 test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
4861 ;;
4862esac
4863fi
4864GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
4865if test -n "$GNOME_CONFIG"; then
4866 echo "$ac_t""$GNOME_CONFIG" 1>&6
4867else
4868 echo "$ac_t""no" 1>&6
4869fi
4870
4871 if test "$GNOME_CONFIG" = "no"; then
4872 no_gnome_config="yes"
4873 else
4874 echo $ac_n "checking if $GNOME_CONFIG works""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004875echo "configure:4876: checking if $GNOME_CONFIG works" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004876 if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
4877 echo "$ac_t""yes" 1>&6
4878 GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome gnomeui`"
4879 GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
4880 GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
4881 have_gnome=yes
4882 else
4883 echo "$ac_t""no" 1>&6
4884 no_gnome_config="yes"
4885 fi
4886 fi
4887
4888 if test x$exec_prefix = xNONE; then
4889 if test x$prefix = xNONE; then
4890 gnome_prefix=$ac_default_prefix/lib
4891 else
4892 gnome_prefix=$prefix/lib
4893 fi
4894 else
4895 gnome_prefix=`eval echo \`echo $libdir\``
4896 fi
4897
4898 if test "$no_gnome_config" = "yes"; then
4899 echo $ac_n "checking for gnomeConf.sh file in $gnome_prefix""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004900echo "configure:4901: checking for gnomeConf.sh file in $gnome_prefix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004901 if test -f $gnome_prefix/gnomeConf.sh; then
4902 echo "$ac_t""found" 1>&6
4903 echo "loading gnome configuration from" \
4904 "$gnome_prefix/gnomeConf.sh"
4905 . $gnome_prefix/gnomeConf.sh
4906 have_gnome=yes
4907 else
4908 echo "$ac_t""not found" 1>&6
4909 if test x = xfail; then
4910 { echo "configure: error: Could not find the gnomeConf.sh file that is generated by gnome-libs install" 1>&2; exit 1; }
4911 fi
4912 fi
4913 fi
4914 }
4915 fi
4916
4917 if test x$have_gnome = xyes ; then
4918 cat >> confdefs.h <<\EOF
4919#define FEAT_GUI_GNOME 1
4920EOF
4921
4922 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
4923 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
4924 fi
4925 }
4926 fi
4927 }
4928 fi
4929 fi
4930fi
4931
4932
4933if test -z "$SKIP_MOTIF"; then
4934 gui_XXX="/usr/XXX/Motif* /usr/Motif*/XXX /usr/XXX /usr/shlib /usr/X11*/XXX /usr/XXX/X11* /usr/dt/XXX /local/Motif*/XXX /local/XXX/Motif* /usr/local/Motif*/XXX /usr/local/XXX/Motif* /usr/local/XXX /usr/local/X11*/XXX /usr/local/LessTif/Motif*/XXX $MOTIFHOME/XXX"
4935 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
4936
4937 echo $ac_n "checking for location of Motif GUI includes""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004938echo "configure:4939: checking for location of Motif GUI includes" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004939 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
4940 GUI_INC_LOC=
4941 for try in $gui_includes; do
4942 if test -f "$try/Xm/Xm.h"; then
4943 GUI_INC_LOC=$try
4944 fi
4945 done
4946 if test -n "$GUI_INC_LOC"; then
4947 if test "$GUI_INC_LOC" = /usr/include; then
4948 GUI_INC_LOC=
4949 echo "$ac_t""in default path" 1>&6
4950 else
4951 echo "$ac_t""$GUI_INC_LOC" 1>&6
4952 fi
4953 else
4954 echo "$ac_t""<not found>" 1>&6
4955 SKIP_MOTIF=YES
4956 fi
4957fi
4958
4959
4960if test -z "$SKIP_MOTIF"; then
4961 echo $ac_n "checking --with-motif-lib argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004962echo "configure:4963: checking --with-motif-lib argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004963 # Check whether --with-motif-lib or --without-motif-lib was given.
4964if test "${with_motif_lib+set}" = set; then
4965 withval="$with_motif_lib"
4966 MOTIF_LIBNAME="${withval}"
4967fi
4968
4969
4970 if test -n "$MOTIF_LIBNAME"; then
4971 echo "$ac_t""$MOTIF_LIBNAME" 1>&6
4972 GUI_LIB_LOC=
4973 else
4974 echo "$ac_t""no" 1>&6
4975
4976 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
4977
4978 echo $ac_n "checking for location of Motif GUI libs""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00004979echo "configure:4980: checking for location of Motif GUI libs" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004980 gui_libs="`echo $x_libraries|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/lib/g` `echo "$GUI_INC_LOC" | sed s/include/lib/` $GUI_LIB_LOC"
4981 GUI_LIB_LOC=
4982 for try in $gui_libs; do
4983 for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl; do
4984 if test -f "$libtry"; then
4985 GUI_LIB_LOC=$try
4986 fi
4987 done
4988 done
4989 if test -n "$GUI_LIB_LOC"; then
4990 if test "$GUI_LIB_LOC" = /usr/lib; then
4991 GUI_LIB_LOC=
4992 echo "$ac_t""in default path" 1>&6
4993 else
4994 if test -n "$GUI_LIB_LOC"; then
4995 echo "$ac_t""$GUI_LIB_LOC" 1>&6
4996 if test "`(uname) 2>/dev/null`" = SunOS &&
4997 uname -r | grep '^5' >/dev/null; then
4998 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
4999 fi
5000 fi
5001 fi
5002 MOTIF_LIBNAME=-lXm
5003 else
5004 echo "$ac_t""<not found>" 1>&6
5005 SKIP_MOTIF=YES
5006 fi
5007 fi
5008fi
5009
5010if test -z "$SKIP_MOTIF"; then
5011 SKIP_ATHENA=YES
5012 SKIP_NEXTAW=YES
5013 GUITYPE=MOTIF
5014
5015fi
5016
5017
5018GUI_X_LIBS=
5019
5020if test -z "$SKIP_ATHENA"; then
5021 echo $ac_n "checking if Athena header files can be found""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005022echo "configure:5023: checking if Athena header files can be found" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005023 cflags_save=$CFLAGS
5024 CFLAGS="$CFLAGS $X_CFLAGS"
5025 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005026#line 5027 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005027#include "confdefs.h"
5028
5029#include <X11/Intrinsic.h>
5030#include <X11/Xaw/Paned.h>
5031int main() {
5032
5033; return 0; }
5034EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005035if { (eval echo configure:5036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005036 rm -rf conftest*
5037 echo "$ac_t""yes" 1>&6
5038else
5039 echo "configure: failed program was:" >&5
5040 cat conftest.$ac_ext >&5
5041 rm -rf conftest*
5042 echo "$ac_t""no" 1>&6; SKIP_ATHENA=YES
5043fi
5044rm -f conftest*
5045 CFLAGS=$cflags_save
5046fi
5047
5048if test -z "$SKIP_ATHENA"; then
5049 GUITYPE=ATHENA
5050fi
5051
5052if test -z "$SKIP_NEXTAW"; then
5053 echo $ac_n "checking if neXtaw header files can be found""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005054echo "configure:5055: checking if neXtaw header files can be found" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005055 cflags_save=$CFLAGS
5056 CFLAGS="$CFLAGS $X_CFLAGS"
5057 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005058#line 5059 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005059#include "confdefs.h"
5060
5061#include <X11/Intrinsic.h>
5062#include <X11/neXtaw/Paned.h>
5063int main() {
5064
5065; return 0; }
5066EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005067if { (eval echo configure:5068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005068 rm -rf conftest*
5069 echo "$ac_t""yes" 1>&6
5070else
5071 echo "configure: failed program was:" >&5
5072 cat conftest.$ac_ext >&5
5073 rm -rf conftest*
5074 echo "$ac_t""no" 1>&6; SKIP_NEXTAW=YES
5075fi
5076rm -f conftest*
5077 CFLAGS=$cflags_save
5078fi
5079
5080if test -z "$SKIP_NEXTAW"; then
5081 GUITYPE=NEXTAW
5082fi
5083
5084if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
5085 if test -n "$GUI_INC_LOC"; then
5086 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
5087 fi
5088 if test -n "$GUI_LIB_LOC"; then
5089 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
5090 fi
5091
5092 ldflags_save=$LDFLAGS
5093 LDFLAGS="$X_LIBS $LDFLAGS"
5094 echo $ac_n "checking for XShapeQueryExtension in -lXext""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005095echo "configure:5096: checking for XShapeQueryExtension in -lXext" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005096ac_lib_var=`echo Xext'_'XShapeQueryExtension | sed 'y%./+-%__p_%'`
5097if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5098 echo $ac_n "(cached) $ac_c" 1>&6
5099else
5100 ac_save_LIBS="$LIBS"
5101LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5102cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005103#line 5104 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005104#include "confdefs.h"
5105/* Override any gcc2 internal prototype to avoid an error. */
5106/* We use char because int might match the return type of a gcc2
5107 builtin and then its argument prototype would still apply. */
5108char XShapeQueryExtension();
5109
5110int main() {
5111XShapeQueryExtension()
5112; return 0; }
5113EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005114if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005115 rm -rf conftest*
5116 eval "ac_cv_lib_$ac_lib_var=yes"
5117else
5118 echo "configure: failed program was:" >&5
5119 cat conftest.$ac_ext >&5
5120 rm -rf conftest*
5121 eval "ac_cv_lib_$ac_lib_var=no"
5122fi
5123rm -f conftest*
5124LIBS="$ac_save_LIBS"
5125
5126fi
5127if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5128 echo "$ac_t""yes" 1>&6
5129 GUI_X_LIBS="-lXext"
5130else
5131 echo "$ac_t""no" 1>&6
5132fi
5133
5134 echo $ac_n "checking for wslen in -lw""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005135echo "configure:5136: checking for wslen in -lw" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005136ac_lib_var=`echo w'_'wslen | sed 'y%./+-%__p_%'`
5137if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5138 echo $ac_n "(cached) $ac_c" 1>&6
5139else
5140 ac_save_LIBS="$LIBS"
5141LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5142cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005143#line 5144 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005144#include "confdefs.h"
5145/* Override any gcc2 internal prototype to avoid an error. */
5146/* We use char because int might match the return type of a gcc2
5147 builtin and then its argument prototype would still apply. */
5148char wslen();
5149
5150int main() {
5151wslen()
5152; return 0; }
5153EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005154if { (eval echo configure:5155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005155 rm -rf conftest*
5156 eval "ac_cv_lib_$ac_lib_var=yes"
5157else
5158 echo "configure: failed program was:" >&5
5159 cat conftest.$ac_ext >&5
5160 rm -rf conftest*
5161 eval "ac_cv_lib_$ac_lib_var=no"
5162fi
5163rm -f conftest*
5164LIBS="$ac_save_LIBS"
5165
5166fi
5167if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5168 echo "$ac_t""yes" 1>&6
5169 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
5170else
5171 echo "$ac_t""no" 1>&6
5172fi
5173
5174 echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005175echo "configure:5176: checking for dlsym in -ldl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005176ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
5177if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5178 echo $ac_n "(cached) $ac_c" 1>&6
5179else
5180 ac_save_LIBS="$LIBS"
5181LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5182cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005183#line 5184 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005184#include "confdefs.h"
5185/* Override any gcc2 internal prototype to avoid an error. */
5186/* We use char because int might match the return type of a gcc2
5187 builtin and then its argument prototype would still apply. */
5188char dlsym();
5189
5190int main() {
5191dlsym()
5192; return 0; }
5193EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005194if { (eval echo configure:5195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005195 rm -rf conftest*
5196 eval "ac_cv_lib_$ac_lib_var=yes"
5197else
5198 echo "configure: failed program was:" >&5
5199 cat conftest.$ac_ext >&5
5200 rm -rf conftest*
5201 eval "ac_cv_lib_$ac_lib_var=no"
5202fi
5203rm -f conftest*
5204LIBS="$ac_save_LIBS"
5205
5206fi
5207if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5208 echo "$ac_t""yes" 1>&6
5209 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
5210else
5211 echo "$ac_t""no" 1>&6
5212fi
5213
5214 echo $ac_n "checking for XmuCreateStippledPixmap in -lXmu""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005215echo "configure:5216: checking for XmuCreateStippledPixmap in -lXmu" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005216ac_lib_var=`echo Xmu'_'XmuCreateStippledPixmap | sed 'y%./+-%__p_%'`
5217if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5218 echo $ac_n "(cached) $ac_c" 1>&6
5219else
5220 ac_save_LIBS="$LIBS"
5221LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5222cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005223#line 5224 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005224#include "confdefs.h"
5225/* Override any gcc2 internal prototype to avoid an error. */
5226/* We use char because int might match the return type of a gcc2
5227 builtin and then its argument prototype would still apply. */
5228char XmuCreateStippledPixmap();
5229
5230int main() {
5231XmuCreateStippledPixmap()
5232; return 0; }
5233EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005234if { (eval echo configure:5235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005235 rm -rf conftest*
5236 eval "ac_cv_lib_$ac_lib_var=yes"
5237else
5238 echo "configure: failed program was:" >&5
5239 cat conftest.$ac_ext >&5
5240 rm -rf conftest*
5241 eval "ac_cv_lib_$ac_lib_var=no"
5242fi
5243rm -f conftest*
5244LIBS="$ac_save_LIBS"
5245
5246fi
5247if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5248 echo "$ac_t""yes" 1>&6
5249 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
5250else
5251 echo "$ac_t""no" 1>&6
5252fi
5253
5254 if test -z "$SKIP_MOTIF"; then
5255 echo $ac_n "checking for XpEndJob in -lXp""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005256echo "configure:5257: checking for XpEndJob in -lXp" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005257ac_lib_var=`echo Xp'_'XpEndJob | sed 'y%./+-%__p_%'`
5258if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5259 echo $ac_n "(cached) $ac_c" 1>&6
5260else
5261 ac_save_LIBS="$LIBS"
5262LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5263cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005264#line 5265 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005265#include "confdefs.h"
5266/* Override any gcc2 internal prototype to avoid an error. */
5267/* We use char because int might match the return type of a gcc2
5268 builtin and then its argument prototype would still apply. */
5269char XpEndJob();
5270
5271int main() {
5272XpEndJob()
5273; return 0; }
5274EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005275if { (eval echo configure:5276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005276 rm -rf conftest*
5277 eval "ac_cv_lib_$ac_lib_var=yes"
5278else
5279 echo "configure: failed program was:" >&5
5280 cat conftest.$ac_ext >&5
5281 rm -rf conftest*
5282 eval "ac_cv_lib_$ac_lib_var=no"
5283fi
5284rm -f conftest*
5285LIBS="$ac_save_LIBS"
5286
5287fi
5288if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5289 echo "$ac_t""yes" 1>&6
5290 GUI_X_LIBS="-lXp $GUI_X_LIBS"
5291else
5292 echo "$ac_t""no" 1>&6
5293fi
5294
5295 fi
5296 LDFLAGS=$ldflags_save
5297
5298 echo $ac_n "checking for extra X11 defines""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005299echo "configure:5300: checking for extra X11 defines" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005300 NARROW_PROTO=
5301 rm -fr conftestdir
5302 if mkdir conftestdir; then
5303 cd conftestdir
5304 cat > Imakefile <<'EOF'
5305acfindx:
5306 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
5307EOF
5308 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5309 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5310 fi
5311 cd ..
5312 rm -fr conftestdir
5313 fi
5314 if test -z "$NARROW_PROTO"; then
5315 echo "$ac_t""no" 1>&6
5316 else
5317 echo "$ac_t""$NARROW_PROTO" 1>&6
5318 fi
5319
5320fi
5321
5322if test "$enable_xsmp" = "yes"; then
5323 cppflags_save=$CPPFLAGS
5324 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5325 for ac_hdr in X11/SM/SMlib.h
5326do
5327ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5328echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005329echo "configure:5330: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005330if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5331 echo $ac_n "(cached) $ac_c" 1>&6
5332else
5333 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005334#line 5335 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005335#include "confdefs.h"
5336#include <$ac_hdr>
5337EOF
5338ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +00005339{ (eval echo configure:5340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005340ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5341if test -z "$ac_err"; then
5342 rm -rf conftest*
5343 eval "ac_cv_header_$ac_safe=yes"
5344else
5345 echo "$ac_err" >&5
5346 echo "configure: failed program was:" >&5
5347 cat conftest.$ac_ext >&5
5348 rm -rf conftest*
5349 eval "ac_cv_header_$ac_safe=no"
5350fi
5351rm -f conftest*
5352fi
5353if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5354 echo "$ac_t""yes" 1>&6
5355 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5356 cat >> confdefs.h <<EOF
5357#define $ac_tr_hdr 1
5358EOF
5359
5360else
5361 echo "$ac_t""no" 1>&6
5362fi
5363done
5364
5365 CPPFLAGS=$cppflags_save
5366fi
5367
5368
5369if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_GTK"; then
5370 cppflags_save=$CPPFLAGS
5371 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5372 for ac_hdr in X11/xpm.h X11/Sunkeysym.h
5373do
5374ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5375echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005376echo "configure:5377: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005377if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5378 echo $ac_n "(cached) $ac_c" 1>&6
5379else
5380 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005381#line 5382 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005382#include "confdefs.h"
5383#include <$ac_hdr>
5384EOF
5385ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +00005386{ (eval echo configure:5387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005387ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5388if test -z "$ac_err"; then
5389 rm -rf conftest*
5390 eval "ac_cv_header_$ac_safe=yes"
5391else
5392 echo "$ac_err" >&5
5393 echo "configure: failed program was:" >&5
5394 cat conftest.$ac_ext >&5
5395 rm -rf conftest*
5396 eval "ac_cv_header_$ac_safe=no"
5397fi
5398rm -f conftest*
5399fi
5400if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5401 echo "$ac_t""yes" 1>&6
5402 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5403 cat >> confdefs.h <<EOF
5404#define $ac_tr_hdr 1
5405EOF
5406
5407else
5408 echo "$ac_t""no" 1>&6
5409fi
5410done
5411
5412
5413 if test ! "$enable_xim" = "no"; then
5414 echo $ac_n "checking for XIMText in X11/Xlib.h""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005415echo "configure:5416: checking for XIMText in X11/Xlib.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005416 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005417#line 5418 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005418#include "confdefs.h"
5419#include <X11/Xlib.h>
5420EOF
5421if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5422 egrep "XIMText" >/dev/null 2>&1; then
5423 rm -rf conftest*
5424 echo "$ac_t""yes" 1>&6
5425else
5426 rm -rf conftest*
5427 echo "$ac_t""no; xim has been disabled" 1>&6; enable_xim = "no"
5428fi
5429rm -f conftest*
5430
5431 fi
5432 CPPFLAGS=$cppflags_save
5433
5434 if test "$enable_xim" = "auto" -a "$enable_hangulinput" != "yes" \
5435 -a "x$GUITYPE" != "xNONE" ; then
5436 echo "$ac_t""X GUI selected; xim has been enabled" 1>&6
5437 enable_xim="yes"
5438 fi
5439fi
5440
5441if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
5442 cppflags_save=$CPPFLAGS
5443 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5444 for ac_hdr in X11/Xmu/Editres.h
5445do
5446ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5447echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005448echo "configure:5449: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005449if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5450 echo $ac_n "(cached) $ac_c" 1>&6
5451else
5452 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005453#line 5454 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005454#include "confdefs.h"
5455#include <$ac_hdr>
5456EOF
5457ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +00005458{ (eval echo configure:5459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005459ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5460if test -z "$ac_err"; then
5461 rm -rf conftest*
5462 eval "ac_cv_header_$ac_safe=yes"
5463else
5464 echo "$ac_err" >&5
5465 echo "configure: failed program was:" >&5
5466 cat conftest.$ac_ext >&5
5467 rm -rf conftest*
5468 eval "ac_cv_header_$ac_safe=no"
5469fi
5470rm -f conftest*
5471fi
5472if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5473 echo "$ac_t""yes" 1>&6
5474 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5475 cat >> confdefs.h <<EOF
5476#define $ac_tr_hdr 1
5477EOF
5478
5479else
5480 echo "$ac_t""no" 1>&6
5481fi
5482done
5483
5484 CPPFLAGS=$cppflags_save
5485fi
5486
5487if test -z "$SKIP_MOTIF"; then
5488 cppflags_save=$CPPFLAGS
5489 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5490 for ac_hdr in Xm/Xm.h Xm/XpmP.h
5491do
5492ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5493echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005494echo "configure:5495: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005495if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5496 echo $ac_n "(cached) $ac_c" 1>&6
5497else
5498 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005499#line 5500 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005500#include "confdefs.h"
5501#include <$ac_hdr>
5502EOF
5503ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +00005504{ (eval echo configure:5505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005505ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5506if test -z "$ac_err"; then
5507 rm -rf conftest*
5508 eval "ac_cv_header_$ac_safe=yes"
5509else
5510 echo "$ac_err" >&5
5511 echo "configure: failed program was:" >&5
5512 cat conftest.$ac_ext >&5
5513 rm -rf conftest*
5514 eval "ac_cv_header_$ac_safe=no"
5515fi
5516rm -f conftest*
5517fi
5518if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5519 echo "$ac_t""yes" 1>&6
5520 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5521 cat >> confdefs.h <<EOF
5522#define $ac_tr_hdr 1
5523EOF
5524
5525else
5526 echo "$ac_t""no" 1>&6
5527fi
5528done
5529
5530 CPPFLAGS=$cppflags_save
5531fi
5532
5533if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
5534 echo "$ac_t""no GUI selected; xim has been disabled" 1>&6
5535 enable_xim="no"
5536fi
5537if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
5538 echo "$ac_t""no GUI selected; fontset has been disabled" 1>&6
5539 enable_fontset="no"
5540fi
5541if test "x$GUITYPE:$enable_fontset" = "xGTK:yes" -a "0$gtk_major_version" -ge 2; then
5542 echo "$ac_t""GTK+ 2 GUI selected; fontset has been disabled" 1>&6
5543 enable_fontset="no"
5544fi
5545
5546if test -z "$SKIP_BEOS"; then
5547 GUITYPE=BEOSGUI
5548fi
5549
5550if test -z "$SKIP_PHOTON"; then
5551 GUITYPE=PHOTONGUI
5552fi
5553
5554
5555
5556
5557
5558
5559if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
5560 { echo "configure: error: cannot use workshop without Motif" 1>&2; exit 1; }
5561fi
5562
5563if test "$enable_xim" = "yes"; then
5564 cat >> confdefs.h <<\EOF
5565#define FEAT_XIM 1
5566EOF
5567
5568fi
5569if test "$enable_fontset" = "yes"; then
5570 cat >> confdefs.h <<\EOF
5571#define FEAT_XFONTSET 1
5572EOF
5573
5574fi
5575
5576
5577
5578
5579if test "$enable_hangulinput" = "yes"; then
5580 if test "x$GUITYPE" = "xNONE"; then
5581 echo "$ac_t""no GUI selected; hangul input has been disabled" 1>&6
5582 enable_hangulinput=no
5583 else
5584 cat >> confdefs.h <<\EOF
5585#define FEAT_HANGULIN 1
5586EOF
5587
5588 HANGULIN_SRC=hangulin.c
5589
5590 HANGULIN_OBJ=objects/hangulin.o
5591
5592 fi
5593fi
5594
5595
5596echo $ac_n "checking quality of toupper""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005597echo "configure:5598: checking quality of toupper" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005598if test "$cross_compiling" = yes; then
5599 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
5600else
5601 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005602#line 5603 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005603#include "confdefs.h"
5604#include <ctype.h>
5605main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
5606EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005607if { (eval echo configure:5608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00005608then
5609 cat >> confdefs.h <<\EOF
5610#define BROKEN_TOUPPER 1
5611EOF
5612 echo "$ac_t""bad" 1>&6
5613else
5614 echo "configure: failed program was:" >&5
5615 cat conftest.$ac_ext >&5
5616 rm -fr conftest*
5617 echo "$ac_t""good" 1>&6
5618fi
5619rm -fr conftest*
5620fi
5621
5622
5623echo $ac_n "checking whether __DATE__ and __TIME__ work""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005624echo "configure:5625: checking whether __DATE__ and __TIME__ work" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005625cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005626#line 5627 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005627#include "confdefs.h"
5628
5629int main() {
5630printf("(" __DATE__ " " __TIME__ ")");
5631; return 0; }
5632EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005633if { (eval echo configure:5634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005634 rm -rf conftest*
5635 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
5636#define HAVE_DATE_TIME 1
5637EOF
5638
5639else
5640 echo "configure: failed program was:" >&5
5641 cat conftest.$ac_ext >&5
5642 rm -rf conftest*
5643 echo "$ac_t""no" 1>&6
5644fi
5645rm -f conftest*
5646
5647ac_safe=`echo "elf.h" | sed 'y%./+-%__p_%'`
5648echo $ac_n "checking for elf.h""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005649echo "configure:5650: checking for elf.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005650if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5651 echo $ac_n "(cached) $ac_c" 1>&6
5652else
5653 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005654#line 5655 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005655#include "confdefs.h"
5656#include <elf.h>
5657EOF
5658ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +00005659{ (eval echo configure:5660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005660ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5661if test -z "$ac_err"; then
5662 rm -rf conftest*
5663 eval "ac_cv_header_$ac_safe=yes"
5664else
5665 echo "$ac_err" >&5
5666 echo "configure: failed program was:" >&5
5667 cat conftest.$ac_ext >&5
5668 rm -rf conftest*
5669 eval "ac_cv_header_$ac_safe=no"
5670fi
5671rm -f conftest*
5672fi
5673if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5674 echo "$ac_t""yes" 1>&6
5675 HAS_ELF=1
5676else
5677 echo "$ac_t""no" 1>&6
5678fi
5679
5680if test "$HAS_ELF" = 1; then
5681 echo $ac_n "checking for main in -lelf""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005682echo "configure:5683: checking for main in -lelf" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005683ac_lib_var=`echo elf'_'main | sed 'y%./+-%__p_%'`
5684if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5685 echo $ac_n "(cached) $ac_c" 1>&6
5686else
5687 ac_save_LIBS="$LIBS"
5688LIBS="-lelf $LIBS"
5689cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005690#line 5691 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005691#include "confdefs.h"
5692
5693int main() {
5694main()
5695; return 0; }
5696EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005697if { (eval echo configure:5698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005698 rm -rf conftest*
5699 eval "ac_cv_lib_$ac_lib_var=yes"
5700else
5701 echo "configure: failed program was:" >&5
5702 cat conftest.$ac_ext >&5
5703 rm -rf conftest*
5704 eval "ac_cv_lib_$ac_lib_var=no"
5705fi
5706rm -f conftest*
5707LIBS="$ac_save_LIBS"
5708
5709fi
5710if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5711 echo "$ac_t""yes" 1>&6
5712 ac_tr_lib=HAVE_LIB`echo elf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5713 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5714 cat >> confdefs.h <<EOF
5715#define $ac_tr_lib 1
5716EOF
5717
5718 LIBS="-lelf $LIBS"
5719
5720else
5721 echo "$ac_t""no" 1>&6
5722fi
5723
5724fi
5725
5726ac_header_dirent=no
5727for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
5728do
5729ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5730echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005731echo "configure:5732: checking for $ac_hdr that defines DIR" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005732if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
5733 echo $ac_n "(cached) $ac_c" 1>&6
5734else
5735 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005736#line 5737 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005737#include "confdefs.h"
5738#include <sys/types.h>
5739#include <$ac_hdr>
5740int main() {
5741DIR *dirp = 0;
5742; return 0; }
5743EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005744if { (eval echo configure:5745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005745 rm -rf conftest*
5746 eval "ac_cv_header_dirent_$ac_safe=yes"
5747else
5748 echo "configure: failed program was:" >&5
5749 cat conftest.$ac_ext >&5
5750 rm -rf conftest*
5751 eval "ac_cv_header_dirent_$ac_safe=no"
5752fi
5753rm -f conftest*
5754fi
5755if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
5756 echo "$ac_t""yes" 1>&6
5757 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5758 cat >> confdefs.h <<EOF
5759#define $ac_tr_hdr 1
5760EOF
5761 ac_header_dirent=$ac_hdr; break
5762else
5763 echo "$ac_t""no" 1>&6
5764fi
5765done
5766# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5767if test $ac_header_dirent = dirent.h; then
5768echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005769echo "configure:5770: checking for opendir in -ldir" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005770ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
5771if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5772 echo $ac_n "(cached) $ac_c" 1>&6
5773else
5774 ac_save_LIBS="$LIBS"
5775LIBS="-ldir $LIBS"
5776cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005777#line 5778 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005778#include "confdefs.h"
5779/* Override any gcc2 internal prototype to avoid an error. */
5780/* We use char because int might match the return type of a gcc2
5781 builtin and then its argument prototype would still apply. */
5782char opendir();
5783
5784int main() {
5785opendir()
5786; return 0; }
5787EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005788if { (eval echo configure:5789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005789 rm -rf conftest*
5790 eval "ac_cv_lib_$ac_lib_var=yes"
5791else
5792 echo "configure: failed program was:" >&5
5793 cat conftest.$ac_ext >&5
5794 rm -rf conftest*
5795 eval "ac_cv_lib_$ac_lib_var=no"
5796fi
5797rm -f conftest*
5798LIBS="$ac_save_LIBS"
5799
5800fi
5801if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5802 echo "$ac_t""yes" 1>&6
5803 LIBS="$LIBS -ldir"
5804else
5805 echo "$ac_t""no" 1>&6
5806fi
5807
5808else
5809echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005810echo "configure:5811: checking for opendir in -lx" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005811ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
5812if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5813 echo $ac_n "(cached) $ac_c" 1>&6
5814else
5815 ac_save_LIBS="$LIBS"
5816LIBS="-lx $LIBS"
5817cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005818#line 5819 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005819#include "confdefs.h"
5820/* Override any gcc2 internal prototype to avoid an error. */
5821/* We use char because int might match the return type of a gcc2
5822 builtin and then its argument prototype would still apply. */
5823char opendir();
5824
5825int main() {
5826opendir()
5827; return 0; }
5828EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005829if { (eval echo configure:5830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005830 rm -rf conftest*
5831 eval "ac_cv_lib_$ac_lib_var=yes"
5832else
5833 echo "configure: failed program was:" >&5
5834 cat conftest.$ac_ext >&5
5835 rm -rf conftest*
5836 eval "ac_cv_lib_$ac_lib_var=no"
5837fi
5838rm -f conftest*
5839LIBS="$ac_save_LIBS"
5840
5841fi
5842if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5843 echo "$ac_t""yes" 1>&6
5844 LIBS="$LIBS -lx"
5845else
5846 echo "$ac_t""no" 1>&6
5847fi
5848
5849fi
5850
5851
5852echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005853echo "configure:5854: checking for ANSI C header files" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005854if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5855 echo $ac_n "(cached) $ac_c" 1>&6
5856else
5857 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005858#line 5859 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005859#include "confdefs.h"
5860#include <stdlib.h>
5861#include <stdarg.h>
5862#include <string.h>
5863#include <float.h>
5864EOF
5865ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +00005866{ (eval echo configure:5867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005867ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5868if test -z "$ac_err"; then
5869 rm -rf conftest*
5870 ac_cv_header_stdc=yes
5871else
5872 echo "$ac_err" >&5
5873 echo "configure: failed program was:" >&5
5874 cat conftest.$ac_ext >&5
5875 rm -rf conftest*
5876 ac_cv_header_stdc=no
5877fi
5878rm -f conftest*
5879
5880if test $ac_cv_header_stdc = yes; then
5881 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5882cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005883#line 5884 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005884#include "confdefs.h"
5885#include <string.h>
5886EOF
5887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5888 egrep "memchr" >/dev/null 2>&1; then
5889 :
5890else
5891 rm -rf conftest*
5892 ac_cv_header_stdc=no
5893fi
5894rm -f conftest*
5895
5896fi
5897
5898if test $ac_cv_header_stdc = yes; then
5899 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5900cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005901#line 5902 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005902#include "confdefs.h"
5903#include <stdlib.h>
5904EOF
5905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5906 egrep "free" >/dev/null 2>&1; then
5907 :
5908else
5909 rm -rf conftest*
5910 ac_cv_header_stdc=no
5911fi
5912rm -f conftest*
5913
5914fi
5915
5916if test $ac_cv_header_stdc = yes; then
5917 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5918if test "$cross_compiling" = yes; then
5919 :
5920else
5921 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005922#line 5923 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005923#include "confdefs.h"
5924#include <ctype.h>
5925#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5926#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5927#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5928int main () { int i; for (i = 0; i < 256; i++)
5929if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5930exit (0); }
5931
5932EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005933if { (eval echo configure:5934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00005934then
5935 :
5936else
5937 echo "configure: failed program was:" >&5
5938 cat conftest.$ac_ext >&5
5939 rm -fr conftest*
5940 ac_cv_header_stdc=no
5941fi
5942rm -fr conftest*
5943fi
5944
5945fi
5946fi
5947
5948echo "$ac_t""$ac_cv_header_stdc" 1>&6
5949if test $ac_cv_header_stdc = yes; then
5950 cat >> confdefs.h <<\EOF
5951#define STDC_HEADERS 1
5952EOF
5953
5954fi
5955
5956echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00005957echo "configure:5958: checking for sys/wait.h that is POSIX.1 compatible" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005958if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
5959 echo $ac_n "(cached) $ac_c" 1>&6
5960else
5961 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005962#line 5963 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005963#include "confdefs.h"
5964#include <sys/types.h>
5965#include <sys/wait.h>
5966#ifndef WEXITSTATUS
5967#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5968#endif
5969#ifndef WIFEXITED
5970#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5971#endif
5972int main() {
5973int s;
5974wait (&s);
5975s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5976; return 0; }
5977EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00005978if { (eval echo configure:5979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005979 rm -rf conftest*
5980 ac_cv_header_sys_wait_h=yes
5981else
5982 echo "configure: failed program was:" >&5
5983 cat conftest.$ac_ext >&5
5984 rm -rf conftest*
5985 ac_cv_header_sys_wait_h=no
5986fi
5987rm -f conftest*
5988fi
5989
5990echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
5991if test $ac_cv_header_sys_wait_h = yes; then
5992 cat >> confdefs.h <<\EOF
5993#define HAVE_SYS_WAIT_H 1
5994EOF
5995
5996fi
5997
5998
5999if test $ac_cv_header_sys_wait_h = no; then
6000 echo $ac_n "checking for sys/wait.h that defines union wait""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006001echo "configure:6002: checking for sys/wait.h that defines union wait" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006002 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006003#line 6004 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006004#include "confdefs.h"
6005#include <sys/wait.h>
6006int main() {
6007union wait xx, yy; xx = yy
6008; return 0; }
6009EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006010if { (eval echo configure:6011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006011 rm -rf conftest*
6012 echo "$ac_t""yes" 1>&6
6013 cat >> confdefs.h <<\EOF
6014#define HAVE_SYS_WAIT_H 1
6015EOF
6016
6017 cat >> confdefs.h <<\EOF
6018#define HAVE_UNION_WAIT 1
6019EOF
6020
6021else
6022 echo "configure: failed program was:" >&5
6023 cat conftest.$ac_ext >&5
6024 rm -rf conftest*
6025 echo "$ac_t""no" 1>&6
6026fi
6027rm -f conftest*
6028fi
6029
6030for ac_hdr in stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \
6031 termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \
6032 iconv.h langinfo.h unistd.h stropts.h errno.h \
6033 sys/resource.h sys/systeminfo.h locale.h \
6034 sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \
6035 poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \
6036 libgen.h util/debug.h util/msg18n.h frame.h pthread_np.h \
6037 sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h wchar.h
6038do
6039ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6040echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006041echo "configure:6042: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006042if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6043 echo $ac_n "(cached) $ac_c" 1>&6
6044else
6045 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006046#line 6047 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006047#include "confdefs.h"
6048#include <$ac_hdr>
6049EOF
6050ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +00006051{ (eval echo configure:6052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006052ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6053if test -z "$ac_err"; then
6054 rm -rf conftest*
6055 eval "ac_cv_header_$ac_safe=yes"
6056else
6057 echo "$ac_err" >&5
6058 echo "configure: failed program was:" >&5
6059 cat conftest.$ac_ext >&5
6060 rm -rf conftest*
6061 eval "ac_cv_header_$ac_safe=no"
6062fi
6063rm -f conftest*
6064fi
6065if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6066 echo "$ac_t""yes" 1>&6
6067 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6068 cat >> confdefs.h <<EOF
6069#define $ac_tr_hdr 1
6070EOF
6071
6072else
6073 echo "$ac_t""no" 1>&6
6074fi
6075done
6076
6077
6078if test "x$MACOSX" != "xyes"; then
6079 for ac_hdr in strings.h
6080do
6081ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6082echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006083echo "configure:6084: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006084if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6085 echo $ac_n "(cached) $ac_c" 1>&6
6086else
6087 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006088#line 6089 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006089#include "confdefs.h"
6090#include <$ac_hdr>
6091EOF
6092ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +00006093{ (eval echo configure:6094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006094ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6095if test -z "$ac_err"; then
6096 rm -rf conftest*
6097 eval "ac_cv_header_$ac_safe=yes"
6098else
6099 echo "$ac_err" >&5
6100 echo "configure: failed program was:" >&5
6101 cat conftest.$ac_ext >&5
6102 rm -rf conftest*
6103 eval "ac_cv_header_$ac_safe=no"
6104fi
6105rm -f conftest*
6106fi
6107if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6108 echo "$ac_t""yes" 1>&6
6109 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6110 cat >> confdefs.h <<EOF
6111#define $ac_tr_hdr 1
6112EOF
6113
6114else
6115 echo "$ac_t""no" 1>&6
6116fi
6117done
6118
6119fi
6120
6121echo $ac_n "checking if strings.h can be included after string.h""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006122echo "configure:6123: checking if strings.h can be included after string.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006123cppflags_save=$CPPFLAGS
6124CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6125cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006126#line 6127 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006127#include "confdefs.h"
6128
6129#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
6130# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
6131 /* but don't do it on AIX 5.1 (Uribarri) */
6132#endif
6133#ifdef HAVE_XM_XM_H
6134# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
6135#endif
6136#ifdef HAVE_STRING_H
6137# include <string.h>
6138#endif
6139#if defined(HAVE_STRINGS_H)
6140# include <strings.h>
6141#endif
6142
6143int main() {
6144int i; i = 0;
6145; return 0; }
6146EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006147if { (eval echo configure:6148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006148 rm -rf conftest*
6149 echo "$ac_t""yes" 1>&6
6150else
6151 echo "configure: failed program was:" >&5
6152 cat conftest.$ac_ext >&5
6153 rm -rf conftest*
6154 cat >> confdefs.h <<\EOF
6155#define NO_STRINGS_WITH_STRING_H 1
6156EOF
6157
6158 echo "$ac_t""no" 1>&6
6159fi
6160rm -f conftest*
6161CPPFLAGS=$cppflags_save
6162
6163if test $ac_cv_prog_gcc = yes; then
6164 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006165echo "configure:6166: checking whether ${CC-cc} needs -traditional" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006166if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
6167 echo $ac_n "(cached) $ac_c" 1>&6
6168else
6169 ac_pattern="Autoconf.*'x'"
6170 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006171#line 6172 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006172#include "confdefs.h"
6173#include <sgtty.h>
6174Autoconf TIOCGETP
6175EOF
6176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6177 egrep "$ac_pattern" >/dev/null 2>&1; then
6178 rm -rf conftest*
6179 ac_cv_prog_gcc_traditional=yes
6180else
6181 rm -rf conftest*
6182 ac_cv_prog_gcc_traditional=no
6183fi
6184rm -f conftest*
6185
6186
6187 if test $ac_cv_prog_gcc_traditional = no; then
6188 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006189#line 6190 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006190#include "confdefs.h"
6191#include <termio.h>
6192Autoconf TCGETA
6193EOF
6194if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6195 egrep "$ac_pattern" >/dev/null 2>&1; then
6196 rm -rf conftest*
6197 ac_cv_prog_gcc_traditional=yes
6198fi
6199rm -f conftest*
6200
6201 fi
6202fi
6203
6204echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
6205 if test $ac_cv_prog_gcc_traditional = yes; then
6206 CC="$CC -traditional"
6207 fi
6208fi
6209
6210echo $ac_n "checking for working const""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006211echo "configure:6212: checking for working const" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006212if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6213 echo $ac_n "(cached) $ac_c" 1>&6
6214else
6215 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006216#line 6217 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006217#include "confdefs.h"
6218
6219int main() {
6220
6221/* Ultrix mips cc rejects this. */
6222typedef int charset[2]; const charset x;
6223/* SunOS 4.1.1 cc rejects this. */
6224char const *const *ccp;
6225char **p;
6226/* NEC SVR4.0.2 mips cc rejects this. */
6227struct point {int x, y;};
6228static struct point const zero = {0,0};
6229/* AIX XL C 1.02.0.0 rejects this.
6230 It does not let you subtract one const X* pointer from another in an arm
6231 of an if-expression whose if-part is not a constant expression */
6232const char *g = "string";
6233ccp = &g + (g ? g-g : 0);
6234/* HPUX 7.0 cc rejects these. */
6235++ccp;
6236p = (char**) ccp;
6237ccp = (char const *const *) p;
6238{ /* SCO 3.2v4 cc rejects this. */
6239 char *t;
6240 char const *s = 0 ? (char *) 0 : (char const *) 0;
6241
6242 *t++ = 0;
6243}
6244{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6245 int x[] = {25, 17};
6246 const int *foo = &x[0];
6247 ++foo;
6248}
6249{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6250 typedef const int *iptr;
6251 iptr p = 0;
6252 ++p;
6253}
6254{ /* AIX XL C 1.02.0.0 rejects this saying
6255 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6256 struct s { int j; const int *ap[3]; };
6257 struct s *b; b->j = 5;
6258}
6259{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6260 const int foo = 10;
6261}
6262
6263; return 0; }
6264EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006265if { (eval echo configure:6266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006266 rm -rf conftest*
6267 ac_cv_c_const=yes
6268else
6269 echo "configure: failed program was:" >&5
6270 cat conftest.$ac_ext >&5
6271 rm -rf conftest*
6272 ac_cv_c_const=no
6273fi
6274rm -f conftest*
6275fi
6276
6277echo "$ac_t""$ac_cv_c_const" 1>&6
6278if test $ac_cv_c_const = no; then
6279 cat >> confdefs.h <<\EOF
6280#define const
6281EOF
6282
6283fi
6284
6285echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006286echo "configure:6287: checking for mode_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006287if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
6288 echo $ac_n "(cached) $ac_c" 1>&6
6289else
6290 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006291#line 6292 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006292#include "confdefs.h"
6293#include <sys/types.h>
6294#if STDC_HEADERS
6295#include <stdlib.h>
6296#include <stddef.h>
6297#endif
6298EOF
6299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6300 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6301 rm -rf conftest*
6302 ac_cv_type_mode_t=yes
6303else
6304 rm -rf conftest*
6305 ac_cv_type_mode_t=no
6306fi
6307rm -f conftest*
6308
6309fi
6310echo "$ac_t""$ac_cv_type_mode_t" 1>&6
6311if test $ac_cv_type_mode_t = no; then
6312 cat >> confdefs.h <<\EOF
6313#define mode_t int
6314EOF
6315
6316fi
6317
6318echo $ac_n "checking for off_t""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006319echo "configure:6320: checking for off_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006320if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
6321 echo $ac_n "(cached) $ac_c" 1>&6
6322else
6323 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006324#line 6325 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006325#include "confdefs.h"
6326#include <sys/types.h>
6327#if STDC_HEADERS
6328#include <stdlib.h>
6329#include <stddef.h>
6330#endif
6331EOF
6332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6333 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6334 rm -rf conftest*
6335 ac_cv_type_off_t=yes
6336else
6337 rm -rf conftest*
6338 ac_cv_type_off_t=no
6339fi
6340rm -f conftest*
6341
6342fi
6343echo "$ac_t""$ac_cv_type_off_t" 1>&6
6344if test $ac_cv_type_off_t = no; then
6345 cat >> confdefs.h <<\EOF
6346#define off_t long
6347EOF
6348
6349fi
6350
6351echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006352echo "configure:6353: checking for pid_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006353if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6354 echo $ac_n "(cached) $ac_c" 1>&6
6355else
6356 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006357#line 6358 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006358#include "confdefs.h"
6359#include <sys/types.h>
6360#if STDC_HEADERS
6361#include <stdlib.h>
6362#include <stddef.h>
6363#endif
6364EOF
6365if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6366 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6367 rm -rf conftest*
6368 ac_cv_type_pid_t=yes
6369else
6370 rm -rf conftest*
6371 ac_cv_type_pid_t=no
6372fi
6373rm -f conftest*
6374
6375fi
6376echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6377if test $ac_cv_type_pid_t = no; then
6378 cat >> confdefs.h <<\EOF
6379#define pid_t int
6380EOF
6381
6382fi
6383
6384echo $ac_n "checking for size_t""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006385echo "configure:6386: checking for size_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006386if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6387 echo $ac_n "(cached) $ac_c" 1>&6
6388else
6389 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006390#line 6391 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006391#include "confdefs.h"
6392#include <sys/types.h>
6393#if STDC_HEADERS
6394#include <stdlib.h>
6395#include <stddef.h>
6396#endif
6397EOF
6398if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6399 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6400 rm -rf conftest*
6401 ac_cv_type_size_t=yes
6402else
6403 rm -rf conftest*
6404 ac_cv_type_size_t=no
6405fi
6406rm -f conftest*
6407
6408fi
6409echo "$ac_t""$ac_cv_type_size_t" 1>&6
6410if test $ac_cv_type_size_t = no; then
6411 cat >> confdefs.h <<\EOF
6412#define size_t unsigned
6413EOF
6414
6415fi
6416
6417echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006418echo "configure:6419: checking for uid_t in sys/types.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006419if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
6420 echo $ac_n "(cached) $ac_c" 1>&6
6421else
6422 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006423#line 6424 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006424#include "confdefs.h"
6425#include <sys/types.h>
6426EOF
6427if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6428 egrep "uid_t" >/dev/null 2>&1; then
6429 rm -rf conftest*
6430 ac_cv_type_uid_t=yes
6431else
6432 rm -rf conftest*
6433 ac_cv_type_uid_t=no
6434fi
6435rm -f conftest*
6436
6437fi
6438
6439echo "$ac_t""$ac_cv_type_uid_t" 1>&6
6440if test $ac_cv_type_uid_t = no; then
6441 cat >> confdefs.h <<\EOF
6442#define uid_t int
6443EOF
6444
6445 cat >> confdefs.h <<\EOF
6446#define gid_t int
6447EOF
6448
6449fi
6450
6451echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006452echo "configure:6453: checking whether time.h and sys/time.h may both be included" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006453if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
6454 echo $ac_n "(cached) $ac_c" 1>&6
6455else
6456 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006457#line 6458 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006458#include "confdefs.h"
6459#include <sys/types.h>
6460#include <sys/time.h>
6461#include <time.h>
6462int main() {
6463struct tm *tp;
6464; return 0; }
6465EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006466if { (eval echo configure:6467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006467 rm -rf conftest*
6468 ac_cv_header_time=yes
6469else
6470 echo "configure: failed program was:" >&5
6471 cat conftest.$ac_ext >&5
6472 rm -rf conftest*
6473 ac_cv_header_time=no
6474fi
6475rm -f conftest*
6476fi
6477
6478echo "$ac_t""$ac_cv_header_time" 1>&6
6479if test $ac_cv_header_time = yes; then
6480 cat >> confdefs.h <<\EOF
6481#define TIME_WITH_SYS_TIME 1
6482EOF
6483
6484fi
6485
6486echo $ac_n "checking for ino_t""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006487echo "configure:6488: checking for ino_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006488if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
6489 echo $ac_n "(cached) $ac_c" 1>&6
6490else
6491 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006492#line 6493 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006493#include "confdefs.h"
6494#include <sys/types.h>
6495#if STDC_HEADERS
6496#include <stdlib.h>
6497#include <stddef.h>
6498#endif
6499EOF
6500if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6501 egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6502 rm -rf conftest*
6503 ac_cv_type_ino_t=yes
6504else
6505 rm -rf conftest*
6506 ac_cv_type_ino_t=no
6507fi
6508rm -f conftest*
6509
6510fi
6511echo "$ac_t""$ac_cv_type_ino_t" 1>&6
6512if test $ac_cv_type_ino_t = no; then
6513 cat >> confdefs.h <<\EOF
6514#define ino_t long
6515EOF
6516
6517fi
6518
6519echo $ac_n "checking for dev_t""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006520echo "configure:6521: checking for dev_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006521if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
6522 echo $ac_n "(cached) $ac_c" 1>&6
6523else
6524 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006525#line 6526 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006526#include "confdefs.h"
6527#include <sys/types.h>
6528#if STDC_HEADERS
6529#include <stdlib.h>
6530#include <stddef.h>
6531#endif
6532EOF
6533if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6534 egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6535 rm -rf conftest*
6536 ac_cv_type_dev_t=yes
6537else
6538 rm -rf conftest*
6539 ac_cv_type_dev_t=no
6540fi
6541rm -f conftest*
6542
6543fi
6544echo "$ac_t""$ac_cv_type_dev_t" 1>&6
6545if test $ac_cv_type_dev_t = no; then
6546 cat >> confdefs.h <<\EOF
6547#define dev_t unsigned
6548EOF
6549
6550fi
6551
6552
6553echo $ac_n "checking for rlim_t""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006554echo "configure:6555: checking for rlim_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006555if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
6556 echo "$ac_t""(cached) $ac_cv_type_rlim_t" 1>&6
6557else
6558 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006559#line 6560 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006560#include "confdefs.h"
6561
6562#include <sys/types.h>
6563#if STDC_HEADERS
6564#include <stdlib.h>
6565#include <stddef.h>
6566#endif
6567#ifdef HAVE_SYS_RESOURCE_H
6568#include <sys/resource.h>
6569#endif
6570
6571EOF
6572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6573 egrep "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6574 rm -rf conftest*
6575 ac_cv_type_rlim_t=yes
6576else
6577 rm -rf conftest*
6578 ac_cv_type_rlim_t=no
6579fi
6580rm -f conftest*
6581
6582 echo "$ac_t""$ac_cv_type_rlim_t" 1>&6
6583fi
6584if test $ac_cv_type_rlim_t = no; then
6585 cat >> confdefs.h <<\EOF
6586#define rlim_t unsigned long
6587EOF
6588fi
6589
6590echo $ac_n "checking for stack_t""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006591echo "configure:6592: checking for stack_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006592if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
6593 echo "$ac_t""(cached) $ac_cv_type_stack_t" 1>&6
6594else
6595 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006596#line 6597 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006597#include "confdefs.h"
6598
6599#include <sys/types.h>
6600#if STDC_HEADERS
6601#include <stdlib.h>
6602#include <stddef.h>
6603#endif
6604#include <signal.h>
6605
6606EOF
6607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6608 egrep "stack_t" >/dev/null 2>&1; then
6609 rm -rf conftest*
6610 ac_cv_type_stack_t=yes
6611else
6612 rm -rf conftest*
6613 ac_cv_type_stack_t=no
6614fi
6615rm -f conftest*
6616
6617 echo "$ac_t""$ac_cv_type_stack_t" 1>&6
6618fi
6619if test $ac_cv_type_stack_t = no; then
6620 cat >> confdefs.h <<\EOF
6621#define stack_t struct sigaltstack
6622EOF
6623fi
6624
6625echo $ac_n "checking whether stack_t has an ss_base field""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006626echo "configure:6627: checking whether stack_t has an ss_base field" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006627cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006628#line 6629 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006629#include "confdefs.h"
6630
6631#include <sys/types.h>
6632#if STDC_HEADERS
6633#include <stdlib.h>
6634#include <stddef.h>
6635#endif
6636#include <signal.h>
6637#include "confdefs.h"
6638
6639int main() {
6640stack_t sigstk; sigstk.ss_base = 0;
6641; return 0; }
6642EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006643if { (eval echo configure:6644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006644 rm -rf conftest*
6645 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
6646#define HAVE_SS_BASE 1
6647EOF
6648
6649else
6650 echo "configure: failed program was:" >&5
6651 cat conftest.$ac_ext >&5
6652 rm -rf conftest*
6653 echo "$ac_t""no" 1>&6
6654fi
6655rm -f conftest*
6656
6657olibs="$LIBS"
6658echo $ac_n "checking --with-tlib argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006659echo "configure:6660: checking --with-tlib argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006660# Check whether --with-tlib or --without-tlib was given.
6661if test "${with_tlib+set}" = set; then
6662 withval="$with_tlib"
6663 :
6664fi
6665
6666if test -n "$with_tlib"; then
6667 echo "$ac_t""$with_tlib" 1>&6
6668 LIBS="$LIBS -l$with_tlib"
6669else
6670 echo "$ac_t""automatic terminal library selection" 1>&6
6671 case "`uname -s 2>/dev/null`" in
6672 OSF1) tlibs="ncurses curses termlib termcap";;
6673 *) tlibs="ncurses termlib termcap curses";;
6674 esac
6675 for libname in $tlibs; do
6676 echo $ac_n "checking for tgetent in -l${libname}""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006677echo "configure:6678: checking for tgetent in -l${libname}" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006678ac_lib_var=`echo ${libname}'_'tgetent | sed 'y%./+-%__p_%'`
6679if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6680 echo $ac_n "(cached) $ac_c" 1>&6
6681else
6682 ac_save_LIBS="$LIBS"
6683LIBS="-l${libname} $LIBS"
6684cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006685#line 6686 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006686#include "confdefs.h"
6687/* Override any gcc2 internal prototype to avoid an error. */
6688/* We use char because int might match the return type of a gcc2
6689 builtin and then its argument prototype would still apply. */
6690char tgetent();
6691
6692int main() {
6693tgetent()
6694; return 0; }
6695EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006696if { (eval echo configure:6697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006697 rm -rf conftest*
6698 eval "ac_cv_lib_$ac_lib_var=yes"
6699else
6700 echo "configure: failed program was:" >&5
6701 cat conftest.$ac_ext >&5
6702 rm -rf conftest*
6703 eval "ac_cv_lib_$ac_lib_var=no"
6704fi
6705rm -f conftest*
6706LIBS="$ac_save_LIBS"
6707
6708fi
6709if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6710 echo "$ac_t""yes" 1>&6
6711 ac_tr_lib=HAVE_LIB`echo ${libname} | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6712 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6713 cat >> confdefs.h <<EOF
6714#define $ac_tr_lib 1
6715EOF
6716
6717 LIBS="-l${libname} $LIBS"
6718
6719else
6720 echo "$ac_t""no" 1>&6
6721fi
6722
6723 if test "x$olibs" != "x$LIBS"; then
6724 if test "$cross_compiling" = yes; then
6725 res="FAIL"
6726else
6727 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006728#line 6729 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006729#include "confdefs.h"
6730
6731#ifdef HAVE_TERMCAP_H
6732# include <termcap.h>
6733#endif
6734main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
6735EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006736if { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00006737then
6738 res="OK"
6739else
6740 echo "configure: failed program was:" >&5
6741 cat conftest.$ac_ext >&5
6742 rm -fr conftest*
6743 res="FAIL"
6744fi
6745rm -fr conftest*
6746fi
6747
6748 if test "$res" = "OK"; then
6749 break
6750 fi
6751 echo "$ac_t""$libname library is not usable" 1>&6
6752 LIBS="$olibs"
6753 fi
6754 done
6755fi
6756if test "x$olibs" != "x$LIBS"; then
6757 echo $ac_n "checking whether we talk terminfo""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006758echo "configure:6759: checking whether we talk terminfo" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006759 if test "$cross_compiling" = yes; then
6760 { echo "configure: error: failed to compile test program." 1>&2; exit 1; }
6761else
6762 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006763#line 6764 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006764#include "confdefs.h"
6765
6766#ifdef HAVE_TERMCAP_H
6767# include <termcap.h>
6768#endif
6769main()
6770{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
6771EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006772if { (eval echo configure:6773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00006773then
6774 echo "$ac_t""no -- we are in termcap land" 1>&6
6775else
6776 echo "configure: failed program was:" >&5
6777 cat conftest.$ac_ext >&5
6778 rm -fr conftest*
6779 echo "$ac_t""yes -- terminfo spoken here" 1>&6; cat >> confdefs.h <<\EOF
6780#define TERMINFO 1
6781EOF
6782
6783fi
6784rm -fr conftest*
6785fi
6786
6787else
6788 echo "$ac_t""none found" 1>&6
6789fi
6790
6791if test "x$olibs" != "x$LIBS"; then
6792 echo $ac_n "checking what tgetent() returns for an unknown terminal""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006793echo "configure:6794: checking what tgetent() returns for an unknown terminal" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006794 if test "$cross_compiling" = yes; then
6795 { echo "configure: error: failed to compile test program." 1>&2; exit 1; }
6796else
6797 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006798#line 6799 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006799#include "confdefs.h"
6800
6801#ifdef HAVE_TERMCAP_H
6802# include <termcap.h>
6803#endif
6804main()
6805{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
6806EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006807if { (eval echo configure:6808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00006808then
6809 echo "$ac_t""zero" 1>&6; cat >> confdefs.h <<\EOF
6810#define TGETENT_ZERO_ERR 0
6811EOF
6812
6813else
6814 echo "configure: failed program was:" >&5
6815 cat conftest.$ac_ext >&5
6816 rm -fr conftest*
6817 echo "$ac_t""non-zero" 1>&6
6818fi
6819rm -fr conftest*
6820fi
6821
6822fi
6823
6824echo $ac_n "checking whether termcap.h contains ospeed""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006825echo "configure:6826: checking whether termcap.h contains ospeed" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006826cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006827#line 6828 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006828#include "confdefs.h"
6829
6830#ifdef HAVE_TERMCAP_H
6831# include <termcap.h>
6832#endif
6833
6834int main() {
6835ospeed = 20000
6836; return 0; }
6837EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006838if { (eval echo configure:6839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006839 rm -rf conftest*
6840 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
6841#define HAVE_OSPEED 1
6842EOF
6843
6844else
6845 echo "configure: failed program was:" >&5
6846 cat conftest.$ac_ext >&5
6847 rm -rf conftest*
6848 echo "$ac_t""no" 1>&6
6849 echo $ac_n "checking whether ospeed can be extern""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006850echo "configure:6851: checking whether ospeed can be extern" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006851 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006852#line 6853 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006853#include "confdefs.h"
6854
6855#ifdef HAVE_TERMCAP_H
6856# include <termcap.h>
6857#endif
6858extern short ospeed;
6859
6860int main() {
6861ospeed = 20000
6862; return 0; }
6863EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006864if { (eval echo configure:6865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006865 rm -rf conftest*
6866 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
6867#define OSPEED_EXTERN 1
6868EOF
6869
6870else
6871 echo "configure: failed program was:" >&5
6872 cat conftest.$ac_ext >&5
6873 rm -rf conftest*
6874 echo "$ac_t""no" 1>&6
6875fi
6876rm -f conftest*
6877
6878fi
6879rm -f conftest*
6880
6881echo $ac_n "checking whether termcap.h contains UP, BC and PC""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006882echo "configure:6883: checking whether termcap.h contains UP, BC and PC" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006883cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006884#line 6885 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006885#include "confdefs.h"
6886
6887#ifdef HAVE_TERMCAP_H
6888# include <termcap.h>
6889#endif
6890
6891int main() {
6892if (UP == 0 && BC == 0) PC = 1
6893; return 0; }
6894EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006895if { (eval echo configure:6896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006896 rm -rf conftest*
6897 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
6898#define HAVE_UP_BC_PC 1
6899EOF
6900
6901else
6902 echo "configure: failed program was:" >&5
6903 cat conftest.$ac_ext >&5
6904 rm -rf conftest*
6905 echo "$ac_t""no" 1>&6
6906 echo $ac_n "checking whether UP, BC and PC can be extern""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006907echo "configure:6908: checking whether UP, BC and PC can be extern" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006908 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006909#line 6910 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006910#include "confdefs.h"
6911
6912#ifdef HAVE_TERMCAP_H
6913# include <termcap.h>
6914#endif
6915extern char *UP, *BC, PC;
6916
6917int main() {
6918if (UP == 0 && BC == 0) PC = 1
6919; return 0; }
6920EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006921if { (eval echo configure:6922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006922 rm -rf conftest*
6923 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
6924#define UP_BC_PC_EXTERN 1
6925EOF
6926
6927else
6928 echo "configure: failed program was:" >&5
6929 cat conftest.$ac_ext >&5
6930 rm -rf conftest*
6931 echo "$ac_t""no" 1>&6
6932fi
6933rm -f conftest*
6934
6935fi
6936rm -f conftest*
6937
6938echo $ac_n "checking whether tputs() uses outfuntype""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006939echo "configure:6940: checking whether tputs() uses outfuntype" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006940cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006941#line 6942 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006942#include "confdefs.h"
6943
6944#ifdef HAVE_TERMCAP_H
6945# include <termcap.h>
6946#endif
6947
6948int main() {
6949extern int xx(); tputs("test", 1, (outfuntype)xx)
6950; return 0; }
6951EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006952if { (eval echo configure:6953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006953 rm -rf conftest*
6954 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
6955#define HAVE_OUTFUNTYPE 1
6956EOF
6957
6958else
6959 echo "configure: failed program was:" >&5
6960 cat conftest.$ac_ext >&5
6961 rm -rf conftest*
6962 echo "$ac_t""no" 1>&6
6963fi
6964rm -f conftest*
6965
6966echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006967echo "configure:6968: checking whether sys/select.h and sys/time.h may both be included" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006968cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006969#line 6970 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006970#include "confdefs.h"
6971
6972#include <sys/types.h>
6973#include <sys/time.h>
6974#include <sys/select.h>
6975int main() {
6976
6977; return 0; }
6978EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00006979if { (eval echo configure:6980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006980 rm -rf conftest*
6981 echo "$ac_t""yes" 1>&6
6982 cat >> confdefs.h <<\EOF
6983#define SYS_SELECT_WITH_SYS_TIME 1
6984EOF
6985
6986else
6987 echo "configure: failed program was:" >&5
6988 cat conftest.$ac_ext >&5
6989 rm -rf conftest*
6990 echo "$ac_t""no" 1>&6
6991fi
6992rm -f conftest*
6993
6994
6995echo $ac_n "checking for /dev/ptc""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00006996echo "configure:6997: checking for /dev/ptc" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006997if test -r /dev/ptc; then
6998 cat >> confdefs.h <<\EOF
6999#define HAVE_DEV_PTC 1
7000EOF
7001
7002 echo "$ac_t""yes" 1>&6
7003else
7004 echo "$ac_t""no" 1>&6
7005fi
7006
7007echo $ac_n "checking for SVR4 ptys""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007008echo "configure:7009: checking for SVR4 ptys" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007009if test -c /dev/ptmx ; then
7010 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007011#line 7012 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007012#include "confdefs.h"
7013
7014int main() {
7015ptsname(0);grantpt(0);unlockpt(0);
7016; return 0; }
7017EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007018if { (eval echo configure:7019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007019 rm -rf conftest*
7020 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7021#define HAVE_SVR4_PTYS 1
7022EOF
7023
7024else
7025 echo "configure: failed program was:" >&5
7026 cat conftest.$ac_ext >&5
7027 rm -rf conftest*
7028 echo "$ac_t""no" 1>&6
7029fi
7030rm -f conftest*
7031else
7032 echo "$ac_t""no" 1>&6
7033fi
7034
7035echo $ac_n "checking for ptyranges""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007036echo "configure:7037: checking for ptyranges" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007037if test -d /dev/ptym ; then
7038 pdir='/dev/ptym'
7039else
7040 pdir='/dev'
7041fi
7042cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007043#line 7044 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007044#include "confdefs.h"
7045#ifdef M_UNIX
7046 yes;
7047#endif
7048
7049EOF
7050if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7051 egrep "yes" >/dev/null 2>&1; then
7052 rm -rf conftest*
7053 ptys=`echo /dev/ptyp??`
7054else
7055 rm -rf conftest*
7056 ptys=`echo $pdir/pty??`
7057fi
7058rm -f conftest*
7059
7060if test "$ptys" != "$pdir/pty??" ; then
7061 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
7062 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
7063 cat >> confdefs.h <<EOF
7064#define PTYRANGE0 "$p0"
7065EOF
7066
7067 cat >> confdefs.h <<EOF
7068#define PTYRANGE1 "$p1"
7069EOF
7070
7071 echo "$ac_t""$p0 / $p1" 1>&6
7072else
7073 echo "$ac_t""don't know" 1>&6
7074fi
7075
7076echo $ac_n "checking default tty permissions/group""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007077echo "configure:7078: checking default tty permissions/group" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007078rm -f conftest_grp
7079if test "$cross_compiling" = yes; then
7080 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7081else
7082 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007083#line 7084 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007084#include "confdefs.h"
7085
7086#include <sys/types.h>
7087#include <sys/stat.h>
7088#include <stdio.h>
7089main()
7090{
7091 struct stat sb;
7092 char *x,*ttyname();
7093 int om, m;
7094 FILE *fp;
7095
7096 if (!(x = ttyname(0))) exit(1);
7097 if (stat(x, &sb)) exit(1);
7098 om = sb.st_mode;
7099 if (om & 002) exit(0);
7100 m = system("mesg y");
7101 if (m == -1 || m == 127) exit(1);
7102 if (stat(x, &sb)) exit(1);
7103 m = sb.st_mode;
7104 if (chmod(x, om)) exit(1);
7105 if (m & 002) exit(0);
7106 if (sb.st_gid == getgid()) exit(1);
7107 if (!(fp=fopen("conftest_grp", "w")))
7108 exit(1);
7109 fprintf(fp, "%d\n", sb.st_gid);
7110 fclose(fp);
7111 exit(0);
7112}
7113
7114EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007115if { (eval echo configure:7116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00007116then
7117
7118 if test -f conftest_grp; then
7119 ptygrp=`cat conftest_grp`
7120 echo "$ac_t""pty mode: 0620, group: $ptygrp" 1>&6
7121 cat >> confdefs.h <<\EOF
7122#define PTYMODE 0620
7123EOF
7124
7125 cat >> confdefs.h <<EOF
7126#define PTYGROUP $ptygrp
7127EOF
7128
7129 else
7130 echo "$ac_t""ptys are world accessable" 1>&6
7131 fi
7132
7133else
7134 echo "configure: failed program was:" >&5
7135 cat conftest.$ac_ext >&5
7136 rm -fr conftest*
7137 echo "$ac_t""can't determine - assume ptys are world accessable" 1>&6
7138fi
7139rm -fr conftest*
7140fi
7141
7142rm -f conftest_grp
7143
7144
7145echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007146echo "configure:7147: checking return type of signal handlers" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007147if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
7148 echo $ac_n "(cached) $ac_c" 1>&6
7149else
7150 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007151#line 7152 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007152#include "confdefs.h"
7153#include <sys/types.h>
7154#include <signal.h>
7155#ifdef signal
7156#undef signal
7157#endif
7158#ifdef __cplusplus
7159extern "C" void (*signal (int, void (*)(int)))(int);
7160#else
7161void (*signal ()) ();
7162#endif
7163
7164int main() {
7165int i;
7166; return 0; }
7167EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007168if { (eval echo configure:7169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007169 rm -rf conftest*
7170 ac_cv_type_signal=void
7171else
7172 echo "configure: failed program was:" >&5
7173 cat conftest.$ac_ext >&5
7174 rm -rf conftest*
7175 ac_cv_type_signal=int
7176fi
7177rm -f conftest*
7178fi
7179
7180echo "$ac_t""$ac_cv_type_signal" 1>&6
7181cat >> confdefs.h <<EOF
7182#define RETSIGTYPE $ac_cv_type_signal
7183EOF
7184
7185
7186
7187if test $ac_cv_type_signal = void; then
7188 cat >> confdefs.h <<\EOF
7189#define SIGRETURN return
7190EOF
7191
7192else
7193 cat >> confdefs.h <<\EOF
7194#define SIGRETURN return 0
7195EOF
7196
7197fi
7198
7199echo $ac_n "checking for struct sigcontext""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007200echo "configure:7201: checking for struct sigcontext" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007201cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007202#line 7203 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007203#include "confdefs.h"
7204
7205#include <signal.h>
7206test_sig()
7207{
7208 struct sigcontext *scont;
7209 scont = (struct sigcontext *)0;
7210 return 1;
7211}
7212int main() {
7213
7214; return 0; }
7215EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007216if { (eval echo configure:7217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007217 rm -rf conftest*
7218 echo "$ac_t""yes" 1>&6
7219 cat >> confdefs.h <<\EOF
7220#define HAVE_SIGCONTEXT 1
7221EOF
7222
7223else
7224 echo "configure: failed program was:" >&5
7225 cat conftest.$ac_ext >&5
7226 rm -rf conftest*
7227 echo "$ac_t""no" 1>&6
7228fi
7229rm -f conftest*
7230
7231echo $ac_n "checking getcwd implementation""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007232echo "configure:7233: checking getcwd implementation" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007233if test "$cross_compiling" = yes; then
7234 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7235else
7236 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007237#line 7238 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007238#include "confdefs.h"
7239
7240char *dagger[] = { "IFS=pwd", 0 };
7241main()
7242{
7243 char buffer[500];
7244 extern char **environ;
7245 environ = dagger;
7246 return getcwd(buffer, 500) ? 0 : 1;
7247}
7248EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007249if { (eval echo configure:7250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00007250then
7251 echo "$ac_t""it is usable" 1>&6
7252else
7253 echo "configure: failed program was:" >&5
7254 cat conftest.$ac_ext >&5
7255 rm -fr conftest*
7256 echo "$ac_t""it stinks" 1>&6
7257 cat >> confdefs.h <<\EOF
7258#define BAD_GETCWD 1
7259EOF
7260
7261fi
7262rm -fr conftest*
7263fi
7264
7265
7266for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \
7267 getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
7268 memset nanosleep opendir putenv qsort readlink select setenv \
7269 setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
7270 sigvec snprintf strcasecmp strerror strftime stricmp strncasecmp \
7271 strnicmp strpbrk strtol tgetent towlower towupper usleep utime utimes
7272do
7273echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007274echo "configure:7275: checking for $ac_func" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007275if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7276 echo $ac_n "(cached) $ac_c" 1>&6
7277else
7278 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007279#line 7280 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007280#include "confdefs.h"
7281/* System header to define __stub macros and hopefully few prototypes,
7282 which can conflict with char $ac_func(); below. */
7283#include <assert.h>
7284/* Override any gcc2 internal prototype to avoid an error. */
7285/* We use char because int might match the return type of a gcc2
7286 builtin and then its argument prototype would still apply. */
7287char $ac_func();
7288
7289int main() {
7290
7291/* The GNU C library defines this for functions which it implements
7292 to always fail with ENOSYS. Some functions are actually named
7293 something starting with __ and the normal name is an alias. */
7294#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7295choke me
7296#else
7297$ac_func();
7298#endif
7299
7300; return 0; }
7301EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007302if { (eval echo configure:7303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007303 rm -rf conftest*
7304 eval "ac_cv_func_$ac_func=yes"
7305else
7306 echo "configure: failed program was:" >&5
7307 cat conftest.$ac_ext >&5
7308 rm -rf conftest*
7309 eval "ac_cv_func_$ac_func=no"
7310fi
7311rm -f conftest*
7312fi
7313
7314if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7315 echo "$ac_t""yes" 1>&6
7316 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7317 cat >> confdefs.h <<EOF
7318#define $ac_tr_func 1
7319EOF
7320
7321else
7322 echo "$ac_t""no" 1>&6
7323fi
7324done
7325
7326
7327echo $ac_n "checking for st_blksize""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007328echo "configure:7329: checking for st_blksize" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007329cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007330#line 7331 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007331#include "confdefs.h"
7332#include <sys/types.h>
7333#include <sys/stat.h>
7334int main() {
7335 struct stat st;
7336 int n;
7337
7338 stat("/", &st);
7339 n = (int)st.st_blksize;
7340; return 0; }
7341EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007342if { (eval echo configure:7343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007343 rm -rf conftest*
7344 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7345#define HAVE_ST_BLKSIZE 1
7346EOF
7347
7348else
7349 echo "configure: failed program was:" >&5
7350 cat conftest.$ac_ext >&5
7351 rm -rf conftest*
7352 echo "$ac_t""no" 1>&6
7353fi
7354rm -f conftest*
7355
7356echo $ac_n "checking whether stat() ignores a trailing slash""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007357echo "configure:7358: checking whether stat() ignores a trailing slash" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007358if test "$cross_compiling" = yes; then
7359 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7360else
7361 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007362#line 7363 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007363#include "confdefs.h"
7364#include <sys/types.h>
7365#include <sys/stat.h>
7366main() {struct stat st; exit(stat("configure/", &st) != 0); }
7367EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007368if { (eval echo configure:7369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00007369then
7370 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7371#define STAT_IGNORES_SLASH 1
7372EOF
7373
7374else
7375 echo "configure: failed program was:" >&5
7376 cat conftest.$ac_ext >&5
7377 rm -fr conftest*
7378 echo "$ac_t""no" 1>&6
7379fi
7380rm -fr conftest*
7381fi
7382
7383
7384echo $ac_n "checking for iconv_open()""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007385echo "configure:7386: checking for iconv_open()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007386save_LIBS="$LIBS"
7387LIBS="$LIBS -liconv"
7388cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007389#line 7390 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007390#include "confdefs.h"
7391
7392#ifdef HAVE_ICONV_H
7393# include <iconv.h>
7394#endif
7395
7396int main() {
7397iconv_open("fr", "to");
7398; return 0; }
7399EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007400if { (eval echo configure:7401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007401 rm -rf conftest*
7402 echo "$ac_t""yes; with -liconv" 1>&6; cat >> confdefs.h <<\EOF
7403#define HAVE_ICONV 1
7404EOF
7405
7406else
7407 echo "configure: failed program was:" >&5
7408 cat conftest.$ac_ext >&5
7409 rm -rf conftest*
7410 LIBS="$save_LIBS"
7411 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007412#line 7413 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007413#include "confdefs.h"
7414
7415#ifdef HAVE_ICONV_H
7416# include <iconv.h>
7417#endif
7418
7419int main() {
7420iconv_open("fr", "to");
7421; return 0; }
7422EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007423if { (eval echo configure:7424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007424 rm -rf conftest*
7425 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7426#define HAVE_ICONV 1
7427EOF
7428
7429else
7430 echo "configure: failed program was:" >&5
7431 cat conftest.$ac_ext >&5
7432 rm -rf conftest*
7433 echo "$ac_t""no" 1>&6
7434fi
7435rm -f conftest*
7436fi
7437rm -f conftest*
7438
7439
7440echo $ac_n "checking for nl_langinfo(CODESET)""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007441echo "configure:7442: checking for nl_langinfo(CODESET)" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007442cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007443#line 7444 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007444#include "confdefs.h"
7445
7446#ifdef HAVE_LANGINFO_H
7447# include <langinfo.h>
7448#endif
7449
7450int main() {
7451char *cs = nl_langinfo(CODESET);
7452; return 0; }
7453EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007454if { (eval echo configure:7455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007455 rm -rf conftest*
7456 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7457#define HAVE_NL_LANGINFO_CODESET 1
7458EOF
7459
7460else
7461 echo "configure: failed program was:" >&5
7462 cat conftest.$ac_ext >&5
7463 rm -rf conftest*
7464 echo "$ac_t""no" 1>&6
7465fi
7466rm -f conftest*
7467
7468echo $ac_n "checking --disable-acl argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007469echo "configure:7470: checking --disable-acl argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007470# Check whether --enable-acl or --disable-acl was given.
7471if test "${enable_acl+set}" = set; then
7472 enableval="$enable_acl"
7473 :
7474else
7475 enable_acl="yes"
7476fi
7477
7478if test "$enable_acl" = "yes"; then
7479echo "$ac_t""no" 1>&6
7480echo $ac_n "checking for acl_get_file in -lposix1e""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007481echo "configure:7482: checking for acl_get_file in -lposix1e" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007482ac_lib_var=`echo posix1e'_'acl_get_file | sed 'y%./+-%__p_%'`
7483if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7484 echo $ac_n "(cached) $ac_c" 1>&6
7485else
7486 ac_save_LIBS="$LIBS"
7487LIBS="-lposix1e $LIBS"
7488cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007489#line 7490 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007490#include "confdefs.h"
7491/* Override any gcc2 internal prototype to avoid an error. */
7492/* We use char because int might match the return type of a gcc2
7493 builtin and then its argument prototype would still apply. */
7494char acl_get_file();
7495
7496int main() {
7497acl_get_file()
7498; return 0; }
7499EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007500if { (eval echo configure:7501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007501 rm -rf conftest*
7502 eval "ac_cv_lib_$ac_lib_var=yes"
7503else
7504 echo "configure: failed program was:" >&5
7505 cat conftest.$ac_ext >&5
7506 rm -rf conftest*
7507 eval "ac_cv_lib_$ac_lib_var=no"
7508fi
7509rm -f conftest*
7510LIBS="$ac_save_LIBS"
7511
7512fi
7513if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7514 echo "$ac_t""yes" 1>&6
7515 LIBS="$LIBS -lposix1e"
7516else
7517 echo "$ac_t""no" 1>&6
7518echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007519echo "configure:7520: checking for acl_get_file in -lacl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007520ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
7521if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7522 echo $ac_n "(cached) $ac_c" 1>&6
7523else
7524 ac_save_LIBS="$LIBS"
7525LIBS="-lacl $LIBS"
7526cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007527#line 7528 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007528#include "confdefs.h"
7529/* Override any gcc2 internal prototype to avoid an error. */
7530/* We use char because int might match the return type of a gcc2
7531 builtin and then its argument prototype would still apply. */
7532char acl_get_file();
7533
7534int main() {
7535acl_get_file()
7536; return 0; }
7537EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007538if { (eval echo configure:7539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007539 rm -rf conftest*
7540 eval "ac_cv_lib_$ac_lib_var=yes"
7541else
7542 echo "configure: failed program was:" >&5
7543 cat conftest.$ac_ext >&5
7544 rm -rf conftest*
7545 eval "ac_cv_lib_$ac_lib_var=no"
7546fi
7547rm -f conftest*
7548LIBS="$ac_save_LIBS"
7549
7550fi
7551if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7552 echo "$ac_t""yes" 1>&6
7553 LIBS="$LIBS -lacl"
7554 echo $ac_n "checking for fgetxattr in -lattr""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007555echo "configure:7556: checking for fgetxattr in -lattr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007556ac_lib_var=`echo attr'_'fgetxattr | sed 'y%./+-%__p_%'`
7557if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7558 echo $ac_n "(cached) $ac_c" 1>&6
7559else
7560 ac_save_LIBS="$LIBS"
7561LIBS="-lattr $LIBS"
7562cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007563#line 7564 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007564#include "confdefs.h"
7565/* Override any gcc2 internal prototype to avoid an error. */
7566/* We use char because int might match the return type of a gcc2
7567 builtin and then its argument prototype would still apply. */
7568char fgetxattr();
7569
7570int main() {
7571fgetxattr()
7572; return 0; }
7573EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007574if { (eval echo configure:7575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007575 rm -rf conftest*
7576 eval "ac_cv_lib_$ac_lib_var=yes"
7577else
7578 echo "configure: failed program was:" >&5
7579 cat conftest.$ac_ext >&5
7580 rm -rf conftest*
7581 eval "ac_cv_lib_$ac_lib_var=no"
7582fi
7583rm -f conftest*
7584LIBS="$ac_save_LIBS"
7585
7586fi
7587if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7588 echo "$ac_t""yes" 1>&6
7589 LIBS="$LIBS -lattr"
7590else
7591 echo "$ac_t""no" 1>&6
7592fi
7593
7594else
7595 echo "$ac_t""no" 1>&6
7596fi
7597
7598fi
7599
7600
7601echo $ac_n "checking for POSIX ACL support""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007602echo "configure:7603: checking for POSIX ACL support" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007603cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007604#line 7605 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007605#include "confdefs.h"
7606
7607#include <sys/types.h>
7608#ifdef HAVE_SYS_ACL_H
7609# include <sys/acl.h>
7610#endif
7611acl_t acl;
7612int main() {
7613acl = acl_get_file("foo", ACL_TYPE_ACCESS);
7614 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
7615 acl_free(acl);
7616; return 0; }
7617EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007618if { (eval echo configure:7619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007619 rm -rf conftest*
7620 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7621#define HAVE_POSIX_ACL 1
7622EOF
7623
7624else
7625 echo "configure: failed program was:" >&5
7626 cat conftest.$ac_ext >&5
7627 rm -rf conftest*
7628 echo "$ac_t""no" 1>&6
7629fi
7630rm -f conftest*
7631
7632echo $ac_n "checking for Solaris ACL support""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007633echo "configure:7634: checking for Solaris ACL support" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007634cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007635#line 7636 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007636#include "confdefs.h"
7637
7638#ifdef HAVE_SYS_ACL_H
7639# include <sys/acl.h>
7640#endif
7641int main() {
7642acl("foo", GETACLCNT, 0, NULL);
7643
7644; return 0; }
7645EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007646if { (eval echo configure:7647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007647 rm -rf conftest*
7648 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7649#define HAVE_SOLARIS_ACL 1
7650EOF
7651
7652else
7653 echo "configure: failed program was:" >&5
7654 cat conftest.$ac_ext >&5
7655 rm -rf conftest*
7656 echo "$ac_t""no" 1>&6
7657fi
7658rm -f conftest*
7659
7660echo $ac_n "checking for AIX ACL support""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007661echo "configure:7662: checking for AIX ACL support" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007662cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007663#line 7664 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007664#include "confdefs.h"
7665
7666#ifdef HAVE_SYS_ACL_H
7667# include <sys/acl.h>
7668#endif
7669#ifdef HAVE_SYS_ACCESS_H
7670# include <sys/access.h>
7671#endif
7672#define _ALL_SOURCE
7673
7674#include <sys/stat.h>
7675
7676int aclsize;
7677struct acl *aclent;
7678int main() {
7679aclsize = sizeof(struct acl);
7680 aclent = (void *)malloc(aclsize);
7681 statacl("foo", STX_NORMAL, aclent, aclsize);
7682
7683; return 0; }
7684EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007685if { (eval echo configure:7686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007686 rm -rf conftest*
7687 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7688#define HAVE_AIX_ACL 1
7689EOF
7690
7691else
7692 echo "configure: failed program was:" >&5
7693 cat conftest.$ac_ext >&5
7694 rm -rf conftest*
7695 echo "$ac_t""no" 1>&6
7696fi
7697rm -f conftest*
7698else
7699 echo "$ac_t""yes" 1>&6
7700fi
7701
7702echo $ac_n "checking --disable-gpm argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007703echo "configure:7704: checking --disable-gpm argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007704# Check whether --enable-gpm or --disable-gpm was given.
7705if test "${enable_gpm+set}" = set; then
7706 enableval="$enable_gpm"
7707 :
7708else
7709 enable_gpm="yes"
7710fi
7711
7712
7713if test "$enable_gpm" = "yes"; then
7714 echo "$ac_t""no" 1>&6
7715 echo $ac_n "checking for gpm""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007716echo "configure:7717: checking for gpm" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007717if eval "test \"`echo '$''{'vi_cv_have_gpm'+set}'`\" = set"; then
7718 echo $ac_n "(cached) $ac_c" 1>&6
7719else
7720 olibs="$LIBS" ; LIBS="-lgpm"
7721 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007722#line 7723 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007723#include "confdefs.h"
7724#include <gpm.h>
7725 #include <linux/keyboard.h>
7726int main() {
7727Gpm_GetLibVersion(NULL);
7728; return 0; }
7729EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007730if { (eval echo configure:7731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007731 rm -rf conftest*
7732 vi_cv_have_gpm=yes
7733else
7734 echo "configure: failed program was:" >&5
7735 cat conftest.$ac_ext >&5
7736 rm -rf conftest*
7737 vi_cv_have_gpm=no
7738fi
7739rm -f conftest*
7740 LIBS="$olibs"
7741
7742fi
7743
7744echo "$ac_t""$vi_cv_have_gpm" 1>&6
7745 if test $vi_cv_have_gpm = yes; then
7746 LIBS="$LIBS -lgpm"
7747 cat >> confdefs.h <<\EOF
7748#define HAVE_GPM 1
7749EOF
7750
7751 fi
7752else
7753 echo "$ac_t""yes" 1>&6
7754fi
7755
7756echo $ac_n "checking for vsnprintf()""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007757echo "configure:7758: checking for vsnprintf()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007758if test "$cross_compiling" = yes; then
7759 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7760else
7761 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007762#line 7763 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007763#include "confdefs.h"
7764
7765#include <stdio.h>
7766#include <stdarg.h>
7767 /* Check use of vsnprintf() */
7768 void warn(char *fmt, ...);
7769 void warn(char *fmt, ...)
7770 {
7771 va_list ap; char buf[20];
7772 va_start(ap, fmt);
7773 vsnprintf(buf, 20, fmt, ap);
7774 va_end(ap);
7775 }
7776 main()
7777 {
7778 warn("testing %s\n", "a very long string that won't fit");
7779 exit(0);
7780 }
7781
7782EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007783if { (eval echo configure:7784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00007784then
7785 cat >> confdefs.h <<\EOF
7786#define HAVE_VSNPRINTF 1
7787EOF
7788 echo "$ac_t""yes" 1>&6
7789else
7790 echo "configure: failed program was:" >&5
7791 cat conftest.$ac_ext >&5
7792 rm -fr conftest*
7793 echo "$ac_t""no" 1>&6
7794fi
7795rm -fr conftest*
7796fi
7797
7798
7799
7800echo $ac_n "checking for rename""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007801echo "configure:7802: checking for rename" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007802cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007803#line 7804 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007804#include "confdefs.h"
7805#include <stdio.h>
7806int main() {
7807rename("this", "that")
7808; return 0; }
7809EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007810if { (eval echo configure:7811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007811 rm -rf conftest*
7812 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7813#define HAVE_RENAME 1
7814EOF
7815
7816else
7817 echo "configure: failed program was:" >&5
7818 cat conftest.$ac_ext >&5
7819 rm -rf conftest*
7820 echo "$ac_t""no" 1>&6
7821fi
7822rm -f conftest*
7823
7824echo $ac_n "checking for sysctl""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007825echo "configure:7826: checking for sysctl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007826cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007827#line 7828 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007828#include "confdefs.h"
7829#include <sys/types.h>
7830#include <sys/sysctl.h>
7831int main() {
7832 int mib[2], r;
7833 size_t len;
7834
7835 mib[0] = CTL_HW;
7836 mib[1] = HW_USERMEM;
7837 len = sizeof(r);
7838 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
7839
7840; return 0; }
7841EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007842if { (eval echo configure:7843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007843 rm -rf conftest*
7844 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7845#define HAVE_SYSCTL 1
7846EOF
7847
7848else
7849 echo "configure: failed program was:" >&5
7850 cat conftest.$ac_ext >&5
7851 rm -rf conftest*
7852 echo "$ac_t""not usable" 1>&6
7853fi
7854rm -f conftest*
7855
7856echo $ac_n "checking for sysinfo""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007857echo "configure:7858: checking for sysinfo" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007858cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007859#line 7860 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007860#include "confdefs.h"
7861#include <sys/types.h>
7862#include <sys/sysinfo.h>
7863int main() {
7864 struct sysinfo sinfo;
7865 int t;
7866
7867 (void)sysinfo(&sinfo);
7868 t = sinfo.totalram;
7869
7870; return 0; }
7871EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007872if { (eval echo configure:7873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007873 rm -rf conftest*
7874 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7875#define HAVE_SYSINFO 1
7876EOF
7877
7878else
7879 echo "configure: failed program was:" >&5
7880 cat conftest.$ac_ext >&5
7881 rm -rf conftest*
7882 echo "$ac_t""not usable" 1>&6
7883fi
7884rm -f conftest*
7885
7886echo $ac_n "checking for sysconf""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007887echo "configure:7888: checking for sysconf" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007888cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007889#line 7890 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007890#include "confdefs.h"
7891#include <unistd.h>
7892int main() {
7893 (void)sysconf(_SC_PAGESIZE);
7894 (void)sysconf(_SC_PHYS_PAGES);
7895
7896; return 0; }
7897EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007898if { (eval echo configure:7899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007899 rm -rf conftest*
7900 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7901#define HAVE_SYSCONF 1
7902EOF
7903
7904else
7905 echo "configure: failed program was:" >&5
7906 cat conftest.$ac_ext >&5
7907 rm -rf conftest*
7908 echo "$ac_t""not usable" 1>&6
7909fi
7910rm -f conftest*
7911
7912
7913echo $ac_n "checking size of int""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007914echo "configure:7915: checking size of int" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007915if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
7916 echo $ac_n "(cached) $ac_c" 1>&6
7917else
7918 if test "$cross_compiling" = yes; then
7919 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7920else
7921 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007922#line 7923 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007923#include "confdefs.h"
7924#include <stdio.h>
7925 main()
7926 {
7927 FILE *f=fopen("conftestval", "w");
7928 if (!f) exit(1);
7929 fprintf(f, "%d\n", (int)sizeof(int));
7930 exit(0);
7931 }
7932EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007933if { (eval echo configure:7934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00007934then
7935 ac_cv_sizeof_int=`cat conftestval`
7936else
7937 echo "configure: failed program was:" >&5
7938 cat conftest.$ac_ext >&5
7939 rm -fr conftest*
7940 ac_cv_sizeof_int=0
7941fi
7942rm -fr conftest*
7943fi
7944
7945fi
7946
7947echo "$ac_t""$ac_cv_sizeof_int" 1>&6
7948cat >> confdefs.h <<EOF
7949#define SIZEOF_INT $ac_cv_sizeof_int
7950EOF
7951
7952
7953echo $ac_n "checking whether memmove/bcopy/memcpy handle overlaps""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00007954echo "configure:7955: checking whether memmove/bcopy/memcpy handle overlaps" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007955bcopy_test_prog='
7956main() {
7957 char buf[10];
7958 strcpy(buf, "abcdefghi");
7959 mch_memmove(buf, buf + 2, 3);
7960 if (strncmp(buf, "ababcf", 6))
7961 exit(1);
7962 strcpy(buf, "abcdefghi");
7963 mch_memmove(buf + 2, buf, 3);
7964 if (strncmp(buf, "cdedef", 6))
7965 exit(1);
7966 exit(0); /* libc version works properly. */
7967}'
7968
7969
7970if test "$cross_compiling" = yes; then
7971 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7972else
7973 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007974#line 7975 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007975#include "confdefs.h"
7976#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
7977EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007978if { (eval echo configure:7979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00007979then
7980 cat >> confdefs.h <<\EOF
7981#define USEMEMMOVE 1
7982EOF
7983 echo "$ac_t""memmove does" 1>&6
7984else
7985 echo "configure: failed program was:" >&5
7986 cat conftest.$ac_ext >&5
7987 rm -fr conftest*
7988 if test "$cross_compiling" = yes; then
7989 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7990else
7991 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007992#line 7993 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007993#include "confdefs.h"
7994#define mch_memmove(s,d,l) bcopy(d,s,l) $bcopy_test_prog
7995EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00007996if { (eval echo configure:7997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00007997then
7998 cat >> confdefs.h <<\EOF
7999#define USEBCOPY 1
8000EOF
8001 echo "$ac_t""bcopy does" 1>&6
8002else
8003 echo "configure: failed program was:" >&5
8004 cat conftest.$ac_ext >&5
8005 rm -fr conftest*
8006 if test "$cross_compiling" = yes; then
8007 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8008else
8009 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008010#line 8011 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008011#include "confdefs.h"
8012#define mch_memmove(s,d,l) memcpy(d,s,l) $bcopy_test_prog
8013EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008014if { (eval echo configure:8015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +00008015then
8016 cat >> confdefs.h <<\EOF
8017#define USEMEMCPY 1
8018EOF
8019 echo "$ac_t""memcpy does" 1>&6
8020else
8021 echo "configure: failed program was:" >&5
8022 cat conftest.$ac_ext >&5
8023 rm -fr conftest*
8024 echo "$ac_t""no" 1>&6
8025fi
8026rm -fr conftest*
8027fi
8028
8029fi
8030rm -fr conftest*
8031fi
8032
8033fi
8034rm -fr conftest*
8035fi
8036
8037
8038
8039if test "$enable_multibyte" = "yes"; then
8040 cflags_save=$CFLAGS
8041 ldflags_save=$LDFLAGS
8042 if test -n "$x_includes" ; then
8043 CFLAGS="$CFLAGS -I$x_includes"
8044 LDFLAGS="$X_LIBS $LDFLAGS -lX11"
8045 echo $ac_n "checking whether X_LOCALE needed""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008046echo "configure:8047: checking whether X_LOCALE needed" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008047 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008048#line 8049 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008049#include "confdefs.h"
8050#include <X11/Xlocale.h>
8051int main() {
8052
8053; return 0; }
8054EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008055if { (eval echo configure:8056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008056 rm -rf conftest*
8057 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008058#line 8059 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008059#include "confdefs.h"
8060/* Override any gcc2 internal prototype to avoid an error. */
8061/* We use char because int might match the return type of a gcc2
8062 builtin and then its argument prototype would still apply. */
8063char _Xsetlocale();
8064
8065int main() {
8066_Xsetlocale()
8067; return 0; }
8068EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008069if { (eval echo configure:8070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008070 rm -rf conftest*
8071 echo "$ac_t""yes" 1>&6
8072 cat >> confdefs.h <<\EOF
8073#define X_LOCALE 1
8074EOF
8075
8076else
8077 echo "configure: failed program was:" >&5
8078 cat conftest.$ac_ext >&5
8079 rm -rf conftest*
8080 echo "$ac_t""no" 1>&6
8081fi
8082rm -f conftest*
8083else
8084 echo "configure: failed program was:" >&5
8085 cat conftest.$ac_ext >&5
8086 rm -rf conftest*
8087 echo "$ac_t""no" 1>&6
8088fi
8089rm -f conftest*
8090 fi
8091 CFLAGS=$cflags_save
8092 LDFLAGS=$ldflags_save
8093fi
8094
8095echo $ac_n "checking for _xpg4_setrunelocale in -lxpg4""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008096echo "configure:8097: checking for _xpg4_setrunelocale in -lxpg4" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008097ac_lib_var=`echo xpg4'_'_xpg4_setrunelocale | sed 'y%./+-%__p_%'`
8098if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8099 echo $ac_n "(cached) $ac_c" 1>&6
8100else
8101 ac_save_LIBS="$LIBS"
8102LIBS="-lxpg4 $LIBS"
8103cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008104#line 8105 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008105#include "confdefs.h"
8106/* Override any gcc2 internal prototype to avoid an error. */
8107/* We use char because int might match the return type of a gcc2
8108 builtin and then its argument prototype would still apply. */
8109char _xpg4_setrunelocale();
8110
8111int main() {
8112_xpg4_setrunelocale()
8113; return 0; }
8114EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008115if { (eval echo configure:8116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008116 rm -rf conftest*
8117 eval "ac_cv_lib_$ac_lib_var=yes"
8118else
8119 echo "configure: failed program was:" >&5
8120 cat conftest.$ac_ext >&5
8121 rm -rf conftest*
8122 eval "ac_cv_lib_$ac_lib_var=no"
8123fi
8124rm -f conftest*
8125LIBS="$ac_save_LIBS"
8126
8127fi
8128if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8129 echo "$ac_t""yes" 1>&6
8130 LIBS="$LIBS -lxpg4"
8131else
8132 echo "$ac_t""no" 1>&6
8133fi
8134
8135
8136echo $ac_n "checking how to create tags""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008137echo "configure:8138: checking how to create tags" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008138test -f tags && mv tags tags.save
8139if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
8140 TAGPRG="ctags"
8141else
8142 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
8143 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
8144 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
8145 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
8146 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
8147 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
8148 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
8149fi
8150test -f tags.save && mv tags.save tags
8151echo "$ac_t""$TAGPRG" 1>&6
8152
8153echo $ac_n "checking how to run man with a section nr""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008154echo "configure:8155: checking how to run man with a section nr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008155MANDEF="man"
8156(eval man -s 2 read) < /dev/null > /dev/null 2>&5 && MANDEF="man -s"
8157echo "$ac_t""$MANDEF" 1>&6
8158if test "$MANDEF" = "man -s"; then
8159 cat >> confdefs.h <<\EOF
8160#define USEMAN_S 1
8161EOF
8162
8163fi
8164
8165echo $ac_n "checking --disable-nls argument""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008166echo "configure:8167: checking --disable-nls argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008167# Check whether --enable-nls or --disable-nls was given.
8168if test "${enable_nls+set}" = set; then
8169 enableval="$enable_nls"
8170 :
8171else
8172 enable_nls="yes"
8173fi
8174
8175
8176if test "$enable_nls" = "yes"; then
8177 echo "$ac_t""no" 1>&6
8178 # Extract the first word of "msgfmt", so it can be a program name with args.
8179set dummy msgfmt; ac_word=$2
8180echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008181echo "configure:8182: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008182if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
8183 echo $ac_n "(cached) $ac_c" 1>&6
8184else
8185 if test -n "$MSGFMT"; then
8186 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
8187else
8188 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8189 ac_dummy="$PATH"
8190 for ac_dir in $ac_dummy; do
8191 test -z "$ac_dir" && ac_dir=.
8192 if test -f $ac_dir/$ac_word; then
8193 ac_cv_prog_MSGFMT="msgfmt"
8194 break
8195 fi
8196 done
8197 IFS="$ac_save_ifs"
8198fi
8199fi
8200MSGFMT="$ac_cv_prog_MSGFMT"
8201if test -n "$MSGFMT"; then
8202 echo "$ac_t""$MSGFMT" 1>&6
8203else
8204 echo "$ac_t""no" 1>&6
8205fi
8206
8207 echo $ac_n "checking for NLS""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008208echo "configure:8209: checking for NLS" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008209 if test -f po/Makefile; then
8210 have_gettext="no"
8211 if test -n "$MSGFMT"; then
8212 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008213#line 8214 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008214#include "confdefs.h"
8215#include <libintl.h>
8216int main() {
8217gettext("Test");
8218; return 0; }
8219EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008220if { (eval echo configure:8221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008221 rm -rf conftest*
8222 echo "$ac_t""gettext() works" 1>&6; have_gettext="yes"
8223else
8224 echo "configure: failed program was:" >&5
8225 cat conftest.$ac_ext >&5
8226 rm -rf conftest*
8227 olibs=$LIBS
8228 LIBS="$LIBS -lintl"
8229 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008230#line 8231 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008231#include "confdefs.h"
8232#include <libintl.h>
8233int main() {
8234gettext("Test");
8235; return 0; }
8236EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008237if { (eval echo configure:8238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008238 rm -rf conftest*
8239 echo "$ac_t""gettext() works with -lintl" 1>&6; have_gettext="yes"
8240else
8241 echo "configure: failed program was:" >&5
8242 cat conftest.$ac_ext >&5
8243 rm -rf conftest*
8244 echo "$ac_t""gettext() doesn't work" 1>&6;
8245 LIBS=$olibs
8246fi
8247rm -f conftest*
8248fi
8249rm -f conftest*
8250 else
8251 echo "$ac_t""msgfmt not found - disabled" 1>&6;
8252 fi
8253 if test $have_gettext = "yes"; then
8254 cat >> confdefs.h <<\EOF
8255#define HAVE_GETTEXT 1
8256EOF
8257
8258 MAKEMO=yes
8259
8260 for ac_func in bind_textdomain_codeset
8261do
8262echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008263echo "configure:8264: checking for $ac_func" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008264if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8265 echo $ac_n "(cached) $ac_c" 1>&6
8266else
8267 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008268#line 8269 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008269#include "confdefs.h"
8270/* System header to define __stub macros and hopefully few prototypes,
8271 which can conflict with char $ac_func(); below. */
8272#include <assert.h>
8273/* Override any gcc2 internal prototype to avoid an error. */
8274/* We use char because int might match the return type of a gcc2
8275 builtin and then its argument prototype would still apply. */
8276char $ac_func();
8277
8278int main() {
8279
8280/* The GNU C library defines this for functions which it implements
8281 to always fail with ENOSYS. Some functions are actually named
8282 something starting with __ and the normal name is an alias. */
8283#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8284choke me
8285#else
8286$ac_func();
8287#endif
8288
8289; return 0; }
8290EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008291if { (eval echo configure:8292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008292 rm -rf conftest*
8293 eval "ac_cv_func_$ac_func=yes"
8294else
8295 echo "configure: failed program was:" >&5
8296 cat conftest.$ac_ext >&5
8297 rm -rf conftest*
8298 eval "ac_cv_func_$ac_func=no"
8299fi
8300rm -f conftest*
8301fi
8302
8303if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8304 echo "$ac_t""yes" 1>&6
8305 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8306 cat >> confdefs.h <<EOF
8307#define $ac_tr_func 1
8308EOF
8309
8310else
8311 echo "$ac_t""no" 1>&6
8312fi
8313done
8314
8315 echo $ac_n "checking for _nl_msg_cat_cntr""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008316echo "configure:8317: checking for _nl_msg_cat_cntr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008317 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008318#line 8319 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008319#include "confdefs.h"
8320#include <libintl.h>
8321 extern int _nl_msg_cat_cntr;
8322int main() {
8323++_nl_msg_cat_cntr;
8324; return 0; }
8325EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008326if { (eval echo configure:8327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008327 rm -rf conftest*
8328 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8329#define HAVE_NL_MSG_CAT_CNTR 1
8330EOF
8331
8332else
8333 echo "configure: failed program was:" >&5
8334 cat conftest.$ac_ext >&5
8335 rm -rf conftest*
8336 echo "$ac_t""no" 1>&6
8337fi
8338rm -f conftest*
8339 fi
8340 else
8341 echo "$ac_t""no "po/Makefile" - disabled" 1>&6;
8342 fi
8343else
8344 echo "$ac_t""yes" 1>&6
8345fi
8346
8347ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
8348echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008349echo "configure:8350: checking for dlfcn.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008350if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8351 echo $ac_n "(cached) $ac_c" 1>&6
8352else
8353 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008354#line 8355 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008355#include "confdefs.h"
8356#include <dlfcn.h>
8357EOF
8358ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +00008359{ (eval echo configure:8360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008360ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8361if test -z "$ac_err"; then
8362 rm -rf conftest*
8363 eval "ac_cv_header_$ac_safe=yes"
8364else
8365 echo "$ac_err" >&5
8366 echo "configure: failed program was:" >&5
8367 cat conftest.$ac_ext >&5
8368 rm -rf conftest*
8369 eval "ac_cv_header_$ac_safe=no"
8370fi
8371rm -f conftest*
8372fi
8373if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8374 echo "$ac_t""yes" 1>&6
8375 DLL=dlfcn.h
8376else
8377 echo "$ac_t""no" 1>&6
8378ac_safe=`echo "dl.h" | sed 'y%./+-%__p_%'`
8379echo $ac_n "checking for dl.h""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008380echo "configure:8381: checking for dl.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008381if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8382 echo $ac_n "(cached) $ac_c" 1>&6
8383else
8384 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008385#line 8386 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008386#include "confdefs.h"
8387#include <dl.h>
8388EOF
8389ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +00008390{ (eval echo configure:8391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008391ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8392if test -z "$ac_err"; then
8393 rm -rf conftest*
8394 eval "ac_cv_header_$ac_safe=yes"
8395else
8396 echo "$ac_err" >&5
8397 echo "configure: failed program was:" >&5
8398 cat conftest.$ac_ext >&5
8399 rm -rf conftest*
8400 eval "ac_cv_header_$ac_safe=no"
8401fi
8402rm -f conftest*
8403fi
8404if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8405 echo "$ac_t""yes" 1>&6
8406 DLL=dl.h
8407else
8408 echo "$ac_t""no" 1>&6
8409fi
8410
8411fi
8412
8413if test x${DLL} = xdlfcn.h; then
8414 cat >> confdefs.h <<\EOF
8415#define HAVE_DLFCN_H 1
8416EOF
8417
8418 echo $ac_n "checking for dlopen()""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008419echo "configure:8420: checking for dlopen()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008420 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008421#line 8422 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008422#include "confdefs.h"
8423
8424int main() {
8425
8426 extern void* dlopen();
8427 dlopen();
8428
8429; return 0; }
8430EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008431if { (eval echo configure:8432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008432 rm -rf conftest*
8433 echo "$ac_t""yes" 1>&6;
8434 cat >> confdefs.h <<\EOF
8435#define HAVE_DLOPEN 1
8436EOF
8437
8438else
8439 echo "configure: failed program was:" >&5
8440 cat conftest.$ac_ext >&5
8441 rm -rf conftest*
8442 echo "$ac_t""no" 1>&6;
8443 echo $ac_n "checking for dlopen() in -ldl""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008444echo "configure:8445: checking for dlopen() in -ldl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008445 olibs=$LIBS
8446 LIBS="$LIBS -ldl"
8447 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008448#line 8449 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008449#include "confdefs.h"
8450
8451int main() {
8452
8453 extern void* dlopen();
8454 dlopen();
8455
8456; return 0; }
8457EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008458if { (eval echo configure:8459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008459 rm -rf conftest*
8460 echo "$ac_t""yes" 1>&6;
8461 cat >> confdefs.h <<\EOF
8462#define HAVE_DLOPEN 1
8463EOF
8464
8465else
8466 echo "configure: failed program was:" >&5
8467 cat conftest.$ac_ext >&5
8468 rm -rf conftest*
8469 echo "$ac_t""no" 1>&6;
8470 LIBS=$olibs
8471fi
8472rm -f conftest*
8473fi
8474rm -f conftest*
8475 echo $ac_n "checking for dlsym()""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008476echo "configure:8477: checking for dlsym()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008477 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008478#line 8479 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008479#include "confdefs.h"
8480
8481int main() {
8482
8483 extern void* dlsym();
8484 dlsym();
8485
8486; return 0; }
8487EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008488if { (eval echo configure:8489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008489 rm -rf conftest*
8490 echo "$ac_t""yes" 1>&6;
8491 cat >> confdefs.h <<\EOF
8492#define HAVE_DLSYM 1
8493EOF
8494
8495else
8496 echo "configure: failed program was:" >&5
8497 cat conftest.$ac_ext >&5
8498 rm -rf conftest*
8499 echo "$ac_t""no" 1>&6;
8500 echo $ac_n "checking for dlsym() in -ldl""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008501echo "configure:8502: checking for dlsym() in -ldl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008502 olibs=$LIBS
8503 LIBS="$LIBS -ldl"
8504 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008505#line 8506 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008506#include "confdefs.h"
8507
8508int main() {
8509
8510 extern void* dlsym();
8511 dlsym();
8512
8513; return 0; }
8514EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008515if { (eval echo configure:8516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008516 rm -rf conftest*
8517 echo "$ac_t""yes" 1>&6;
8518 cat >> confdefs.h <<\EOF
8519#define HAVE_DLSYM 1
8520EOF
8521
8522else
8523 echo "configure: failed program was:" >&5
8524 cat conftest.$ac_ext >&5
8525 rm -rf conftest*
8526 echo "$ac_t""no" 1>&6;
8527 LIBS=$olibs
8528fi
8529rm -f conftest*
8530fi
8531rm -f conftest*
8532elif test x${DLL} = xdl.h; then
8533 cat >> confdefs.h <<\EOF
8534#define HAVE_DL_H 1
8535EOF
8536
8537 echo $ac_n "checking for shl_load()""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008538echo "configure:8539: checking for shl_load()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008539 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008540#line 8541 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008541#include "confdefs.h"
8542
8543int main() {
8544
8545 extern void* shl_load();
8546 shl_load();
8547
8548; return 0; }
8549EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008550if { (eval echo configure:8551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008551 rm -rf conftest*
8552 echo "$ac_t""yes" 1>&6;
8553 cat >> confdefs.h <<\EOF
8554#define HAVE_SHL_LOAD 1
8555EOF
8556
8557else
8558 echo "configure: failed program was:" >&5
8559 cat conftest.$ac_ext >&5
8560 rm -rf conftest*
8561 echo "$ac_t""no" 1>&6;
8562 echo $ac_n "checking for shl_load() in -ldld""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008563echo "configure:8564: checking for shl_load() in -ldld" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008564 olibs=$LIBS
8565 LIBS="$LIBS -ldld"
8566 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008567#line 8568 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008568#include "confdefs.h"
8569
8570int main() {
8571
8572 extern void* shl_load();
8573 shl_load();
8574
8575; return 0; }
8576EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008577if { (eval echo configure:8578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008578 rm -rf conftest*
8579 echo "$ac_t""yes" 1>&6;
8580 cat >> confdefs.h <<\EOF
8581#define HAVE_SHL_LOAD 1
8582EOF
8583
8584else
8585 echo "configure: failed program was:" >&5
8586 cat conftest.$ac_ext >&5
8587 rm -rf conftest*
8588 echo "$ac_t""no" 1>&6;
8589 LIBS=$olibs
8590fi
8591rm -f conftest*
8592fi
8593rm -f conftest*
8594fi
8595for ac_hdr in setjmp.h
8596do
8597ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8598echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008599echo "configure:8600: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008600if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8601 echo $ac_n "(cached) $ac_c" 1>&6
8602else
8603 cat > conftest.$ac_ext <<EOF
Bram Moolenaar843ee412004-06-30 16:16:41 +00008604#line 8605 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008605#include "confdefs.h"
8606#include <$ac_hdr>
8607EOF
8608ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar843ee412004-06-30 16:16:41 +00008609{ (eval echo configure:8610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008610ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8611if test -z "$ac_err"; then
8612 rm -rf conftest*
8613 eval "ac_cv_header_$ac_safe=yes"
8614else
8615 echo "$ac_err" >&5
8616 echo "configure: failed program was:" >&5
8617 cat conftest.$ac_ext >&5
8618 rm -rf conftest*
8619 eval "ac_cv_header_$ac_safe=no"
8620fi
8621rm -f conftest*
8622fi
8623if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8624 echo "$ac_t""yes" 1>&6
8625 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8626 cat >> confdefs.h <<EOF
8627#define $ac_tr_hdr 1
8628EOF
8629
8630else
8631 echo "$ac_t""no" 1>&6
8632fi
8633done
8634
8635
8636if test "x$MACOSX" = "xyes" -a -n "$PERL"; then
8637 if echo $LIBS | grep -e '-ldl' >/dev/null; then
8638 LIBS=`echo $LIBS | sed s/-ldl//`
8639 PERL_LIBS="$PERL_LIBS -ldl"
8640 fi
8641fi
8642
8643if test "x$MACOSX" = "xyes" && test "x$CARBON" = "xyes" \
8644 && test "x$GUITYPE" != "xCARBONGUI"; then
8645 echo $ac_n "checking whether we need -framework Carbon""... $ac_c" 1>&6
Bram Moolenaar843ee412004-06-30 16:16:41 +00008646echo "configure:8647: checking whether we need -framework Carbon" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008647 if test "x$enable_multibyte" = "xyes" || test "x$features" == "xbig" \
8648 || test "x$features" = "xhuge"; then
8649 LIBS="$LIBS -framework Carbon"
8650 echo "$ac_t""yes" 1>&6
8651 else
8652 echo "$ac_t""no" 1>&6
8653 fi
8654fi
8655
8656
8657trap '' 1 2 15
8658cat > confcache <<\EOF
8659# This file is a shell script that caches the results of configure
8660# tests run on this system so they can be shared between configure
8661# scripts and configure runs. It is not useful on other systems.
8662# If it contains results you don't want to keep, you may remove or edit it.
8663#
8664# By default, configure uses ./config.cache as the cache file,
8665# creating it if it does not exist already. You can give configure
8666# the --cache-file=FILE option to use a different cache file; that is
8667# what configure does when it calls configure scripts in
8668# subdirectories, so they share the cache.
8669# Giving --cache-file=/dev/null disables caching, for debugging configure.
8670# config.status only pays attention to the cache file if you give it the
8671# --recheck option to rerun configure.
8672#
8673EOF
8674# The following way of writing the cache mishandles newlines in values,
8675# but we know of no workaround that is simple, portable, and efficient.
8676# So, don't put newlines in cache variables' values.
8677# Ultrix sh set writes to stderr and can't be redirected directly,
8678# and sets the high bit in the cache file unless we assign to the vars.
8679(set) 2>&1 |
8680 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8681 *ac_space=\ *)
8682 # `set' does not quote correctly, so add quotes (double-quote substitution
8683 # turns \\\\ into \\, and sed turns \\ into \).
8684 sed -n \
8685 -e "s/'/'\\\\''/g" \
8686 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8687 ;;
8688 *)
8689 # `set' quotes correctly as required by POSIX, so do not add quotes.
8690 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8691 ;;
8692 esac >> confcache
8693if cmp -s $cache_file confcache; then
8694 :
8695else
8696 if test -w $cache_file; then
8697 echo "updating cache $cache_file"
8698 cat confcache > $cache_file
8699 else
8700 echo "not updating unwritable cache $cache_file"
8701 fi
8702fi
8703rm -f confcache
8704
8705trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8706
8707test "x$prefix" = xNONE && prefix=$ac_default_prefix
8708# Let make expand exec_prefix.
8709test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8710
8711# Any assignment to VPATH causes Sun make to only execute
8712# the first set of double-colon rules, so remove it if not needed.
8713# If there is a colon in the path, we need to keep it.
8714if test "x$srcdir" = x.; then
8715 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8716fi
8717
8718trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8719
8720DEFS=-DHAVE_CONFIG_H
8721
8722# Without the "./", some shells look in PATH for config.status.
8723: ${CONFIG_STATUS=./config.status}
8724
8725echo creating $CONFIG_STATUS
8726rm -f $CONFIG_STATUS
8727cat > $CONFIG_STATUS <<EOF
8728#! /bin/sh
8729# Generated automatically by configure.
8730# Run this file to recreate the current configuration.
8731# This directory was configured as follows,
8732# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8733#
8734# $0 $ac_configure_args
8735#
8736# Compiler output produced by configure, useful for debugging
8737# configure, is in auto/config.log if it exists.
8738
8739ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8740for ac_option
8741do
8742 case "\$ac_option" in
8743 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8744 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8745 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8746 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8747 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8748 exit 0 ;;
8749 -help | --help | --hel | --he | --h)
8750 echo "\$ac_cs_usage"; exit 0 ;;
8751 *) echo "\$ac_cs_usage"; exit 1 ;;
8752 esac
8753done
8754
8755ac_given_srcdir=$srcdir
8756
8757trap 'rm -fr `echo "auto/config.mk:config.mk.in auto/config.h:config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8758EOF
8759cat >> $CONFIG_STATUS <<EOF
8760
8761# Protect against being on the right side of a sed subst in config.status.
8762sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8763 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8764$ac_vpsub
8765$extrasub
8766s%@SHELL@%$SHELL%g
8767s%@CFLAGS@%$CFLAGS%g
8768s%@CPPFLAGS@%$CPPFLAGS%g
8769s%@CXXFLAGS@%$CXXFLAGS%g
8770s%@FFLAGS@%$FFLAGS%g
8771s%@DEFS@%$DEFS%g
8772s%@LDFLAGS@%$LDFLAGS%g
8773s%@LIBS@%$LIBS%g
8774s%@exec_prefix@%$exec_prefix%g
8775s%@prefix@%$prefix%g
8776s%@program_transform_name@%$program_transform_name%g
8777s%@bindir@%$bindir%g
8778s%@sbindir@%$sbindir%g
8779s%@libexecdir@%$libexecdir%g
8780s%@datadir@%$datadir%g
8781s%@sysconfdir@%$sysconfdir%g
8782s%@sharedstatedir@%$sharedstatedir%g
8783s%@localstatedir@%$localstatedir%g
8784s%@libdir@%$libdir%g
8785s%@includedir@%$includedir%g
8786s%@oldincludedir@%$oldincludedir%g
8787s%@infodir@%$infodir%g
8788s%@mandir@%$mandir%g
8789s%@SET_MAKE@%$SET_MAKE%g
8790s%@CC@%$CC%g
8791s%@CPP@%$CPP%g
8792s%@AWK@%$AWK%g
8793s%@STRIP@%$STRIP%g
8794s%@EXEEXT@%$EXEEXT%g
8795s%@CPP_MM@%$CPP_MM%g
8796s%@OS_EXTRA_SRC@%$OS_EXTRA_SRC%g
8797s%@OS_EXTRA_OBJ@%$OS_EXTRA_OBJ%g
8798s%@VIMNAME@%$VIMNAME%g
8799s%@EXNAME@%$EXNAME%g
8800s%@VIEWNAME@%$VIEWNAME%g
8801s%@line_break@%$line_break%g
8802s%@dovimdiff@%$dovimdiff%g
8803s%@dogvimdiff@%$dogvimdiff%g
8804s%@compiledby@%$compiledby%g
8805s%@vi_cv_path_perl@%$vi_cv_path_perl%g
8806s%@vi_cv_perllib@%$vi_cv_perllib%g
8807s%@shrpenv@%$shrpenv%g
8808s%@PERL_SRC@%$PERL_SRC%g
8809s%@PERL_OBJ@%$PERL_OBJ%g
8810s%@PERL_PRO@%$PERL_PRO%g
8811s%@PERL_CFLAGS@%$PERL_CFLAGS%g
8812s%@PERL_LIBS@%$PERL_LIBS%g
8813s%@vi_cv_path_python@%$vi_cv_path_python%g
8814s%@PYTHON_CONFDIR@%$PYTHON_CONFDIR%g
8815s%@PYTHON_LIBS@%$PYTHON_LIBS%g
8816s%@PYTHON_GETPATH_CFLAGS@%$PYTHON_GETPATH_CFLAGS%g
8817s%@PYTHON_CFLAGS@%$PYTHON_CFLAGS%g
8818s%@PYTHON_SRC@%$PYTHON_SRC%g
8819s%@PYTHON_OBJ@%$PYTHON_OBJ%g
8820s%@vi_cv_path_tcl@%$vi_cv_path_tcl%g
8821s%@TCL_SRC@%$TCL_SRC%g
8822s%@TCL_OBJ@%$TCL_OBJ%g
8823s%@TCL_PRO@%$TCL_PRO%g
8824s%@TCL_CFLAGS@%$TCL_CFLAGS%g
8825s%@TCL_LIBS@%$TCL_LIBS%g
8826s%@vi_cv_path_ruby@%$vi_cv_path_ruby%g
8827s%@RUBY_SRC@%$RUBY_SRC%g
8828s%@RUBY_OBJ@%$RUBY_OBJ%g
8829s%@RUBY_PRO@%$RUBY_PRO%g
8830s%@RUBY_CFLAGS@%$RUBY_CFLAGS%g
8831s%@RUBY_LIBS@%$RUBY_LIBS%g
8832s%@WORKSHOP_SRC@%$WORKSHOP_SRC%g
8833s%@WORKSHOP_OBJ@%$WORKSHOP_OBJ%g
8834s%@NETBEANS_SRC@%$NETBEANS_SRC%g
8835s%@NETBEANS_OBJ@%$NETBEANS_OBJ%g
8836s%@SNIFF_SRC@%$SNIFF_SRC%g
8837s%@SNIFF_OBJ@%$SNIFF_OBJ%g
8838s%@xmkmfpath@%$xmkmfpath%g
8839s%@X_CFLAGS@%$X_CFLAGS%g
8840s%@X_PRE_LIBS@%$X_PRE_LIBS%g
8841s%@X_LIBS@%$X_LIBS%g
8842s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
8843s%@X_LIB@%$X_LIB%g
Bram Moolenaar843ee412004-06-30 16:16:41 +00008844s%@MOC@%$MOC%g
8845s%@KDE_CONFIG@%$KDE_CONFIG%g
8846s%@KDE_LIBS@%$KDE_LIBS%g
8847s%@KDE_INCLUDES@%$KDE_INCLUDES%g
8848s%@KDE_PREFIX@%$KDE_PREFIX%g
8849s%@QT_LIBS@%$QT_LIBS%g
8850s%@QT_INCLUDES@%$QT_INCLUDES%g
8851s%@ROOTQT@%$ROOTQT%g
Bram Moolenaar071d4272004-06-13 20:20:40 +00008852s%@GTK_CONFIG@%$GTK_CONFIG%g
8853s%@GTK12_CONFIG@%$GTK12_CONFIG%g
8854s%@PKG_CONFIG@%$PKG_CONFIG%g
8855s%@GTK_CFLAGS@%$GTK_CFLAGS%g
8856s%@GTK_LIBS@%$GTK_LIBS%g
8857s%@GTK_LIBNAME@%$GTK_LIBNAME%g
8858s%@GNOME_LIBS@%$GNOME_LIBS%g
8859s%@GNOME_LIBDIR@%$GNOME_LIBDIR%g
8860s%@GNOME_INCLUDEDIR@%$GNOME_INCLUDEDIR%g
8861s%@GNOME_CONFIG@%$GNOME_CONFIG%g
8862s%@MOTIF_LIBNAME@%$MOTIF_LIBNAME%g
8863s%@NARROW_PROTO@%$NARROW_PROTO%g
8864s%@GUI_INC_LOC@%$GUI_INC_LOC%g
8865s%@GUI_LIB_LOC@%$GUI_LIB_LOC%g
8866s%@GUITYPE@%$GUITYPE%g
8867s%@GUI_X_LIBS@%$GUI_X_LIBS%g
8868s%@HANGULIN_SRC@%$HANGULIN_SRC%g
8869s%@HANGULIN_OBJ@%$HANGULIN_OBJ%g
8870s%@TAGPRG@%$TAGPRG%g
8871s%@MSGFMT@%$MSGFMT%g
8872s%@MAKEMO@%$MAKEMO%g
8873
8874CEOF
8875EOF
8876
8877cat >> $CONFIG_STATUS <<\EOF
8878
8879# Split the substitutions into bite-sized pieces for seds with
8880# small command number limits, like on Digital OSF/1 and HP-UX.
8881ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8882ac_file=1 # Number of current file.
8883ac_beg=1 # First line for current file.
8884ac_end=$ac_max_sed_cmds # Line after last line for current file.
8885ac_more_lines=:
8886ac_sed_cmds=""
8887while $ac_more_lines; do
8888 if test $ac_beg -gt 1; then
8889 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8890 else
8891 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8892 fi
8893 if test ! -s conftest.s$ac_file; then
8894 ac_more_lines=false
8895 rm -f conftest.s$ac_file
8896 else
8897 if test -z "$ac_sed_cmds"; then
8898 ac_sed_cmds="sed -f conftest.s$ac_file"
8899 else
8900 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8901 fi
8902 ac_file=`expr $ac_file + 1`
8903 ac_beg=$ac_end
8904 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8905 fi
8906done
8907if test -z "$ac_sed_cmds"; then
8908 ac_sed_cmds=cat
8909fi
8910EOF
8911
8912cat >> $CONFIG_STATUS <<EOF
8913
8914CONFIG_FILES=\${CONFIG_FILES-"auto/config.mk:config.mk.in"}
8915EOF
8916cat >> $CONFIG_STATUS <<\EOF
8917for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8918 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8919 case "$ac_file" in
8920 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8921 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8922 *) ac_file_in="${ac_file}.in" ;;
8923 esac
8924
8925 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8926
8927 # Remove last slash and all that follows it. Not all systems have dirname.
8928 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8929 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8930 # The file is in a subdirectory.
8931 test ! -d "$ac_dir" && mkdir "$ac_dir"
8932 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8933 # A "../" for each directory in $ac_dir_suffix.
8934 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8935 else
8936 ac_dir_suffix= ac_dots=
8937 fi
8938
8939 case "$ac_given_srcdir" in
8940 .) srcdir=.
8941 if test -z "$ac_dots"; then top_srcdir=.
8942 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8943 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8944 *) # Relative path.
8945 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8946 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8947 esac
8948
8949
8950 echo creating "$ac_file"
8951 rm -f "$ac_file"
8952 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8953 case "$ac_file" in
8954 *Makefile*) ac_comsub="1i\\
8955# $configure_input" ;;
8956 *) ac_comsub= ;;
8957 esac
8958
8959 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8960 sed -e "$ac_comsub
8961s%@configure_input@%$configure_input%g
8962s%@srcdir@%$srcdir%g
8963s%@top_srcdir@%$top_srcdir%g
8964" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8965fi; done
8966rm -f conftest.s*
8967
8968# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8969# NAME is the cpp macro being defined and VALUE is the value it is being given.
8970#
8971# ac_d sets the value in "#define NAME VALUE" lines.
8972ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8973ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8974ac_dC='\3'
8975ac_dD='%g'
8976# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8977ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8978ac_uB='\([ ]\)%\1#\2define\3'
8979ac_uC=' '
8980ac_uD='\4%g'
8981# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8982ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8983ac_eB='$%\1#\2define\3'
8984ac_eC=' '
8985ac_eD='%g'
8986
8987if test "${CONFIG_HEADERS+set}" != set; then
8988EOF
8989cat >> $CONFIG_STATUS <<EOF
8990 CONFIG_HEADERS="auto/config.h:config.h.in"
8991EOF
8992cat >> $CONFIG_STATUS <<\EOF
8993fi
8994for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8995 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8996 case "$ac_file" in
8997 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8998 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8999 *) ac_file_in="${ac_file}.in" ;;
9000 esac
9001
9002 echo creating $ac_file
9003
9004 rm -f conftest.frag conftest.in conftest.out
9005 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9006 cat $ac_file_inputs > conftest.in
9007
9008EOF
9009
9010# Transform confdefs.h into a sed script conftest.vals that substitutes
9011# the proper values into config.h.in to produce config.h. And first:
9012# Protect against being on the right side of a sed subst in config.status.
9013# Protect against being in an unquoted here document in config.status.
9014rm -f conftest.vals
9015cat > conftest.hdr <<\EOF
9016s/[\\&%]/\\&/g
9017s%[\\$`]%\\&%g
9018s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9019s%ac_d%ac_u%gp
9020s%ac_u%ac_e%gp
9021EOF
9022sed -n -f conftest.hdr confdefs.h > conftest.vals
9023rm -f conftest.hdr
9024
9025# This sed command replaces #undef with comments. This is necessary, for
9026# example, in the case of _POSIX_SOURCE, which is predefined and required
9027# on some systems where configure will not decide to define it.
9028cat >> conftest.vals <<\EOF
9029s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9030EOF
9031
9032# Break up conftest.vals because some shells have a limit on
9033# the size of here documents, and old seds have small limits too.
9034
9035rm -f conftest.tail
9036while :
9037do
9038 ac_lines=`grep -c . conftest.vals`
9039 # grep -c gives empty output for an empty file on some AIX systems.
9040 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9041 # Write a limited-size here document to conftest.frag.
9042 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9043 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9044 echo 'CEOF
9045 sed -f conftest.frag conftest.in > conftest.out
9046 rm -f conftest.in
9047 mv conftest.out conftest.in
9048' >> $CONFIG_STATUS
9049 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9050 rm -f conftest.vals
9051 mv conftest.tail conftest.vals
9052done
9053rm -f conftest.vals
9054
9055cat >> $CONFIG_STATUS <<\EOF
9056 rm -f conftest.frag conftest.h
9057 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9058 cat conftest.in >> conftest.h
9059 rm -f conftest.in
9060 if cmp -s $ac_file conftest.h 2>/dev/null; then
9061 echo "$ac_file is unchanged"
9062 rm -f conftest.h
9063 else
9064 # Remove last slash and all that follows it. Not all systems have dirname.
9065 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9066 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9067 # The file is in a subdirectory.
9068 test ! -d "$ac_dir" && mkdir "$ac_dir"
9069 fi
9070 rm -f $ac_file
9071 mv conftest.h $ac_file
9072 fi
9073fi; done
9074
9075EOF
9076cat >> $CONFIG_STATUS <<EOF
9077
9078EOF
9079cat >> $CONFIG_STATUS <<\EOF
9080
9081exit 0
9082EOF
9083chmod +x $CONFIG_STATUS
9084rm -fr confdefs* $ac_clean_files
9085test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9086
9087