blob: f83a703f4ee4071a4d5c6460f99b83e5c225bc49 [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
Bram Moolenaar325b7a22004-07-05 15:58:32 +000035 --enable-mzschemeinterp Include MzScheme interpreter."
36ac_help="$ac_help
37 --with-plthome=PLTHOME Use PLTHOME."
38ac_help="$ac_help
Bram Moolenaar071d4272004-06-13 20:20:40 +000039 --enable-perlinterp Include Perl interpreter."
40ac_help="$ac_help
41 --enable-pythoninterp Include Python interpreter."
42ac_help="$ac_help
43 --with-python-config-dir=PATH Python's config directory"
44ac_help="$ac_help
45 --enable-tclinterp Include Tcl interpreter."
46ac_help="$ac_help
47 --with-tclsh=PATH which tclsh to use (default: tclsh8.0)"
48ac_help="$ac_help
49 --enable-rubyinterp Include Ruby interpreter."
50ac_help="$ac_help
51 --enable-cscope Include cscope interface."
52ac_help="$ac_help
53 --enable-workshop Include Sun Visual Workshop support."
54ac_help="$ac_help
55 --disable-netbeans Disable NetBeans integration support."
56ac_help="$ac_help
57 --enable-sniff Include Sniff interface."
58ac_help="$ac_help
59 --enable-multibyte Include multibyte editing support."
60ac_help="$ac_help
61 --enable-hangulinput Include Hangul input support."
62ac_help="$ac_help
63 --enable-xim Include XIM input support."
64ac_help="$ac_help
65 --enable-fontset Include X fontset output support."
66ac_help="$ac_help
67 --with-x use the X Window System"
68ac_help="$ac_help
Bram Moolenaar843ee412004-06-30 16:16:41 +000069 --enable-gui[=OPTS] X11 GUI [default=auto] [OPTS=auto/no/gtk/gtk2/gnome/gnome2/kde/motif/athena/neXtaw/beos/photon/carbon]"
70ac_help="$ac_help
71 --enable-kde-check If auto-select GUI, check for KDE [default=no]"
Bram Moolenaar071d4272004-06-13 20:20:40 +000072ac_help="$ac_help
73 --enable-gtk-check If auto-select GUI, check for GTK [default=yes]"
74ac_help="$ac_help
75 --enable-gtk2-check If GTK GUI, check for GTK+ 2 [default=yes]"
76ac_help="$ac_help
77 --enable-gnome-check If GTK GUI, check for GNOME [default=no]"
78ac_help="$ac_help
79 --enable-motif-check If auto-select GUI, check for Motif [default=yes]"
80ac_help="$ac_help
81 --enable-athena-check If auto-select GUI, check for Athena [default=yes]"
82ac_help="$ac_help
83 --enable-nextaw-check If auto-select GUI, check for neXtaw [default=yes]"
84ac_help="$ac_help
85 --enable-carbon-check If auto-select GUI, check for Carbon [default=yes]"
86ac_help="$ac_help
Bram Moolenaar843ee412004-06-30 16:16:41 +000087 --with-qt-dir=DIR Specify prefix of QT files"
88ac_help="$ac_help
89 --with-qt-includes=DIR Specify location of Qt headers"
90ac_help="$ac_help
91 --with-qt-libs=DIR Specify location of Qt libraries"
92ac_help="$ac_help
93 --enable-kde-toolbar if KDE GUI is selected, enable a KDE-look toolbar [default=no]"
94ac_help="$ac_help
95 --disable-rpath Disable rpath."
96ac_help="$ac_help
97 --with-kde-prefix=PFX Prefix where KDE is installed (optional)"
98ac_help="$ac_help
99 --with-kde-includes=DIR Specify location of KDE headers"
100ac_help="$ac_help
101 --with-kde-libs=DIR Specify location of KDE libraries"
102ac_help="$ac_help
103 --disable-kdetest Do not try to compile and run a test KDE program"
104ac_help="$ac_help
Bram Moolenaar071d4272004-06-13 20:20:40 +0000105 --with-gtk-prefix=PFX Prefix where GTK is installed (optional)"
106ac_help="$ac_help
107 --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)"
108ac_help="$ac_help
109 --disable-gtktest Do not try to compile and run a test GTK program"
110ac_help="$ac_help
111 --with-gnome-includes=DIR Specify location of GNOME headers"
112ac_help="$ac_help
113 --with-gnome-libs=DIR Specify location of GNOME libs"
114ac_help="$ac_help
115 --with-gnome Specify prefix for GNOME files"
116ac_help="$ac_help
117 --with-motif-lib=STRING Library for Motif "
118ac_help="$ac_help
119 --with-tlib=library terminal library to be used "
120ac_help="$ac_help
121 --disable-acl Don't check for ACL support."
122ac_help="$ac_help
123 --disable-gpm Don't use gpm (Linux mouse daemon)."
124ac_help="$ac_help
125 --disable-nls Don't support NLS (gettext())."
126
127# Initialize some variables set by options.
128# The variables have the same names as the options, with
129# dashes changed to underlines.
130build=NONE
131cache_file=./config.cache
132exec_prefix=NONE
133host=NONE
134no_create=
135nonopt=NONE
136no_recursion=
137prefix=NONE
138program_prefix=NONE
139program_suffix=NONE
140program_transform_name=s,x,x,
141silent=
142site=
143srcdir=
144target=NONE
145verbose=
146x_includes=NONE
147x_libraries=NONE
148bindir='${exec_prefix}/bin'
149sbindir='${exec_prefix}/sbin'
150libexecdir='${exec_prefix}/libexec'
151datadir='${prefix}/share'
152sysconfdir='${prefix}/etc'
153sharedstatedir='${prefix}/com'
154localstatedir='${prefix}/var'
155libdir='${exec_prefix}/lib'
156includedir='${prefix}/include'
157oldincludedir='/usr/include'
158infodir='${prefix}/info'
159mandir='${prefix}/man'
160
161# Initialize some other variables.
162subdirs=
163MFLAGS= MAKEFLAGS=
164SHELL=${CONFIG_SHELL-/bin/sh}
165# Maximum number of lines to put in a shell here document.
166ac_max_here_lines=12
167
168ac_prev=
169for ac_option
170do
171
172 # If the previous option needs an argument, assign it.
173 if test -n "$ac_prev"; then
174 eval "$ac_prev=\$ac_option"
175 ac_prev=
176 continue
177 fi
178
179 case "$ac_option" in
180 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
181 *) ac_optarg= ;;
182 esac
183
184 # Accept the important Cygnus configure options, so we can diagnose typos.
185
186 case "$ac_option" in
187
188 -bindir | --bindir | --bindi | --bind | --bin | --bi)
189 ac_prev=bindir ;;
190 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
191 bindir="$ac_optarg" ;;
192
193 -build | --build | --buil | --bui | --bu)
194 ac_prev=build ;;
195 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
196 build="$ac_optarg" ;;
197
198 -cache-file | --cache-file | --cache-fil | --cache-fi \
199 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
200 ac_prev=cache_file ;;
201 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
202 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
203 cache_file="$ac_optarg" ;;
204
205 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
206 ac_prev=datadir ;;
207 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
208 | --da=*)
209 datadir="$ac_optarg" ;;
210
211 -disable-* | --disable-*)
212 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
213 # Reject names that are not valid shell variable names.
214 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
215 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
216 fi
217 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
218 eval "enable_${ac_feature}=no" ;;
219
220 -enable-* | --enable-*)
221 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
222 # Reject names that are not valid shell variable names.
223 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
224 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
225 fi
226 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
227 case "$ac_option" in
228 *=*) ;;
229 *) ac_optarg=yes ;;
230 esac
231 eval "enable_${ac_feature}='$ac_optarg'" ;;
232
233 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
234 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
235 | --exec | --exe | --ex)
236 ac_prev=exec_prefix ;;
237 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
238 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
239 | --exec=* | --exe=* | --ex=*)
240 exec_prefix="$ac_optarg" ;;
241
242 -gas | --gas | --ga | --g)
243 # Obsolete; use --with-gas.
244 with_gas=yes ;;
245
246 -help | --help | --hel | --he)
247 # Omit some internal or obsolete options to make the list less imposing.
248 # This message is too long to be a string in the A/UX 3.1 sh.
249 cat << EOF
250Usage: configure [options] [host]
251Options: [defaults in brackets after descriptions]
252Configuration:
253 --cache-file=FILE cache test results in FILE
254 --help print this message
255 --no-create do not create output files
256 --quiet, --silent do not print \`checking...' messages
257 --version print the version of autoconf that created configure
258Directory and file names:
259 --prefix=PREFIX install architecture-independent files in PREFIX
260 [$ac_default_prefix]
261 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
262 [same as prefix]
263 --bindir=DIR user executables in DIR [EPREFIX/bin]
264 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
265 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
266 --datadir=DIR read-only architecture-independent data in DIR
267 [PREFIX/share]
268 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
269 --sharedstatedir=DIR modifiable architecture-independent data in DIR
270 [PREFIX/com]
271 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
272 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
273 --includedir=DIR C header files in DIR [PREFIX/include]
274 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
275 --infodir=DIR info documentation in DIR [PREFIX/info]
276 --mandir=DIR man documentation in DIR [PREFIX/man]
277 --srcdir=DIR find the sources in DIR [configure dir or ..]
278 --program-prefix=PREFIX prepend PREFIX to installed program names
279 --program-suffix=SUFFIX append SUFFIX to installed program names
280 --program-transform-name=PROGRAM
281 run sed PROGRAM on installed program names
282EOF
283 cat << EOF
284Host type:
285 --build=BUILD configure for building on BUILD [BUILD=HOST]
286 --host=HOST configure for HOST [guessed]
287 --target=TARGET configure for TARGET [TARGET=HOST]
288Features and packages:
289 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
290 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
291 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
292 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
293 --x-includes=DIR X include files are in DIR
294 --x-libraries=DIR X library files are in DIR
295EOF
296 if test -n "$ac_help"; then
297 echo "--enable and --with options recognized:$ac_help"
298 fi
299 exit 0 ;;
300
301 -host | --host | --hos | --ho)
302 ac_prev=host ;;
303 -host=* | --host=* | --hos=* | --ho=*)
304 host="$ac_optarg" ;;
305
306 -includedir | --includedir | --includedi | --included | --include \
307 | --includ | --inclu | --incl | --inc)
308 ac_prev=includedir ;;
309 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
310 | --includ=* | --inclu=* | --incl=* | --inc=*)
311 includedir="$ac_optarg" ;;
312
313 -infodir | --infodir | --infodi | --infod | --info | --inf)
314 ac_prev=infodir ;;
315 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
316 infodir="$ac_optarg" ;;
317
318 -libdir | --libdir | --libdi | --libd)
319 ac_prev=libdir ;;
320 -libdir=* | --libdir=* | --libdi=* | --libd=*)
321 libdir="$ac_optarg" ;;
322
323 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
324 | --libexe | --libex | --libe)
325 ac_prev=libexecdir ;;
326 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
327 | --libexe=* | --libex=* | --libe=*)
328 libexecdir="$ac_optarg" ;;
329
330 -localstatedir | --localstatedir | --localstatedi | --localstated \
331 | --localstate | --localstat | --localsta | --localst \
332 | --locals | --local | --loca | --loc | --lo)
333 ac_prev=localstatedir ;;
334 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
335 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
336 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
337 localstatedir="$ac_optarg" ;;
338
339 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
340 ac_prev=mandir ;;
341 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
342 mandir="$ac_optarg" ;;
343
344 -nfp | --nfp | --nf)
345 # Obsolete; use --without-fp.
346 with_fp=no ;;
347
348 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
349 | --no-cr | --no-c)
350 no_create=yes ;;
351
352 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
353 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
354 no_recursion=yes ;;
355
356 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
357 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
358 | --oldin | --oldi | --old | --ol | --o)
359 ac_prev=oldincludedir ;;
360 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
361 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
362 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
363 oldincludedir="$ac_optarg" ;;
364
365 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
366 ac_prev=prefix ;;
367 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
368 prefix="$ac_optarg" ;;
369
370 -program-prefix | --program-prefix | --program-prefi | --program-pref \
371 | --program-pre | --program-pr | --program-p)
372 ac_prev=program_prefix ;;
373 -program-prefix=* | --program-prefix=* | --program-prefi=* \
374 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
375 program_prefix="$ac_optarg" ;;
376
377 -program-suffix | --program-suffix | --program-suffi | --program-suff \
378 | --program-suf | --program-su | --program-s)
379 ac_prev=program_suffix ;;
380 -program-suffix=* | --program-suffix=* | --program-suffi=* \
381 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
382 program_suffix="$ac_optarg" ;;
383
384 -program-transform-name | --program-transform-name \
385 | --program-transform-nam | --program-transform-na \
386 | --program-transform-n | --program-transform- \
387 | --program-transform | --program-transfor \
388 | --program-transfo | --program-transf \
389 | --program-trans | --program-tran \
390 | --progr-tra | --program-tr | --program-t)
391 ac_prev=program_transform_name ;;
392 -program-transform-name=* | --program-transform-name=* \
393 | --program-transform-nam=* | --program-transform-na=* \
394 | --program-transform-n=* | --program-transform-=* \
395 | --program-transform=* | --program-transfor=* \
396 | --program-transfo=* | --program-transf=* \
397 | --program-trans=* | --program-tran=* \
398 | --progr-tra=* | --program-tr=* | --program-t=*)
399 program_transform_name="$ac_optarg" ;;
400
401 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
402 | -silent | --silent | --silen | --sile | --sil)
403 silent=yes ;;
404
405 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
406 ac_prev=sbindir ;;
407 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
408 | --sbi=* | --sb=*)
409 sbindir="$ac_optarg" ;;
410
411 -sharedstatedir | --sharedstatedir | --sharedstatedi \
412 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
413 | --sharedst | --shareds | --shared | --share | --shar \
414 | --sha | --sh)
415 ac_prev=sharedstatedir ;;
416 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
417 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
418 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
419 | --sha=* | --sh=*)
420 sharedstatedir="$ac_optarg" ;;
421
422 -site | --site | --sit)
423 ac_prev=site ;;
424 -site=* | --site=* | --sit=*)
425 site="$ac_optarg" ;;
426
427 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
428 ac_prev=srcdir ;;
429 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
430 srcdir="$ac_optarg" ;;
431
432 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
433 | --syscon | --sysco | --sysc | --sys | --sy)
434 ac_prev=sysconfdir ;;
435 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
436 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
437 sysconfdir="$ac_optarg" ;;
438
439 -target | --target | --targe | --targ | --tar | --ta | --t)
440 ac_prev=target ;;
441 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
442 target="$ac_optarg" ;;
443
444 -v | -verbose | --verbose | --verbos | --verbo | --verb)
445 verbose=yes ;;
446
447 -version | --version | --versio | --versi | --vers)
448 echo "configure generated by autoconf version 2.13"
449 exit 0 ;;
450
451 -with-* | --with-*)
452 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
453 # Reject names that are not valid shell variable names.
454 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
455 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
456 fi
457 ac_package=`echo $ac_package| sed 's/-/_/g'`
458 case "$ac_option" in
459 *=*) ;;
460 *) ac_optarg=yes ;;
461 esac
462 eval "with_${ac_package}='$ac_optarg'" ;;
463
464 -without-* | --without-*)
465 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
466 # Reject names that are not valid shell variable names.
467 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
468 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
469 fi
470 ac_package=`echo $ac_package| sed 's/-/_/g'`
471 eval "with_${ac_package}=no" ;;
472
473 --x)
474 # Obsolete; use --with-x.
475 with_x=yes ;;
476
477 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
478 | --x-incl | --x-inc | --x-in | --x-i)
479 ac_prev=x_includes ;;
480 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
481 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
482 x_includes="$ac_optarg" ;;
483
484 -x-libraries | --x-libraries | --x-librarie | --x-librari \
485 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
486 ac_prev=x_libraries ;;
487 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
488 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
489 x_libraries="$ac_optarg" ;;
490
491 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
492 ;;
493
494 *)
495 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
496 echo "configure: warning: $ac_option: invalid host type" 1>&2
497 fi
498 if test "x$nonopt" != xNONE; then
499 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
500 fi
501 nonopt="$ac_option"
502 ;;
503
504 esac
505done
506
507if test -n "$ac_prev"; then
508 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
509fi
510
511trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
512
513# File descriptor usage:
514# 0 standard input
515# 1 file creation
516# 2 errors and warnings
517# 3 some systems may open it to /dev/tty
518# 4 used on the Kubota Titan
519# 6 checking for... messages and results
520# 5 compiler messages saved in config.log
521if test "$silent" = yes; then
522 exec 6>/dev/null
523else
524 exec 6>&1
525fi
526exec 5>auto/config.log
527
528echo "\
529This file contains any messages produced by compilers while
530running configure, to aid debugging if configure makes a mistake.
531" 1>&5
532
533# Strip out --no-create and --no-recursion so they do not pile up.
534# Also quote any args containing shell metacharacters.
535ac_configure_args=
536for ac_arg
537do
538 case "$ac_arg" in
539 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
540 | --no-cr | --no-c) ;;
541 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
542 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
543 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
544 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
545 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
546 esac
547done
548
549# NLS nuisances.
550# Only set these to C if already set. These must not be set unconditionally
551# because not all systems understand e.g. LANG=C (notably SCO).
552# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
553# Non-C LC_CTYPE values break the ctype check.
554if test "${LANG+set}" = set; then LANG=C; export LANG; fi
555if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
556if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
557if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
558
559# confdefs.h avoids OS command line length limits that DEFS can exceed.
560rm -rf conftest* confdefs.h
561# AIX cpp loses on an empty file, so make sure it contains at least a newline.
562echo > confdefs.h
563
564# A filename unique to this package, relative to the directory that
565# configure is in, which we can look for to find out if srcdir is correct.
566ac_unique_file=vim.h
567
568# Find the source files, if location was not specified.
569if test -z "$srcdir"; then
570 ac_srcdir_defaulted=yes
571 # Try the directory containing this script, then its parent.
572 ac_prog=$0
573 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
574 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
575 srcdir=$ac_confdir
576 if test ! -r $srcdir/$ac_unique_file; then
577 srcdir=..
578 fi
579else
580 ac_srcdir_defaulted=no
581fi
582if test ! -r $srcdir/$ac_unique_file; then
583 if test "$ac_srcdir_defaulted" = yes; then
584 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
585 else
586 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
587 fi
588fi
589srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
590
591# Prefer explicitly selected file to automatically selected ones.
592if test -z "$CONFIG_SITE"; then
593 if test "x$prefix" != xNONE; then
594 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
595 else
596 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
597 fi
598fi
599for ac_site_file in $CONFIG_SITE; do
600 if test -r "$ac_site_file"; then
601 echo "loading site script $ac_site_file"
602 . "$ac_site_file"
603 fi
604done
605
606if test -r "$cache_file"; then
607 echo "loading cache $cache_file"
608 . $cache_file
609else
610 echo "creating cache $cache_file"
611 > $cache_file
612fi
613
614ac_ext=c
615# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
616ac_cpp='$CPP $CPPFLAGS'
617ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
618ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
619cross_compiling=$ac_cv_prog_cc_cross
620
621ac_exeext=
622ac_objext=o
623if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
624 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
625 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
626 ac_n= ac_c='
627' ac_t=' '
628 else
629 ac_n=-n ac_c= ac_t=
630 fi
631else
632 ac_n= ac_c='\c' ac_t=
633fi
634
635
636
637
638cat >> confdefs.h <<\EOF
639#define UNIX 1
640EOF
641
642echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000643echo "configure:644: checking whether ${MAKE-make} sets \${MAKE}" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000644set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
645if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647else
648 cat > conftestmake <<\EOF
649all:
650 @echo 'ac_maketemp="${MAKE}"'
651EOF
652# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
653eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
654if test -n "$ac_maketemp"; then
655 eval ac_cv_prog_make_${ac_make}_set=yes
656else
657 eval ac_cv_prog_make_${ac_make}_set=no
658fi
659rm -f conftestmake
660fi
661if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
662 echo "$ac_t""yes" 1>&6
663 SET_MAKE=
664else
665 echo "$ac_t""no" 1>&6
666 SET_MAKE="MAKE=${MAKE-make}"
667fi
668
669
670# Extract the first word of "gcc", so it can be a program name with args.
671set dummy gcc; ac_word=$2
672echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000673echo "configure:674: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000674if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
675 echo $ac_n "(cached) $ac_c" 1>&6
676else
677 if test -n "$CC"; then
678 ac_cv_prog_CC="$CC" # Let the user override the test.
679else
680 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
681 ac_dummy="$PATH"
682 for ac_dir in $ac_dummy; do
683 test -z "$ac_dir" && ac_dir=.
684 if test -f $ac_dir/$ac_word; then
685 ac_cv_prog_CC="gcc"
686 break
687 fi
688 done
689 IFS="$ac_save_ifs"
690fi
691fi
692CC="$ac_cv_prog_CC"
693if test -n "$CC"; then
694 echo "$ac_t""$CC" 1>&6
695else
696 echo "$ac_t""no" 1>&6
697fi
698
699if test -z "$CC"; then
700 # Extract the first word of "cc", so it can be a program name with args.
701set dummy cc; ac_word=$2
702echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000703echo "configure:704: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000704if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
705 echo $ac_n "(cached) $ac_c" 1>&6
706else
707 if test -n "$CC"; then
708 ac_cv_prog_CC="$CC" # Let the user override the test.
709else
710 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
711 ac_prog_rejected=no
712 ac_dummy="$PATH"
713 for ac_dir in $ac_dummy; do
714 test -z "$ac_dir" && ac_dir=.
715 if test -f $ac_dir/$ac_word; then
716 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
717 ac_prog_rejected=yes
718 continue
719 fi
720 ac_cv_prog_CC="cc"
721 break
722 fi
723 done
724 IFS="$ac_save_ifs"
725if test $ac_prog_rejected = yes; then
726 # We found a bogon in the path, so make sure we never use it.
727 set dummy $ac_cv_prog_CC
728 shift
729 if test $# -gt 0; then
730 # We chose a different compiler from the bogus one.
731 # However, it has the same basename, so the bogon will be chosen
732 # first if we set CC to just the basename; use the full file name.
733 shift
734 set dummy "$ac_dir/$ac_word" "$@"
735 shift
736 ac_cv_prog_CC="$@"
737 fi
738fi
739fi
740fi
741CC="$ac_cv_prog_CC"
742if test -n "$CC"; then
743 echo "$ac_t""$CC" 1>&6
744else
745 echo "$ac_t""no" 1>&6
746fi
747
748 if test -z "$CC"; then
749 case "`uname -s`" in
750 *win32* | *WIN32*)
751 # Extract the first word of "cl", so it can be a program name with args.
752set dummy cl; ac_word=$2
753echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000754echo "configure:755: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000755if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
756 echo $ac_n "(cached) $ac_c" 1>&6
757else
758 if test -n "$CC"; then
759 ac_cv_prog_CC="$CC" # Let the user override the test.
760else
761 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
762 ac_dummy="$PATH"
763 for ac_dir in $ac_dummy; do
764 test -z "$ac_dir" && ac_dir=.
765 if test -f $ac_dir/$ac_word; then
766 ac_cv_prog_CC="cl"
767 break
768 fi
769 done
770 IFS="$ac_save_ifs"
771fi
772fi
773CC="$ac_cv_prog_CC"
774if test -n "$CC"; then
775 echo "$ac_t""$CC" 1>&6
776else
777 echo "$ac_t""no" 1>&6
778fi
779 ;;
780 esac
781 fi
782 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
783fi
784
785echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000786echo "configure:787: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000787
788ac_ext=c
789# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
790ac_cpp='$CPP $CPPFLAGS'
791ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
792ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
793cross_compiling=$ac_cv_prog_cc_cross
794
795cat > conftest.$ac_ext << EOF
796
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000797#line 798 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000798#include "confdefs.h"
799
800main(){return(0);}
801EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000802if { (eval echo configure:803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +0000803 ac_cv_prog_cc_works=yes
804 # If we can't run a trivial program, we are probably using a cross compiler.
805 if (./conftest; exit) 2>/dev/null; then
806 ac_cv_prog_cc_cross=no
807 else
808 ac_cv_prog_cc_cross=yes
809 fi
810else
811 echo "configure: failed program was:" >&5
812 cat conftest.$ac_ext >&5
813 ac_cv_prog_cc_works=no
814fi
815rm -fr conftest*
816ac_ext=c
817# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
818ac_cpp='$CPP $CPPFLAGS'
819ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
820ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
821cross_compiling=$ac_cv_prog_cc_cross
822
823echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
824if test $ac_cv_prog_cc_works = no; then
825 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
826fi
827echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000828echo "configure:829: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000829echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
830cross_compiling=$ac_cv_prog_cc_cross
831
832echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000833echo "configure:834: checking whether we are using GNU C" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000834if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
835 echo $ac_n "(cached) $ac_c" 1>&6
836else
837 cat > conftest.c <<EOF
838#ifdef __GNUC__
839 yes;
840#endif
841EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000842if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Bram Moolenaar071d4272004-06-13 20:20:40 +0000843 ac_cv_prog_gcc=yes
844else
845 ac_cv_prog_gcc=no
846fi
847fi
848
849echo "$ac_t""$ac_cv_prog_gcc" 1>&6
850
851if test $ac_cv_prog_gcc = yes; then
852 GCC=yes
853else
854 GCC=
855fi
856
857ac_test_CFLAGS="${CFLAGS+set}"
858ac_save_CFLAGS="$CFLAGS"
859CFLAGS=
860echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000861echo "configure:862: checking whether ${CC-cc} accepts -g" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000862if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
863 echo $ac_n "(cached) $ac_c" 1>&6
864else
865 echo 'void f(){}' > conftest.c
866if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
867 ac_cv_prog_cc_g=yes
868else
869 ac_cv_prog_cc_g=no
870fi
871rm -f conftest*
872
873fi
874
875echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
876if test "$ac_test_CFLAGS" = set; then
877 CFLAGS="$ac_save_CFLAGS"
878elif test $ac_cv_prog_cc_g = yes; then
879 if test "$GCC" = yes; then
880 CFLAGS="-g -O2"
881 else
882 CFLAGS="-g"
883 fi
884else
885 if test "$GCC" = yes; then
886 CFLAGS="-O2"
887 else
888 CFLAGS=
889 fi
890fi
891 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000892echo "configure:893: checking how to run the C preprocessor" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000893# On Suns, sometimes $CPP names a directory.
894if test -n "$CPP" && test -d "$CPP"; then
895 CPP=
896fi
897if test -z "$CPP"; then
898if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
899 echo $ac_n "(cached) $ac_c" 1>&6
900else
901 # This must be in double quotes, not single quotes, because CPP may get
902 # substituted into the Makefile and "${CC-cc}" will confuse make.
903 CPP="${CC-cc} -E"
904 # On the NeXT, cc -E runs the code through the compiler's parser,
905 # not just through cpp.
906 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000907#line 908 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000908#include "confdefs.h"
909#include <assert.h>
910Syntax Error
911EOF
912ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000913{ (eval echo configure:914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +0000914ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
915if test -z "$ac_err"; then
916 :
917else
918 echo "$ac_err" >&5
919 echo "configure: failed program was:" >&5
920 cat conftest.$ac_ext >&5
921 rm -rf conftest*
922 CPP="${CC-cc} -E -traditional-cpp"
923 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000924#line 925 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000925#include "confdefs.h"
926#include <assert.h>
927Syntax Error
928EOF
929ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000930{ (eval echo configure:931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +0000931ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
932if test -z "$ac_err"; then
933 :
934else
935 echo "$ac_err" >&5
936 echo "configure: failed program was:" >&5
937 cat conftest.$ac_ext >&5
938 rm -rf conftest*
939 CPP="${CC-cc} -nologo -E"
940 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000941#line 942 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000942#include "confdefs.h"
943#include <assert.h>
944Syntax Error
945EOF
946ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000947{ (eval echo configure:948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +0000948ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
949if test -z "$ac_err"; then
950 :
951else
952 echo "$ac_err" >&5
953 echo "configure: failed program was:" >&5
954 cat conftest.$ac_ext >&5
955 rm -rf conftest*
956 CPP=/lib/cpp
957fi
958rm -f conftest*
959fi
960rm -f conftest*
961fi
962rm -f conftest*
963 ac_cv_prog_CPP="$CPP"
964fi
965 CPP="$ac_cv_prog_CPP"
966else
967 ac_cv_prog_CPP="$CPP"
968fi
969echo "$ac_t""$CPP" 1>&6
970 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000971#line 972 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000972#include "confdefs.h"
973
974EOF
975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
976 egrep "" >/dev/null 2>&1; then
977 :
978fi
979rm -f conftest*
980 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000981echo "configure:982: checking for POSIXized ISC" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000982if test -d /etc/conf/kconfig.d &&
983 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
984then
985 echo "$ac_t""yes" 1>&6
986 ISC=yes # If later tests want to check for ISC.
987 cat >> confdefs.h <<\EOF
988#define _POSIX_SOURCE 1
989EOF
990
991 if test "$GCC" = yes; then
992 CC="$CC -posix"
993 else
994 CC="$CC -Xp"
995 fi
996else
997 echo "$ac_t""no" 1>&6
998 ISC=
999fi
1000 for ac_prog in mawk gawk nawk awk
1001do
1002# Extract the first word of "$ac_prog", so it can be a program name with args.
1003set dummy $ac_prog; ac_word=$2
1004echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001005echo "configure:1006: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001006if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1007 echo $ac_n "(cached) $ac_c" 1>&6
1008else
1009 if test -n "$AWK"; then
1010 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1011else
1012 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1013 ac_dummy="$PATH"
1014 for ac_dir in $ac_dummy; do
1015 test -z "$ac_dir" && ac_dir=.
1016 if test -f $ac_dir/$ac_word; then
1017 ac_cv_prog_AWK="$ac_prog"
1018 break
1019 fi
1020 done
1021 IFS="$ac_save_ifs"
1022fi
1023fi
1024AWK="$ac_cv_prog_AWK"
1025if test -n "$AWK"; then
1026 echo "$ac_t""$AWK" 1>&6
1027else
1028 echo "$ac_t""no" 1>&6
1029fi
1030
1031test -n "$AWK" && break
1032done
1033
1034# Extract the first word of "strip", so it can be a program name with args.
1035set dummy strip; ac_word=$2
1036echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001037echo "configure:1038: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001038if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1039 echo $ac_n "(cached) $ac_c" 1>&6
1040else
1041 if test -n "$STRIP"; then
1042 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1043else
1044 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1045 ac_dummy="$PATH"
1046 for ac_dir in $ac_dummy; do
1047 test -z "$ac_dir" && ac_dir=.
1048 if test -f $ac_dir/$ac_word; then
1049 ac_cv_prog_STRIP="strip"
1050 break
1051 fi
1052 done
1053 IFS="$ac_save_ifs"
1054 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
1055fi
1056fi
1057STRIP="$ac_cv_prog_STRIP"
1058if test -n "$STRIP"; then
1059 echo "$ac_t""$STRIP" 1>&6
1060else
1061 echo "$ac_t""no" 1>&6
1062fi
1063
1064
1065echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001066echo "configure:1067: checking for Cygwin environment" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001067if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1068 echo $ac_n "(cached) $ac_c" 1>&6
1069else
1070 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001071#line 1072 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001072#include "confdefs.h"
1073
1074int main() {
1075
1076#ifndef __CYGWIN__
1077#define __CYGWIN__ __CYGWIN32__
1078#endif
1079return __CYGWIN__;
1080; return 0; }
1081EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001082if { (eval echo configure:1083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001083 rm -rf conftest*
1084 ac_cv_cygwin=yes
1085else
1086 echo "configure: failed program was:" >&5
1087 cat conftest.$ac_ext >&5
1088 rm -rf conftest*
1089 ac_cv_cygwin=no
1090fi
1091rm -f conftest*
1092rm -f conftest*
1093fi
1094
1095echo "$ac_t""$ac_cv_cygwin" 1>&6
1096CYGWIN=
1097test "$ac_cv_cygwin" = yes && CYGWIN=yes
1098echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001099echo "configure:1100: checking for mingw32 environment" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001100if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1101 echo $ac_n "(cached) $ac_c" 1>&6
1102else
1103 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001104#line 1105 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001105#include "confdefs.h"
1106
1107int main() {
1108return __MINGW32__;
1109; return 0; }
1110EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001111if { (eval echo configure:1112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001112 rm -rf conftest*
1113 ac_cv_mingw32=yes
1114else
1115 echo "configure: failed program was:" >&5
1116 cat conftest.$ac_ext >&5
1117 rm -rf conftest*
1118 ac_cv_mingw32=no
1119fi
1120rm -f conftest*
1121rm -f conftest*
1122fi
1123
1124echo "$ac_t""$ac_cv_mingw32" 1>&6
1125MINGW32=
1126test "$ac_cv_mingw32" = yes && MINGW32=yes
1127
1128
1129echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001130echo "configure:1131: checking for executable suffix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001131if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1132 echo $ac_n "(cached) $ac_c" 1>&6
1133else
1134 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1135 ac_cv_exeext=.exe
1136else
1137 rm -f conftest*
1138 echo 'int main () { return 0; }' > conftest.$ac_ext
1139 ac_cv_exeext=
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001140 if { (eval echo configure:1141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001141 for file in conftest.*; do
1142 case $file in
1143 *.c | *.o | *.obj) ;;
1144 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1145 esac
1146 done
1147 else
1148 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1149 fi
1150 rm -f conftest*
1151 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1152fi
1153fi
1154
1155EXEEXT=""
1156test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1157echo "$ac_t""${ac_cv_exeext}" 1>&6
1158ac_exeext=$EXEEXT
1159
1160
1161if test -z "$CFLAGS"; then
1162 CFLAGS="-O"
1163 test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
1164fi
1165if test "$GCC" = yes; then
1166 gccversion=`"$CC" --version | sed -e '2,$d;s/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'`
1167 if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2"; then
1168 echo 'GCC 3.0.x has a bug in the optimizer, disabling "-O#"'
1169 CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
1170 else
1171 if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
1172 echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
1173 CFLAGS="$CFLAGS -fno-strength-reduce"
1174 fi
1175 fi
1176fi
1177
1178if test "$cross_compiling" = yes; then
1179 { echo "configure: error: cannot compile a simple program, check CC and CFLAGS
1180 (cross compiling doesn't work)" 1>&2; exit 1; }
1181fi
1182
1183test "$GCC" = yes && CPP_MM=M;
1184
1185if test -f ./toolcheck; then
1186 echo "checking for buggy tools" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001187echo "configure:1188: checking for buggy tools" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001188 sh ./toolcheck 1>&6
1189fi
1190
1191OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
1192
1193echo $ac_n "checking for BeOS""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001194echo "configure:1195: checking for BeOS" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001195case `uname` in
1196 BeOS) OS_EXTRA_SRC=os_beos.c; OS_EXTRA_OBJ=objects/os_beos.o
1197 BEOS=yes; echo "$ac_t""yes" 1>&6;;
1198 *) BEOS=no; echo "$ac_t""no" 1>&6;;
1199esac
1200
1201echo $ac_n "checking for QNX""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001202echo "configure:1203: checking for QNX" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001203case `uname` in
1204 QNX) OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
1205 test -z "$with_x" && with_x=no
1206 QNX=yes; echo "$ac_t""yes" 1>&6;;
1207 *) QNX=no; echo "$ac_t""no" 1>&6;;
1208esac
1209
1210DEFAULT_VIMNAME=vim
1211echo $ac_n "checking for Darwin (Mac OS X)""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001212echo "configure:1213: checking for Darwin (Mac OS X)" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001213if test "`(uname) 2>/dev/null`" = Darwin; then
1214 echo "$ac_t""yes" 1>&6
1215
1216 echo $ac_n "checking --disable-darwin argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001217echo "configure:1218: checking --disable-darwin argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001218 # Check whether --enable-darwin or --disable-darwin was given.
1219if test "${enable_darwin+set}" = set; then
1220 enableval="$enable_darwin"
1221 :
1222else
1223 enable_darwin="yes"
1224fi
1225
1226 if test "$enable_darwin" = "yes"; then
1227 echo "$ac_t""no" 1>&6
1228 echo $ac_n "checking if Darwin files are there""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001229echo "configure:1230: checking if Darwin files are there" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001230 if test -f os_macosx.c; then
1231 echo "$ac_t""yes" 1>&6
1232 else
1233 echo "$ac_t""no, Darwin support disabled" 1>&6
1234 enable_darwin=no
1235 fi
1236 else
1237 echo "$ac_t""yes, Darwin support excluded" 1>&6
1238 fi
1239
1240 if test "$enable_darwin" = "yes"; then
1241 MACOSX=yes
1242 OS_EXTRA_SCR="os_macosx.c";
1243 OS_EXTRA_OBJ="objects/os_macosx.o"
1244 CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -I/Developer/Headers/FlatCarbon -no-cpp-precomp"
1245
1246 ac_safe=`echo "Carbon/Carbon.h" | sed 'y%./+-%__p_%'`
1247echo $ac_n "checking for Carbon/Carbon.h""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001248echo "configure:1249: checking for Carbon/Carbon.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001249if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1250 echo $ac_n "(cached) $ac_c" 1>&6
1251else
1252 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001253#line 1254 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001254#include "confdefs.h"
1255#include <Carbon/Carbon.h>
1256EOF
1257ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001258{ (eval echo configure:1259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00001259ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1260if test -z "$ac_err"; then
1261 rm -rf conftest*
1262 eval "ac_cv_header_$ac_safe=yes"
1263else
1264 echo "$ac_err" >&5
1265 echo "configure: failed program was:" >&5
1266 cat conftest.$ac_ext >&5
1267 rm -rf conftest*
1268 eval "ac_cv_header_$ac_safe=no"
1269fi
1270rm -f conftest*
1271fi
1272if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1273 echo "$ac_t""yes" 1>&6
1274 CARBON=yes
1275else
1276 echo "$ac_t""no" 1>&6
1277fi
1278
1279 if test "x$CARBON" = "xyes"; then
1280 if test -z "$with_x"; then
1281 with_x=no
1282 DEFAULT_VIMNAME=Vim
1283 fi
1284 fi
1285 fi
1286else
1287 echo "$ac_t""no" 1>&6
1288fi
1289
1290
1291
1292
1293have_local_include=''
1294have_local_lib=''
1295if test "$GCC" = yes; then
1296 echo 'void f(){}' > conftest.c
1297 have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 2>&1 | grep '/usr/local/include'`
1298 have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep '/usr/local/lib'`
1299 rm -f conftest.c conftest.o
1300fi
1301if test -z "$have_local_lib" -a -d /usr/local/lib; then
1302 tt=`echo "$LDFLAGS" | sed -e 's+-L/usr/local/lib ++g' -e 's+-L/usr/local/lib$++g'`
1303 if test "$tt" = "$LDFLAGS"; then
1304 LDFLAGS="$LDFLAGS -L/usr/local/lib"
1305 fi
1306fi
1307if test -z "$have_local_include" -a -d /usr/local/include; then
1308 tt=`echo "$CPPFLAGS" | sed -e 's+-I/usr/local/include ++g' -e 's+-I/usr/local/include$++g'`
1309 if test "$tt" = "$CPPFLAGS"; then
1310 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
1311 fi
1312fi
1313
1314echo $ac_n "checking --with-vim-name argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001315echo "configure:1316: checking --with-vim-name argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001316# Check whether --with-vim-name or --without-vim-name was given.
1317if test "${with_vim_name+set}" = set; then
1318 withval="$with_vim_name"
1319 VIMNAME="$withval"; echo "$ac_t""$VIMNAME" 1>&6
1320else
1321 VIMNAME="$DEFAULT_VIMNAME"; echo "$ac_t""Defaulting to $VIMNAME" 1>&6
1322fi
1323
1324
1325echo $ac_n "checking --with-ex-name argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001326echo "configure:1327: checking --with-ex-name argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001327# Check whether --with-ex-name or --without-ex-name was given.
1328if test "${with_ex_name+set}" = set; then
1329 withval="$with_ex_name"
1330 EXNAME="$withval"; echo "$ac_t""$EXNAME" 1>&6
1331else
1332 EXNAME="ex"; echo "$ac_t""Defaulting to ex" 1>&6
1333fi
1334
1335
1336echo $ac_n "checking --with-view-name argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001337echo "configure:1338: checking --with-view-name argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001338# Check whether --with-view-name or --without-view-name was given.
1339if test "${with_view_name+set}" = set; then
1340 withval="$with_view_name"
1341 VIEWNAME="$withval"; echo "$ac_t""$VIEWNAME" 1>&6
1342else
1343 VIEWNAME="view"; echo "$ac_t""Defaulting to view" 1>&6
1344fi
1345
1346
1347
1348echo $ac_n "checking --with-global-runtime argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001349echo "configure:1350: checking --with-global-runtime argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001350# Check whether --with-global-runtime or --without-global-runtime was given.
1351if test "${with_global_runtime+set}" = set; then
1352 withval="$with_global_runtime"
1353 echo "$ac_t""$withval" 1>&6; cat >> confdefs.h <<EOF
1354#define RUNTIME_GLOBAL "$withval"
1355EOF
1356
1357else
1358 echo "$ac_t""no" 1>&6
1359fi
1360
1361
1362echo $ac_n "checking --with-modified-by argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001363echo "configure:1364: checking --with-modified-by argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001364# Check whether --with-modified-by or --without-modified-by was given.
1365if test "${with_modified_by+set}" = set; then
1366 withval="$with_modified_by"
1367 echo "$ac_t""$withval" 1>&6; cat >> confdefs.h <<EOF
1368#define MODIFIED_BY "$withval"
1369EOF
1370
1371else
1372 echo "$ac_t""no" 1>&6
1373fi
1374
1375
1376echo $ac_n "checking if character set is EBCDIC""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001377echo "configure:1378: checking if character set is EBCDIC" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001378cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001379#line 1380 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001380#include "confdefs.h"
1381
1382int main() {
1383 /* TryCompile function for CharSet.
1384 Treat any failure as ASCII for compatibility with existing art.
1385 Use compile-time rather than run-time tests for cross-compiler
1386 tolerance. */
1387#if '0'!=240
1388make an error "Character set is not EBCDIC"
1389#endif
1390; return 0; }
1391EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001392if { (eval echo configure:1393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001393 rm -rf conftest*
1394 # TryCompile action if true
1395cf_cv_ebcdic=yes
1396else
1397 echo "configure: failed program was:" >&5
1398 cat conftest.$ac_ext >&5
1399 rm -rf conftest*
1400 # TryCompile action if false
1401cf_cv_ebcdic=no
1402fi
1403rm -f conftest*
1404# end of TryCompile ])
1405# end of CacheVal CvEbcdic
1406echo "$ac_t""$cf_cv_ebcdic" 1>&6
1407case "$cf_cv_ebcdic" in #(vi
1408 yes) cat >> confdefs.h <<\EOF
1409#define EBCDIC 1
1410EOF
1411
1412 line_break='"\\n"'
1413 ;;
1414 *) line_break='"\\012"';;
1415esac
1416
1417
1418if test "$cf_cv_ebcdic" = "yes"; then
1419echo $ac_n "checking for OS/390 Unix""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001420echo "configure:1421: checking for OS/390 Unix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001421case `uname` in
1422 OS/390) OS390Unix="yes";
1423 if test "$CC" = "cc"; then
1424 ccm="$_CC_CCMODE"
1425 ccn="CC"
1426 else
1427 if test "$CC" = "c89"; then
1428 ccm="$_CC_C89MODE"
1429 ccn="C89"
1430 else
1431 ccm=1
1432 fi
1433 fi
1434 if test "$ccm" != "1"; then
1435 echo ""
1436 echo "------------------------------------------"
1437 echo " On OS/390 Unix, the environment variable"
1438 echo " __CC_${ccn}MODE must be set to \"1\"!"
1439 echo " Do:"
1440 echo " export _CC_${ccn}MODE=1"
1441 echo " and then call configure again."
1442 echo "------------------------------------------"
1443 exit 1
1444 fi
1445 CFLAGS="$CFLAGS -D_ALL_SOURCE"; LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
1446 echo "$ac_t""yes" 1>&6
1447 ;;
1448 *) OS390Unix="no";
1449 echo "$ac_t""no" 1>&6
1450 ;;
1451esac
1452fi
1453
1454
1455
1456echo $ac_n "checking --with-features argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001457echo "configure:1458: checking --with-features argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001458# Check whether --with-features or --without-features was given.
1459if test "${with_features+set}" = set; then
1460 withval="$with_features"
1461 features="$withval"; echo "$ac_t""$features" 1>&6
1462else
1463 features="normal"; echo "$ac_t""Defaulting to normal" 1>&6
1464fi
1465
1466
1467dovimdiff=""
1468dogvimdiff=""
1469case "$features" in
1470 tiny) cat >> confdefs.h <<\EOF
1471#define FEAT_TINY 1
1472EOF
1473 ;;
1474 small) cat >> confdefs.h <<\EOF
1475#define FEAT_SMALL 1
1476EOF
1477 ;;
1478 normal) cat >> confdefs.h <<\EOF
1479#define FEAT_NORMAL 1
1480EOF
1481 dovimdiff="installvimdiff";
1482 dogvimdiff="installgvimdiff" ;;
1483 big) cat >> confdefs.h <<\EOF
1484#define FEAT_BIG 1
1485EOF
1486 dovimdiff="installvimdiff";
1487 dogvimdiff="installgvimdiff" ;;
1488 huge) cat >> confdefs.h <<\EOF
1489#define FEAT_HUGE 1
1490EOF
1491 dovimdiff="installvimdiff";
1492 dogvimdiff="installgvimdiff" ;;
1493 *) echo "$ac_t""Sorry, $features is not supported" 1>&6 ;;
1494esac
1495
1496
1497
1498
1499echo $ac_n "checking --with-compiledby argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001500echo "configure:1501: checking --with-compiledby argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001501# Check whether --with-compiledby or --without-compiledby was given.
1502if test "${with_compiledby+set}" = set; then
1503 withval="$with_compiledby"
1504 compiledby="$withval"; echo "$ac_t""$withval" 1>&6
1505else
1506 compiledby=""; echo "$ac_t""no" 1>&6
1507fi
1508
1509
1510
1511echo $ac_n "checking --disable-xsmp argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001512echo "configure:1513: checking --disable-xsmp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001513# Check whether --enable-xsmp or --disable-xsmp was given.
1514if test "${enable_xsmp+set}" = set; then
1515 enableval="$enable_xsmp"
1516 :
1517else
1518 enable_xsmp="yes"
1519fi
1520
1521
1522if test "$enable_xsmp" = "yes"; then
1523 echo "$ac_t""no" 1>&6
1524 echo $ac_n "checking --disable-xsmp-interact argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001525echo "configure:1526: checking --disable-xsmp-interact argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001526 # Check whether --enable-xsmp-interact or --disable-xsmp-interact was given.
1527if test "${enable_xsmp_interact+set}" = set; then
1528 enableval="$enable_xsmp_interact"
1529 :
1530else
1531 enable_xsmp_interact="yes"
1532fi
1533
1534 if test "$enable_xsmp_interact" = "yes"; then
1535 echo "$ac_t""no" 1>&6
1536 cat >> confdefs.h <<\EOF
1537#define USE_XSMP_INTERACT 1
1538EOF
1539
1540 else
1541 echo "$ac_t""yes" 1>&6
1542 fi
1543else
1544 echo "$ac_t""yes" 1>&6
1545fi
1546
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001547echo $ac_n "checking --enable-mzschemeinterp argument""... $ac_c" 1>&6
1548echo "configure:1549: checking --enable-mzschemeinterp argument" >&5
1549# Check whether --enable-mzschemeinterp or --disable-mzschemeinterp was given.
1550if test "${enable_mzschemeinterp+set}" = set; then
1551 enableval="$enable_mzschemeinterp"
1552 :
1553else
1554 enable_mzschemeinterp="no"
1555fi
1556
1557echo "$ac_t""$enable_mzschemeinterp" 1>&6
1558
1559if test "$enable_mzschemeinterp" = "yes"; then
1560
1561
1562 echo $ac_n "checking --with-plthome argument""... $ac_c" 1>&6
1563echo "configure:1564: checking --with-plthome argument" >&5
1564 # Check whether --with-plthome or --without-plthome was given.
1565if test "${with_plthome+set}" = set; then
1566 withval="$with_plthome"
1567 with_plthome="$withval"; echo "$ac_t""$with_plthome" 1>&6
1568else
1569 with_plthome="";echo "$ac_t"""no"" 1>&6
1570fi
1571
1572
1573 if test "X$with_plthome" != "X"; then
1574 vi_cv_path_mzscheme_pfx="$with_plthome"
1575 else
1576 echo $ac_n "checking PLTHOME environment var""... $ac_c" 1>&6
1577echo "configure:1578: checking PLTHOME environment var" >&5
1578 if test "X$PLTHOME" != "X"; then
1579 echo "$ac_t"""$PLTHOME"" 1>&6
1580 vi_cv_path_mzscheme_pfx="$PLTHOME"
1581 else
1582 echo "$ac_t"""not set"" 1>&6
1583 # Extract the first word of "mzscheme", so it can be a program name with args.
1584set dummy mzscheme; ac_word=$2
1585echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1586echo "configure:1587: checking for $ac_word" >&5
1587if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_mzscheme'+set}'`\" = set"; then
1588 echo $ac_n "(cached) $ac_c" 1>&6
1589else
1590 case "$vi_cv_path_mzscheme" in
1591 /*)
1592 ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
1593 ;;
1594 ?:/*)
1595 ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a dos path.
1596 ;;
1597 *)
1598 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1599 ac_dummy="$PATH"
1600 for ac_dir in $ac_dummy; do
1601 test -z "$ac_dir" && ac_dir=.
1602 if test -f $ac_dir/$ac_word; then
1603 ac_cv_path_vi_cv_path_mzscheme="$ac_dir/$ac_word"
1604 break
1605 fi
1606 done
1607 IFS="$ac_save_ifs"
1608 ;;
1609esac
1610fi
1611vi_cv_path_mzscheme="$ac_cv_path_vi_cv_path_mzscheme"
1612if test -n "$vi_cv_path_mzscheme"; then
1613 echo "$ac_t""$vi_cv_path_mzscheme" 1>&6
1614else
1615 echo "$ac_t""no" 1>&6
1616fi
1617
1618
1619 if test "X$vi_cv_path_mzscheme" != "X"; then
1620 lsout=`ls -l $vi_cv_path_mzscheme`
1621 if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
1622 vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
1623 fi
1624 fi
1625
1626 if test "X$vi_cv_path_mzscheme" != "X"; then
1627 echo $ac_n "checking MzScheme install prefix""... $ac_c" 1>&6
1628echo "configure:1629: checking MzScheme install prefix" >&5
1629if eval "test \"`echo '$''{'vi_cv_path_mzscheme_pfx'+set}'`\" = set"; then
1630 echo $ac_n "(cached) $ac_c" 1>&6
1631else
1632 vi_cv_path_mzscheme_pfx=`
1633 ${vi_cv_path_mzscheme} -evm \
1634 "(display (simplify-path \
1635 (build-path (call-with-values \
1636 (lambda () (split-path (find-system-path (quote exec-file)))) \
1637 (lambda (base name must-be-dir?) base)) (quote up))))"`
1638fi
1639
1640echo "$ac_t""$vi_cv_path_mzscheme_pfx" 1>&6
1641 vi_cv_path_mzscheme_pfx=`echo "$vi_cv_path_mzscheme_pfx" | sed 's+/$++'`
1642 fi
1643 fi
1644 fi
1645
1646 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
1647 echo $ac_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include""... $ac_c" 1>&6
1648echo "configure:1649: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
1649 if test -f $vi_cv_path_mzscheme_pfx/include/scheme.h; then
1650 echo "$ac_t"""yes"" 1>&6
1651 else
1652 echo "$ac_t"""no"" 1>&6
1653 vi_cv_path_mzscheme_pfx=
1654 fi
1655 fi
1656
1657 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
1658 if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then
1659 MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a ${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a"
1660 else
1661 MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzgc -lmzscheme"
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001662 if test "$GCC" = yes; then
1663 MZSCHEME_LIBS="$MZSCHEME_LIBS -Wl,-rpath -Wl,${vi_cv_path_mzscheme_pfx}/lib"
1664 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001665 fi
1666 MZSCHEME_CFLAGS="-I${vi_cv_path_mzscheme_pfx}/include \
1667 -DMZSCHEME_COLLECTS='\"${vi_cv_path_mzscheme_pfx}/collects\"'"
1668 MZSCHEME_SRC="if_mzsch.c"
1669 MZSCHEME_OBJ="objects/if_mzsch.o"
1670 MZSCHEME_PRO="if_mzsch.pro"
1671 cat >> confdefs.h <<\EOF
1672#define FEAT_MZSCHEME 1
1673EOF
1674
1675 fi
1676
1677
1678
1679
1680
1681fi
1682
1683
Bram Moolenaar071d4272004-06-13 20:20:40 +00001684echo $ac_n "checking --enable-perlinterp argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001685echo "configure:1686: checking --enable-perlinterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001686# Check whether --enable-perlinterp or --disable-perlinterp was given.
1687if test "${enable_perlinterp+set}" = set; then
1688 enableval="$enable_perlinterp"
1689 :
1690else
1691 enable_perlinterp="no"
1692fi
1693
1694echo "$ac_t""$enable_perlinterp" 1>&6
1695if test "$enable_perlinterp" = "yes"; then
1696
1697 # Extract the first word of "perl", so it can be a program name with args.
1698set dummy perl; ac_word=$2
1699echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001700echo "configure:1701: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001701if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_perl'+set}'`\" = set"; then
1702 echo $ac_n "(cached) $ac_c" 1>&6
1703else
1704 case "$vi_cv_path_perl" in
1705 /*)
1706 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
1707 ;;
1708 ?:/*)
1709 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a dos path.
1710 ;;
1711 *)
1712 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1713 ac_dummy="$PATH"
1714 for ac_dir in $ac_dummy; do
1715 test -z "$ac_dir" && ac_dir=.
1716 if test -f $ac_dir/$ac_word; then
1717 ac_cv_path_vi_cv_path_perl="$ac_dir/$ac_word"
1718 break
1719 fi
1720 done
1721 IFS="$ac_save_ifs"
1722 ;;
1723esac
1724fi
1725vi_cv_path_perl="$ac_cv_path_vi_cv_path_perl"
1726if test -n "$vi_cv_path_perl"; then
1727 echo "$ac_t""$vi_cv_path_perl" 1>&6
1728else
1729 echo "$ac_t""no" 1>&6
1730fi
1731
1732 if test "X$vi_cv_path_perl" != "X"; then
1733 echo $ac_n "checking Perl version""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001734echo "configure:1735: checking Perl version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001735 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
1736 eval `$vi_cv_path_perl -V:usethreads`
1737 if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
1738 badthreads=no
1739 else
1740 if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
1741 eval `$vi_cv_path_perl -V:use5005threads`
1742 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
1743 badthreads=no
1744 else
1745 badthreads=yes
1746 echo "$ac_t"">>> Perl > 5.6 with 5.5 threads cannot be used <<<" 1>&6
1747 fi
1748 else
1749 badthreads=yes
1750 echo "$ac_t"">>> Perl 5.5 with threads cannot be used <<<" 1>&6
1751 fi
1752 fi
1753 if test $badthreads = no; then
1754 echo "$ac_t""OK" 1>&6
1755 eval `$vi_cv_path_perl -V:shrpenv`
1756 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
1757 shrpenv=""
1758 fi
1759 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
1760
1761 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
1762 -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//'`
1763 perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
1764 sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
1765 -e 's/-bE:perl.exp//' -e 's/-lc //'`
1766 perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
1767 -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
1768
1769 echo $ac_n "checking if compile and link flags for Perl are sane""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001770echo "configure:1771: checking if compile and link flags for Perl are sane" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001771 cflags_save=$CFLAGS
1772 libs_save=$LIBS
1773 ldflags_save=$LDFLAGS
1774 CFLAGS="$CFLAGS $perlcppflags"
1775 LIBS="$LIBS $perllibs"
1776 LDFLAGS="$perlldflags $LDFLAGS"
1777 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001778#line 1779 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001779#include "confdefs.h"
1780
1781int main() {
1782
1783; return 0; }
1784EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001785if { (eval echo configure:1786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001786 rm -rf conftest*
1787 echo "$ac_t""yes" 1>&6; perl_ok=yes
1788else
1789 echo "configure: failed program was:" >&5
1790 cat conftest.$ac_ext >&5
1791 rm -rf conftest*
1792 echo "$ac_t""no: PERL DISABLED" 1>&6; perl_ok=no
1793fi
1794rm -f conftest*
1795 CFLAGS=$cflags_save
1796 LIBS=$libs_save
1797 LDFLAGS=$ldflags_save
1798 if test $perl_ok = yes; then
1799 if test "X$perlcppflags" != "X"; then
1800 PERL_CFLAGS="$perlcppflags"
1801 fi
1802 if test "X$perlldflags" != "X"; then
1803 LDFLAGS="$perlldflags $LDFLAGS"
1804 fi
1805 PERL_LIBS=$perllibs
1806 PERL_SRC="auto/if_perl.c if_perlsfio.c"
1807 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
1808 PERL_PRO="if_perl.pro if_perlsfio.pro"
1809 cat >> confdefs.h <<\EOF
1810#define FEAT_PERL 1
1811EOF
1812
1813 fi
1814 fi
1815 else
1816 echo "$ac_t"">>> too old; need Perl version 5.003_01 or later <<<" 1>&6
1817 fi
1818 fi
1819
1820 if test "x$MACOSX" = "xyes"; then
1821 dir=/System/Library/Perl
1822 darwindir=$dir/darwin
1823 if test -d $darwindir; then
1824 PERL=/usr/bin/perl
1825 else
1826 dir=/System/Library/Perl/5.8.1
1827 darwindir=$dir/darwin-thread-multi-2level
1828 if test -d $darwindir; then
1829 PERL=/usr/bin/perl
1830 fi
1831 fi
1832 if test -n "$PERL"; then
1833 PERL_DIR="$dir"
1834 PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
1835 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
1836 PERL_LIBS="-L$darwindir/CORE -lperl"
1837 fi
1838 fi
1839fi
1840
1841
1842
1843
1844
1845
1846
1847echo $ac_n "checking --enable-pythoninterp argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001848echo "configure:1849: checking --enable-pythoninterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001849# Check whether --enable-pythoninterp or --disable-pythoninterp was given.
1850if test "${enable_pythoninterp+set}" = set; then
1851 enableval="$enable_pythoninterp"
1852 :
1853else
1854 enable_pythoninterp="no"
1855fi
1856
1857echo "$ac_t""$enable_pythoninterp" 1>&6
1858if test "$enable_pythoninterp" = "yes"; then
1859 # Extract the first word of "python", so it can be a program name with args.
1860set dummy python; ac_word=$2
1861echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001862echo "configure:1863: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001863if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_python'+set}'`\" = set"; then
1864 echo $ac_n "(cached) $ac_c" 1>&6
1865else
1866 case "$vi_cv_path_python" in
1867 /*)
1868 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
1869 ;;
1870 ?:/*)
1871 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a dos path.
1872 ;;
1873 *)
1874 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1875 ac_dummy="$PATH"
1876 for ac_dir in $ac_dummy; do
1877 test -z "$ac_dir" && ac_dir=.
1878 if test -f $ac_dir/$ac_word; then
1879 ac_cv_path_vi_cv_path_python="$ac_dir/$ac_word"
1880 break
1881 fi
1882 done
1883 IFS="$ac_save_ifs"
1884 ;;
1885esac
1886fi
1887vi_cv_path_python="$ac_cv_path_vi_cv_path_python"
1888if test -n "$vi_cv_path_python"; then
1889 echo "$ac_t""$vi_cv_path_python" 1>&6
1890else
1891 echo "$ac_t""no" 1>&6
1892fi
1893
1894 if test "X$vi_cv_path_python" != "X"; then
1895
1896 echo $ac_n "checking Python version""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001897echo "configure:1898: checking Python version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001898if eval "test \"`echo '$''{'vi_cv_var_python_version'+set}'`\" = set"; then
1899 echo $ac_n "(cached) $ac_c" 1>&6
1900else
1901 vi_cv_var_python_version=`
1902 ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
1903
1904fi
1905
1906echo "$ac_t""$vi_cv_var_python_version" 1>&6
1907
1908 echo $ac_n "checking Python is 1.4 or better""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001909echo "configure:1910: checking Python is 1.4 or better" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001910 if ${vi_cv_path_python} -c \
1911 "import sys; sys.exit(${vi_cv_var_python_version} < 1.4)"
1912 then
1913 echo "$ac_t""yep" 1>&6
1914
1915 echo $ac_n "checking Python's install prefix""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001916echo "configure:1917: checking Python's install prefix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001917if eval "test \"`echo '$''{'vi_cv_path_python_pfx'+set}'`\" = set"; then
1918 echo $ac_n "(cached) $ac_c" 1>&6
1919else
1920 vi_cv_path_python_pfx=`
1921 ${vi_cv_path_python} -c \
1922 "import sys; print sys.prefix"`
1923fi
1924
1925echo "$ac_t""$vi_cv_path_python_pfx" 1>&6
1926
1927 echo $ac_n "checking Python's execution prefix""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001928echo "configure:1929: checking Python's execution prefix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001929if eval "test \"`echo '$''{'vi_cv_path_python_epfx'+set}'`\" = set"; then
1930 echo $ac_n "(cached) $ac_c" 1>&6
1931else
1932 vi_cv_path_python_epfx=`
1933 ${vi_cv_path_python} -c \
1934 "import sys; print sys.exec_prefix"`
1935fi
1936
1937echo "$ac_t""$vi_cv_path_python_epfx" 1>&6
1938
1939
1940 if eval "test \"`echo '$''{'vi_cv_path_pythonpath'+set}'`\" = set"; then
1941 echo $ac_n "(cached) $ac_c" 1>&6
1942else
1943 vi_cv_path_pythonpath=`
1944 unset PYTHONPATH;
1945 ${vi_cv_path_python} -c \
1946 "import sys, string; print string.join(sys.path,':')"`
1947fi
1948
1949
1950
1951 # Check whether --with-python-config-dir or --without-python-config-dir was given.
1952if test "${with_python_config_dir+set}" = set; then
1953 withval="$with_python_config_dir"
1954 vi_cv_path_python_conf="${withval}"
1955fi
1956
1957
1958 echo $ac_n "checking Python's configuration directory""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001959echo "configure:1960: checking Python's configuration directory" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001960if eval "test \"`echo '$''{'vi_cv_path_python_conf'+set}'`\" = set"; then
1961 echo $ac_n "(cached) $ac_c" 1>&6
1962else
1963
1964 vi_cv_path_python_conf=
1965 for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
1966 for subdir in lib share; do
1967 d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
1968 if test -d "$d" && test -f "$d/config.c"; then
1969 vi_cv_path_python_conf="$d"
1970 fi
1971 done
1972 done
1973
1974fi
1975
1976echo "$ac_t""$vi_cv_path_python_conf" 1>&6
1977
1978 PYTHON_CONFDIR="${vi_cv_path_python_conf}"
1979
1980 if test "X$PYTHON_CONFDIR" = "X"; then
1981 echo "$ac_t""can't find it!" 1>&6
1982 else
1983
1984 if eval "test \"`echo '$''{'vi_cv_path_python_plibs'+set}'`\" = set"; then
1985 echo $ac_n "(cached) $ac_c" 1>&6
1986else
1987
1988 tmp_mkf="/tmp/Makefile-conf$$"
1989 cat ${PYTHON_CONFDIR}/Makefile - <<'eof' >${tmp_mkf}
1990__:
1991 @echo "python_MODLIBS='$(MODLIBS)'"
1992 @echo "python_LIBS='$(LIBS)'"
1993 @echo "python_SYSLIBS='$(SYSLIBS)'"
1994 @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
1995eof
1996 eval "`cd ${PYTHON_CONFDIR} && make -f ${tmp_mkf} __ | sed '/ directory /d'`"
1997 rm -f ${tmp_mkf}
1998 if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
1999 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
2000 vi_cv_path_python_plibs="-framework Python"
2001 else
2002 if test "${vi_cv_var_python_version}" = "1.4"; then
2003 vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
2004 else
2005 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
2006 fi
2007 vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_MODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
2008 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
2009 fi
2010
2011fi
2012
2013
2014 PYTHON_LIBS="${vi_cv_path_python_plibs}"
2015 if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
2016 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
2017 else
2018 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}"
2019 fi
2020 PYTHON_SRC="if_python.c"
2021 if test "x$MACOSX" = "xyes"; then
2022 PYTHON_OBJ="objects/if_python.o"
2023 else
2024 PYTHON_OBJ="objects/if_python.o objects/py_config.o"
2025 fi
2026 if test "${vi_cv_var_python_version}" = "1.4"; then
2027 PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o"
2028 fi
2029 PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'"
2030
2031 echo $ac_n "checking if -pthread should be used""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002032echo "configure:2033: checking if -pthread should be used" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002033 threadsafe_flag=
2034 thread_lib=
2035 if test "x$MACOSX" != "xyes"; then
2036 test "$GCC" = yes && threadsafe_flag="-pthread"
2037 if test "`(uname) 2>/dev/null`" = FreeBSD; then
2038 threadsafe_flag="-D_THREAD_SAFE"
2039 thread_lib="-pthread"
2040 fi
2041 fi
2042 libs_save_old=$LIBS
2043 if test -n "$threadsafe_flag"; then
2044 cflags_save=$CFLAGS
2045 CFLAGS="$CFLAGS $threadsafe_flag"
2046 LIBS="$LIBS $thread_lib"
2047 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002048#line 2049 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002049#include "confdefs.h"
2050
2051int main() {
2052
2053; return 0; }
2054EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002055if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002056 rm -rf conftest*
2057 echo "$ac_t""yes" 1>&6; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
2058else
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -rf conftest*
2062 echo "$ac_t""no" 1>&6; LIBS=$libs_save_old
2063
2064fi
2065rm -f conftest*
2066 CFLAGS=$cflags_save
2067 else
2068 echo "$ac_t""no" 1>&6
2069 fi
2070
2071 echo $ac_n "checking if compile and link flags for Python are sane""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002072echo "configure:2073: checking if compile and link flags for Python are sane" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002073 cflags_save=$CFLAGS
2074 libs_save=$LIBS
2075 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
2076 LIBS="$LIBS $PYTHON_LIBS"
2077 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002078#line 2079 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002079#include "confdefs.h"
2080
2081int main() {
2082
2083; return 0; }
2084EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002085if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002086 rm -rf conftest*
2087 echo "$ac_t""yes" 1>&6; python_ok=yes
2088else
2089 echo "configure: failed program was:" >&5
2090 cat conftest.$ac_ext >&5
2091 rm -rf conftest*
2092 echo "$ac_t""no: PYTHON DISABLED" 1>&6; python_ok=no
2093fi
2094rm -f conftest*
2095 CFLAGS=$cflags_save
2096 LIBS=$libs_save
2097 if test $python_ok = yes; then
2098 cat >> confdefs.h <<\EOF
2099#define FEAT_PYTHON 1
2100EOF
2101
2102 else
2103 LIBS=$libs_save_old
2104 PYTHON_SRC=
2105 PYTHON_OBJ=
2106 PYTHON_LIBS=
2107 PYTHON_CFLAGS=
2108 fi
2109
2110 fi
2111 else
2112 echo "$ac_t""too old" 1>&6
2113 fi
2114 fi
2115fi
2116
2117
2118
2119
2120
2121
2122
2123echo $ac_n "checking --enable-tclinterp argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002124echo "configure:2125: checking --enable-tclinterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002125# Check whether --enable-tclinterp or --disable-tclinterp was given.
2126if test "${enable_tclinterp+set}" = set; then
2127 enableval="$enable_tclinterp"
2128 :
2129else
2130 enable_tclinterp="no"
2131fi
2132
2133echo "$ac_t""$enable_tclinterp" 1>&6
2134
2135if test "$enable_tclinterp" = "yes"; then
2136
2137 echo $ac_n "checking --with-tclsh argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002138echo "configure:2139: checking --with-tclsh argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002139 # Check whether --with-tclsh or --without-tclsh was given.
2140if test "${with_tclsh+set}" = set; then
2141 withval="$with_tclsh"
2142 tclsh_name="$withval"; echo "$ac_t""$tclsh_name" 1>&6
2143else
2144 tclsh_name="tclsh8.0"; echo "$ac_t""no" 1>&6
2145fi
2146
2147 # Extract the first word of "$tclsh_name", so it can be a program name with args.
2148set dummy $tclsh_name; ac_word=$2
2149echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002150echo "configure:2151: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002151if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
2152 echo $ac_n "(cached) $ac_c" 1>&6
2153else
2154 case "$vi_cv_path_tcl" in
2155 /*)
2156 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
2157 ;;
2158 ?:/*)
2159 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
2160 ;;
2161 *)
2162 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2163 ac_dummy="$PATH"
2164 for ac_dir in $ac_dummy; do
2165 test -z "$ac_dir" && ac_dir=.
2166 if test -f $ac_dir/$ac_word; then
2167 ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
2168 break
2169 fi
2170 done
2171 IFS="$ac_save_ifs"
2172 ;;
2173esac
2174fi
2175vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
2176if test -n "$vi_cv_path_tcl"; then
2177 echo "$ac_t""$vi_cv_path_tcl" 1>&6
2178else
2179 echo "$ac_t""no" 1>&6
2180fi
2181
2182
2183
2184 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.0"; then
2185 tclsh_name="tclsh8.2"
2186 # Extract the first word of "$tclsh_name", so it can be a program name with args.
2187set dummy $tclsh_name; ac_word=$2
2188echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002189echo "configure:2190: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002190if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
2191 echo $ac_n "(cached) $ac_c" 1>&6
2192else
2193 case "$vi_cv_path_tcl" in
2194 /*)
2195 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
2196 ;;
2197 ?:/*)
2198 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
2199 ;;
2200 *)
2201 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2202 ac_dummy="$PATH"
2203 for ac_dir in $ac_dummy; do
2204 test -z "$ac_dir" && ac_dir=.
2205 if test -f $ac_dir/$ac_word; then
2206 ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
2207 break
2208 fi
2209 done
2210 IFS="$ac_save_ifs"
2211 ;;
2212esac
2213fi
2214vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
2215if test -n "$vi_cv_path_tcl"; then
2216 echo "$ac_t""$vi_cv_path_tcl" 1>&6
2217else
2218 echo "$ac_t""no" 1>&6
2219fi
2220
2221 fi
2222 if test "X$vi_cv_path_tcl" = "X"; then
2223 tclsh_name="tclsh"
2224 # Extract the first word of "$tclsh_name", so it can be a program name with args.
2225set dummy $tclsh_name; ac_word=$2
2226echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002227echo "configure:2228: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002228if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
2229 echo $ac_n "(cached) $ac_c" 1>&6
2230else
2231 case "$vi_cv_path_tcl" in
2232 /*)
2233 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
2234 ;;
2235 ?:/*)
2236 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
2237 ;;
2238 *)
2239 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2240 ac_dummy="$PATH"
2241 for ac_dir in $ac_dummy; do
2242 test -z "$ac_dir" && ac_dir=.
2243 if test -f $ac_dir/$ac_word; then
2244 ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
2245 break
2246 fi
2247 done
2248 IFS="$ac_save_ifs"
2249 ;;
2250esac
2251fi
2252vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
2253if test -n "$vi_cv_path_tcl"; then
2254 echo "$ac_t""$vi_cv_path_tcl" 1>&6
2255else
2256 echo "$ac_t""no" 1>&6
2257fi
2258
2259 fi
2260 if test "X$vi_cv_path_tcl" != "X"; then
2261 echo $ac_n "checking Tcl version""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002262echo "configure:2263: checking Tcl version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002263 if echo 'exit [expr [info tclversion] < 8.0]' | $vi_cv_path_tcl - ; then
2264 tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
2265 echo "$ac_t""$tclver - OK" 1>&6;
2266 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 -`
2267
2268 echo $ac_n "checking for location of Tcl include""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002269echo "configure:2270: checking for location of Tcl include" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002270 if test "x$MACOSX" != "xyes"; then
2271 tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include"
2272 else
2273 tclinc="/System/Library/Frameworks/Tcl.framework/Headers"
2274 fi
2275 for try in $tclinc; do
2276 if test -f "$try/tcl.h"; then
2277 echo "$ac_t""$try/tcl.h" 1>&6
2278 TCL_INC=$try
2279 break
2280 fi
2281 done
2282 if test -z "$TCL_INC"; then
2283 echo "$ac_t""<not found>" 1>&6
2284 SKIP_TCL=YES
2285 fi
2286 if test -z "$SKIP_TCL"; then
2287 echo $ac_n "checking for location of tclConfig.sh script""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002288echo "configure:2289: checking for location of tclConfig.sh script" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002289 if test "x$MACOSX" != "xyes"; then
2290 tclcnf=`echo $tclinc | sed s/include/lib/g`
2291 else
2292 tclcnf="/System/Library/Frameworks/Tcl.framework"
2293 fi
2294 for try in $tclcnf; do
2295 if test -f $try/tclConfig.sh; then
2296 echo "$ac_t""$try/tclConfig.sh" 1>&6
2297 . $try/tclConfig.sh
2298 TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
2299 TCL_DEFS=`echo $TCL_DEFS | tr ' ' '\012' | sed -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr -d '\012'`
2300 break
2301 fi
2302 done
2303 if test -z "$TCL_LIBS"; then
2304 echo "$ac_t""<not found>" 1>&6
2305 echo $ac_n "checking for Tcl library by myself""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002306echo "configure:2307: checking for Tcl library by myself" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002307 tcllib=`echo $tclinc | sed s/include/lib/g`
2308 for ext in .so .a ; do
2309 for ver in "" $tclver ; do
2310 for try in $tcllib ; do
2311 trylib=tcl$ver$ext
2312 if test -f $try/lib$trylib ; then
2313 echo "$ac_t""$try/lib$trylib" 1>&6
2314 TCL_LIBS="-L$try -ltcl$ver -ldl -lm"
2315 if test "`(uname) 2>/dev/null`" = SunOS &&
2316 uname -r | grep '^5' >/dev/null; then
2317 TCL_LIBS="$TCL_LIBS -R $try"
2318 fi
2319 break 3
2320 fi
2321 done
2322 done
2323 done
2324 if test -z "$TCL_LIBS"; then
2325 echo "$ac_t""<not found>" 1>&6
2326 SKIP_TCL=YES
2327 fi
2328 fi
2329 if test -z "$SKIP_TCL"; then
2330 cat >> confdefs.h <<\EOF
2331#define FEAT_TCL 1
2332EOF
2333
2334 TCL_SRC=if_tcl.c
2335 TCL_OBJ=objects/if_tcl.o
2336 TCL_PRO=if_tcl.pro
2337 TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
2338 fi
2339 fi
2340 else
2341 echo "$ac_t""too old; need Tcl version 8.0 or later" 1>&6
2342 fi
2343 fi
2344fi
2345
2346
2347
2348
2349
2350
2351echo $ac_n "checking --enable-rubyinterp argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002352echo "configure:2353: checking --enable-rubyinterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002353# Check whether --enable-rubyinterp or --disable-rubyinterp was given.
2354if test "${enable_rubyinterp+set}" = set; then
2355 enableval="$enable_rubyinterp"
2356 :
2357else
2358 enable_rubyinterp="no"
2359fi
2360
2361echo "$ac_t""$enable_rubyinterp" 1>&6
2362if test "$enable_rubyinterp" = "yes"; then
2363
2364 # Extract the first word of "ruby", so it can be a program name with args.
2365set dummy ruby; ac_word=$2
2366echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002367echo "configure:2368: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002368if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_ruby'+set}'`\" = set"; then
2369 echo $ac_n "(cached) $ac_c" 1>&6
2370else
2371 case "$vi_cv_path_ruby" in
2372 /*)
2373 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
2374 ;;
2375 ?:/*)
2376 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a dos path.
2377 ;;
2378 *)
2379 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2380 ac_dummy="$PATH"
2381 for ac_dir in $ac_dummy; do
2382 test -z "$ac_dir" && ac_dir=.
2383 if test -f $ac_dir/$ac_word; then
2384 ac_cv_path_vi_cv_path_ruby="$ac_dir/$ac_word"
2385 break
2386 fi
2387 done
2388 IFS="$ac_save_ifs"
2389 ;;
2390esac
2391fi
2392vi_cv_path_ruby="$ac_cv_path_vi_cv_path_ruby"
2393if test -n "$vi_cv_path_ruby"; then
2394 echo "$ac_t""$vi_cv_path_ruby" 1>&6
2395else
2396 echo "$ac_t""no" 1>&6
2397fi
2398
2399 if test "X$vi_cv_path_ruby" != "X"; then
2400 echo $ac_n "checking Ruby version""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002401echo "configure:2402: checking Ruby version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002402 if $vi_cv_path_ruby -e 'VERSION >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
2403 echo "$ac_t""OK" 1>&6
2404 echo $ac_n "checking Ruby header files""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002405echo "configure:2406: checking Ruby header files" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002406 rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null`
2407 if test "X$rubyhdrdir" != "X"; then
2408 echo "$ac_t""$rubyhdrdir" 1>&6
2409 RUBY_CFLAGS="-I$rubyhdrdir"
2410 rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'`
2411 if test "X$rubylibs" != "X"; then
2412 RUBY_LIBS="$rubylibs"
2413 fi
2414 librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'`
2415 if test -f "$rubyhdrdir/$librubyarg"; then
2416 librubyarg="$rubyhdrdir/$librubyarg"
2417 else
2418 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'`
2419 if test -f "$rubylibdir/$librubyarg"; then
2420 librubyarg="$rubylibdir/$librubyarg"
2421 elif test "$librubyarg" = "libruby.a"; then
2422 librubyarg="-lruby"
2423 else
2424 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"`
2425 fi
2426 fi
2427
2428 if test "X$librubyarg" != "X"; then
2429 RUBY_LIBS="$librubyarg $RUBY_LIBS"
2430 fi
2431 rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'`
2432 if test "X$rubyldflags" != "X"; then
2433 LDFLAGS="$rubyldflags $LDFLAGS"
2434 fi
2435 RUBY_SRC="if_ruby.c"
2436 RUBY_OBJ="objects/if_ruby.o"
2437 RUBY_PRO="if_ruby.pro"
2438 cat >> confdefs.h <<\EOF
2439#define FEAT_RUBY 1
2440EOF
2441
2442 else
2443 echo "$ac_t""not found" 1>&6
2444 fi
2445 else
2446 echo "$ac_t""too old; need Ruby version 1.6.0 or later" 1>&6
2447 fi
2448 fi
2449fi
2450
2451
2452
2453
2454
2455
2456echo $ac_n "checking --enable-cscope argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002457echo "configure:2458: checking --enable-cscope argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002458# Check whether --enable-cscope or --disable-cscope was given.
2459if test "${enable_cscope+set}" = set; then
2460 enableval="$enable_cscope"
2461 :
2462else
2463 enable_cscope="no"
2464fi
2465
2466echo "$ac_t""$enable_cscope" 1>&6
2467if test "$enable_cscope" = "yes"; then
2468 cat >> confdefs.h <<\EOF
2469#define FEAT_CSCOPE 1
2470EOF
2471
2472fi
2473
2474echo $ac_n "checking --enable-workshop argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002475echo "configure:2476: checking --enable-workshop argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002476# Check whether --enable-workshop or --disable-workshop was given.
2477if test "${enable_workshop+set}" = set; then
2478 enableval="$enable_workshop"
2479 :
2480else
2481 enable_workshop="no"
2482fi
2483
2484echo "$ac_t""$enable_workshop" 1>&6
2485if test "$enable_workshop" = "yes"; then
2486 cat >> confdefs.h <<\EOF
2487#define FEAT_SUN_WORKSHOP 1
2488EOF
2489
2490 WORKSHOP_SRC="workshop.c integration.c"
2491
2492 WORKSHOP_OBJ="objects/workshop.o objects/integration.o"
2493
2494 if test "${enable_gui-xxx}" = xxx; then
2495 enable_gui=motif
2496 fi
2497fi
2498
2499echo $ac_n "checking --disable-netbeans argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002500echo "configure:2501: checking --disable-netbeans argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002501# Check whether --enable-netbeans or --disable-netbeans was given.
2502if test "${enable_netbeans+set}" = set; then
2503 enableval="$enable_netbeans"
2504 :
2505else
2506 enable_netbeans="yes"
2507fi
2508
2509if test "$enable_netbeans" = "yes"; then
2510 echo "$ac_t""no" 1>&6
2511 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002512echo "configure:2513: checking for socket in -lsocket" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002513ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
2514if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2515 echo $ac_n "(cached) $ac_c" 1>&6
2516else
2517 ac_save_LIBS="$LIBS"
2518LIBS="-lsocket $LIBS"
2519cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002520#line 2521 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002521#include "confdefs.h"
2522/* Override any gcc2 internal prototype to avoid an error. */
2523/* We use char because int might match the return type of a gcc2
2524 builtin and then its argument prototype would still apply. */
2525char socket();
2526
2527int main() {
2528socket()
2529; return 0; }
2530EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002531if { (eval echo configure:2532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002532 rm -rf conftest*
2533 eval "ac_cv_lib_$ac_lib_var=yes"
2534else
2535 echo "configure: failed program was:" >&5
2536 cat conftest.$ac_ext >&5
2537 rm -rf conftest*
2538 eval "ac_cv_lib_$ac_lib_var=no"
2539fi
2540rm -f conftest*
2541LIBS="$ac_save_LIBS"
2542
2543fi
2544if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2545 echo "$ac_t""yes" 1>&6
2546 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2547 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2548 cat >> confdefs.h <<EOF
2549#define $ac_tr_lib 1
2550EOF
2551
2552 LIBS="-lsocket $LIBS"
2553
2554else
2555 echo "$ac_t""no" 1>&6
2556fi
2557
2558 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002559echo "configure:2560: checking for gethostbyname in -lnsl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002560ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2561if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2562 echo $ac_n "(cached) $ac_c" 1>&6
2563else
2564 ac_save_LIBS="$LIBS"
2565LIBS="-lnsl $LIBS"
2566cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002567#line 2568 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002568#include "confdefs.h"
2569/* Override any gcc2 internal prototype to avoid an error. */
2570/* We use char because int might match the return type of a gcc2
2571 builtin and then its argument prototype would still apply. */
2572char gethostbyname();
2573
2574int main() {
2575gethostbyname()
2576; return 0; }
2577EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002578if { (eval echo configure:2579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002579 rm -rf conftest*
2580 eval "ac_cv_lib_$ac_lib_var=yes"
2581else
2582 echo "configure: failed program was:" >&5
2583 cat conftest.$ac_ext >&5
2584 rm -rf conftest*
2585 eval "ac_cv_lib_$ac_lib_var=no"
2586fi
2587rm -f conftest*
2588LIBS="$ac_save_LIBS"
2589
2590fi
2591if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2592 echo "$ac_t""yes" 1>&6
2593 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2594 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2595 cat >> confdefs.h <<EOF
2596#define $ac_tr_lib 1
2597EOF
2598
2599 LIBS="-lnsl $LIBS"
2600
2601else
2602 echo "$ac_t""no" 1>&6
2603fi
2604
2605 echo $ac_n "checking whether compiling netbeans integration is possible""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002606echo "configure:2607: checking whether compiling netbeans integration is possible" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002607 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002608#line 2609 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002609#include "confdefs.h"
2610
2611#include <stdio.h>
2612#include <stdlib.h>
2613#include <stdarg.h>
2614#include <fcntl.h>
2615#include <netdb.h>
2616#include <netinet/in.h>
2617#include <errno.h>
2618#include <sys/types.h>
2619#include <sys/socket.h>
2620 /* Check bitfields */
2621 struct nbbuf {
2622 unsigned int initDone:1;
2623 ushort signmaplen;
2624 };
2625
2626int main() {
2627
2628 /* Check creating a socket. */
2629 struct sockaddr_in server;
2630 (void)socket(AF_INET, SOCK_STREAM, 0);
2631 (void)htons(100);
2632 (void)gethostbyname("microsoft.com");
2633 if (errno == ECONNREFUSED)
2634 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
2635
2636; return 0; }
2637EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002638if { (eval echo configure:2639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002639 rm -rf conftest*
2640 echo "$ac_t""yes" 1>&6
2641else
2642 echo "configure: failed program was:" >&5
2643 cat conftest.$ac_ext >&5
2644 rm -rf conftest*
2645 echo "$ac_t""no" 1>&6; enable_netbeans="no"
2646fi
2647rm -f conftest*
2648else
2649 echo "$ac_t""yes" 1>&6
2650fi
2651if test "$enable_netbeans" = "yes"; then
2652 cat >> confdefs.h <<\EOF
2653#define FEAT_NETBEANS_INTG 1
2654EOF
2655
2656 NETBEANS_SRC="netbeans.c"
2657
2658 NETBEANS_OBJ="objects/netbeans.o"
2659
2660fi
2661
2662echo $ac_n "checking --enable-sniff argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002663echo "configure:2664: checking --enable-sniff argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002664# Check whether --enable-sniff or --disable-sniff was given.
2665if test "${enable_sniff+set}" = set; then
2666 enableval="$enable_sniff"
2667 :
2668else
2669 enable_sniff="no"
2670fi
2671
2672echo "$ac_t""$enable_sniff" 1>&6
2673if test "$enable_sniff" = "yes"; then
2674 cat >> confdefs.h <<\EOF
2675#define FEAT_SNIFF 1
2676EOF
2677
2678 SNIFF_SRC="if_sniff.c"
2679
2680 SNIFF_OBJ="objects/if_sniff.o"
2681
2682fi
2683
2684echo $ac_n "checking --enable-multibyte argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002685echo "configure:2686: checking --enable-multibyte argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002686# Check whether --enable-multibyte or --disable-multibyte was given.
2687if test "${enable_multibyte+set}" = set; then
2688 enableval="$enable_multibyte"
2689 :
2690else
2691 enable_multibyte="no"
2692fi
2693
2694echo "$ac_t""$enable_multibyte" 1>&6
2695if test "$enable_multibyte" = "yes"; then
2696 cat >> confdefs.h <<\EOF
2697#define FEAT_MBYTE 1
2698EOF
2699
2700fi
2701
2702echo $ac_n "checking --enable-hangulinput argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002703echo "configure:2704: checking --enable-hangulinput argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002704# Check whether --enable-hangulinput or --disable-hangulinput was given.
2705if test "${enable_hangulinput+set}" = set; then
2706 enableval="$enable_hangulinput"
2707 :
2708else
2709 enable_hangulinput="no"
2710fi
2711
2712echo "$ac_t""$enable_hangulinput" 1>&6
2713
2714echo $ac_n "checking --enable-xim argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002715echo "configure:2716: checking --enable-xim argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002716# Check whether --enable-xim or --disable-xim was given.
2717if test "${enable_xim+set}" = set; then
2718 enableval="$enable_xim"
2719 echo "$ac_t""$enable_xim" 1>&6
2720else
2721 enable_xim="auto"; echo "$ac_t""defaulting to auto" 1>&6
2722fi
2723
2724
2725echo $ac_n "checking --enable-fontset argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002726echo "configure:2727: checking --enable-fontset argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002727# Check whether --enable-fontset or --disable-fontset was given.
2728if test "${enable_fontset+set}" = set; then
2729 enableval="$enable_fontset"
2730 :
2731else
2732 enable_fontset="no"
2733fi
2734
2735echo "$ac_t""$enable_fontset" 1>&6
2736
2737test -z "$with_x" && with_x=yes
2738test "${enable_gui-yes}" != no -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
2739if test "$with_x" = no; then
2740 echo "$ac_t""defaulting to: don't HAVE_X11" 1>&6
2741else
2742
2743 # Extract the first word of "xmkmf", so it can be a program name with args.
2744set dummy xmkmf; ac_word=$2
2745echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002746echo "configure:2747: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002747if eval "test \"`echo '$''{'ac_cv_path_xmkmfpath'+set}'`\" = set"; then
2748 echo $ac_n "(cached) $ac_c" 1>&6
2749else
2750 case "$xmkmfpath" in
2751 /*)
2752 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
2753 ;;
2754 ?:/*)
2755 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a dos path.
2756 ;;
2757 *)
2758 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2759 ac_dummy="$PATH"
2760 for ac_dir in $ac_dummy; do
2761 test -z "$ac_dir" && ac_dir=.
2762 if test -f $ac_dir/$ac_word; then
2763 ac_cv_path_xmkmfpath="$ac_dir/$ac_word"
2764 break
2765 fi
2766 done
2767 IFS="$ac_save_ifs"
2768 ;;
2769esac
2770fi
2771xmkmfpath="$ac_cv_path_xmkmfpath"
2772if test -n "$xmkmfpath"; then
2773 echo "$ac_t""$xmkmfpath" 1>&6
2774else
2775 echo "$ac_t""no" 1>&6
2776fi
2777
2778
2779 # If we find X, set shell vars x_includes and x_libraries to the
2780# paths, otherwise set no_x=yes.
2781# Uses ac_ vars as temps to allow command line to override cache and checks.
2782# --without-x overrides everything else, but does not touch the cache.
2783echo $ac_n "checking for X""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002784echo "configure:2785: checking for X" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002785
2786# Check whether --with-x or --without-x was given.
2787if test "${with_x+set}" = set; then
2788 withval="$with_x"
2789 :
2790fi
2791
2792# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2793if test "x$with_x" = xno; then
2794 # The user explicitly disabled X.
2795 have_x=disabled
2796else
2797 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2798 # Both variables are already set.
2799 have_x=yes
2800 else
2801if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2802 echo $ac_n "(cached) $ac_c" 1>&6
2803else
2804 # One or both of the vars are not set, and there is no cached value.
2805ac_x_includes=NO ac_x_libraries=NO
2806rm -fr conftestdir
2807if mkdir conftestdir; then
2808 cd conftestdir
2809 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2810 cat > Imakefile <<'EOF'
2811acfindx:
2812 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2813EOF
2814 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2815 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2816 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2817 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2818 for ac_extension in a so sl; do
2819 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2820 test -f $ac_im_libdir/libX11.$ac_extension; then
2821 ac_im_usrlibdir=$ac_im_libdir; break
2822 fi
2823 done
2824 # Screen out bogus values from the imake configuration. They are
2825 # bogus both because they are the default anyway, and because
2826 # using them would break gcc on systems where it needs fixed includes.
2827 case "$ac_im_incroot" in
2828 /usr/include) ;;
2829 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2830 esac
2831 case "$ac_im_usrlibdir" in
2832 /usr/lib | /lib) ;;
2833 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2834 esac
2835 fi
2836 cd ..
2837 rm -fr conftestdir
2838fi
2839
2840if test "$ac_x_includes" = NO; then
2841 # Guess where to find include files, by looking for this one X11 .h file.
2842 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2843
2844 # First, try using that file with no special directory specified.
2845cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002846#line 2847 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002847#include "confdefs.h"
2848#include <$x_direct_test_include>
2849EOF
2850ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002851{ (eval echo configure:2852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00002852ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2853if test -z "$ac_err"; then
2854 rm -rf conftest*
2855 # We can compile using X headers with no special include directory.
2856ac_x_includes=
2857else
2858 echo "$ac_err" >&5
2859 echo "configure: failed program was:" >&5
2860 cat conftest.$ac_ext >&5
2861 rm -rf conftest*
2862 # Look for the header file in a standard set of common directories.
2863# Check X11 before X11Rn because it is often a symlink to the current release.
2864 for ac_dir in \
2865 /usr/X11/include \
2866 /usr/X11R6/include \
2867 /usr/X11R5/include \
2868 /usr/X11R4/include \
2869 \
2870 /usr/include/X11 \
2871 /usr/include/X11R6 \
2872 /usr/include/X11R5 \
2873 /usr/include/X11R4 \
2874 \
2875 /usr/local/X11/include \
2876 /usr/local/X11R6/include \
2877 /usr/local/X11R5/include \
2878 /usr/local/X11R4/include \
2879 \
2880 /usr/local/include/X11 \
2881 /usr/local/include/X11R6 \
2882 /usr/local/include/X11R5 \
2883 /usr/local/include/X11R4 \
2884 \
2885 /usr/X386/include \
2886 /usr/x386/include \
2887 /usr/XFree86/include/X11 \
2888 \
2889 /usr/include \
2890 /usr/local/include \
2891 /usr/unsupported/include \
2892 /usr/athena/include \
2893 /usr/local/x11r5/include \
2894 /usr/lpp/Xamples/include \
2895 \
2896 /usr/openwin/include \
2897 /usr/openwin/share/include \
2898 ; \
2899 do
2900 if test -r "$ac_dir/$x_direct_test_include"; then
2901 ac_x_includes=$ac_dir
2902 break
2903 fi
2904 done
2905fi
2906rm -f conftest*
2907fi # $ac_x_includes = NO
2908
2909if test "$ac_x_libraries" = NO; then
2910 # Check for the libraries.
2911
2912 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2913 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2914
2915 # See if we find them without any special options.
2916 # Don't add to $LIBS permanently.
2917 ac_save_LIBS="$LIBS"
2918 LIBS="-l$x_direct_test_library $LIBS"
2919cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002920#line 2921 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002921#include "confdefs.h"
2922
2923int main() {
2924${x_direct_test_function}()
2925; return 0; }
2926EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00002927if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002928 rm -rf conftest*
2929 LIBS="$ac_save_LIBS"
2930# We can link X programs with no special library path.
2931ac_x_libraries=
2932else
2933 echo "configure: failed program was:" >&5
2934 cat conftest.$ac_ext >&5
2935 rm -rf conftest*
2936 LIBS="$ac_save_LIBS"
2937# First see if replacing the include by lib works.
2938# Check X11 before X11Rn because it is often a symlink to the current release.
2939for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2940 /usr/X11/lib \
2941 /usr/X11R6/lib \
2942 /usr/X11R5/lib \
2943 /usr/X11R4/lib \
2944 \
2945 /usr/lib/X11 \
2946 /usr/lib/X11R6 \
2947 /usr/lib/X11R5 \
2948 /usr/lib/X11R4 \
2949 \
2950 /usr/local/X11/lib \
2951 /usr/local/X11R6/lib \
2952 /usr/local/X11R5/lib \
2953 /usr/local/X11R4/lib \
2954 \
2955 /usr/local/lib/X11 \
2956 /usr/local/lib/X11R6 \
2957 /usr/local/lib/X11R5 \
2958 /usr/local/lib/X11R4 \
2959 \
2960 /usr/X386/lib \
2961 /usr/x386/lib \
2962 /usr/XFree86/lib/X11 \
2963 \
2964 /usr/lib \
2965 /usr/local/lib \
2966 /usr/unsupported/lib \
2967 /usr/athena/lib \
2968 /usr/local/x11r5/lib \
2969 /usr/lpp/Xamples/lib \
2970 /lib/usr/lib/X11 \
2971 \
2972 /usr/openwin/lib \
2973 /usr/openwin/share/lib \
2974 ; \
2975do
2976 for ac_extension in a so sl; do
2977 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2978 ac_x_libraries=$ac_dir
2979 break 2
2980 fi
2981 done
2982done
2983fi
2984rm -f conftest*
2985fi # $ac_x_libraries = NO
2986
2987if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2988 # Didn't find X anywhere. Cache the known absence of X.
2989 ac_cv_have_x="have_x=no"
2990else
2991 # Record where we found X for the cache.
2992 ac_cv_have_x="have_x=yes \
2993 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2994fi
2995fi
2996 fi
2997 eval "$ac_cv_have_x"
2998fi # $with_x != no
2999
3000if test "$have_x" != yes; then
3001 echo "$ac_t""$have_x" 1>&6
3002 no_x=yes
3003else
3004 # If each of the values was on the command line, it overrides each guess.
3005 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3006 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3007 # Update the cache value to reflect the command line values.
3008 ac_cv_have_x="have_x=yes \
3009 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3010 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3011fi
3012
3013if test "$no_x" = yes; then
3014 # Not all programs may use this symbol, but it does not hurt to define it.
3015 cat >> confdefs.h <<\EOF
3016#define X_DISPLAY_MISSING 1
3017EOF
3018
3019 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
3020else
3021 if test -n "$x_includes"; then
3022 X_CFLAGS="$X_CFLAGS -I$x_includes"
3023 fi
3024
3025 # It would also be nice to do this for all -L options, not just this one.
3026 if test -n "$x_libraries"; then
3027 X_LIBS="$X_LIBS -L$x_libraries"
3028 # For Solaris; some versions of Sun CC require a space after -R and
3029 # others require no space. Words are not sufficient . . . .
3030 case "`(uname -sr) 2>/dev/null`" in
3031 "SunOS 5"*)
3032 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003033echo "configure:3034: checking whether -R must be followed by a space" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003034 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
3035 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003036#line 3037 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003037#include "confdefs.h"
3038
3039int main() {
3040
3041; return 0; }
3042EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003043if { (eval echo configure:3044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003044 rm -rf conftest*
3045 ac_R_nospace=yes
3046else
3047 echo "configure: failed program was:" >&5
3048 cat conftest.$ac_ext >&5
3049 rm -rf conftest*
3050 ac_R_nospace=no
3051fi
3052rm -f conftest*
3053 if test $ac_R_nospace = yes; then
3054 echo "$ac_t""no" 1>&6
3055 X_LIBS="$X_LIBS -R$x_libraries"
3056 else
3057 LIBS="$ac_xsave_LIBS -R $x_libraries"
3058 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003059#line 3060 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003060#include "confdefs.h"
3061
3062int main() {
3063
3064; return 0; }
3065EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003066if { (eval echo configure:3067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003067 rm -rf conftest*
3068 ac_R_space=yes
3069else
3070 echo "configure: failed program was:" >&5
3071 cat conftest.$ac_ext >&5
3072 rm -rf conftest*
3073 ac_R_space=no
3074fi
3075rm -f conftest*
3076 if test $ac_R_space = yes; then
3077 echo "$ac_t""yes" 1>&6
3078 X_LIBS="$X_LIBS -R $x_libraries"
3079 else
3080 echo "$ac_t""neither works" 1>&6
3081 fi
3082 fi
3083 LIBS="$ac_xsave_LIBS"
3084 esac
3085 fi
3086
3087 # Check for system-dependent libraries X programs must link with.
3088 # Do this before checking for the system-independent R6 libraries
3089 # (-lICE), since we may need -lsocket or whatever for X linking.
3090
3091 if test "$ISC" = yes; then
3092 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
3093 else
3094 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
3095 # libraries were built with DECnet support. And karl@cs.umb.edu says
3096 # the Alpha needs dnet_stub (dnet does not exist).
3097 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003098echo "configure:3099: checking for dnet_ntoa in -ldnet" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003099ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3100if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3101 echo $ac_n "(cached) $ac_c" 1>&6
3102else
3103 ac_save_LIBS="$LIBS"
3104LIBS="-ldnet $LIBS"
3105cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003106#line 3107 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003107#include "confdefs.h"
3108/* Override any gcc2 internal prototype to avoid an error. */
3109/* We use char because int might match the return type of a gcc2
3110 builtin and then its argument prototype would still apply. */
3111char dnet_ntoa();
3112
3113int main() {
3114dnet_ntoa()
3115; return 0; }
3116EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003117if { (eval echo configure:3118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003118 rm -rf conftest*
3119 eval "ac_cv_lib_$ac_lib_var=yes"
3120else
3121 echo "configure: failed program was:" >&5
3122 cat conftest.$ac_ext >&5
3123 rm -rf conftest*
3124 eval "ac_cv_lib_$ac_lib_var=no"
3125fi
3126rm -f conftest*
3127LIBS="$ac_save_LIBS"
3128
3129fi
3130if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3131 echo "$ac_t""yes" 1>&6
3132 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
3133else
3134 echo "$ac_t""no" 1>&6
3135fi
3136
3137 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
3138 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003139echo "configure:3140: checking for dnet_ntoa in -ldnet_stub" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003140ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3141if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3142 echo $ac_n "(cached) $ac_c" 1>&6
3143else
3144 ac_save_LIBS="$LIBS"
3145LIBS="-ldnet_stub $LIBS"
3146cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003147#line 3148 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003148#include "confdefs.h"
3149/* Override any gcc2 internal prototype to avoid an error. */
3150/* We use char because int might match the return type of a gcc2
3151 builtin and then its argument prototype would still apply. */
3152char dnet_ntoa();
3153
3154int main() {
3155dnet_ntoa()
3156; return 0; }
3157EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003158if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003159 rm -rf conftest*
3160 eval "ac_cv_lib_$ac_lib_var=yes"
3161else
3162 echo "configure: failed program was:" >&5
3163 cat conftest.$ac_ext >&5
3164 rm -rf conftest*
3165 eval "ac_cv_lib_$ac_lib_var=no"
3166fi
3167rm -f conftest*
3168LIBS="$ac_save_LIBS"
3169
3170fi
3171if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3172 echo "$ac_t""yes" 1>&6
3173 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
3174else
3175 echo "$ac_t""no" 1>&6
3176fi
3177
3178 fi
3179
3180 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
3181 # to get the SysV transport functions.
3182 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
3183 # needs -lnsl.
3184 # The nsl library prevents programs from opening the X display
3185 # on Irix 5.2, according to dickey@clark.net.
3186 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003187echo "configure:3188: checking for gethostbyname" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003188if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3189 echo $ac_n "(cached) $ac_c" 1>&6
3190else
3191 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003192#line 3193 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003193#include "confdefs.h"
3194/* System header to define __stub macros and hopefully few prototypes,
3195 which can conflict with char gethostbyname(); below. */
3196#include <assert.h>
3197/* Override any gcc2 internal prototype to avoid an error. */
3198/* We use char because int might match the return type of a gcc2
3199 builtin and then its argument prototype would still apply. */
3200char gethostbyname();
3201
3202int main() {
3203
3204/* The GNU C library defines this for functions which it implements
3205 to always fail with ENOSYS. Some functions are actually named
3206 something starting with __ and the normal name is an alias. */
3207#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3208choke me
3209#else
3210gethostbyname();
3211#endif
3212
3213; return 0; }
3214EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003215if { (eval echo configure:3216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003216 rm -rf conftest*
3217 eval "ac_cv_func_gethostbyname=yes"
3218else
3219 echo "configure: failed program was:" >&5
3220 cat conftest.$ac_ext >&5
3221 rm -rf conftest*
3222 eval "ac_cv_func_gethostbyname=no"
3223fi
3224rm -f conftest*
3225fi
3226
3227if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3228 echo "$ac_t""yes" 1>&6
3229 :
3230else
3231 echo "$ac_t""no" 1>&6
3232fi
3233
3234 if test $ac_cv_func_gethostbyname = no; then
3235 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003236echo "configure:3237: checking for gethostbyname in -lnsl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003237ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3238if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3239 echo $ac_n "(cached) $ac_c" 1>&6
3240else
3241 ac_save_LIBS="$LIBS"
3242LIBS="-lnsl $LIBS"
3243cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003244#line 3245 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003245#include "confdefs.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 gethostbyname();
3250
3251int main() {
3252gethostbyname()
3253; return 0; }
3254EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003255if { (eval echo configure:3256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003256 rm -rf conftest*
3257 eval "ac_cv_lib_$ac_lib_var=yes"
3258else
3259 echo "configure: failed program was:" >&5
3260 cat conftest.$ac_ext >&5
3261 rm -rf conftest*
3262 eval "ac_cv_lib_$ac_lib_var=no"
3263fi
3264rm -f conftest*
3265LIBS="$ac_save_LIBS"
3266
3267fi
3268if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3269 echo "$ac_t""yes" 1>&6
3270 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
3271else
3272 echo "$ac_t""no" 1>&6
3273fi
3274
3275 fi
3276
3277 # lieder@skyler.mavd.honeywell.com says without -lsocket,
3278 # socket/setsockopt and other routines are undefined under SCO ODT
3279 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
3280 # on later versions), says simon@lia.di.epfl.ch: it contains
3281 # gethostby* variants that don't use the nameserver (or something).
3282 # -lsocket must be given before -lnsl if both are needed.
3283 # We assume that if connect needs -lnsl, so does gethostbyname.
3284 echo $ac_n "checking for connect""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003285echo "configure:3286: checking for connect" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003286if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3287 echo $ac_n "(cached) $ac_c" 1>&6
3288else
3289 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003290#line 3291 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003291#include "confdefs.h"
3292/* System header to define __stub macros and hopefully few prototypes,
3293 which can conflict with char connect(); below. */
3294#include <assert.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 connect();
3299
3300int main() {
3301
3302/* The GNU C library defines this for functions which it implements
3303 to always fail with ENOSYS. Some functions are actually named
3304 something starting with __ and the normal name is an alias. */
3305#if defined (__stub_connect) || defined (__stub___connect)
3306choke me
3307#else
3308connect();
3309#endif
3310
3311; return 0; }
3312EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003313if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003314 rm -rf conftest*
3315 eval "ac_cv_func_connect=yes"
3316else
3317 echo "configure: failed program was:" >&5
3318 cat conftest.$ac_ext >&5
3319 rm -rf conftest*
3320 eval "ac_cv_func_connect=no"
3321fi
3322rm -f conftest*
3323fi
3324
3325if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3326 echo "$ac_t""yes" 1>&6
3327 :
3328else
3329 echo "$ac_t""no" 1>&6
3330fi
3331
3332 if test $ac_cv_func_connect = no; then
3333 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003334echo "configure:3335: checking for connect in -lsocket" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003335ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3336if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3337 echo $ac_n "(cached) $ac_c" 1>&6
3338else
3339 ac_save_LIBS="$LIBS"
3340LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
3341cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003342#line 3343 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003343#include "confdefs.h"
3344/* Override any gcc2 internal prototype to avoid an error. */
3345/* We use char because int might match the return type of a gcc2
3346 builtin and then its argument prototype would still apply. */
3347char connect();
3348
3349int main() {
3350connect()
3351; return 0; }
3352EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003353if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003354 rm -rf conftest*
3355 eval "ac_cv_lib_$ac_lib_var=yes"
3356else
3357 echo "configure: failed program was:" >&5
3358 cat conftest.$ac_ext >&5
3359 rm -rf conftest*
3360 eval "ac_cv_lib_$ac_lib_var=no"
3361fi
3362rm -f conftest*
3363LIBS="$ac_save_LIBS"
3364
3365fi
3366if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3367 echo "$ac_t""yes" 1>&6
3368 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3369else
3370 echo "$ac_t""no" 1>&6
3371fi
3372
3373 fi
3374
3375 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3376 echo $ac_n "checking for remove""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003377echo "configure:3378: checking for remove" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003378if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3379 echo $ac_n "(cached) $ac_c" 1>&6
3380else
3381 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003382#line 3383 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003383#include "confdefs.h"
3384/* System header to define __stub macros and hopefully few prototypes,
3385 which can conflict with char remove(); below. */
3386#include <assert.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 remove();
3391
3392int main() {
3393
3394/* The GNU C library defines this for functions which it implements
3395 to always fail with ENOSYS. Some functions are actually named
3396 something starting with __ and the normal name is an alias. */
3397#if defined (__stub_remove) || defined (__stub___remove)
3398choke me
3399#else
3400remove();
3401#endif
3402
3403; return 0; }
3404EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003405if { (eval echo configure:3406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003406 rm -rf conftest*
3407 eval "ac_cv_func_remove=yes"
3408else
3409 echo "configure: failed program was:" >&5
3410 cat conftest.$ac_ext >&5
3411 rm -rf conftest*
3412 eval "ac_cv_func_remove=no"
3413fi
3414rm -f conftest*
3415fi
3416
3417if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3418 echo "$ac_t""yes" 1>&6
3419 :
3420else
3421 echo "$ac_t""no" 1>&6
3422fi
3423
3424 if test $ac_cv_func_remove = no; then
3425 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003426echo "configure:3427: checking for remove in -lposix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003427ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3428if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3429 echo $ac_n "(cached) $ac_c" 1>&6
3430else
3431 ac_save_LIBS="$LIBS"
3432LIBS="-lposix $LIBS"
3433cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003434#line 3435 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003435#include "confdefs.h"
3436/* Override any gcc2 internal prototype to avoid an error. */
3437/* We use char because int might match the return type of a gcc2
3438 builtin and then its argument prototype would still apply. */
3439char remove();
3440
3441int main() {
3442remove()
3443; return 0; }
3444EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003445if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003446 rm -rf conftest*
3447 eval "ac_cv_lib_$ac_lib_var=yes"
3448else
3449 echo "configure: failed program was:" >&5
3450 cat conftest.$ac_ext >&5
3451 rm -rf conftest*
3452 eval "ac_cv_lib_$ac_lib_var=no"
3453fi
3454rm -f conftest*
3455LIBS="$ac_save_LIBS"
3456
3457fi
3458if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3459 echo "$ac_t""yes" 1>&6
3460 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3461else
3462 echo "$ac_t""no" 1>&6
3463fi
3464
3465 fi
3466
3467 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3468 echo $ac_n "checking for shmat""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003469echo "configure:3470: checking for shmat" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003470if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3471 echo $ac_n "(cached) $ac_c" 1>&6
3472else
3473 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003474#line 3475 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003475#include "confdefs.h"
3476/* System header to define __stub macros and hopefully few prototypes,
3477 which can conflict with char shmat(); below. */
3478#include <assert.h>
3479/* Override any gcc2 internal prototype to avoid an error. */
3480/* We use char because int might match the return type of a gcc2
3481 builtin and then its argument prototype would still apply. */
3482char shmat();
3483
3484int main() {
3485
3486/* The GNU C library defines this for functions which it implements
3487 to always fail with ENOSYS. Some functions are actually named
3488 something starting with __ and the normal name is an alias. */
3489#if defined (__stub_shmat) || defined (__stub___shmat)
3490choke me
3491#else
3492shmat();
3493#endif
3494
3495; return 0; }
3496EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003497if { (eval echo configure:3498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003498 rm -rf conftest*
3499 eval "ac_cv_func_shmat=yes"
3500else
3501 echo "configure: failed program was:" >&5
3502 cat conftest.$ac_ext >&5
3503 rm -rf conftest*
3504 eval "ac_cv_func_shmat=no"
3505fi
3506rm -f conftest*
3507fi
3508
3509if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3510 echo "$ac_t""yes" 1>&6
3511 :
3512else
3513 echo "$ac_t""no" 1>&6
3514fi
3515
3516 if test $ac_cv_func_shmat = no; then
3517 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003518echo "configure:3519: checking for shmat in -lipc" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003519ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3520if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3521 echo $ac_n "(cached) $ac_c" 1>&6
3522else
3523 ac_save_LIBS="$LIBS"
3524LIBS="-lipc $LIBS"
3525cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003526#line 3527 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003527#include "confdefs.h"
3528/* Override any gcc2 internal prototype to avoid an error. */
3529/* We use char because int might match the return type of a gcc2
3530 builtin and then its argument prototype would still apply. */
3531char shmat();
3532
3533int main() {
3534shmat()
3535; return 0; }
3536EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003537if { (eval echo configure:3538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003538 rm -rf conftest*
3539 eval "ac_cv_lib_$ac_lib_var=yes"
3540else
3541 echo "configure: failed program was:" >&5
3542 cat conftest.$ac_ext >&5
3543 rm -rf conftest*
3544 eval "ac_cv_lib_$ac_lib_var=no"
3545fi
3546rm -f conftest*
3547LIBS="$ac_save_LIBS"
3548
3549fi
3550if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3551 echo "$ac_t""yes" 1>&6
3552 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3553else
3554 echo "$ac_t""no" 1>&6
3555fi
3556
3557 fi
3558 fi
3559
3560 # Check for libraries that X11R6 Xt/Xaw programs need.
3561 ac_save_LDFLAGS="$LDFLAGS"
3562 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3563 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3564 # check for ICE first), but we must link in the order -lSM -lICE or
3565 # we get undefined symbols. So assume we have SM if we have ICE.
3566 # These have to be linked with before -lX11, unlike the other
3567 # libraries we check for below, so use a different variable.
3568 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3569 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003570echo "configure:3571: checking for IceConnectionNumber in -lICE" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003571ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3572if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3573 echo $ac_n "(cached) $ac_c" 1>&6
3574else
3575 ac_save_LIBS="$LIBS"
3576LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3577cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003578#line 3579 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003579#include "confdefs.h"
3580/* Override any gcc2 internal prototype to avoid an error. */
3581/* We use char because int might match the return type of a gcc2
3582 builtin and then its argument prototype would still apply. */
3583char IceConnectionNumber();
3584
3585int main() {
3586IceConnectionNumber()
3587; return 0; }
3588EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003589if { (eval echo configure:3590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003590 rm -rf conftest*
3591 eval "ac_cv_lib_$ac_lib_var=yes"
3592else
3593 echo "configure: failed program was:" >&5
3594 cat conftest.$ac_ext >&5
3595 rm -rf conftest*
3596 eval "ac_cv_lib_$ac_lib_var=no"
3597fi
3598rm -f conftest*
3599LIBS="$ac_save_LIBS"
3600
3601fi
3602if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3603 echo "$ac_t""yes" 1>&6
3604 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3605else
3606 echo "$ac_t""no" 1>&6
3607fi
3608
3609 LDFLAGS="$ac_save_LDFLAGS"
3610
3611fi
3612
3613
3614 if test "$OS390Unix" = "yes"; then
3615 CFLAGS="$CFLAGS -W c,dll"
3616 LDFLAGS="$LDFLAGS -W l,dll"
3617 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
3618 fi
3619
3620
3621 if test -d "$x_includes" && test ! -d "$x_libraries"; then
3622 x_libraries=`echo "$x_includes" | sed s/include/lib/`
3623 echo "$ac_t""Corrected X libraries to $x_libraries" 1>&6
3624 X_LIBS="$X_LIBS -L$x_libraries"
3625 if test "`(uname) 2>/dev/null`" = SunOS &&
3626 uname -r | grep '^5' >/dev/null; then
3627 X_LIBS="$X_LIBS -R $x_libraries"
3628 fi
3629 fi
3630
3631 if test -d "$x_libraries" && test ! -d "$x_includes"; then
3632 x_includes=`echo "$x_libraries" | sed s/lib/include/`
3633 echo "$ac_t""Corrected X includes to $x_includes" 1>&6
3634 X_CFLAGS="$X_CFLAGS -I$x_includes"
3635 fi
3636
3637 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`"
3638 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`"
3639 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
3640
3641
3642 echo $ac_n "checking if X11 header files can be found""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003643echo "configure:3644: checking if X11 header files can be found" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003644 cflags_save=$CFLAGS
3645 CFLAGS="$CFLAGS $X_CFLAGS"
3646 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003647#line 3648 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003648#include "confdefs.h"
3649#include <X11/Xlib.h>
3650int main() {
3651
3652; return 0; }
3653EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003654if { (eval echo configure:3655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003655 rm -rf conftest*
3656 echo "$ac_t""yes" 1>&6
3657else
3658 echo "configure: failed program was:" >&5
3659 cat conftest.$ac_ext >&5
3660 rm -rf conftest*
3661 echo "$ac_t""no" 1>&6; no_x=yes
3662fi
3663rm -f conftest*
3664 CFLAGS=$cflags_save
3665
3666 if test "${no_x-no}" = yes; then
3667 with_x=no
3668 else
3669 cat >> confdefs.h <<\EOF
3670#define HAVE_X11 1
3671EOF
3672
3673 X_LIB="-lXt -lX11";
3674
3675
3676 ac_save_LDFLAGS="$LDFLAGS"
3677 LDFLAGS="-L$x_libraries $LDFLAGS"
3678
3679 echo $ac_n "checking for _XdmcpAuthDoIt in -lXdmcp""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003680echo "configure:3681: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003681ac_lib_var=`echo Xdmcp'_'_XdmcpAuthDoIt | sed 'y%./+-%__p_%'`
3682if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3683 echo $ac_n "(cached) $ac_c" 1>&6
3684else
3685 ac_save_LIBS="$LIBS"
3686LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
3687cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003688#line 3689 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003689#include "confdefs.h"
3690/* Override any gcc2 internal prototype to avoid an error. */
3691/* We use char because int might match the return type of a gcc2
3692 builtin and then its argument prototype would still apply. */
3693char _XdmcpAuthDoIt();
3694
3695int main() {
3696_XdmcpAuthDoIt()
3697; return 0; }
3698EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003699if { (eval echo configure:3700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003700 rm -rf conftest*
3701 eval "ac_cv_lib_$ac_lib_var=yes"
3702else
3703 echo "configure: failed program was:" >&5
3704 cat conftest.$ac_ext >&5
3705 rm -rf conftest*
3706 eval "ac_cv_lib_$ac_lib_var=no"
3707fi
3708rm -f conftest*
3709LIBS="$ac_save_LIBS"
3710
3711fi
3712if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3713 echo "$ac_t""yes" 1>&6
3714 X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
3715else
3716 echo "$ac_t""no" 1>&6
3717fi
3718
3719
3720 echo $ac_n "checking for IceOpenConnection in -lICE""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003721echo "configure:3722: checking for IceOpenConnection in -lICE" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003722ac_lib_var=`echo ICE'_'IceOpenConnection | sed 'y%./+-%__p_%'`
3723if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3724 echo $ac_n "(cached) $ac_c" 1>&6
3725else
3726 ac_save_LIBS="$LIBS"
3727LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3728cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003729#line 3730 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003730#include "confdefs.h"
3731/* Override any gcc2 internal prototype to avoid an error. */
3732/* We use char because int might match the return type of a gcc2
3733 builtin and then its argument prototype would still apply. */
3734char IceOpenConnection();
3735
3736int main() {
3737IceOpenConnection()
3738; return 0; }
3739EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003740if { (eval echo configure:3741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003741 rm -rf conftest*
3742 eval "ac_cv_lib_$ac_lib_var=yes"
3743else
3744 echo "configure: failed program was:" >&5
3745 cat conftest.$ac_ext >&5
3746 rm -rf conftest*
3747 eval "ac_cv_lib_$ac_lib_var=no"
3748fi
3749rm -f conftest*
3750LIBS="$ac_save_LIBS"
3751
3752fi
3753if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3754 echo "$ac_t""yes" 1>&6
3755 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
3756else
3757 echo "$ac_t""no" 1>&6
3758fi
3759
3760
3761 LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
3762 echo $ac_n "checking for XpmCreatePixmapFromData in -lXpm""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003763echo "configure:3764: checking for XpmCreatePixmapFromData in -lXpm" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003764ac_lib_var=`echo Xpm'_'XpmCreatePixmapFromData | sed 'y%./+-%__p_%'`
3765if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3766 echo $ac_n "(cached) $ac_c" 1>&6
3767else
3768 ac_save_LIBS="$LIBS"
3769LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
3770cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003771#line 3772 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003772#include "confdefs.h"
3773/* Override any gcc2 internal prototype to avoid an error. */
3774/* We use char because int might match the return type of a gcc2
3775 builtin and then its argument prototype would still apply. */
3776char XpmCreatePixmapFromData();
3777
3778int main() {
3779XpmCreatePixmapFromData()
3780; return 0; }
3781EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003782if { (eval echo configure:3783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003783 rm -rf conftest*
3784 eval "ac_cv_lib_$ac_lib_var=yes"
3785else
3786 echo "configure: failed program was:" >&5
3787 cat conftest.$ac_ext >&5
3788 rm -rf conftest*
3789 eval "ac_cv_lib_$ac_lib_var=no"
3790fi
3791rm -f conftest*
3792LIBS="$ac_save_LIBS"
3793
3794fi
3795if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3796 echo "$ac_t""yes" 1>&6
3797 X_PRE_LIBS="$X_PRE_LIBS -lXpm"
3798else
3799 echo "$ac_t""no" 1>&6
3800fi
3801
3802
3803 echo $ac_n "checking if X11 header files implicitly declare return values""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003804echo "configure:3805: checking if X11 header files implicitly declare return values" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003805 cflags_save=$CFLAGS
3806 CFLAGS="$CFLAGS $X_CFLAGS -Werror"
3807 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003808#line 3809 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003809#include "confdefs.h"
3810#include <X11/Xlib.h>
3811int main() {
3812
3813; return 0; }
3814EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003815if { (eval echo configure:3816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003816 rm -rf conftest*
3817 echo "$ac_t""no" 1>&6
3818else
3819 echo "configure: failed program was:" >&5
3820 cat conftest.$ac_ext >&5
3821 rm -rf conftest*
3822 CFLAGS="$CFLAGS -Wno-implicit-int"
3823 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003824#line 3825 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003825#include "confdefs.h"
3826#include <X11/Xlib.h>
3827int main() {
3828
3829; return 0; }
3830EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003831if { (eval echo configure:3832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003832 rm -rf conftest*
3833 echo "$ac_t""yes" 1>&6; cflags_save="$cflags_save -Wno-implicit-int"
3834else
3835 echo "configure: failed program was:" >&5
3836 cat conftest.$ac_ext >&5
3837 rm -rf conftest*
3838 echo "$ac_t""test failed" 1>&6
3839
3840fi
3841rm -f conftest*
3842
3843fi
3844rm -f conftest*
3845 CFLAGS=$cflags_save
3846
3847 LDFLAGS="$ac_save_LDFLAGS"
3848
3849 fi
3850fi
3851
3852test "x$with_x" = xno -a "x$BEOS" != "xyes" -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
3853
3854echo $ac_n "checking --enable-gui argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003855echo "configure:3856: checking --enable-gui argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003856# Check whether --enable-gui or --disable-gui was given.
3857if test "${enable_gui+set}" = set; then
3858 enableval="$enable_gui"
3859 :
3860else
3861 enable_gui="auto"
3862fi
3863
3864
3865enable_gui_canon=`echo "_$enable_gui" | \
3866 sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
3867
3868SKIP_GTK=YES
3869SKIP_GTK2=YES
3870SKIP_GNOME=YES
Bram Moolenaar592e0a22004-07-03 16:05:59 +00003871SKIP_KDE=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00003872SKIP_MOTIF=YES
3873SKIP_ATHENA=YES
3874SKIP_NEXTAW=YES
3875SKIP_PHOTON=YES
3876SKIP_BEOS=YES
3877SKIP_CARBON=YES
3878GUITYPE=NONE
3879
3880if test "x$BEOS" = "xyes"; then
3881 SKIP_BEOS=
3882 case "$enable_gui_canon" in
3883 no) echo "$ac_t""no GUI support" 1>&6
3884 SKIP_BEOS=YES ;;
3885 yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
3886 auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
3887 beos) echo "$ac_t""BeOS GUI support" 1>&6 ;;
3888 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
3889 SKIP_BEOS=YES ;;
3890 esac
3891
3892elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
3893 SKIP_PHOTON=
3894 case "$enable_gui_canon" in
3895 no) echo "$ac_t""no GUI support" 1>&6
3896 SKIP_PHOTON=YES ;;
3897 yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
3898 auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
3899 photon) echo "$ac_t""Photon GUI support" 1>&6 ;;
3900 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
3901 SKIP_PHOTON=YES ;;
3902 esac
3903
3904elif test "x$MACOSX" = "xyes" -a "x$with_x" = "xno" ; then
3905 SKIP_CARBON=
3906 case "$enable_gui_canon" in
3907 no) echo "$ac_t""no GUI support" 1>&6
3908 SKIP_CARBON=YES ;;
3909 yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
3910 auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
3911 carbon) echo "$ac_t""Carbon GUI support" 1>&6 ;;
3912 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
3913 SKIP_CARBON=YES ;;
3914 esac
3915
3916else
3917
Bram Moolenaar071d4272004-06-13 20:20:40 +00003918 case "$enable_gui_canon" in
3919 no|none) echo "$ac_t""no GUI support" 1>&6 ;;
3920 yes|""|auto) echo "$ac_t""yes/auto - automatic GUI support" 1>&6
3921 SKIP_GTK=
3922 SKIP_GTK2=
3923 SKIP_GNOME=
3924 SKIP_MOTIF=
3925 SKIP_ATHENA=
3926 SKIP_NEXTAW=
3927 SKIP_CARBON=;;
Bram Moolenaar843ee412004-06-30 16:16:41 +00003928 kde|Kde|KDE) echo "$ac_t""KDE 2.x or 3.x GUI support" 1>&6
3929 SKIP_KDE=;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00003930 gtk) echo "$ac_t""GTK+ 1.x GUI support" 1>&6
3931 SKIP_GTK=;;
3932 gtk2) echo "$ac_t""GTK+ 2.x GUI support" 1>&6
3933 SKIP_GTK=
3934 SKIP_GTK2=;;
3935 gnome) echo "$ac_t""GNOME 1.x GUI support" 1>&6
3936 SKIP_GNOME=
3937 SKIP_GTK=;;
3938 gnome2) echo "$ac_t""GNOME 2.x GUI support" 1>&6
3939 SKIP_GNOME=
3940 SKIP_GTK=
3941 SKIP_GTK2=;;
3942 motif) echo "$ac_t""Motif GUI support" 1>&6
3943 SKIP_MOTIF=;;
3944 athena) echo "$ac_t""Athena GUI support" 1>&6
3945 SKIP_ATHENA=;;
3946 nextaw) echo "$ac_t""neXtaw GUI support" 1>&6
3947 SKIP_NEXTAW=;;
3948 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;;
3949 esac
3950
3951fi
3952
Bram Moolenaar843ee412004-06-30 16:16:41 +00003953if test "x$SKIP_KDE" != "xYES" -a "$enable_gui_canon" != "kde"; then
3954 echo $ac_n "checking whether or not to look for KDE""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003955echo "configure:3956: checking whether or not to look for KDE" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00003956 # Check whether --enable-kde-check or --disable-kde-check was given.
3957if test "${enable_kde_check+set}" = set; then
3958 enableval="$enable_kde_check"
3959 :
3960else
3961 enable_kde_check="no"
3962fi
3963
3964 echo "$ac_t""$enable_kde_check" 1>&6;
3965 if test "x$enable_kde_check" = "xno"; then
3966 SKIP_KDE=YES
3967 fi
3968fi
3969
Bram Moolenaar071d4272004-06-13 20:20:40 +00003970if test "x$SKIP_GTK" != "xYES" -a "$enable_gui_canon" != "gtk" -a "$enable_gui_canon" != "gtk2"; then
3971 echo $ac_n "checking whether or not to look for GTK""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003972echo "configure:3973: checking whether or not to look for GTK" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003973 # Check whether --enable-gtk-check or --disable-gtk-check was given.
3974if test "${enable_gtk_check+set}" = set; then
3975 enableval="$enable_gtk_check"
3976 :
3977else
3978 enable_gtk_check="yes"
3979fi
3980
3981 echo "$ac_t""$enable_gtk_check" 1>&6
3982 if test "x$enable_gtk_check" = "xno"; then
3983 SKIP_GTK=YES
3984 SKIP_GNOME=YES
3985 fi
3986fi
3987
3988if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
3989 -a "$enable_gui_canon" != "gnome2"; then
3990 echo $ac_n "checking whether or not to look for GTK+ 2""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00003991echo "configure:3992: checking whether or not to look for GTK+ 2" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003992 # Check whether --enable-gtk2-check or --disable-gtk2-check was given.
3993if test "${enable_gtk2_check+set}" = set; then
3994 enableval="$enable_gtk2_check"
3995 :
3996else
3997 enable_gtk2_check="yes"
3998fi
3999
4000 echo "$ac_t""$enable_gtk2_check" 1>&6
4001 if test "x$enable_gtk2_check" = "xno"; then
4002 SKIP_GTK2=YES
4003 fi
4004fi
4005
4006if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome" \
4007 -a "$enable_gui_canon" != "gnome2"; then
4008 echo $ac_n "checking whether or not to look for GNOME""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004009echo "configure:4010: checking whether or not to look for GNOME" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004010 # Check whether --enable-gnome-check or --disable-gnome-check was given.
4011if test "${enable_gnome_check+set}" = set; then
4012 enableval="$enable_gnome_check"
4013 :
4014else
4015 enable_gnome_check="no"
4016fi
4017
4018 echo "$ac_t""$enable_gnome_check" 1>&6
4019 if test "x$enable_gnome_check" = "xno"; then
4020 SKIP_GNOME=YES
4021 fi
4022fi
4023
4024if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
4025 echo $ac_n "checking whether or not to look for Motif""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004026echo "configure:4027: checking whether or not to look for Motif" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004027 # Check whether --enable-motif-check or --disable-motif-check was given.
4028if test "${enable_motif_check+set}" = set; then
4029 enableval="$enable_motif_check"
4030 :
4031else
4032 enable_motif_check="yes"
4033fi
4034
4035 echo "$ac_t""$enable_motif_check" 1>&6
4036 if test "x$enable_motif_check" = "xno"; then
4037 SKIP_MOTIF=YES
4038 fi
4039fi
4040
4041if test "x$SKIP_ATHENA" != "xYES" -a "$enable_gui_canon" != "athena"; then
4042 echo $ac_n "checking whether or not to look for Athena""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004043echo "configure:4044: checking whether or not to look for Athena" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004044 # Check whether --enable-athena-check or --disable-athena-check was given.
4045if test "${enable_athena_check+set}" = set; then
4046 enableval="$enable_athena_check"
4047 :
4048else
4049 enable_athena_check="yes"
4050fi
4051
4052 echo "$ac_t""$enable_athena_check" 1>&6
4053 if test "x$enable_athena_check" = "xno"; then
4054 SKIP_ATHENA=YES
4055 fi
4056fi
4057
4058if test "x$SKIP_NEXTAW" != "xYES" -a "$enable_gui_canon" != "nextaw"; then
4059 echo $ac_n "checking whether or not to look for neXtaw""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004060echo "configure:4061: checking whether or not to look for neXtaw" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004061 # Check whether --enable-nextaw-check or --disable-nextaw-check was given.
4062if test "${enable_nextaw_check+set}" = set; then
4063 enableval="$enable_nextaw_check"
4064 :
4065else
4066 enable_nextaw_check="yes"
4067fi
4068
4069 echo "$ac_t""$enable_nextaw_check" 1>&6;
4070 if test "x$enable_nextaw_check" = "xno"; then
4071 SKIP_NEXTAW=YES
4072 fi
4073fi
4074
4075if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
4076 echo $ac_n "checking whether or not to look for Carbon""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004077echo "configure:4078: checking whether or not to look for Carbon" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004078 # Check whether --enable-carbon-check or --disable-carbon-check was given.
4079if test "${enable_carbon_check+set}" = set; then
4080 enableval="$enable_carbon_check"
4081 :
4082else
4083 enable_carbon_check="yes"
4084fi
4085
4086 echo "$ac_t""$enable_carbon_check" 1>&6;
4087 if test "x$enable_carbon_check" = "xno"; then
4088 SKIP_CARBON=YES
4089 fi
4090fi
4091
Bram Moolenaar843ee412004-06-30 16:16:41 +00004092
4093if test -z "$SKIP_KDE"; then
4094# Check whether --with-qt-dir or --without-qt-dir was given.
4095if test "${with_qt_dir+set}" = set; then
4096 withval="$with_qt_dir"
4097
4098 ROOTQT="$withval"
4099 MOC="$withval"/bin/moc
4100 QT_INCLUDES="$withval"/include
4101 QT_LIBS="$withval"/lib
4102
4103fi
4104
4105
4106if test "x$ROOTQT" = "x"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004107 if test -z "$QTDIR"; then
4108 # Extract the first word of "moc", so it can be a program name with args.
Bram Moolenaar843ee412004-06-30 16:16:41 +00004109set dummy moc; ac_word=$2
4110echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004111echo "configure:4112: checking for $ac_word" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004112if eval "test \"`echo '$''{'ac_cv_path_MOC'+set}'`\" = set"; then
4113 echo $ac_n "(cached) $ac_c" 1>&6
4114else
4115 case "$MOC" in
4116 /*)
4117 ac_cv_path_MOC="$MOC" # Let the user override the test with a path.
4118 ;;
4119 ?:/*)
4120 ac_cv_path_MOC="$MOC" # Let the user override the test with a dos path.
4121 ;;
4122 *)
4123 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4124 ac_dummy="$PATH"
4125 for ac_dir in $ac_dummy; do
4126 test -z "$ac_dir" && ac_dir=.
4127 if test -f $ac_dir/$ac_word; then
4128 ac_cv_path_MOC="$ac_dir/$ac_word"
4129 break
4130 fi
4131 done
4132 IFS="$ac_save_ifs"
4133 test -z "$ac_cv_path_MOC" && ac_cv_path_MOC="no"
4134 ;;
4135esac
4136fi
4137MOC="$ac_cv_path_MOC"
4138if test -n "$MOC"; then
4139 echo "$ac_t""$MOC" 1>&6
4140else
4141 echo "$ac_t""no" 1>&6
4142fi
4143
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004144 if test "x$MOC" = "xno"; then
4145 { echo "configure: error: could not find Qt directory" 1>&2; exit 1; }
4146 else
4147 ROOTQT=`echo $MOC | sed 's+/bin/moc++'`
4148 fi
4149 else
4150 ROOTQT="$QTDIR"
4151 fi
Bram Moolenaar843ee412004-06-30 16:16:41 +00004152fi
4153MOC="$ROOTQT"/bin/moc
4154QT_INCLUDES="$ROOTQT"/include
4155QT_LIBS="$ROOTQT"/lib
4156
4157# Check whether --with-qt-includes or --without-qt-includes was given.
4158if test "${with_qt_includes+set}" = set; then
4159 withval="$with_qt_includes"
4160 QT_INCLUDES="$withval"
4161
4162fi
4163
4164
4165# Check whether --with-qt-libraries or --without-qt-libraries was given.
4166if test "${with_qt_libraries+set}" = set; then
4167 withval="$with_qt_libraries"
4168 QT_LIBS="$withval"
4169
4170fi
4171
4172
4173if test "x$QT_LIBS" = "x" ; then
4174 QT_LIBS="$ROOTQT"/lib
4175fi
4176if test "x$QT_INCLUDES" = "x" ; then
4177 QT_INCLUDES="$ROOTQT"/include
4178fi
4179
4180echo $ac_n "checking whether or not to use a KDE Toolbar in KVim""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004181echo "configure:4182: checking whether or not to use a KDE Toolbar in KVim" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004182# Check whether --enable-kde-toolbar or --disable-kde-toolbar was given.
4183if test "${enable_kde_toolbar+set}" = set; then
4184 enableval="$enable_kde_toolbar"
4185 :
4186else
4187 enable_kde_toolbar="no"
4188fi
4189
4190if test "x$enable_kde_toolbar" != "xno"; then
4191 cat >> confdefs.h <<\EOF
4192#define FEAT_KDETOOLBAR 1
4193EOF
4194
4195fi
4196echo "$ac_t""$enable_kde_toolbar" 1>&6;
4197fi
4198
4199
4200if test -z "$SKIP_KDE"; then
4201
4202
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004203
4204
Bram Moolenaar843ee412004-06-30 16:16:41 +00004205echo $ac_n "checking --disable-rpath argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004206echo "configure:4207: checking --disable-rpath argument" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004207# Check whether --enable-rpath or --disable-rpath was given.
4208if test "${enable_rpath+set}" = set; then
4209 enableval="$enable_rpath"
4210 :
4211else
4212 enable_rpath="yes"
4213fi
4214
4215if test "$enable_rpath" = "yes"; then
4216 echo "$ac_t""no" 1>&6
4217else
4218 echo "$ac_t""yes" 1>&6
4219fi
4220
4221echo $ac_n "checking --with-kde-prefix argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004222echo "configure:4223: checking --with-kde-prefix argument" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004223# Check whether --with-kde-prefix or --without-kde-prefix was given.
4224if test "${with_kde_prefix+set}" = set; then
4225 withval="$with_kde_prefix"
4226 kde_config_prefix="$withval";
4227echo "$ac_t""$kde_config_prefix" 1>&6
4228else
4229 kde_config_prefix="";echo "$ac_t""no" 1>&6
4230fi
4231
4232
4233# Check whether --with-kde-includes or --without-kde-includes was given.
4234if test "${with_kde_includes+set}" = set; then
4235 withval="$with_kde_includes"
4236 KDE_INCLUDES="$withval"
4237
4238fi
4239
4240
4241# Check whether --with-kde-libraries or --without-kde-libraries was given.
4242if test "${with_kde_libraries+set}" = set; then
4243 withval="$with_kde_libraries"
4244 KDE_LIBS="$withval"
4245
4246fi
4247
4248
4249echo $ac_n "checking --disable-kdetest argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004250echo "configure:4251: checking --disable-kdetest argument" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004251# Check whether --enable-kdetest or --disable-kdetest was given.
4252if test "${enable_kdetest+set}" = set; then
4253 enableval="$enable_kdetest"
4254 enable_kdetest=yes
4255fi
4256
4257
4258if test "x$enable_kdetest" = "xyes" ; then
4259 echo "$ac_t""kde test enabled" 1>&6
4260else
4261 echo "$ac_t""kde test disabled" 1>&6
4262fi
4263
4264if test "x$kde_config_prefix" != "x" ; then
Bram Moolenaar843ee412004-06-30 16:16:41 +00004265 KDE_CONFIG=$kde_config_prefix/bin/kde-config
4266fi
4267
4268if test "X$KDE_CONFIG" = "X"; then
4269 # Extract the first word of "kde-config", so it can be a program name with args.
4270set dummy kde-config; ac_word=$2
4271echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004272echo "configure:4273: checking for $ac_word" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004273if eval "test \"`echo '$''{'ac_cv_path_KDE_CONFIG'+set}'`\" = set"; then
4274 echo $ac_n "(cached) $ac_c" 1>&6
4275else
4276 case "$KDE_CONFIG" in
4277 /*)
4278 ac_cv_path_KDE_CONFIG="$KDE_CONFIG" # Let the user override the test with a path.
4279 ;;
4280 ?:/*)
4281 ac_cv_path_KDE_CONFIG="$KDE_CONFIG" # Let the user override the test with a dos path.
4282 ;;
4283 *)
4284 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4285 ac_dummy="$PATH"
4286 for ac_dir in $ac_dummy; do
4287 test -z "$ac_dir" && ac_dir=.
4288 if test -f $ac_dir/$ac_word; then
4289 ac_cv_path_KDE_CONFIG="$ac_dir/$ac_word"
4290 break
4291 fi
4292 done
4293 IFS="$ac_save_ifs"
4294 test -z "$ac_cv_path_KDE_CONFIG" && ac_cv_path_KDE_CONFIG="no"
4295 ;;
4296esac
4297fi
4298KDE_CONFIG="$ac_cv_path_KDE_CONFIG"
4299if test -n "$KDE_CONFIG"; then
4300 echo "$ac_t""$KDE_CONFIG" 1>&6
4301else
4302 echo "$ac_t""no" 1>&6
4303fi
4304
4305else
4306 echo "$ac_t""Using KDE configuration program $KDE_CONFIG" 1>&6
4307fi
4308
4309if test "X$KDE_CONFIG" != "X" ; then
4310
4311 if test "X$KDE_CONFIG" != "X"; then
4312 min_kde_version=2.0.0
4313 echo $ac_n "checking for KDE version >= $min_kde_version""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004314echo "configure:4315: checking for KDE version >= $min_kde_version" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004315 no_kde=""
4316 if test "$KDE_CONFIG" = "no" ; then
4317 no_kde=yes
4318 else
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004319 KDE_PREFIX=`$KDE_CONFIG --prefix`
Bram Moolenaar843ee412004-06-30 16:16:41 +00004320 if test "x$KDE_LIBS" = "x"; then
4321 KDE_LIBS="$KDE_PREFIX/lib"
4322 fi
4323 if test "x$KDE_INCLUDES" = "x"; then
Bram Moolenaar592e0a22004-07-03 16:05:59 +00004324 KDE_INCLUDES="$KDE_PREFIX/include"
4325 if test -d "$KDE_INCLUDES/kde"; then
4326 KDE_INCLUDES="$KDE_INCLUDES/kde"
4327 fi
Bram Moolenaar843ee412004-06-30 16:16:41 +00004328 fi
4329 kde_major_version=`$KDE_CONFIG --version | grep KDE | \
4330sed 's/KDE:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\1/'`
4331 kde_minor_version=`$KDE_CONFIG --version | grep KDE | \
4332sed 's/KDE:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\2/'`
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004333
Bram Moolenaar843ee412004-06-30 16:16:41 +00004334 qt_major_version=`$KDE_CONFIG --version | grep Qt | sed -e \
4335's/Qt:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\1/'`
4336 qt_minor_version=`$KDE_CONFIG --version | grep Qt | sed -e \
4337's/Qt:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\2/'`
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004338
Bram Moolenaar843ee412004-06-30 16:16:41 +00004339 if test "x$enable-kdetest" = "xyes" ; then
4340 ac_save_LIBS="$LIBS"
4341 LIBS="$LIBS $KDE_LIBS"
4342
4343 if test "$cross_compiling" = yes; then
4344 echo $ac_n "cross compiling KDE ? ? how can i remove that ? :)"
4345else
4346 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004347#line 4348 "configure"
Bram Moolenaar843ee412004-06-30 16:16:41 +00004348#include "confdefs.h"
4349
4350#include <stdio.h>
4351int
4352main()
4353{ return 0; }
4354
4355EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004356if { (eval echo configure:4357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Bram Moolenaar843ee412004-06-30 16:16:41 +00004357then
4358 :
4359else
4360 echo "configure: failed program was:" >&5
4361 cat conftest.$ac_ext >&5
4362 rm -fr conftest*
4363 no_kde=yes
4364fi
4365rm -fr conftest*
4366fi
4367
4368 LIBS="$ac_save_LIBS"
4369 fi
4370 fi
4371 if test "x$no_kde" = x ; then
4372 echo "$ac_t""found KDE $kde_major_version.$kde_minor_version" 1>&6
4373 GUI_LIB_LOC="-L$KDE_LIBS -lkdeui -lkdecore -lDCOP"
4374 GUI_INC_LOC="-I$KDE_INCLUDES"
4375 KDEDIR="$KDE_PREFIX"
4376 else
4377 echo "$ac_t""no" 1>&6
4378 KDE_LIBS=""
4379 :
4380 fi
4381else
4382 echo "$ac_t""no" 1>&6
4383 KDE_LIBS=""
4384 :
4385fi
4386
4387
4388
4389
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004390
Bram Moolenaar843ee412004-06-30 16:16:41 +00004391 if test "x$KDE_PREFIX" != "x"; then
4392 echo $ac_n "checking for QT version $qt_major_version.x""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004393echo "configure:4394: checking for QT version $qt_major_version.x" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004394 if test "x$ROOTQT" != "x" ; then
4395 GUI_INC_LOC="-I$QT_INCLUDES $GUI_INC_LOC"
4396 if test $qt_major_version -lt 2; then
4397 { 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; }
4398 fi
4399 if test "`(uname) 2>/dev/null`" = "FreeBSD"; then
4400 CFLAGS="$CFLAGS -D_THREAD_SAFE"
4401 CXXFLAGS="$CXXFLAGS -D_THREAD_SAFE"
4402 GUI_LIB_LOC="$GUI_LIB_LOC -pthread"
4403 LIBS="$LIBS -pthread"
4404 fi
4405
4406 if test "x$enable_rpath" = "xyes"; then
4407 if test $qt_major_version = 2; then
4408 GUI_LIB_LOC="-L$KDE_LIBS -lkfile -L$QT_LIBS -lqt $GUI_LIB_LOC \
4409-Wl,--rpath -Wl,$KDE_LIBS -Wl,--rpath -Wl,$QT_LIBS"
4410 else
4411 GUI_LIB_LOC="-L$KDE_LIBS -lkio -L$QT_LIBS -lqt-mt $GUI_LIB_LOC \
4412-Wl,--rpath -Wl,$KDE_LIBS -Wl,--rpath -Wl,$QT_LIBS"
4413 fi
4414 else
4415 if test $qt_major_version = 2; then
4416 GUI_LIB_LOC="-L$KDE_LIBS -lkfile -L$QT_LIBS -lqt $GUI_LIB_LOC"
4417 else
4418 GUI_LIB_LOC="-L$KDE_LIBS -lkio -L$QT_LIBS -lqt-mt $GUI_LIB_LOC"
4419 fi
4420 fi
4421
4422 GUI_INC_LOC="`echo $GUI_INC_LOC\ | sed 's%-I/usr/include %%'`"
4423
4424 echo "$ac_t""found $qt_major_version.$qt_minor_version in $ROOTQT" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004425
4426
4427 qt_incdir=NO
4428 for i in $QT_INCLUDES;
4429 do
4430 for j in qstyle.h;
4431 do
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004432 echo "configure: 4433: $i/$j" >&5
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004433 if test -r "$i/$j"; then
4434 echo "taking that" >&5
4435 qt_incdir=$i
4436 break 2
4437 fi
4438 done
4439 done
4440
4441 if test "x$qt_incdir" = "xNO"; then
4442 { echo "configure: error: Could not find Qt headers in $QT_INCLUDES" 1>&2; exit 1; }
4443 fi
4444
4445 kde_incdir=NO
4446 for i in $KDE_INCLUDES;
4447 do
4448 for j in kapplication.h;
4449 do
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004450 echo "configure: 4451: $i/$j" >&5
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004451 if test -r "$i/$j"; then
4452 echo "taking that" >&5
4453 kde_incdir=$i
4454 break 2
4455 fi
4456 done
4457 done
4458
4459 if test "x$kde_incdir" = "xNO"; then
4460 { echo "configure: error: Could not find KDE headers in $KDE_INCLUDES" 1>&2; exit 1; }
4461 fi
4462
4463
4464 ac_ext=C
4465# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4466ac_cpp='$CXXCPP $CPPFLAGS'
4467ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4468ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4469cross_compiling=$ac_cv_prog_cxx_cross
4470
4471 ac_save_LIBS="$LIBS"
4472 LIBS="$GUI_LIB_LOC"
4473 ac_save_CXXFLAGS="$CXXFLAGS"
4474 CXXFLAGS="$CXXFLAGS $GUI_INC_LOC"
4475 echo $ac_n "checking whether Qt libraries are usable""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004476echo "configure:4477: checking whether Qt libraries are usable" >&5
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004477 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004478#line 4479 "configure"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004479#include "confdefs.h"
4480#include <qapplication.h>
4481int main() {
4482
4483 int argc;
4484 char** argv;
4485 QApplication app(argc, argv);
4486
4487; return 0; }
4488EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004489if { (eval echo configure:4490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004490 rm -rf conftest*
4491 echo "$ac_t""yes" 1>&6
4492else
4493 echo "configure: failed program was:" >&5
4494 cat conftest.$ac_ext >&5
4495 rm -rf conftest*
4496 echo "$ac_t""no" 1>&6;{ echo "configure: error: Qt fails to link a simple application" 1>&2; exit 1; }
4497fi
4498rm -f conftest*
4499
4500 echo $ac_n "checking whether KDE libraries are usable""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004501echo "configure:4502: checking whether KDE libraries are usable" >&5
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004502 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004503#line 4504 "configure"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004504#include "confdefs.h"
4505#include <kapplication.h>
4506int main() {
4507
4508 int argc;
4509 char** argv;
4510 KApplication app(argc, argv);
4511
4512; return 0; }
4513EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004514if { (eval echo configure:4515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004515 rm -rf conftest*
4516 echo "$ac_t""yes" 1>&6
4517else
4518 echo "configure: failed program was:" >&5
4519 cat conftest.$ac_ext >&5
4520 rm -rf conftest*
4521 echo "$ac_t""no" 1>&6;{ echo "configure: error: KDE fails to link a simple application" 1>&2; exit 1; }
4522fi
4523rm -f conftest*
4524
4525 LIBS="$ac_save_LIBS"
4526 CXXFLAGS="$ac_save_CXXFLAGS"
4527 ac_ext=c
4528# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4529ac_cpp='$CPP $CPPFLAGS'
4530ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4531ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4532cross_compiling=$ac_cv_prog_cc_cross
4533
4534
4535
Bram Moolenaar843ee412004-06-30 16:16:41 +00004536 SKIP_GTK=YES
4537 SKIP_ATHENA=YES
4538 SKIP_MOTIF=YES
4539 GUITYPE=KDE
4540
4541
4542
4543
4544
4545 cat >> confdefs.h <<\EOF
4546#define FEAT_GUI_KDE 1
4547EOF
4548
4549 else
4550 { echo "configure: error: Detected QT version mismatched" 1>&2; exit 1; }
4551 fi
4552 else
4553 { echo "configure: error: Could not find KDE installation prefix" 1>&2; exit 1; }
4554 fi
4555fi
4556fi
4557
Bram Moolenaar071d4272004-06-13 20:20:40 +00004558if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
4559 echo $ac_n "checking for Carbon GUI""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004560echo "configure:4561: checking for Carbon GUI" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004561 echo "$ac_t""yes" 1>&6;
4562 GUITYPE=CARBONGUI
4563 SKIP_GTK=YES;
4564 SKIP_GTK2=YES;
4565 SKIP_GNOME=YES;
4566 SKIP_MOTIF=YES;
4567 SKIP_ATHENA=YES;
4568 SKIP_NEXTAW=YES;
4569 SKIP_PHOTON=YES;
4570 SKIP_BEOS=YES;
4571 SKIP_CARBON=YES
4572fi
4573
4574
4575
4576
4577
4578
4579
4580
4581
Bram Moolenaar071d4272004-06-13 20:20:40 +00004582if test -z "$SKIP_GTK"; then
4583
4584 echo $ac_n "checking --with-gtk-prefix argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004585echo "configure:4586: checking --with-gtk-prefix argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004586 # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
4587if test "${with_gtk_prefix+set}" = set; then
4588 withval="$with_gtk_prefix"
4589 gtk_config_prefix="$withval"; echo "$ac_t""$gtk_config_prefix" 1>&6
4590else
4591 gtk_config_prefix=""; echo "$ac_t""no" 1>&6
4592fi
4593
4594
4595 echo $ac_n "checking --with-gtk-exec-prefix argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004596echo "configure:4597: checking --with-gtk-exec-prefix argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004597 # Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
4598if test "${with_gtk_exec_prefix+set}" = set; then
4599 withval="$with_gtk_exec_prefix"
4600 gtk_config_exec_prefix="$withval"; echo "$ac_t""$gtk_config_prefix" 1>&6
4601else
4602 gtk_config_exec_prefix=""; echo "$ac_t""no" 1>&6
4603fi
4604
4605
4606 echo $ac_n "checking --disable-gtktest argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004607echo "configure:4608: checking --disable-gtktest argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004608 # Check whether --enable-gtktest or --disable-gtktest was given.
4609if test "${enable_gtktest+set}" = set; then
4610 enableval="$enable_gtktest"
4611 :
4612else
4613 enable_gtktest=yes
4614fi
4615
4616 if test "x$enable_gtktest" = "xyes" ; then
4617 echo "$ac_t""gtk test enabled" 1>&6
4618 else
4619 echo "$ac_t""gtk test disabled" 1>&6
4620 fi
4621
4622 if test "x$gtk_config_prefix" != "x" ; then
4623 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
4624 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
4625 fi
4626 if test "x$gtk_config_exec_prefix" != "x" ; then
4627 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
4628 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
4629 fi
4630 if test "X$GTK_CONFIG" = "X"; then
4631 # Extract the first word of "gtk-config", so it can be a program name with args.
4632set dummy gtk-config; ac_word=$2
4633echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004634echo "configure:4635: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004635if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
4636 echo $ac_n "(cached) $ac_c" 1>&6
4637else
4638 case "$GTK_CONFIG" in
4639 /*)
4640 ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
4641 ;;
4642 ?:/*)
4643 ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
4644 ;;
4645 *)
4646 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4647 ac_dummy="$PATH"
4648 for ac_dir in $ac_dummy; do
4649 test -z "$ac_dir" && ac_dir=.
4650 if test -f $ac_dir/$ac_word; then
4651 ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
4652 break
4653 fi
4654 done
4655 IFS="$ac_save_ifs"
4656 test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
4657 ;;
4658esac
4659fi
4660GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
4661if test -n "$GTK_CONFIG"; then
4662 echo "$ac_t""$GTK_CONFIG" 1>&6
4663else
4664 echo "$ac_t""no" 1>&6
4665fi
4666
4667 if test "X$GTK_CONFIG" = "Xno"; then
4668 # Extract the first word of "gtk12-config", so it can be a program name with args.
4669set dummy gtk12-config; ac_word=$2
4670echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004671echo "configure:4672: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004672if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
4673 echo $ac_n "(cached) $ac_c" 1>&6
4674else
4675 case "$GTK12_CONFIG" in
4676 /*)
4677 ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a path.
4678 ;;
4679 ?:/*)
4680 ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a dos path.
4681 ;;
4682 *)
4683 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4684 ac_dummy="$PATH"
4685 for ac_dir in $ac_dummy; do
4686 test -z "$ac_dir" && ac_dir=.
4687 if test -f $ac_dir/$ac_word; then
4688 ac_cv_path_GTK12_CONFIG="$ac_dir/$ac_word"
4689 break
4690 fi
4691 done
4692 IFS="$ac_save_ifs"
4693 test -z "$ac_cv_path_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
4694 ;;
4695esac
4696fi
4697GTK12_CONFIG="$ac_cv_path_GTK12_CONFIG"
4698if test -n "$GTK12_CONFIG"; then
4699 echo "$ac_t""$GTK12_CONFIG" 1>&6
4700else
4701 echo "$ac_t""no" 1>&6
4702fi
4703
4704 GTK_CONFIG="$GTK12_CONFIG"
4705 fi
4706 else
4707 echo "$ac_t""Using GTK configuration program $GTK_CONFIG" 1>&6
4708 fi
4709 if test "X$PKG_CONFIG" = "X"; then
4710 # Extract the first word of "pkg-config", so it can be a program name with args.
4711set dummy pkg-config; ac_word=$2
4712echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004713echo "configure:4714: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004714if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
4715 echo $ac_n "(cached) $ac_c" 1>&6
4716else
4717 case "$PKG_CONFIG" in
4718 /*)
4719 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4720 ;;
4721 ?:/*)
4722 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
4723 ;;
4724 *)
4725 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4726 ac_dummy="$PATH"
4727 for ac_dir in $ac_dummy; do
4728 test -z "$ac_dir" && ac_dir=.
4729 if test -f $ac_dir/$ac_word; then
4730 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4731 break
4732 fi
4733 done
4734 IFS="$ac_save_ifs"
4735 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
4736 ;;
4737esac
4738fi
4739PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4740if test -n "$PKG_CONFIG"; then
4741 echo "$ac_t""$PKG_CONFIG" 1>&6
4742else
4743 echo "$ac_t""no" 1>&6
4744fi
4745
4746 fi
4747
4748 if test "x$GTK_CONFIG:$PKG_CONFIG" != "xno:no"; then
4749 if test "X$SKIP_GTK2" != "XYES"; then
4750
4751 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
4752 {
4753 min_gtk_version=2.2.0
4754 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004755echo "configure:4756: checking for GTK - version >= $min_gtk_version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004756 no_gtk=""
4757 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
4758 && $PKG_CONFIG --exists gtk+-2.0; then
4759 {
4760 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
4761 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
4762 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4763 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4764 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4765 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4766 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4767 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4768 }
4769 elif test "X$GTK_CONFIG" != "Xno"; then
4770 {
4771 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
4772 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
4773 gtk_major_version=`$GTK_CONFIG $gtk_config_args --version | \
4774 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4775 gtk_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
4776 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4777 gtk_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
4778 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4779 }
4780 else
4781 no_gtk=yes
4782 fi
4783
4784 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
4785 {
4786 ac_save_CFLAGS="$CFLAGS"
4787 ac_save_LIBS="$LIBS"
4788 CFLAGS="$CFLAGS $GTK_CFLAGS"
4789 LIBS="$LIBS $GTK_LIBS"
4790
4791 rm -f conf.gtktest
4792 if test "$cross_compiling" = yes; then
4793 echo $ac_n "cross compiling; assumed OK... $ac_c"
4794else
4795 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004796#line 4797 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00004797#include "confdefs.h"
4798
4799#include <gtk/gtk.h>
4800#include <stdio.h>
4801
4802int
4803main ()
4804{
4805int major, minor, micro;
4806char *tmp_version;
4807
4808system ("touch conf.gtktest");
4809
4810/* HP/UX 9 (%@#!) writes to sscanf strings */
4811tmp_version = g_strdup("$min_gtk_version");
4812if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
4813 printf("%s, bad version string\n", "$min_gtk_version");
4814 exit(1);
4815 }
4816
4817if ((gtk_major_version > major) ||
4818 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
4819 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
4820 (gtk_micro_version >= micro)))
4821{
4822 return 0;
4823}
4824return 1;
4825}
4826
4827EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004828if { (eval echo configure:4829: \"$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 +00004829then
4830 :
4831else
4832 echo "configure: failed program was:" >&5
4833 cat conftest.$ac_ext >&5
4834 rm -fr conftest*
4835 no_gtk=yes
4836fi
4837rm -fr conftest*
4838fi
4839
4840 CFLAGS="$ac_save_CFLAGS"
4841 LIBS="$ac_save_LIBS"
4842 }
4843 fi
4844 if test "x$no_gtk" = x ; then
4845 if test "x$enable_gtktest" = "xyes"; then
4846 echo "$ac_t""yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4847 else
4848 echo "$ac_t""found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4849 fi
4850 GTK_LIBNAME="$GTK_LIBS"
4851 GUI_INC_LOC="$GTK_CFLAGS"
4852 else
4853 {
4854 echo "$ac_t""no" 1>&6
4855 GTK_CFLAGS=""
4856 GTK_LIBS=""
4857 :
4858 }
4859 fi
4860 }
4861 else
4862 GTK_CFLAGS=""
4863 GTK_LIBS=""
4864 :
4865 fi
4866
4867
4868 rm -f conf.gtktest
4869
4870 if test "x$GTK_CFLAGS" != "x"; then
4871 SKIP_ATHENA=YES
4872 SKIP_NEXTAW=YES
4873 SKIP_MOTIF=YES
4874 GUITYPE=GTK
4875
4876 fi
4877 fi
4878
4879 if test "x$GUITYPE" != "xGTK"; then
4880 SKIP_GTK2=YES
4881
4882 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
4883 {
4884 min_gtk_version=1.1.16
4885 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004886echo "configure:4887: checking for GTK - version >= $min_gtk_version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004887 no_gtk=""
4888 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
4889 && $PKG_CONFIG --exists gtk+-2.0; then
4890 {
4891 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
4892 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
4893 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4894 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4895 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4896 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4897 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4898 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4899 }
4900 elif test "X$GTK_CONFIG" != "Xno"; then
4901 {
4902 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
4903 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
4904 gtk_major_version=`$GTK_CONFIG $gtk_config_args --version | \
4905 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4906 gtk_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
4907 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4908 gtk_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
4909 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4910 }
4911 else
4912 no_gtk=yes
4913 fi
4914
4915 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
4916 {
4917 ac_save_CFLAGS="$CFLAGS"
4918 ac_save_LIBS="$LIBS"
4919 CFLAGS="$CFLAGS $GTK_CFLAGS"
4920 LIBS="$LIBS $GTK_LIBS"
4921
4922 rm -f conf.gtktest
4923 if test "$cross_compiling" = yes; then
4924 echo $ac_n "cross compiling; assumed OK... $ac_c"
4925else
4926 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004927#line 4928 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00004928#include "confdefs.h"
4929
4930#include <gtk/gtk.h>
4931#include <stdio.h>
4932
4933int
4934main ()
4935{
4936int major, minor, micro;
4937char *tmp_version;
4938
4939system ("touch conf.gtktest");
4940
4941/* HP/UX 9 (%@#!) writes to sscanf strings */
4942tmp_version = g_strdup("$min_gtk_version");
4943if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
4944 printf("%s, bad version string\n", "$min_gtk_version");
4945 exit(1);
4946 }
4947
4948if ((gtk_major_version > major) ||
4949 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
4950 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
4951 (gtk_micro_version >= micro)))
4952{
4953 return 0;
4954}
4955return 1;
4956}
4957
4958EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00004959if { (eval echo configure:4960: \"$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 +00004960then
4961 :
4962else
4963 echo "configure: failed program was:" >&5
4964 cat conftest.$ac_ext >&5
4965 rm -fr conftest*
4966 no_gtk=yes
4967fi
4968rm -fr conftest*
4969fi
4970
4971 CFLAGS="$ac_save_CFLAGS"
4972 LIBS="$ac_save_LIBS"
4973 }
4974 fi
4975 if test "x$no_gtk" = x ; then
4976 if test "x$enable_gtktest" = "xyes"; then
4977 echo "$ac_t""yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4978 else
4979 echo "$ac_t""found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4980 fi
4981 GTK_LIBNAME="$GTK_LIBS"
4982 GUI_INC_LOC="$GTK_CFLAGS"
4983 else
4984 {
4985 echo "$ac_t""no" 1>&6
4986 GTK_CFLAGS=""
4987 GTK_LIBS=""
4988 :
4989 }
4990 fi
4991 }
4992 else
4993 GTK_CFLAGS=""
4994 GTK_LIBS=""
4995 :
4996 fi
4997
4998
4999 rm -f conf.gtktest
5000
5001 if test "x$GTK_CFLAGS" != "x"; then
5002 SKIP_ATHENA=YES
5003 SKIP_NEXTAW=YES
5004 SKIP_MOTIF=YES
5005 GUITYPE=GTK
5006
5007 fi
5008 fi
5009 fi
5010 if test "x$GUITYPE" = "xGTK"; then
5011 if test "$gtk_major_version" = 1 -a "0$gtk_minor_version" -lt 2 \
5012 -o "$gtk_major_version" = 1 -a "$gtk_minor_version" = 2 -a "0$gtk_micro_version" -lt 3; then
5013 echo "$ac_t""this GTK version is old; version 1.2.3 or later is recommended" 1>&6
5014 else
5015 {
5016 if test "0$gtk_major_version" -ge 2; then
5017 cat >> confdefs.h <<\EOF
5018#define HAVE_GTK2 1
5019EOF
5020
5021 if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \
5022 || test "0$gtk_minor_version" -ge 2 \
5023 || test "0$gtk_major_version" -gt 2; then
5024 cat >> confdefs.h <<\EOF
5025#define HAVE_GTK_MULTIHEAD 1
5026EOF
5027
5028 fi
5029 fi
5030 if test -z "$SKIP_GNOME"; then
5031 {
5032
5033
5034
5035
5036
5037 # Check whether --with-gnome-includes or --without-gnome-includes was given.
5038if test "${with_gnome_includes+set}" = set; then
5039 withval="$with_gnome_includes"
5040 CFLAGS="$CFLAGS -I$withval"
5041
5042fi
5043
5044
5045 # Check whether --with-gnome-libs or --without-gnome-libs was given.
5046if test "${with_gnome_libs+set}" = set; then
5047 withval="$with_gnome_libs"
5048 LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
5049
5050fi
5051
5052
5053 # Check whether --with-gnome or --without-gnome was given.
5054if test "${with_gnome+set}" = set; then
5055 withval="$with_gnome"
5056 if test x$withval = xyes; then
5057 want_gnome=yes
5058 have_gnome=yes
5059 else
5060 if test "x$withval" = xno; then
5061 want_gnome=no
5062 else
5063 want_gnome=yes
5064 LDFLAGS="$LDFLAGS -L$withval/lib"
5065 CFLAGS="$CFLAGS -I$withval/include"
5066 gnome_prefix=$withval/lib
5067 fi
5068 fi
5069else
5070 want_gnome=yes
5071fi
5072
5073
5074 if test "x$want_gnome" = xyes -a "0$gtk_major_version" -ge 2; then
5075 {
5076 echo $ac_n "checking for libgnomeui-2.0""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005077echo "configure:5078: checking for libgnomeui-2.0" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005078 if $PKG_CONFIG --exists libgnomeui-2.0; then
5079 echo "$ac_t""yes" 1>&6
5080 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
5081 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
5082 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
5083 have_gnome=yes
5084 else
5085 echo "$ac_t""not found" 1>&6
5086 if test "x" = xfail; then
5087 { echo "configure: error: Could not find libgnomeui-2.0 via pkg-config" 1>&2; exit 1; }
5088 fi
5089 fi
5090 }
5091 elif test "x$want_gnome" = xyes; then
5092 {
5093 # Extract the first word of "gnome-config", so it can be a program name with args.
5094set dummy gnome-config; ac_word=$2
5095echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005096echo "configure:5097: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005097if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
5098 echo $ac_n "(cached) $ac_c" 1>&6
5099else
5100 case "$GNOME_CONFIG" in
5101 /*)
5102 ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
5103 ;;
5104 ?:/*)
5105 ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
5106 ;;
5107 *)
5108 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5109 ac_dummy="$PATH"
5110 for ac_dir in $ac_dummy; do
5111 test -z "$ac_dir" && ac_dir=.
5112 if test -f $ac_dir/$ac_word; then
5113 ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
5114 break
5115 fi
5116 done
5117 IFS="$ac_save_ifs"
5118 test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
5119 ;;
5120esac
5121fi
5122GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
5123if test -n "$GNOME_CONFIG"; then
5124 echo "$ac_t""$GNOME_CONFIG" 1>&6
5125else
5126 echo "$ac_t""no" 1>&6
5127fi
5128
5129 if test "$GNOME_CONFIG" = "no"; then
5130 no_gnome_config="yes"
5131 else
5132 echo $ac_n "checking if $GNOME_CONFIG works""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005133echo "configure:5134: checking if $GNOME_CONFIG works" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005134 if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
5135 echo "$ac_t""yes" 1>&6
5136 GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome gnomeui`"
5137 GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
5138 GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
5139 have_gnome=yes
5140 else
5141 echo "$ac_t""no" 1>&6
5142 no_gnome_config="yes"
5143 fi
5144 fi
5145
5146 if test x$exec_prefix = xNONE; then
5147 if test x$prefix = xNONE; then
5148 gnome_prefix=$ac_default_prefix/lib
5149 else
5150 gnome_prefix=$prefix/lib
5151 fi
5152 else
5153 gnome_prefix=`eval echo \`echo $libdir\``
5154 fi
5155
5156 if test "$no_gnome_config" = "yes"; then
5157 echo $ac_n "checking for gnomeConf.sh file in $gnome_prefix""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005158echo "configure:5159: checking for gnomeConf.sh file in $gnome_prefix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005159 if test -f $gnome_prefix/gnomeConf.sh; then
5160 echo "$ac_t""found" 1>&6
5161 echo "loading gnome configuration from" \
5162 "$gnome_prefix/gnomeConf.sh"
5163 . $gnome_prefix/gnomeConf.sh
5164 have_gnome=yes
5165 else
5166 echo "$ac_t""not found" 1>&6
5167 if test x = xfail; then
5168 { echo "configure: error: Could not find the gnomeConf.sh file that is generated by gnome-libs install" 1>&2; exit 1; }
5169 fi
5170 fi
5171 fi
5172 }
5173 fi
5174
5175 if test x$have_gnome = xyes ; then
5176 cat >> confdefs.h <<\EOF
5177#define FEAT_GUI_GNOME 1
5178EOF
5179
5180 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
5181 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
5182 fi
5183 }
5184 fi
5185 }
5186 fi
5187 fi
5188fi
5189
5190
5191if test -z "$SKIP_MOTIF"; then
5192 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"
5193 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
5194
5195 echo $ac_n "checking for location of Motif GUI includes""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005196echo "configure:5197: checking for location of Motif GUI includes" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005197 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
5198 GUI_INC_LOC=
5199 for try in $gui_includes; do
5200 if test -f "$try/Xm/Xm.h"; then
5201 GUI_INC_LOC=$try
5202 fi
5203 done
5204 if test -n "$GUI_INC_LOC"; then
5205 if test "$GUI_INC_LOC" = /usr/include; then
5206 GUI_INC_LOC=
5207 echo "$ac_t""in default path" 1>&6
5208 else
5209 echo "$ac_t""$GUI_INC_LOC" 1>&6
5210 fi
5211 else
5212 echo "$ac_t""<not found>" 1>&6
5213 SKIP_MOTIF=YES
5214 fi
5215fi
5216
5217
5218if test -z "$SKIP_MOTIF"; then
5219 echo $ac_n "checking --with-motif-lib argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005220echo "configure:5221: checking --with-motif-lib argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005221 # Check whether --with-motif-lib or --without-motif-lib was given.
5222if test "${with_motif_lib+set}" = set; then
5223 withval="$with_motif_lib"
5224 MOTIF_LIBNAME="${withval}"
5225fi
5226
5227
5228 if test -n "$MOTIF_LIBNAME"; then
5229 echo "$ac_t""$MOTIF_LIBNAME" 1>&6
5230 GUI_LIB_LOC=
5231 else
5232 echo "$ac_t""no" 1>&6
5233
5234 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
5235
5236 echo $ac_n "checking for location of Motif GUI libs""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005237echo "configure:5238: checking for location of Motif GUI libs" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005238 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"
5239 GUI_LIB_LOC=
5240 for try in $gui_libs; do
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005241 for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
Bram Moolenaar071d4272004-06-13 20:20:40 +00005242 if test -f "$libtry"; then
5243 GUI_LIB_LOC=$try
5244 fi
5245 done
5246 done
5247 if test -n "$GUI_LIB_LOC"; then
5248 if test "$GUI_LIB_LOC" = /usr/lib; then
5249 GUI_LIB_LOC=
5250 echo "$ac_t""in default path" 1>&6
5251 else
5252 if test -n "$GUI_LIB_LOC"; then
5253 echo "$ac_t""$GUI_LIB_LOC" 1>&6
5254 if test "`(uname) 2>/dev/null`" = SunOS &&
5255 uname -r | grep '^5' >/dev/null; then
5256 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
5257 fi
5258 fi
5259 fi
5260 MOTIF_LIBNAME=-lXm
5261 else
5262 echo "$ac_t""<not found>" 1>&6
5263 SKIP_MOTIF=YES
5264 fi
5265 fi
5266fi
5267
5268if test -z "$SKIP_MOTIF"; then
5269 SKIP_ATHENA=YES
5270 SKIP_NEXTAW=YES
5271 GUITYPE=MOTIF
5272
5273fi
5274
5275
5276GUI_X_LIBS=
5277
5278if test -z "$SKIP_ATHENA"; then
5279 echo $ac_n "checking if Athena header files can be found""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005280echo "configure:5281: checking if Athena header files can be found" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005281 cflags_save=$CFLAGS
5282 CFLAGS="$CFLAGS $X_CFLAGS"
5283 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005284#line 5285 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005285#include "confdefs.h"
5286
5287#include <X11/Intrinsic.h>
5288#include <X11/Xaw/Paned.h>
5289int main() {
5290
5291; return 0; }
5292EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005293if { (eval echo configure:5294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005294 rm -rf conftest*
5295 echo "$ac_t""yes" 1>&6
5296else
5297 echo "configure: failed program was:" >&5
5298 cat conftest.$ac_ext >&5
5299 rm -rf conftest*
5300 echo "$ac_t""no" 1>&6; SKIP_ATHENA=YES
5301fi
5302rm -f conftest*
5303 CFLAGS=$cflags_save
5304fi
5305
5306if test -z "$SKIP_ATHENA"; then
5307 GUITYPE=ATHENA
5308fi
5309
5310if test -z "$SKIP_NEXTAW"; then
5311 echo $ac_n "checking if neXtaw header files can be found""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005312echo "configure:5313: checking if neXtaw header files can be found" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005313 cflags_save=$CFLAGS
5314 CFLAGS="$CFLAGS $X_CFLAGS"
5315 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005316#line 5317 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005317#include "confdefs.h"
5318
5319#include <X11/Intrinsic.h>
5320#include <X11/neXtaw/Paned.h>
5321int main() {
5322
5323; return 0; }
5324EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005325if { (eval echo configure:5326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005326 rm -rf conftest*
5327 echo "$ac_t""yes" 1>&6
5328else
5329 echo "configure: failed program was:" >&5
5330 cat conftest.$ac_ext >&5
5331 rm -rf conftest*
5332 echo "$ac_t""no" 1>&6; SKIP_NEXTAW=YES
5333fi
5334rm -f conftest*
5335 CFLAGS=$cflags_save
5336fi
5337
5338if test -z "$SKIP_NEXTAW"; then
5339 GUITYPE=NEXTAW
5340fi
5341
5342if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
5343 if test -n "$GUI_INC_LOC"; then
5344 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
5345 fi
5346 if test -n "$GUI_LIB_LOC"; then
5347 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
5348 fi
5349
5350 ldflags_save=$LDFLAGS
5351 LDFLAGS="$X_LIBS $LDFLAGS"
5352 echo $ac_n "checking for XShapeQueryExtension in -lXext""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005353echo "configure:5354: checking for XShapeQueryExtension in -lXext" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005354ac_lib_var=`echo Xext'_'XShapeQueryExtension | sed 'y%./+-%__p_%'`
5355if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5356 echo $ac_n "(cached) $ac_c" 1>&6
5357else
5358 ac_save_LIBS="$LIBS"
5359LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5360cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005361#line 5362 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005362#include "confdefs.h"
5363/* Override any gcc2 internal prototype to avoid an error. */
5364/* We use char because int might match the return type of a gcc2
5365 builtin and then its argument prototype would still apply. */
5366char XShapeQueryExtension();
5367
5368int main() {
5369XShapeQueryExtension()
5370; return 0; }
5371EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005372if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005373 rm -rf conftest*
5374 eval "ac_cv_lib_$ac_lib_var=yes"
5375else
5376 echo "configure: failed program was:" >&5
5377 cat conftest.$ac_ext >&5
5378 rm -rf conftest*
5379 eval "ac_cv_lib_$ac_lib_var=no"
5380fi
5381rm -f conftest*
5382LIBS="$ac_save_LIBS"
5383
5384fi
5385if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5386 echo "$ac_t""yes" 1>&6
5387 GUI_X_LIBS="-lXext"
5388else
5389 echo "$ac_t""no" 1>&6
5390fi
5391
5392 echo $ac_n "checking for wslen in -lw""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005393echo "configure:5394: checking for wslen in -lw" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005394ac_lib_var=`echo w'_'wslen | sed 'y%./+-%__p_%'`
5395if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5396 echo $ac_n "(cached) $ac_c" 1>&6
5397else
5398 ac_save_LIBS="$LIBS"
5399LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5400cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005401#line 5402 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005402#include "confdefs.h"
5403/* Override any gcc2 internal prototype to avoid an error. */
5404/* We use char because int might match the return type of a gcc2
5405 builtin and then its argument prototype would still apply. */
5406char wslen();
5407
5408int main() {
5409wslen()
5410; return 0; }
5411EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005412if { (eval echo configure:5413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005413 rm -rf conftest*
5414 eval "ac_cv_lib_$ac_lib_var=yes"
5415else
5416 echo "configure: failed program was:" >&5
5417 cat conftest.$ac_ext >&5
5418 rm -rf conftest*
5419 eval "ac_cv_lib_$ac_lib_var=no"
5420fi
5421rm -f conftest*
5422LIBS="$ac_save_LIBS"
5423
5424fi
5425if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5426 echo "$ac_t""yes" 1>&6
5427 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
5428else
5429 echo "$ac_t""no" 1>&6
5430fi
5431
5432 echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005433echo "configure:5434: checking for dlsym in -ldl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005434ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
5435if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436 echo $ac_n "(cached) $ac_c" 1>&6
5437else
5438 ac_save_LIBS="$LIBS"
5439LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5440cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005441#line 5442 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005442#include "confdefs.h"
5443/* Override any gcc2 internal prototype to avoid an error. */
5444/* We use char because int might match the return type of a gcc2
5445 builtin and then its argument prototype would still apply. */
5446char dlsym();
5447
5448int main() {
5449dlsym()
5450; return 0; }
5451EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005452if { (eval echo configure:5453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005453 rm -rf conftest*
5454 eval "ac_cv_lib_$ac_lib_var=yes"
5455else
5456 echo "configure: failed program was:" >&5
5457 cat conftest.$ac_ext >&5
5458 rm -rf conftest*
5459 eval "ac_cv_lib_$ac_lib_var=no"
5460fi
5461rm -f conftest*
5462LIBS="$ac_save_LIBS"
5463
5464fi
5465if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5466 echo "$ac_t""yes" 1>&6
5467 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
5468else
5469 echo "$ac_t""no" 1>&6
5470fi
5471
5472 echo $ac_n "checking for XmuCreateStippledPixmap in -lXmu""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005473echo "configure:5474: checking for XmuCreateStippledPixmap in -lXmu" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005474ac_lib_var=`echo Xmu'_'XmuCreateStippledPixmap | sed 'y%./+-%__p_%'`
5475if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5476 echo $ac_n "(cached) $ac_c" 1>&6
5477else
5478 ac_save_LIBS="$LIBS"
5479LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5480cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005481#line 5482 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005482#include "confdefs.h"
5483/* Override any gcc2 internal prototype to avoid an error. */
5484/* We use char because int might match the return type of a gcc2
5485 builtin and then its argument prototype would still apply. */
5486char XmuCreateStippledPixmap();
5487
5488int main() {
5489XmuCreateStippledPixmap()
5490; return 0; }
5491EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005492if { (eval echo configure:5493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005493 rm -rf conftest*
5494 eval "ac_cv_lib_$ac_lib_var=yes"
5495else
5496 echo "configure: failed program was:" >&5
5497 cat conftest.$ac_ext >&5
5498 rm -rf conftest*
5499 eval "ac_cv_lib_$ac_lib_var=no"
5500fi
5501rm -f conftest*
5502LIBS="$ac_save_LIBS"
5503
5504fi
5505if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5506 echo "$ac_t""yes" 1>&6
5507 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
5508else
5509 echo "$ac_t""no" 1>&6
5510fi
5511
5512 if test -z "$SKIP_MOTIF"; then
5513 echo $ac_n "checking for XpEndJob in -lXp""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005514echo "configure:5515: checking for XpEndJob in -lXp" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005515ac_lib_var=`echo Xp'_'XpEndJob | sed 'y%./+-%__p_%'`
5516if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5517 echo $ac_n "(cached) $ac_c" 1>&6
5518else
5519 ac_save_LIBS="$LIBS"
5520LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5521cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005522#line 5523 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005523#include "confdefs.h"
5524/* Override any gcc2 internal prototype to avoid an error. */
5525/* We use char because int might match the return type of a gcc2
5526 builtin and then its argument prototype would still apply. */
5527char XpEndJob();
5528
5529int main() {
5530XpEndJob()
5531; return 0; }
5532EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005533if { (eval echo configure:5534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005534 rm -rf conftest*
5535 eval "ac_cv_lib_$ac_lib_var=yes"
5536else
5537 echo "configure: failed program was:" >&5
5538 cat conftest.$ac_ext >&5
5539 rm -rf conftest*
5540 eval "ac_cv_lib_$ac_lib_var=no"
5541fi
5542rm -f conftest*
5543LIBS="$ac_save_LIBS"
5544
5545fi
5546if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5547 echo "$ac_t""yes" 1>&6
5548 GUI_X_LIBS="-lXp $GUI_X_LIBS"
5549else
5550 echo "$ac_t""no" 1>&6
5551fi
5552
5553 fi
5554 LDFLAGS=$ldflags_save
5555
5556 echo $ac_n "checking for extra X11 defines""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005557echo "configure:5558: checking for extra X11 defines" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005558 NARROW_PROTO=
5559 rm -fr conftestdir
5560 if mkdir conftestdir; then
5561 cd conftestdir
5562 cat > Imakefile <<'EOF'
5563acfindx:
5564 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
5565EOF
5566 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5567 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5568 fi
5569 cd ..
5570 rm -fr conftestdir
5571 fi
5572 if test -z "$NARROW_PROTO"; then
5573 echo "$ac_t""no" 1>&6
5574 else
5575 echo "$ac_t""$NARROW_PROTO" 1>&6
5576 fi
5577
5578fi
5579
5580if test "$enable_xsmp" = "yes"; then
5581 cppflags_save=$CPPFLAGS
5582 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5583 for ac_hdr in X11/SM/SMlib.h
5584do
5585ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5586echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005587echo "configure:5588: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005588if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5589 echo $ac_n "(cached) $ac_c" 1>&6
5590else
5591 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005592#line 5593 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005593#include "confdefs.h"
5594#include <$ac_hdr>
5595EOF
5596ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005597{ (eval echo configure:5598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005598ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5599if test -z "$ac_err"; then
5600 rm -rf conftest*
5601 eval "ac_cv_header_$ac_safe=yes"
5602else
5603 echo "$ac_err" >&5
5604 echo "configure: failed program was:" >&5
5605 cat conftest.$ac_ext >&5
5606 rm -rf conftest*
5607 eval "ac_cv_header_$ac_safe=no"
5608fi
5609rm -f conftest*
5610fi
5611if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5612 echo "$ac_t""yes" 1>&6
5613 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5614 cat >> confdefs.h <<EOF
5615#define $ac_tr_hdr 1
5616EOF
5617
5618else
5619 echo "$ac_t""no" 1>&6
5620fi
5621done
5622
5623 CPPFLAGS=$cppflags_save
5624fi
5625
5626
5627if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_GTK"; then
5628 cppflags_save=$CPPFLAGS
5629 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5630 for ac_hdr in X11/xpm.h X11/Sunkeysym.h
5631do
5632ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5633echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005634echo "configure:5635: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005635if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5636 echo $ac_n "(cached) $ac_c" 1>&6
5637else
5638 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005639#line 5640 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005640#include "confdefs.h"
5641#include <$ac_hdr>
5642EOF
5643ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005644{ (eval echo configure:5645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005645ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5646if test -z "$ac_err"; then
5647 rm -rf conftest*
5648 eval "ac_cv_header_$ac_safe=yes"
5649else
5650 echo "$ac_err" >&5
5651 echo "configure: failed program was:" >&5
5652 cat conftest.$ac_ext >&5
5653 rm -rf conftest*
5654 eval "ac_cv_header_$ac_safe=no"
5655fi
5656rm -f conftest*
5657fi
5658if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5659 echo "$ac_t""yes" 1>&6
5660 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5661 cat >> confdefs.h <<EOF
5662#define $ac_tr_hdr 1
5663EOF
5664
5665else
5666 echo "$ac_t""no" 1>&6
5667fi
5668done
5669
5670
5671 if test ! "$enable_xim" = "no"; then
5672 echo $ac_n "checking for XIMText in X11/Xlib.h""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005673echo "configure:5674: checking for XIMText in X11/Xlib.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005674 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005675#line 5676 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005676#include "confdefs.h"
5677#include <X11/Xlib.h>
5678EOF
5679if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5680 egrep "XIMText" >/dev/null 2>&1; then
5681 rm -rf conftest*
5682 echo "$ac_t""yes" 1>&6
5683else
5684 rm -rf conftest*
5685 echo "$ac_t""no; xim has been disabled" 1>&6; enable_xim = "no"
5686fi
5687rm -f conftest*
5688
5689 fi
5690 CPPFLAGS=$cppflags_save
5691
5692 if test "$enable_xim" = "auto" -a "$enable_hangulinput" != "yes" \
5693 -a "x$GUITYPE" != "xNONE" ; then
5694 echo "$ac_t""X GUI selected; xim has been enabled" 1>&6
5695 enable_xim="yes"
5696 fi
5697fi
5698
5699if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
5700 cppflags_save=$CPPFLAGS
5701 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5702 for ac_hdr in X11/Xmu/Editres.h
5703do
5704ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5705echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005706echo "configure:5707: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005707if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5708 echo $ac_n "(cached) $ac_c" 1>&6
5709else
5710 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005711#line 5712 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005712#include "confdefs.h"
5713#include <$ac_hdr>
5714EOF
5715ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005716{ (eval echo configure:5717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005717ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5718if test -z "$ac_err"; then
5719 rm -rf conftest*
5720 eval "ac_cv_header_$ac_safe=yes"
5721else
5722 echo "$ac_err" >&5
5723 echo "configure: failed program was:" >&5
5724 cat conftest.$ac_ext >&5
5725 rm -rf conftest*
5726 eval "ac_cv_header_$ac_safe=no"
5727fi
5728rm -f conftest*
5729fi
5730if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5731 echo "$ac_t""yes" 1>&6
5732 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5733 cat >> confdefs.h <<EOF
5734#define $ac_tr_hdr 1
5735EOF
5736
5737else
5738 echo "$ac_t""no" 1>&6
5739fi
5740done
5741
5742 CPPFLAGS=$cppflags_save
5743fi
5744
5745if test -z "$SKIP_MOTIF"; then
5746 cppflags_save=$CPPFLAGS
5747 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5748 for ac_hdr in Xm/Xm.h Xm/XpmP.h
5749do
5750ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5751echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005752echo "configure:5753: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005753if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5754 echo $ac_n "(cached) $ac_c" 1>&6
5755else
5756 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005757#line 5758 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005758#include "confdefs.h"
5759#include <$ac_hdr>
5760EOF
5761ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005762{ (eval echo configure:5763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005763ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5764if test -z "$ac_err"; then
5765 rm -rf conftest*
5766 eval "ac_cv_header_$ac_safe=yes"
5767else
5768 echo "$ac_err" >&5
5769 echo "configure: failed program was:" >&5
5770 cat conftest.$ac_ext >&5
5771 rm -rf conftest*
5772 eval "ac_cv_header_$ac_safe=no"
5773fi
5774rm -f conftest*
5775fi
5776if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5777 echo "$ac_t""yes" 1>&6
5778 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5779 cat >> confdefs.h <<EOF
5780#define $ac_tr_hdr 1
5781EOF
5782
5783else
5784 echo "$ac_t""no" 1>&6
5785fi
5786done
5787
5788 CPPFLAGS=$cppflags_save
5789fi
5790
5791if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
5792 echo "$ac_t""no GUI selected; xim has been disabled" 1>&6
5793 enable_xim="no"
5794fi
5795if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
5796 echo "$ac_t""no GUI selected; fontset has been disabled" 1>&6
5797 enable_fontset="no"
5798fi
5799if test "x$GUITYPE:$enable_fontset" = "xGTK:yes" -a "0$gtk_major_version" -ge 2; then
5800 echo "$ac_t""GTK+ 2 GUI selected; fontset has been disabled" 1>&6
5801 enable_fontset="no"
5802fi
5803
5804if test -z "$SKIP_BEOS"; then
5805 GUITYPE=BEOSGUI
5806fi
5807
5808if test -z "$SKIP_PHOTON"; then
5809 GUITYPE=PHOTONGUI
5810fi
5811
5812
5813
5814
5815
5816
5817if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
5818 { echo "configure: error: cannot use workshop without Motif" 1>&2; exit 1; }
5819fi
5820
5821if test "$enable_xim" = "yes"; then
5822 cat >> confdefs.h <<\EOF
5823#define FEAT_XIM 1
5824EOF
5825
5826fi
5827if test "$enable_fontset" = "yes"; then
5828 cat >> confdefs.h <<\EOF
5829#define FEAT_XFONTSET 1
5830EOF
5831
5832fi
5833
5834
5835
5836
5837if test "$enable_hangulinput" = "yes"; then
5838 if test "x$GUITYPE" = "xNONE"; then
5839 echo "$ac_t""no GUI selected; hangul input has been disabled" 1>&6
5840 enable_hangulinput=no
5841 else
5842 cat >> confdefs.h <<\EOF
5843#define FEAT_HANGULIN 1
5844EOF
5845
5846 HANGULIN_SRC=hangulin.c
5847
5848 HANGULIN_OBJ=objects/hangulin.o
5849
5850 fi
5851fi
5852
5853
5854echo $ac_n "checking quality of toupper""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005855echo "configure:5856: checking quality of toupper" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005856if test "$cross_compiling" = yes; then
5857 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
5858else
5859 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005860#line 5861 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005861#include "confdefs.h"
5862#include <ctype.h>
5863main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
5864EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005865if { (eval echo configure:5866: \"$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 +00005866then
5867 cat >> confdefs.h <<\EOF
5868#define BROKEN_TOUPPER 1
5869EOF
5870 echo "$ac_t""bad" 1>&6
5871else
5872 echo "configure: failed program was:" >&5
5873 cat conftest.$ac_ext >&5
5874 rm -fr conftest*
5875 echo "$ac_t""good" 1>&6
5876fi
5877rm -fr conftest*
5878fi
5879
5880
5881echo $ac_n "checking whether __DATE__ and __TIME__ work""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005882echo "configure:5883: checking whether __DATE__ and __TIME__ work" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005883cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005884#line 5885 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005885#include "confdefs.h"
5886
5887int main() {
5888printf("(" __DATE__ " " __TIME__ ")");
5889; return 0; }
5890EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005891if { (eval echo configure:5892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005892 rm -rf conftest*
5893 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
5894#define HAVE_DATE_TIME 1
5895EOF
5896
5897else
5898 echo "configure: failed program was:" >&5
5899 cat conftest.$ac_ext >&5
5900 rm -rf conftest*
5901 echo "$ac_t""no" 1>&6
5902fi
5903rm -f conftest*
5904
5905ac_safe=`echo "elf.h" | sed 'y%./+-%__p_%'`
5906echo $ac_n "checking for elf.h""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005907echo "configure:5908: checking for elf.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005908if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5909 echo $ac_n "(cached) $ac_c" 1>&6
5910else
5911 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005912#line 5913 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005913#include "confdefs.h"
5914#include <elf.h>
5915EOF
5916ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005917{ (eval echo configure:5918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005918ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5919if test -z "$ac_err"; then
5920 rm -rf conftest*
5921 eval "ac_cv_header_$ac_safe=yes"
5922else
5923 echo "$ac_err" >&5
5924 echo "configure: failed program was:" >&5
5925 cat conftest.$ac_ext >&5
5926 rm -rf conftest*
5927 eval "ac_cv_header_$ac_safe=no"
5928fi
5929rm -f conftest*
5930fi
5931if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5932 echo "$ac_t""yes" 1>&6
5933 HAS_ELF=1
5934else
5935 echo "$ac_t""no" 1>&6
5936fi
5937
5938if test "$HAS_ELF" = 1; then
5939 echo $ac_n "checking for main in -lelf""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005940echo "configure:5941: checking for main in -lelf" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005941ac_lib_var=`echo elf'_'main | sed 'y%./+-%__p_%'`
5942if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5943 echo $ac_n "(cached) $ac_c" 1>&6
5944else
5945 ac_save_LIBS="$LIBS"
5946LIBS="-lelf $LIBS"
5947cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005948#line 5949 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005949#include "confdefs.h"
5950
5951int main() {
5952main()
5953; return 0; }
5954EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005955if { (eval echo configure:5956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005956 rm -rf conftest*
5957 eval "ac_cv_lib_$ac_lib_var=yes"
5958else
5959 echo "configure: failed program was:" >&5
5960 cat conftest.$ac_ext >&5
5961 rm -rf conftest*
5962 eval "ac_cv_lib_$ac_lib_var=no"
5963fi
5964rm -f conftest*
5965LIBS="$ac_save_LIBS"
5966
5967fi
5968if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5969 echo "$ac_t""yes" 1>&6
5970 ac_tr_lib=HAVE_LIB`echo elf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5971 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5972 cat >> confdefs.h <<EOF
5973#define $ac_tr_lib 1
5974EOF
5975
5976 LIBS="-lelf $LIBS"
5977
5978else
5979 echo "$ac_t""no" 1>&6
5980fi
5981
5982fi
5983
5984ac_header_dirent=no
5985for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
5986do
5987ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5988echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005989echo "configure:5990: checking for $ac_hdr that defines DIR" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005990if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
5991 echo $ac_n "(cached) $ac_c" 1>&6
5992else
5993 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00005994#line 5995 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005995#include "confdefs.h"
5996#include <sys/types.h>
5997#include <$ac_hdr>
5998int main() {
5999DIR *dirp = 0;
6000; return 0; }
6001EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006002if { (eval echo configure:6003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006003 rm -rf conftest*
6004 eval "ac_cv_header_dirent_$ac_safe=yes"
6005else
6006 echo "configure: failed program was:" >&5
6007 cat conftest.$ac_ext >&5
6008 rm -rf conftest*
6009 eval "ac_cv_header_dirent_$ac_safe=no"
6010fi
6011rm -f conftest*
6012fi
6013if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
6014 echo "$ac_t""yes" 1>&6
6015 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6016 cat >> confdefs.h <<EOF
6017#define $ac_tr_hdr 1
6018EOF
6019 ac_header_dirent=$ac_hdr; break
6020else
6021 echo "$ac_t""no" 1>&6
6022fi
6023done
6024# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6025if test $ac_header_dirent = dirent.h; then
6026echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006027echo "configure:6028: checking for opendir in -ldir" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006028ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
6029if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6030 echo $ac_n "(cached) $ac_c" 1>&6
6031else
6032 ac_save_LIBS="$LIBS"
6033LIBS="-ldir $LIBS"
6034cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006035#line 6036 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006036#include "confdefs.h"
6037/* Override any gcc2 internal prototype to avoid an error. */
6038/* We use char because int might match the return type of a gcc2
6039 builtin and then its argument prototype would still apply. */
6040char opendir();
6041
6042int main() {
6043opendir()
6044; return 0; }
6045EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006046if { (eval echo configure:6047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006047 rm -rf conftest*
6048 eval "ac_cv_lib_$ac_lib_var=yes"
6049else
6050 echo "configure: failed program was:" >&5
6051 cat conftest.$ac_ext >&5
6052 rm -rf conftest*
6053 eval "ac_cv_lib_$ac_lib_var=no"
6054fi
6055rm -f conftest*
6056LIBS="$ac_save_LIBS"
6057
6058fi
6059if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6060 echo "$ac_t""yes" 1>&6
6061 LIBS="$LIBS -ldir"
6062else
6063 echo "$ac_t""no" 1>&6
6064fi
6065
6066else
6067echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006068echo "configure:6069: checking for opendir in -lx" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006069ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
6070if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6071 echo $ac_n "(cached) $ac_c" 1>&6
6072else
6073 ac_save_LIBS="$LIBS"
6074LIBS="-lx $LIBS"
6075cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006076#line 6077 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006077#include "confdefs.h"
6078/* Override any gcc2 internal prototype to avoid an error. */
6079/* We use char because int might match the return type of a gcc2
6080 builtin and then its argument prototype would still apply. */
6081char opendir();
6082
6083int main() {
6084opendir()
6085; return 0; }
6086EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006087if { (eval echo configure:6088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006088 rm -rf conftest*
6089 eval "ac_cv_lib_$ac_lib_var=yes"
6090else
6091 echo "configure: failed program was:" >&5
6092 cat conftest.$ac_ext >&5
6093 rm -rf conftest*
6094 eval "ac_cv_lib_$ac_lib_var=no"
6095fi
6096rm -f conftest*
6097LIBS="$ac_save_LIBS"
6098
6099fi
6100if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6101 echo "$ac_t""yes" 1>&6
6102 LIBS="$LIBS -lx"
6103else
6104 echo "$ac_t""no" 1>&6
6105fi
6106
6107fi
6108
6109
6110echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006111echo "configure:6112: checking for ANSI C header files" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006112if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
6113 echo $ac_n "(cached) $ac_c" 1>&6
6114else
6115 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006116#line 6117 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006117#include "confdefs.h"
6118#include <stdlib.h>
6119#include <stdarg.h>
6120#include <string.h>
6121#include <float.h>
6122EOF
6123ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006124{ (eval echo configure:6125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006125ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6126if test -z "$ac_err"; then
6127 rm -rf conftest*
6128 ac_cv_header_stdc=yes
6129else
6130 echo "$ac_err" >&5
6131 echo "configure: failed program was:" >&5
6132 cat conftest.$ac_ext >&5
6133 rm -rf conftest*
6134 ac_cv_header_stdc=no
6135fi
6136rm -f conftest*
6137
6138if test $ac_cv_header_stdc = yes; then
6139 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6140cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006141#line 6142 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006142#include "confdefs.h"
6143#include <string.h>
6144EOF
6145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6146 egrep "memchr" >/dev/null 2>&1; then
6147 :
6148else
6149 rm -rf conftest*
6150 ac_cv_header_stdc=no
6151fi
6152rm -f conftest*
6153
6154fi
6155
6156if test $ac_cv_header_stdc = yes; then
6157 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6158cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006159#line 6160 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006160#include "confdefs.h"
6161#include <stdlib.h>
6162EOF
6163if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6164 egrep "free" >/dev/null 2>&1; then
6165 :
6166else
6167 rm -rf conftest*
6168 ac_cv_header_stdc=no
6169fi
6170rm -f conftest*
6171
6172fi
6173
6174if test $ac_cv_header_stdc = yes; then
6175 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6176if test "$cross_compiling" = yes; then
6177 :
6178else
6179 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006180#line 6181 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006181#include "confdefs.h"
6182#include <ctype.h>
6183#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6184#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6185#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6186int main () { int i; for (i = 0; i < 256; i++)
6187if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
6188exit (0); }
6189
6190EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006191if { (eval echo configure:6192: \"$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 +00006192then
6193 :
6194else
6195 echo "configure: failed program was:" >&5
6196 cat conftest.$ac_ext >&5
6197 rm -fr conftest*
6198 ac_cv_header_stdc=no
6199fi
6200rm -fr conftest*
6201fi
6202
6203fi
6204fi
6205
6206echo "$ac_t""$ac_cv_header_stdc" 1>&6
6207if test $ac_cv_header_stdc = yes; then
6208 cat >> confdefs.h <<\EOF
6209#define STDC_HEADERS 1
6210EOF
6211
6212fi
6213
6214echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006215echo "configure:6216: checking for sys/wait.h that is POSIX.1 compatible" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006216if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
6217 echo $ac_n "(cached) $ac_c" 1>&6
6218else
6219 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006220#line 6221 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006221#include "confdefs.h"
6222#include <sys/types.h>
6223#include <sys/wait.h>
6224#ifndef WEXITSTATUS
6225#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6226#endif
6227#ifndef WIFEXITED
6228#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6229#endif
6230int main() {
6231int s;
6232wait (&s);
6233s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6234; return 0; }
6235EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006236if { (eval echo configure:6237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006237 rm -rf conftest*
6238 ac_cv_header_sys_wait_h=yes
6239else
6240 echo "configure: failed program was:" >&5
6241 cat conftest.$ac_ext >&5
6242 rm -rf conftest*
6243 ac_cv_header_sys_wait_h=no
6244fi
6245rm -f conftest*
6246fi
6247
6248echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
6249if test $ac_cv_header_sys_wait_h = yes; then
6250 cat >> confdefs.h <<\EOF
6251#define HAVE_SYS_WAIT_H 1
6252EOF
6253
6254fi
6255
6256
6257if test $ac_cv_header_sys_wait_h = no; then
6258 echo $ac_n "checking for sys/wait.h that defines union wait""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006259echo "configure:6260: checking for sys/wait.h that defines union wait" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006260 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006261#line 6262 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006262#include "confdefs.h"
6263#include <sys/wait.h>
6264int main() {
6265union wait xx, yy; xx = yy
6266; return 0; }
6267EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006268if { (eval echo configure:6269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006269 rm -rf conftest*
6270 echo "$ac_t""yes" 1>&6
6271 cat >> confdefs.h <<\EOF
6272#define HAVE_SYS_WAIT_H 1
6273EOF
6274
6275 cat >> confdefs.h <<\EOF
6276#define HAVE_UNION_WAIT 1
6277EOF
6278
6279else
6280 echo "configure: failed program was:" >&5
6281 cat conftest.$ac_ext >&5
6282 rm -rf conftest*
6283 echo "$ac_t""no" 1>&6
6284fi
6285rm -f conftest*
6286fi
6287
6288for ac_hdr in stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \
6289 termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \
6290 iconv.h langinfo.h unistd.h stropts.h errno.h \
6291 sys/resource.h sys/systeminfo.h locale.h \
6292 sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \
6293 poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \
6294 libgen.h util/debug.h util/msg18n.h frame.h pthread_np.h \
6295 sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h wchar.h
6296do
6297ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6298echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006299echo "configure:6300: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006300if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6301 echo $ac_n "(cached) $ac_c" 1>&6
6302else
6303 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006304#line 6305 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006305#include "confdefs.h"
6306#include <$ac_hdr>
6307EOF
6308ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006309{ (eval echo configure:6310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006310ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6311if test -z "$ac_err"; then
6312 rm -rf conftest*
6313 eval "ac_cv_header_$ac_safe=yes"
6314else
6315 echo "$ac_err" >&5
6316 echo "configure: failed program was:" >&5
6317 cat conftest.$ac_ext >&5
6318 rm -rf conftest*
6319 eval "ac_cv_header_$ac_safe=no"
6320fi
6321rm -f conftest*
6322fi
6323if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6324 echo "$ac_t""yes" 1>&6
6325 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6326 cat >> confdefs.h <<EOF
6327#define $ac_tr_hdr 1
6328EOF
6329
6330else
6331 echo "$ac_t""no" 1>&6
6332fi
6333done
6334
6335
6336if test "x$MACOSX" != "xyes"; then
6337 for ac_hdr in strings.h
6338do
6339ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6340echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006341echo "configure:6342: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006342if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6343 echo $ac_n "(cached) $ac_c" 1>&6
6344else
6345 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006346#line 6347 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006347#include "confdefs.h"
6348#include <$ac_hdr>
6349EOF
6350ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006351{ (eval echo configure:6352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006352ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6353if test -z "$ac_err"; then
6354 rm -rf conftest*
6355 eval "ac_cv_header_$ac_safe=yes"
6356else
6357 echo "$ac_err" >&5
6358 echo "configure: failed program was:" >&5
6359 cat conftest.$ac_ext >&5
6360 rm -rf conftest*
6361 eval "ac_cv_header_$ac_safe=no"
6362fi
6363rm -f conftest*
6364fi
6365if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6366 echo "$ac_t""yes" 1>&6
6367 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6368 cat >> confdefs.h <<EOF
6369#define $ac_tr_hdr 1
6370EOF
6371
6372else
6373 echo "$ac_t""no" 1>&6
6374fi
6375done
6376
6377fi
6378
6379echo $ac_n "checking if strings.h can be included after string.h""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006380echo "configure:6381: checking if strings.h can be included after string.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006381cppflags_save=$CPPFLAGS
6382CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6383cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006384#line 6385 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006385#include "confdefs.h"
6386
6387#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
6388# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
6389 /* but don't do it on AIX 5.1 (Uribarri) */
6390#endif
6391#ifdef HAVE_XM_XM_H
6392# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
6393#endif
6394#ifdef HAVE_STRING_H
6395# include <string.h>
6396#endif
6397#if defined(HAVE_STRINGS_H)
6398# include <strings.h>
6399#endif
6400
6401int main() {
6402int i; i = 0;
6403; return 0; }
6404EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006405if { (eval echo configure:6406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006406 rm -rf conftest*
6407 echo "$ac_t""yes" 1>&6
6408else
6409 echo "configure: failed program was:" >&5
6410 cat conftest.$ac_ext >&5
6411 rm -rf conftest*
6412 cat >> confdefs.h <<\EOF
6413#define NO_STRINGS_WITH_STRING_H 1
6414EOF
6415
6416 echo "$ac_t""no" 1>&6
6417fi
6418rm -f conftest*
6419CPPFLAGS=$cppflags_save
6420
6421if test $ac_cv_prog_gcc = yes; then
6422 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006423echo "configure:6424: checking whether ${CC-cc} needs -traditional" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006424if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
6425 echo $ac_n "(cached) $ac_c" 1>&6
6426else
6427 ac_pattern="Autoconf.*'x'"
6428 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006429#line 6430 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006430#include "confdefs.h"
6431#include <sgtty.h>
6432Autoconf TIOCGETP
6433EOF
6434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6435 egrep "$ac_pattern" >/dev/null 2>&1; then
6436 rm -rf conftest*
6437 ac_cv_prog_gcc_traditional=yes
6438else
6439 rm -rf conftest*
6440 ac_cv_prog_gcc_traditional=no
6441fi
6442rm -f conftest*
6443
6444
6445 if test $ac_cv_prog_gcc_traditional = no; then
6446 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006447#line 6448 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006448#include "confdefs.h"
6449#include <termio.h>
6450Autoconf TCGETA
6451EOF
6452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6453 egrep "$ac_pattern" >/dev/null 2>&1; then
6454 rm -rf conftest*
6455 ac_cv_prog_gcc_traditional=yes
6456fi
6457rm -f conftest*
6458
6459 fi
6460fi
6461
6462echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
6463 if test $ac_cv_prog_gcc_traditional = yes; then
6464 CC="$CC -traditional"
6465 fi
6466fi
6467
6468echo $ac_n "checking for working const""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006469echo "configure:6470: checking for working const" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006470if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6471 echo $ac_n "(cached) $ac_c" 1>&6
6472else
6473 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006474#line 6475 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006475#include "confdefs.h"
6476
6477int main() {
6478
6479/* Ultrix mips cc rejects this. */
6480typedef int charset[2]; const charset x;
6481/* SunOS 4.1.1 cc rejects this. */
6482char const *const *ccp;
6483char **p;
6484/* NEC SVR4.0.2 mips cc rejects this. */
6485struct point {int x, y;};
6486static struct point const zero = {0,0};
6487/* AIX XL C 1.02.0.0 rejects this.
6488 It does not let you subtract one const X* pointer from another in an arm
6489 of an if-expression whose if-part is not a constant expression */
6490const char *g = "string";
6491ccp = &g + (g ? g-g : 0);
6492/* HPUX 7.0 cc rejects these. */
6493++ccp;
6494p = (char**) ccp;
6495ccp = (char const *const *) p;
6496{ /* SCO 3.2v4 cc rejects this. */
6497 char *t;
6498 char const *s = 0 ? (char *) 0 : (char const *) 0;
6499
6500 *t++ = 0;
6501}
6502{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6503 int x[] = {25, 17};
6504 const int *foo = &x[0];
6505 ++foo;
6506}
6507{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6508 typedef const int *iptr;
6509 iptr p = 0;
6510 ++p;
6511}
6512{ /* AIX XL C 1.02.0.0 rejects this saying
6513 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6514 struct s { int j; const int *ap[3]; };
6515 struct s *b; b->j = 5;
6516}
6517{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6518 const int foo = 10;
6519}
6520
6521; return 0; }
6522EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006523if { (eval echo configure:6524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006524 rm -rf conftest*
6525 ac_cv_c_const=yes
6526else
6527 echo "configure: failed program was:" >&5
6528 cat conftest.$ac_ext >&5
6529 rm -rf conftest*
6530 ac_cv_c_const=no
6531fi
6532rm -f conftest*
6533fi
6534
6535echo "$ac_t""$ac_cv_c_const" 1>&6
6536if test $ac_cv_c_const = no; then
6537 cat >> confdefs.h <<\EOF
6538#define const
6539EOF
6540
6541fi
6542
6543echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006544echo "configure:6545: checking for mode_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006545if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
6546 echo $ac_n "(cached) $ac_c" 1>&6
6547else
6548 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006549#line 6550 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006550#include "confdefs.h"
6551#include <sys/types.h>
6552#if STDC_HEADERS
6553#include <stdlib.h>
6554#include <stddef.h>
6555#endif
6556EOF
6557if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6558 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6559 rm -rf conftest*
6560 ac_cv_type_mode_t=yes
6561else
6562 rm -rf conftest*
6563 ac_cv_type_mode_t=no
6564fi
6565rm -f conftest*
6566
6567fi
6568echo "$ac_t""$ac_cv_type_mode_t" 1>&6
6569if test $ac_cv_type_mode_t = no; then
6570 cat >> confdefs.h <<\EOF
6571#define mode_t int
6572EOF
6573
6574fi
6575
6576echo $ac_n "checking for off_t""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006577echo "configure:6578: checking for off_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006578if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
6579 echo $ac_n "(cached) $ac_c" 1>&6
6580else
6581 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006582#line 6583 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006583#include "confdefs.h"
6584#include <sys/types.h>
6585#if STDC_HEADERS
6586#include <stdlib.h>
6587#include <stddef.h>
6588#endif
6589EOF
6590if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6591 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6592 rm -rf conftest*
6593 ac_cv_type_off_t=yes
6594else
6595 rm -rf conftest*
6596 ac_cv_type_off_t=no
6597fi
6598rm -f conftest*
6599
6600fi
6601echo "$ac_t""$ac_cv_type_off_t" 1>&6
6602if test $ac_cv_type_off_t = no; then
6603 cat >> confdefs.h <<\EOF
6604#define off_t long
6605EOF
6606
6607fi
6608
6609echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006610echo "configure:6611: checking for pid_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006611if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6612 echo $ac_n "(cached) $ac_c" 1>&6
6613else
6614 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006615#line 6616 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006616#include "confdefs.h"
6617#include <sys/types.h>
6618#if STDC_HEADERS
6619#include <stdlib.h>
6620#include <stddef.h>
6621#endif
6622EOF
6623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6624 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6625 rm -rf conftest*
6626 ac_cv_type_pid_t=yes
6627else
6628 rm -rf conftest*
6629 ac_cv_type_pid_t=no
6630fi
6631rm -f conftest*
6632
6633fi
6634echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6635if test $ac_cv_type_pid_t = no; then
6636 cat >> confdefs.h <<\EOF
6637#define pid_t int
6638EOF
6639
6640fi
6641
6642echo $ac_n "checking for size_t""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006643echo "configure:6644: checking for size_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006644if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6645 echo $ac_n "(cached) $ac_c" 1>&6
6646else
6647 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006648#line 6649 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006649#include "confdefs.h"
6650#include <sys/types.h>
6651#if STDC_HEADERS
6652#include <stdlib.h>
6653#include <stddef.h>
6654#endif
6655EOF
6656if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6657 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6658 rm -rf conftest*
6659 ac_cv_type_size_t=yes
6660else
6661 rm -rf conftest*
6662 ac_cv_type_size_t=no
6663fi
6664rm -f conftest*
6665
6666fi
6667echo "$ac_t""$ac_cv_type_size_t" 1>&6
6668if test $ac_cv_type_size_t = no; then
6669 cat >> confdefs.h <<\EOF
6670#define size_t unsigned
6671EOF
6672
6673fi
6674
6675echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006676echo "configure:6677: checking for uid_t in sys/types.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006677if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
6678 echo $ac_n "(cached) $ac_c" 1>&6
6679else
6680 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006681#line 6682 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006682#include "confdefs.h"
6683#include <sys/types.h>
6684EOF
6685if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6686 egrep "uid_t" >/dev/null 2>&1; then
6687 rm -rf conftest*
6688 ac_cv_type_uid_t=yes
6689else
6690 rm -rf conftest*
6691 ac_cv_type_uid_t=no
6692fi
6693rm -f conftest*
6694
6695fi
6696
6697echo "$ac_t""$ac_cv_type_uid_t" 1>&6
6698if test $ac_cv_type_uid_t = no; then
6699 cat >> confdefs.h <<\EOF
6700#define uid_t int
6701EOF
6702
6703 cat >> confdefs.h <<\EOF
6704#define gid_t int
6705EOF
6706
6707fi
6708
6709echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006710echo "configure:6711: checking whether time.h and sys/time.h may both be included" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006711if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
6712 echo $ac_n "(cached) $ac_c" 1>&6
6713else
6714 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006715#line 6716 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006716#include "confdefs.h"
6717#include <sys/types.h>
6718#include <sys/time.h>
6719#include <time.h>
6720int main() {
6721struct tm *tp;
6722; return 0; }
6723EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006724if { (eval echo configure:6725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006725 rm -rf conftest*
6726 ac_cv_header_time=yes
6727else
6728 echo "configure: failed program was:" >&5
6729 cat conftest.$ac_ext >&5
6730 rm -rf conftest*
6731 ac_cv_header_time=no
6732fi
6733rm -f conftest*
6734fi
6735
6736echo "$ac_t""$ac_cv_header_time" 1>&6
6737if test $ac_cv_header_time = yes; then
6738 cat >> confdefs.h <<\EOF
6739#define TIME_WITH_SYS_TIME 1
6740EOF
6741
6742fi
6743
6744echo $ac_n "checking for ino_t""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006745echo "configure:6746: checking for ino_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006746if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
6747 echo $ac_n "(cached) $ac_c" 1>&6
6748else
6749 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006750#line 6751 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006751#include "confdefs.h"
6752#include <sys/types.h>
6753#if STDC_HEADERS
6754#include <stdlib.h>
6755#include <stddef.h>
6756#endif
6757EOF
6758if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6759 egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6760 rm -rf conftest*
6761 ac_cv_type_ino_t=yes
6762else
6763 rm -rf conftest*
6764 ac_cv_type_ino_t=no
6765fi
6766rm -f conftest*
6767
6768fi
6769echo "$ac_t""$ac_cv_type_ino_t" 1>&6
6770if test $ac_cv_type_ino_t = no; then
6771 cat >> confdefs.h <<\EOF
6772#define ino_t long
6773EOF
6774
6775fi
6776
6777echo $ac_n "checking for dev_t""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006778echo "configure:6779: checking for dev_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006779if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
6780 echo $ac_n "(cached) $ac_c" 1>&6
6781else
6782 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006783#line 6784 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006784#include "confdefs.h"
6785#include <sys/types.h>
6786#if STDC_HEADERS
6787#include <stdlib.h>
6788#include <stddef.h>
6789#endif
6790EOF
6791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6792 egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6793 rm -rf conftest*
6794 ac_cv_type_dev_t=yes
6795else
6796 rm -rf conftest*
6797 ac_cv_type_dev_t=no
6798fi
6799rm -f conftest*
6800
6801fi
6802echo "$ac_t""$ac_cv_type_dev_t" 1>&6
6803if test $ac_cv_type_dev_t = no; then
6804 cat >> confdefs.h <<\EOF
6805#define dev_t unsigned
6806EOF
6807
6808fi
6809
6810
6811echo $ac_n "checking for rlim_t""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006812echo "configure:6813: checking for rlim_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006813if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
6814 echo "$ac_t""(cached) $ac_cv_type_rlim_t" 1>&6
6815else
6816 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006817#line 6818 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006818#include "confdefs.h"
6819
6820#include <sys/types.h>
6821#if STDC_HEADERS
6822#include <stdlib.h>
6823#include <stddef.h>
6824#endif
6825#ifdef HAVE_SYS_RESOURCE_H
6826#include <sys/resource.h>
6827#endif
6828
6829EOF
6830if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6831 egrep "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6832 rm -rf conftest*
6833 ac_cv_type_rlim_t=yes
6834else
6835 rm -rf conftest*
6836 ac_cv_type_rlim_t=no
6837fi
6838rm -f conftest*
6839
6840 echo "$ac_t""$ac_cv_type_rlim_t" 1>&6
6841fi
6842if test $ac_cv_type_rlim_t = no; then
6843 cat >> confdefs.h <<\EOF
6844#define rlim_t unsigned long
6845EOF
6846fi
6847
6848echo $ac_n "checking for stack_t""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006849echo "configure:6850: checking for stack_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006850if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
6851 echo "$ac_t""(cached) $ac_cv_type_stack_t" 1>&6
6852else
6853 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006854#line 6855 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006855#include "confdefs.h"
6856
6857#include <sys/types.h>
6858#if STDC_HEADERS
6859#include <stdlib.h>
6860#include <stddef.h>
6861#endif
6862#include <signal.h>
6863
6864EOF
6865if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6866 egrep "stack_t" >/dev/null 2>&1; then
6867 rm -rf conftest*
6868 ac_cv_type_stack_t=yes
6869else
6870 rm -rf conftest*
6871 ac_cv_type_stack_t=no
6872fi
6873rm -f conftest*
6874
6875 echo "$ac_t""$ac_cv_type_stack_t" 1>&6
6876fi
6877if test $ac_cv_type_stack_t = no; then
6878 cat >> confdefs.h <<\EOF
6879#define stack_t struct sigaltstack
6880EOF
6881fi
6882
6883echo $ac_n "checking whether stack_t has an ss_base field""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006884echo "configure:6885: checking whether stack_t has an ss_base field" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006885cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006886#line 6887 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006887#include "confdefs.h"
6888
6889#include <sys/types.h>
6890#if STDC_HEADERS
6891#include <stdlib.h>
6892#include <stddef.h>
6893#endif
6894#include <signal.h>
6895#include "confdefs.h"
6896
6897int main() {
6898stack_t sigstk; sigstk.ss_base = 0;
6899; return 0; }
6900EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006901if { (eval echo configure:6902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006902 rm -rf conftest*
6903 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
6904#define HAVE_SS_BASE 1
6905EOF
6906
6907else
6908 echo "configure: failed program was:" >&5
6909 cat conftest.$ac_ext >&5
6910 rm -rf conftest*
6911 echo "$ac_t""no" 1>&6
6912fi
6913rm -f conftest*
6914
6915olibs="$LIBS"
6916echo $ac_n "checking --with-tlib argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006917echo "configure:6918: checking --with-tlib argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006918# Check whether --with-tlib or --without-tlib was given.
6919if test "${with_tlib+set}" = set; then
6920 withval="$with_tlib"
6921 :
6922fi
6923
6924if test -n "$with_tlib"; then
6925 echo "$ac_t""$with_tlib" 1>&6
6926 LIBS="$LIBS -l$with_tlib"
6927else
6928 echo "$ac_t""automatic terminal library selection" 1>&6
6929 case "`uname -s 2>/dev/null`" in
6930 OSF1) tlibs="ncurses curses termlib termcap";;
6931 *) tlibs="ncurses termlib termcap curses";;
6932 esac
6933 for libname in $tlibs; do
6934 echo $ac_n "checking for tgetent in -l${libname}""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006935echo "configure:6936: checking for tgetent in -l${libname}" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006936ac_lib_var=`echo ${libname}'_'tgetent | sed 'y%./+-%__p_%'`
6937if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6938 echo $ac_n "(cached) $ac_c" 1>&6
6939else
6940 ac_save_LIBS="$LIBS"
6941LIBS="-l${libname} $LIBS"
6942cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006943#line 6944 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006944#include "confdefs.h"
6945/* Override any gcc2 internal prototype to avoid an error. */
6946/* We use char because int might match the return type of a gcc2
6947 builtin and then its argument prototype would still apply. */
6948char tgetent();
6949
6950int main() {
6951tgetent()
6952; return 0; }
6953EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006954if { (eval echo configure:6955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006955 rm -rf conftest*
6956 eval "ac_cv_lib_$ac_lib_var=yes"
6957else
6958 echo "configure: failed program was:" >&5
6959 cat conftest.$ac_ext >&5
6960 rm -rf conftest*
6961 eval "ac_cv_lib_$ac_lib_var=no"
6962fi
6963rm -f conftest*
6964LIBS="$ac_save_LIBS"
6965
6966fi
6967if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6968 echo "$ac_t""yes" 1>&6
6969 ac_tr_lib=HAVE_LIB`echo ${libname} | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6970 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6971 cat >> confdefs.h <<EOF
6972#define $ac_tr_lib 1
6973EOF
6974
6975 LIBS="-l${libname} $LIBS"
6976
6977else
6978 echo "$ac_t""no" 1>&6
6979fi
6980
6981 if test "x$olibs" != "x$LIBS"; then
6982 if test "$cross_compiling" = yes; then
6983 res="FAIL"
6984else
6985 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006986#line 6987 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006987#include "confdefs.h"
6988
6989#ifdef HAVE_TERMCAP_H
6990# include <termcap.h>
6991#endif
6992main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
6993EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006994if { (eval echo configure:6995: \"$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 +00006995then
6996 res="OK"
6997else
6998 echo "configure: failed program was:" >&5
6999 cat conftest.$ac_ext >&5
7000 rm -fr conftest*
7001 res="FAIL"
7002fi
7003rm -fr conftest*
7004fi
7005
7006 if test "$res" = "OK"; then
7007 break
7008 fi
7009 echo "$ac_t""$libname library is not usable" 1>&6
7010 LIBS="$olibs"
7011 fi
7012 done
7013fi
7014if test "x$olibs" != "x$LIBS"; then
7015 echo $ac_n "checking whether we talk terminfo""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007016echo "configure:7017: checking whether we talk terminfo" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007017 if test "$cross_compiling" = yes; then
7018 { echo "configure: error: failed to compile test program." 1>&2; exit 1; }
7019else
7020 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007021#line 7022 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007022#include "confdefs.h"
7023
7024#ifdef HAVE_TERMCAP_H
7025# include <termcap.h>
7026#endif
7027main()
7028{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
7029EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007030if { (eval echo configure:7031: \"$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 +00007031then
7032 echo "$ac_t""no -- we are in termcap land" 1>&6
7033else
7034 echo "configure: failed program was:" >&5
7035 cat conftest.$ac_ext >&5
7036 rm -fr conftest*
7037 echo "$ac_t""yes -- terminfo spoken here" 1>&6; cat >> confdefs.h <<\EOF
7038#define TERMINFO 1
7039EOF
7040
7041fi
7042rm -fr conftest*
7043fi
7044
7045else
7046 echo "$ac_t""none found" 1>&6
7047fi
7048
7049if test "x$olibs" != "x$LIBS"; then
7050 echo $ac_n "checking what tgetent() returns for an unknown terminal""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007051echo "configure:7052: checking what tgetent() returns for an unknown terminal" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007052 if test "$cross_compiling" = yes; then
7053 { echo "configure: error: failed to compile test program." 1>&2; exit 1; }
7054else
7055 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007056#line 7057 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007057#include "confdefs.h"
7058
7059#ifdef HAVE_TERMCAP_H
7060# include <termcap.h>
7061#endif
7062main()
7063{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
7064EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007065if { (eval echo configure:7066: \"$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 +00007066then
7067 echo "$ac_t""zero" 1>&6; cat >> confdefs.h <<\EOF
7068#define TGETENT_ZERO_ERR 0
7069EOF
7070
7071else
7072 echo "configure: failed program was:" >&5
7073 cat conftest.$ac_ext >&5
7074 rm -fr conftest*
7075 echo "$ac_t""non-zero" 1>&6
7076fi
7077rm -fr conftest*
7078fi
7079
7080fi
7081
7082echo $ac_n "checking whether termcap.h contains ospeed""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007083echo "configure:7084: checking whether termcap.h contains ospeed" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007084cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007085#line 7086 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007086#include "confdefs.h"
7087
7088#ifdef HAVE_TERMCAP_H
7089# include <termcap.h>
7090#endif
7091
7092int main() {
7093ospeed = 20000
7094; return 0; }
7095EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007096if { (eval echo configure:7097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007097 rm -rf conftest*
7098 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7099#define HAVE_OSPEED 1
7100EOF
7101
7102else
7103 echo "configure: failed program was:" >&5
7104 cat conftest.$ac_ext >&5
7105 rm -rf conftest*
7106 echo "$ac_t""no" 1>&6
7107 echo $ac_n "checking whether ospeed can be extern""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007108echo "configure:7109: checking whether ospeed can be extern" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007109 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007110#line 7111 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007111#include "confdefs.h"
7112
7113#ifdef HAVE_TERMCAP_H
7114# include <termcap.h>
7115#endif
7116extern short ospeed;
7117
7118int main() {
7119ospeed = 20000
7120; return 0; }
7121EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007122if { (eval echo configure:7123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007123 rm -rf conftest*
7124 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7125#define OSPEED_EXTERN 1
7126EOF
7127
7128else
7129 echo "configure: failed program was:" >&5
7130 cat conftest.$ac_ext >&5
7131 rm -rf conftest*
7132 echo "$ac_t""no" 1>&6
7133fi
7134rm -f conftest*
7135
7136fi
7137rm -f conftest*
7138
7139echo $ac_n "checking whether termcap.h contains UP, BC and PC""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007140echo "configure:7141: checking whether termcap.h contains UP, BC and PC" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007141cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007142#line 7143 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007143#include "confdefs.h"
7144
7145#ifdef HAVE_TERMCAP_H
7146# include <termcap.h>
7147#endif
7148
7149int main() {
7150if (UP == 0 && BC == 0) PC = 1
7151; return 0; }
7152EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007153if { (eval echo configure:7154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007154 rm -rf conftest*
7155 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7156#define HAVE_UP_BC_PC 1
7157EOF
7158
7159else
7160 echo "configure: failed program was:" >&5
7161 cat conftest.$ac_ext >&5
7162 rm -rf conftest*
7163 echo "$ac_t""no" 1>&6
7164 echo $ac_n "checking whether UP, BC and PC can be extern""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007165echo "configure:7166: checking whether UP, BC and PC can be extern" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007166 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007167#line 7168 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007168#include "confdefs.h"
7169
7170#ifdef HAVE_TERMCAP_H
7171# include <termcap.h>
7172#endif
7173extern char *UP, *BC, PC;
7174
7175int main() {
7176if (UP == 0 && BC == 0) PC = 1
7177; return 0; }
7178EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007179if { (eval echo configure:7180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007180 rm -rf conftest*
7181 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7182#define UP_BC_PC_EXTERN 1
7183EOF
7184
7185else
7186 echo "configure: failed program was:" >&5
7187 cat conftest.$ac_ext >&5
7188 rm -rf conftest*
7189 echo "$ac_t""no" 1>&6
7190fi
7191rm -f conftest*
7192
7193fi
7194rm -f conftest*
7195
7196echo $ac_n "checking whether tputs() uses outfuntype""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007197echo "configure:7198: checking whether tputs() uses outfuntype" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007198cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007199#line 7200 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007200#include "confdefs.h"
7201
7202#ifdef HAVE_TERMCAP_H
7203# include <termcap.h>
7204#endif
7205
7206int main() {
7207extern int xx(); tputs("test", 1, (outfuntype)xx)
7208; return 0; }
7209EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007210if { (eval echo configure:7211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007211 rm -rf conftest*
7212 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7213#define HAVE_OUTFUNTYPE 1
7214EOF
7215
7216else
7217 echo "configure: failed program was:" >&5
7218 cat conftest.$ac_ext >&5
7219 rm -rf conftest*
7220 echo "$ac_t""no" 1>&6
7221fi
7222rm -f conftest*
7223
7224echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007225echo "configure:7226: checking whether sys/select.h and sys/time.h may both be included" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007226cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007227#line 7228 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007228#include "confdefs.h"
7229
7230#include <sys/types.h>
7231#include <sys/time.h>
7232#include <sys/select.h>
7233int main() {
7234
7235; return 0; }
7236EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007237if { (eval echo configure:7238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007238 rm -rf conftest*
7239 echo "$ac_t""yes" 1>&6
7240 cat >> confdefs.h <<\EOF
7241#define SYS_SELECT_WITH_SYS_TIME 1
7242EOF
7243
7244else
7245 echo "configure: failed program was:" >&5
7246 cat conftest.$ac_ext >&5
7247 rm -rf conftest*
7248 echo "$ac_t""no" 1>&6
7249fi
7250rm -f conftest*
7251
7252
7253echo $ac_n "checking for /dev/ptc""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007254echo "configure:7255: checking for /dev/ptc" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007255if test -r /dev/ptc; then
7256 cat >> confdefs.h <<\EOF
7257#define HAVE_DEV_PTC 1
7258EOF
7259
7260 echo "$ac_t""yes" 1>&6
7261else
7262 echo "$ac_t""no" 1>&6
7263fi
7264
7265echo $ac_n "checking for SVR4 ptys""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007266echo "configure:7267: checking for SVR4 ptys" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007267if test -c /dev/ptmx ; then
7268 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007269#line 7270 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007270#include "confdefs.h"
7271
7272int main() {
7273ptsname(0);grantpt(0);unlockpt(0);
7274; return 0; }
7275EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007276if { (eval echo configure:7277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007277 rm -rf conftest*
7278 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7279#define HAVE_SVR4_PTYS 1
7280EOF
7281
7282else
7283 echo "configure: failed program was:" >&5
7284 cat conftest.$ac_ext >&5
7285 rm -rf conftest*
7286 echo "$ac_t""no" 1>&6
7287fi
7288rm -f conftest*
7289else
7290 echo "$ac_t""no" 1>&6
7291fi
7292
7293echo $ac_n "checking for ptyranges""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007294echo "configure:7295: checking for ptyranges" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007295if test -d /dev/ptym ; then
7296 pdir='/dev/ptym'
7297else
7298 pdir='/dev'
7299fi
7300cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007301#line 7302 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007302#include "confdefs.h"
7303#ifdef M_UNIX
7304 yes;
7305#endif
7306
7307EOF
7308if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7309 egrep "yes" >/dev/null 2>&1; then
7310 rm -rf conftest*
7311 ptys=`echo /dev/ptyp??`
7312else
7313 rm -rf conftest*
7314 ptys=`echo $pdir/pty??`
7315fi
7316rm -f conftest*
7317
7318if test "$ptys" != "$pdir/pty??" ; then
7319 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
7320 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
7321 cat >> confdefs.h <<EOF
7322#define PTYRANGE0 "$p0"
7323EOF
7324
7325 cat >> confdefs.h <<EOF
7326#define PTYRANGE1 "$p1"
7327EOF
7328
7329 echo "$ac_t""$p0 / $p1" 1>&6
7330else
7331 echo "$ac_t""don't know" 1>&6
7332fi
7333
7334echo $ac_n "checking default tty permissions/group""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007335echo "configure:7336: checking default tty permissions/group" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007336rm -f conftest_grp
7337if test "$cross_compiling" = yes; then
7338 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7339else
7340 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007341#line 7342 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007342#include "confdefs.h"
7343
7344#include <sys/types.h>
7345#include <sys/stat.h>
7346#include <stdio.h>
7347main()
7348{
7349 struct stat sb;
7350 char *x,*ttyname();
7351 int om, m;
7352 FILE *fp;
7353
7354 if (!(x = ttyname(0))) exit(1);
7355 if (stat(x, &sb)) exit(1);
7356 om = sb.st_mode;
7357 if (om & 002) exit(0);
7358 m = system("mesg y");
7359 if (m == -1 || m == 127) exit(1);
7360 if (stat(x, &sb)) exit(1);
7361 m = sb.st_mode;
7362 if (chmod(x, om)) exit(1);
7363 if (m & 002) exit(0);
7364 if (sb.st_gid == getgid()) exit(1);
7365 if (!(fp=fopen("conftest_grp", "w")))
7366 exit(1);
7367 fprintf(fp, "%d\n", sb.st_gid);
7368 fclose(fp);
7369 exit(0);
7370}
7371
7372EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007373if { (eval echo configure:7374: \"$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 +00007374then
7375
7376 if test -f conftest_grp; then
7377 ptygrp=`cat conftest_grp`
7378 echo "$ac_t""pty mode: 0620, group: $ptygrp" 1>&6
7379 cat >> confdefs.h <<\EOF
7380#define PTYMODE 0620
7381EOF
7382
7383 cat >> confdefs.h <<EOF
7384#define PTYGROUP $ptygrp
7385EOF
7386
7387 else
7388 echo "$ac_t""ptys are world accessable" 1>&6
7389 fi
7390
7391else
7392 echo "configure: failed program was:" >&5
7393 cat conftest.$ac_ext >&5
7394 rm -fr conftest*
7395 echo "$ac_t""can't determine - assume ptys are world accessable" 1>&6
7396fi
7397rm -fr conftest*
7398fi
7399
7400rm -f conftest_grp
7401
7402
7403echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007404echo "configure:7405: checking return type of signal handlers" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007405if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
7406 echo $ac_n "(cached) $ac_c" 1>&6
7407else
7408 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007409#line 7410 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007410#include "confdefs.h"
7411#include <sys/types.h>
7412#include <signal.h>
7413#ifdef signal
7414#undef signal
7415#endif
7416#ifdef __cplusplus
7417extern "C" void (*signal (int, void (*)(int)))(int);
7418#else
7419void (*signal ()) ();
7420#endif
7421
7422int main() {
7423int i;
7424; return 0; }
7425EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007426if { (eval echo configure:7427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007427 rm -rf conftest*
7428 ac_cv_type_signal=void
7429else
7430 echo "configure: failed program was:" >&5
7431 cat conftest.$ac_ext >&5
7432 rm -rf conftest*
7433 ac_cv_type_signal=int
7434fi
7435rm -f conftest*
7436fi
7437
7438echo "$ac_t""$ac_cv_type_signal" 1>&6
7439cat >> confdefs.h <<EOF
7440#define RETSIGTYPE $ac_cv_type_signal
7441EOF
7442
7443
7444
7445if test $ac_cv_type_signal = void; then
7446 cat >> confdefs.h <<\EOF
7447#define SIGRETURN return
7448EOF
7449
7450else
7451 cat >> confdefs.h <<\EOF
7452#define SIGRETURN return 0
7453EOF
7454
7455fi
7456
7457echo $ac_n "checking for struct sigcontext""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007458echo "configure:7459: checking for struct sigcontext" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007459cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007460#line 7461 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007461#include "confdefs.h"
7462
7463#include <signal.h>
7464test_sig()
7465{
7466 struct sigcontext *scont;
7467 scont = (struct sigcontext *)0;
7468 return 1;
7469}
7470int main() {
7471
7472; return 0; }
7473EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007474if { (eval echo configure:7475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007475 rm -rf conftest*
7476 echo "$ac_t""yes" 1>&6
7477 cat >> confdefs.h <<\EOF
7478#define HAVE_SIGCONTEXT 1
7479EOF
7480
7481else
7482 echo "configure: failed program was:" >&5
7483 cat conftest.$ac_ext >&5
7484 rm -rf conftest*
7485 echo "$ac_t""no" 1>&6
7486fi
7487rm -f conftest*
7488
7489echo $ac_n "checking getcwd implementation""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007490echo "configure:7491: checking getcwd implementation" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007491if test "$cross_compiling" = yes; then
7492 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7493else
7494 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007495#line 7496 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007496#include "confdefs.h"
7497
7498char *dagger[] = { "IFS=pwd", 0 };
7499main()
7500{
7501 char buffer[500];
7502 extern char **environ;
7503 environ = dagger;
7504 return getcwd(buffer, 500) ? 0 : 1;
7505}
7506EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007507if { (eval echo configure:7508: \"$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 +00007508then
7509 echo "$ac_t""it is usable" 1>&6
7510else
7511 echo "configure: failed program was:" >&5
7512 cat conftest.$ac_ext >&5
7513 rm -fr conftest*
7514 echo "$ac_t""it stinks" 1>&6
7515 cat >> confdefs.h <<\EOF
7516#define BAD_GETCWD 1
7517EOF
7518
7519fi
7520rm -fr conftest*
7521fi
7522
7523
7524for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \
7525 getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
7526 memset nanosleep opendir putenv qsort readlink select setenv \
7527 setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
7528 sigvec snprintf strcasecmp strerror strftime stricmp strncasecmp \
7529 strnicmp strpbrk strtol tgetent towlower towupper usleep utime utimes
7530do
7531echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007532echo "configure:7533: checking for $ac_func" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007533if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7534 echo $ac_n "(cached) $ac_c" 1>&6
7535else
7536 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007537#line 7538 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007538#include "confdefs.h"
7539/* System header to define __stub macros and hopefully few prototypes,
7540 which can conflict with char $ac_func(); below. */
7541#include <assert.h>
7542/* Override any gcc2 internal prototype to avoid an error. */
7543/* We use char because int might match the return type of a gcc2
7544 builtin and then its argument prototype would still apply. */
7545char $ac_func();
7546
7547int main() {
7548
7549/* The GNU C library defines this for functions which it implements
7550 to always fail with ENOSYS. Some functions are actually named
7551 something starting with __ and the normal name is an alias. */
7552#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7553choke me
7554#else
7555$ac_func();
7556#endif
7557
7558; return 0; }
7559EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007560if { (eval echo configure:7561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007561 rm -rf conftest*
7562 eval "ac_cv_func_$ac_func=yes"
7563else
7564 echo "configure: failed program was:" >&5
7565 cat conftest.$ac_ext >&5
7566 rm -rf conftest*
7567 eval "ac_cv_func_$ac_func=no"
7568fi
7569rm -f conftest*
7570fi
7571
7572if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7573 echo "$ac_t""yes" 1>&6
7574 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7575 cat >> confdefs.h <<EOF
7576#define $ac_tr_func 1
7577EOF
7578
7579else
7580 echo "$ac_t""no" 1>&6
7581fi
7582done
7583
7584
7585echo $ac_n "checking for st_blksize""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007586echo "configure:7587: checking for st_blksize" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007587cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007588#line 7589 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007589#include "confdefs.h"
7590#include <sys/types.h>
7591#include <sys/stat.h>
7592int main() {
7593 struct stat st;
7594 int n;
7595
7596 stat("/", &st);
7597 n = (int)st.st_blksize;
7598; return 0; }
7599EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007600if { (eval echo configure:7601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007601 rm -rf conftest*
7602 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7603#define HAVE_ST_BLKSIZE 1
7604EOF
7605
7606else
7607 echo "configure: failed program was:" >&5
7608 cat conftest.$ac_ext >&5
7609 rm -rf conftest*
7610 echo "$ac_t""no" 1>&6
7611fi
7612rm -f conftest*
7613
7614echo $ac_n "checking whether stat() ignores a trailing slash""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007615echo "configure:7616: checking whether stat() ignores a trailing slash" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007616if test "$cross_compiling" = yes; then
7617 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7618else
7619 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007620#line 7621 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007621#include "confdefs.h"
7622#include <sys/types.h>
7623#include <sys/stat.h>
7624main() {struct stat st; exit(stat("configure/", &st) != 0); }
7625EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007626if { (eval echo configure:7627: \"$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 +00007627then
7628 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7629#define STAT_IGNORES_SLASH 1
7630EOF
7631
7632else
7633 echo "configure: failed program was:" >&5
7634 cat conftest.$ac_ext >&5
7635 rm -fr conftest*
7636 echo "$ac_t""no" 1>&6
7637fi
7638rm -fr conftest*
7639fi
7640
7641
7642echo $ac_n "checking for iconv_open()""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007643echo "configure:7644: checking for iconv_open()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007644save_LIBS="$LIBS"
7645LIBS="$LIBS -liconv"
7646cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007647#line 7648 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007648#include "confdefs.h"
7649
7650#ifdef HAVE_ICONV_H
7651# include <iconv.h>
7652#endif
7653
7654int main() {
7655iconv_open("fr", "to");
7656; return 0; }
7657EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007658if { (eval echo configure:7659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007659 rm -rf conftest*
7660 echo "$ac_t""yes; with -liconv" 1>&6; cat >> confdefs.h <<\EOF
7661#define HAVE_ICONV 1
7662EOF
7663
7664else
7665 echo "configure: failed program was:" >&5
7666 cat conftest.$ac_ext >&5
7667 rm -rf conftest*
7668 LIBS="$save_LIBS"
7669 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007670#line 7671 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007671#include "confdefs.h"
7672
7673#ifdef HAVE_ICONV_H
7674# include <iconv.h>
7675#endif
7676
7677int main() {
7678iconv_open("fr", "to");
7679; return 0; }
7680EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007681if { (eval echo configure:7682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007682 rm -rf conftest*
7683 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7684#define HAVE_ICONV 1
7685EOF
7686
7687else
7688 echo "configure: failed program was:" >&5
7689 cat conftest.$ac_ext >&5
7690 rm -rf conftest*
7691 echo "$ac_t""no" 1>&6
7692fi
7693rm -f conftest*
7694fi
7695rm -f conftest*
7696
7697
7698echo $ac_n "checking for nl_langinfo(CODESET)""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007699echo "configure:7700: checking for nl_langinfo(CODESET)" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007700cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007701#line 7702 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007702#include "confdefs.h"
7703
7704#ifdef HAVE_LANGINFO_H
7705# include <langinfo.h>
7706#endif
7707
7708int main() {
7709char *cs = nl_langinfo(CODESET);
7710; return 0; }
7711EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007712if { (eval echo configure:7713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007713 rm -rf conftest*
7714 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7715#define HAVE_NL_LANGINFO_CODESET 1
7716EOF
7717
7718else
7719 echo "configure: failed program was:" >&5
7720 cat conftest.$ac_ext >&5
7721 rm -rf conftest*
7722 echo "$ac_t""no" 1>&6
7723fi
7724rm -f conftest*
7725
7726echo $ac_n "checking --disable-acl argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007727echo "configure:7728: checking --disable-acl argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007728# Check whether --enable-acl or --disable-acl was given.
7729if test "${enable_acl+set}" = set; then
7730 enableval="$enable_acl"
7731 :
7732else
7733 enable_acl="yes"
7734fi
7735
7736if test "$enable_acl" = "yes"; then
7737echo "$ac_t""no" 1>&6
7738echo $ac_n "checking for acl_get_file in -lposix1e""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007739echo "configure:7740: checking for acl_get_file in -lposix1e" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007740ac_lib_var=`echo posix1e'_'acl_get_file | sed 'y%./+-%__p_%'`
7741if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7742 echo $ac_n "(cached) $ac_c" 1>&6
7743else
7744 ac_save_LIBS="$LIBS"
7745LIBS="-lposix1e $LIBS"
7746cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007747#line 7748 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007748#include "confdefs.h"
7749/* Override any gcc2 internal prototype to avoid an error. */
7750/* We use char because int might match the return type of a gcc2
7751 builtin and then its argument prototype would still apply. */
7752char acl_get_file();
7753
7754int main() {
7755acl_get_file()
7756; return 0; }
7757EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007758if { (eval echo configure:7759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007759 rm -rf conftest*
7760 eval "ac_cv_lib_$ac_lib_var=yes"
7761else
7762 echo "configure: failed program was:" >&5
7763 cat conftest.$ac_ext >&5
7764 rm -rf conftest*
7765 eval "ac_cv_lib_$ac_lib_var=no"
7766fi
7767rm -f conftest*
7768LIBS="$ac_save_LIBS"
7769
7770fi
7771if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7772 echo "$ac_t""yes" 1>&6
7773 LIBS="$LIBS -lposix1e"
7774else
7775 echo "$ac_t""no" 1>&6
7776echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007777echo "configure:7778: checking for acl_get_file in -lacl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007778ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
7779if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7780 echo $ac_n "(cached) $ac_c" 1>&6
7781else
7782 ac_save_LIBS="$LIBS"
7783LIBS="-lacl $LIBS"
7784cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007785#line 7786 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007786#include "confdefs.h"
7787/* Override any gcc2 internal prototype to avoid an error. */
7788/* We use char because int might match the return type of a gcc2
7789 builtin and then its argument prototype would still apply. */
7790char acl_get_file();
7791
7792int main() {
7793acl_get_file()
7794; return 0; }
7795EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007796if { (eval echo configure:7797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007797 rm -rf conftest*
7798 eval "ac_cv_lib_$ac_lib_var=yes"
7799else
7800 echo "configure: failed program was:" >&5
7801 cat conftest.$ac_ext >&5
7802 rm -rf conftest*
7803 eval "ac_cv_lib_$ac_lib_var=no"
7804fi
7805rm -f conftest*
7806LIBS="$ac_save_LIBS"
7807
7808fi
7809if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7810 echo "$ac_t""yes" 1>&6
7811 LIBS="$LIBS -lacl"
7812 echo $ac_n "checking for fgetxattr in -lattr""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007813echo "configure:7814: checking for fgetxattr in -lattr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007814ac_lib_var=`echo attr'_'fgetxattr | sed 'y%./+-%__p_%'`
7815if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7816 echo $ac_n "(cached) $ac_c" 1>&6
7817else
7818 ac_save_LIBS="$LIBS"
7819LIBS="-lattr $LIBS"
7820cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007821#line 7822 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007822#include "confdefs.h"
7823/* Override any gcc2 internal prototype to avoid an error. */
7824/* We use char because int might match the return type of a gcc2
7825 builtin and then its argument prototype would still apply. */
7826char fgetxattr();
7827
7828int main() {
7829fgetxattr()
7830; return 0; }
7831EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007832if { (eval echo configure:7833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007833 rm -rf conftest*
7834 eval "ac_cv_lib_$ac_lib_var=yes"
7835else
7836 echo "configure: failed program was:" >&5
7837 cat conftest.$ac_ext >&5
7838 rm -rf conftest*
7839 eval "ac_cv_lib_$ac_lib_var=no"
7840fi
7841rm -f conftest*
7842LIBS="$ac_save_LIBS"
7843
7844fi
7845if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7846 echo "$ac_t""yes" 1>&6
7847 LIBS="$LIBS -lattr"
7848else
7849 echo "$ac_t""no" 1>&6
7850fi
7851
7852else
7853 echo "$ac_t""no" 1>&6
7854fi
7855
7856fi
7857
7858
7859echo $ac_n "checking for POSIX ACL support""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007860echo "configure:7861: checking for POSIX ACL support" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007861cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007862#line 7863 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007863#include "confdefs.h"
7864
7865#include <sys/types.h>
7866#ifdef HAVE_SYS_ACL_H
7867# include <sys/acl.h>
7868#endif
7869acl_t acl;
7870int main() {
7871acl = acl_get_file("foo", ACL_TYPE_ACCESS);
7872 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
7873 acl_free(acl);
7874; return 0; }
7875EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007876if { (eval echo configure:7877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007877 rm -rf conftest*
7878 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7879#define HAVE_POSIX_ACL 1
7880EOF
7881
7882else
7883 echo "configure: failed program was:" >&5
7884 cat conftest.$ac_ext >&5
7885 rm -rf conftest*
7886 echo "$ac_t""no" 1>&6
7887fi
7888rm -f conftest*
7889
7890echo $ac_n "checking for Solaris ACL support""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007891echo "configure:7892: checking for Solaris ACL support" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007892cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007893#line 7894 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007894#include "confdefs.h"
7895
7896#ifdef HAVE_SYS_ACL_H
7897# include <sys/acl.h>
7898#endif
7899int main() {
7900acl("foo", GETACLCNT, 0, NULL);
7901
7902; return 0; }
7903EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007904if { (eval echo configure:7905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007905 rm -rf conftest*
7906 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7907#define HAVE_SOLARIS_ACL 1
7908EOF
7909
7910else
7911 echo "configure: failed program was:" >&5
7912 cat conftest.$ac_ext >&5
7913 rm -rf conftest*
7914 echo "$ac_t""no" 1>&6
7915fi
7916rm -f conftest*
7917
7918echo $ac_n "checking for AIX ACL support""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007919echo "configure:7920: checking for AIX ACL support" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007920cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007921#line 7922 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007922#include "confdefs.h"
7923
7924#ifdef HAVE_SYS_ACL_H
7925# include <sys/acl.h>
7926#endif
7927#ifdef HAVE_SYS_ACCESS_H
7928# include <sys/access.h>
7929#endif
7930#define _ALL_SOURCE
7931
7932#include <sys/stat.h>
7933
7934int aclsize;
7935struct acl *aclent;
7936int main() {
7937aclsize = sizeof(struct acl);
7938 aclent = (void *)malloc(aclsize);
7939 statacl("foo", STX_NORMAL, aclent, aclsize);
7940
7941; return 0; }
7942EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007943if { (eval echo configure:7944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007944 rm -rf conftest*
7945 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7946#define HAVE_AIX_ACL 1
7947EOF
7948
7949else
7950 echo "configure: failed program was:" >&5
7951 cat conftest.$ac_ext >&5
7952 rm -rf conftest*
7953 echo "$ac_t""no" 1>&6
7954fi
7955rm -f conftest*
7956else
7957 echo "$ac_t""yes" 1>&6
7958fi
7959
7960echo $ac_n "checking --disable-gpm argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007961echo "configure:7962: checking --disable-gpm argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007962# Check whether --enable-gpm or --disable-gpm was given.
7963if test "${enable_gpm+set}" = set; then
7964 enableval="$enable_gpm"
7965 :
7966else
7967 enable_gpm="yes"
7968fi
7969
7970
7971if test "$enable_gpm" = "yes"; then
7972 echo "$ac_t""no" 1>&6
7973 echo $ac_n "checking for gpm""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007974echo "configure:7975: checking for gpm" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007975if eval "test \"`echo '$''{'vi_cv_have_gpm'+set}'`\" = set"; then
7976 echo $ac_n "(cached) $ac_c" 1>&6
7977else
7978 olibs="$LIBS" ; LIBS="-lgpm"
7979 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007980#line 7981 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007981#include "confdefs.h"
7982#include <gpm.h>
7983 #include <linux/keyboard.h>
7984int main() {
7985Gpm_GetLibVersion(NULL);
7986; return 0; }
7987EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00007988if { (eval echo configure:7989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007989 rm -rf conftest*
7990 vi_cv_have_gpm=yes
7991else
7992 echo "configure: failed program was:" >&5
7993 cat conftest.$ac_ext >&5
7994 rm -rf conftest*
7995 vi_cv_have_gpm=no
7996fi
7997rm -f conftest*
7998 LIBS="$olibs"
7999
8000fi
8001
8002echo "$ac_t""$vi_cv_have_gpm" 1>&6
8003 if test $vi_cv_have_gpm = yes; then
8004 LIBS="$LIBS -lgpm"
8005 cat >> confdefs.h <<\EOF
8006#define HAVE_GPM 1
8007EOF
8008
8009 fi
8010else
8011 echo "$ac_t""yes" 1>&6
8012fi
8013
8014echo $ac_n "checking for vsnprintf()""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008015echo "configure:8016: checking for vsnprintf()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008016if test "$cross_compiling" = yes; then
8017 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8018else
8019 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008020#line 8021 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008021#include "confdefs.h"
8022
8023#include <stdio.h>
8024#include <stdarg.h>
8025 /* Check use of vsnprintf() */
8026 void warn(char *fmt, ...);
8027 void warn(char *fmt, ...)
8028 {
8029 va_list ap; char buf[20];
8030 va_start(ap, fmt);
8031 vsnprintf(buf, 20, fmt, ap);
8032 va_end(ap);
8033 }
8034 main()
8035 {
8036 warn("testing %s\n", "a very long string that won't fit");
8037 exit(0);
8038 }
8039
8040EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008041if { (eval echo configure:8042: \"$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 +00008042then
8043 cat >> confdefs.h <<\EOF
8044#define HAVE_VSNPRINTF 1
8045EOF
8046 echo "$ac_t""yes" 1>&6
8047else
8048 echo "configure: failed program was:" >&5
8049 cat conftest.$ac_ext >&5
8050 rm -fr conftest*
8051 echo "$ac_t""no" 1>&6
8052fi
8053rm -fr conftest*
8054fi
8055
8056
8057
8058echo $ac_n "checking for rename""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008059echo "configure:8060: checking for rename" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008060cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008061#line 8062 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008062#include "confdefs.h"
8063#include <stdio.h>
8064int main() {
8065rename("this", "that")
8066; return 0; }
8067EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008068if { (eval echo configure:8069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008069 rm -rf conftest*
8070 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8071#define HAVE_RENAME 1
8072EOF
8073
8074else
8075 echo "configure: failed program was:" >&5
8076 cat conftest.$ac_ext >&5
8077 rm -rf conftest*
8078 echo "$ac_t""no" 1>&6
8079fi
8080rm -f conftest*
8081
8082echo $ac_n "checking for sysctl""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008083echo "configure:8084: checking for sysctl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008084cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008085#line 8086 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008086#include "confdefs.h"
8087#include <sys/types.h>
8088#include <sys/sysctl.h>
8089int main() {
8090 int mib[2], r;
8091 size_t len;
8092
8093 mib[0] = CTL_HW;
8094 mib[1] = HW_USERMEM;
8095 len = sizeof(r);
8096 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
8097
8098; return 0; }
8099EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008100if { (eval echo configure:8101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008101 rm -rf conftest*
8102 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8103#define HAVE_SYSCTL 1
8104EOF
8105
8106else
8107 echo "configure: failed program was:" >&5
8108 cat conftest.$ac_ext >&5
8109 rm -rf conftest*
8110 echo "$ac_t""not usable" 1>&6
8111fi
8112rm -f conftest*
8113
8114echo $ac_n "checking for sysinfo""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008115echo "configure:8116: checking for sysinfo" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008116cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008117#line 8118 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008118#include "confdefs.h"
8119#include <sys/types.h>
8120#include <sys/sysinfo.h>
8121int main() {
8122 struct sysinfo sinfo;
8123 int t;
8124
8125 (void)sysinfo(&sinfo);
8126 t = sinfo.totalram;
8127
8128; return 0; }
8129EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008130if { (eval echo configure:8131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008131 rm -rf conftest*
8132 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8133#define HAVE_SYSINFO 1
8134EOF
8135
8136else
8137 echo "configure: failed program was:" >&5
8138 cat conftest.$ac_ext >&5
8139 rm -rf conftest*
8140 echo "$ac_t""not usable" 1>&6
8141fi
8142rm -f conftest*
8143
8144echo $ac_n "checking for sysconf""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008145echo "configure:8146: checking for sysconf" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008146cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008147#line 8148 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008148#include "confdefs.h"
8149#include <unistd.h>
8150int main() {
8151 (void)sysconf(_SC_PAGESIZE);
8152 (void)sysconf(_SC_PHYS_PAGES);
8153
8154; return 0; }
8155EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008156if { (eval echo configure:8157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008157 rm -rf conftest*
8158 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8159#define HAVE_SYSCONF 1
8160EOF
8161
8162else
8163 echo "configure: failed program was:" >&5
8164 cat conftest.$ac_ext >&5
8165 rm -rf conftest*
8166 echo "$ac_t""not usable" 1>&6
8167fi
8168rm -f conftest*
8169
8170
8171echo $ac_n "checking size of int""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008172echo "configure:8173: checking size of int" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008173if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
8174 echo $ac_n "(cached) $ac_c" 1>&6
8175else
8176 if test "$cross_compiling" = yes; then
8177 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8178else
8179 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008180#line 8181 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008181#include "confdefs.h"
8182#include <stdio.h>
8183 main()
8184 {
8185 FILE *f=fopen("conftestval", "w");
8186 if (!f) exit(1);
8187 fprintf(f, "%d\n", (int)sizeof(int));
8188 exit(0);
8189 }
8190EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008191if { (eval echo configure:8192: \"$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 +00008192then
8193 ac_cv_sizeof_int=`cat conftestval`
8194else
8195 echo "configure: failed program was:" >&5
8196 cat conftest.$ac_ext >&5
8197 rm -fr conftest*
8198 ac_cv_sizeof_int=0
8199fi
8200rm -fr conftest*
8201fi
8202
8203fi
8204
8205echo "$ac_t""$ac_cv_sizeof_int" 1>&6
8206cat >> confdefs.h <<EOF
8207#define SIZEOF_INT $ac_cv_sizeof_int
8208EOF
8209
8210
8211echo $ac_n "checking whether memmove/bcopy/memcpy handle overlaps""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008212echo "configure:8213: checking whether memmove/bcopy/memcpy handle overlaps" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008213bcopy_test_prog='
8214main() {
8215 char buf[10];
8216 strcpy(buf, "abcdefghi");
8217 mch_memmove(buf, buf + 2, 3);
8218 if (strncmp(buf, "ababcf", 6))
8219 exit(1);
8220 strcpy(buf, "abcdefghi");
8221 mch_memmove(buf + 2, buf, 3);
8222 if (strncmp(buf, "cdedef", 6))
8223 exit(1);
8224 exit(0); /* libc version works properly. */
8225}'
8226
8227
8228if test "$cross_compiling" = yes; then
8229 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8230else
8231 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008232#line 8233 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008233#include "confdefs.h"
8234#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
8235EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008236if { (eval echo configure:8237: \"$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 +00008237then
8238 cat >> confdefs.h <<\EOF
8239#define USEMEMMOVE 1
8240EOF
8241 echo "$ac_t""memmove does" 1>&6
8242else
8243 echo "configure: failed program was:" >&5
8244 cat conftest.$ac_ext >&5
8245 rm -fr conftest*
8246 if test "$cross_compiling" = yes; then
8247 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8248else
8249 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008250#line 8251 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008251#include "confdefs.h"
8252#define mch_memmove(s,d,l) bcopy(d,s,l) $bcopy_test_prog
8253EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008254if { (eval echo configure:8255: \"$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 +00008255then
8256 cat >> confdefs.h <<\EOF
8257#define USEBCOPY 1
8258EOF
8259 echo "$ac_t""bcopy does" 1>&6
8260else
8261 echo "configure: failed program was:" >&5
8262 cat conftest.$ac_ext >&5
8263 rm -fr conftest*
8264 if test "$cross_compiling" = yes; then
8265 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8266else
8267 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008268#line 8269 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008269#include "confdefs.h"
8270#define mch_memmove(s,d,l) memcpy(d,s,l) $bcopy_test_prog
8271EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008272if { (eval echo configure:8273: \"$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 +00008273then
8274 cat >> confdefs.h <<\EOF
8275#define USEMEMCPY 1
8276EOF
8277 echo "$ac_t""memcpy does" 1>&6
8278else
8279 echo "configure: failed program was:" >&5
8280 cat conftest.$ac_ext >&5
8281 rm -fr conftest*
8282 echo "$ac_t""no" 1>&6
8283fi
8284rm -fr conftest*
8285fi
8286
8287fi
8288rm -fr conftest*
8289fi
8290
8291fi
8292rm -fr conftest*
8293fi
8294
8295
8296
8297if test "$enable_multibyte" = "yes"; then
8298 cflags_save=$CFLAGS
8299 ldflags_save=$LDFLAGS
8300 if test -n "$x_includes" ; then
8301 CFLAGS="$CFLAGS -I$x_includes"
8302 LDFLAGS="$X_LIBS $LDFLAGS -lX11"
8303 echo $ac_n "checking whether X_LOCALE needed""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008304echo "configure:8305: checking whether X_LOCALE needed" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008305 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008306#line 8307 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008307#include "confdefs.h"
8308#include <X11/Xlocale.h>
8309int main() {
8310
8311; return 0; }
8312EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008313if { (eval echo configure:8314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008314 rm -rf conftest*
8315 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008316#line 8317 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008317#include "confdefs.h"
8318/* Override any gcc2 internal prototype to avoid an error. */
8319/* We use char because int might match the return type of a gcc2
8320 builtin and then its argument prototype would still apply. */
8321char _Xsetlocale();
8322
8323int main() {
8324_Xsetlocale()
8325; return 0; }
8326EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008327if { (eval echo configure:8328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008328 rm -rf conftest*
8329 echo "$ac_t""yes" 1>&6
8330 cat >> confdefs.h <<\EOF
8331#define X_LOCALE 1
8332EOF
8333
8334else
8335 echo "configure: failed program was:" >&5
8336 cat conftest.$ac_ext >&5
8337 rm -rf conftest*
8338 echo "$ac_t""no" 1>&6
8339fi
8340rm -f conftest*
8341else
8342 echo "configure: failed program was:" >&5
8343 cat conftest.$ac_ext >&5
8344 rm -rf conftest*
8345 echo "$ac_t""no" 1>&6
8346fi
8347rm -f conftest*
8348 fi
8349 CFLAGS=$cflags_save
8350 LDFLAGS=$ldflags_save
8351fi
8352
8353echo $ac_n "checking for _xpg4_setrunelocale in -lxpg4""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008354echo "configure:8355: checking for _xpg4_setrunelocale in -lxpg4" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008355ac_lib_var=`echo xpg4'_'_xpg4_setrunelocale | sed 'y%./+-%__p_%'`
8356if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8357 echo $ac_n "(cached) $ac_c" 1>&6
8358else
8359 ac_save_LIBS="$LIBS"
8360LIBS="-lxpg4 $LIBS"
8361cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008362#line 8363 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008363#include "confdefs.h"
8364/* Override any gcc2 internal prototype to avoid an error. */
8365/* We use char because int might match the return type of a gcc2
8366 builtin and then its argument prototype would still apply. */
8367char _xpg4_setrunelocale();
8368
8369int main() {
8370_xpg4_setrunelocale()
8371; return 0; }
8372EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008373if { (eval echo configure:8374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008374 rm -rf conftest*
8375 eval "ac_cv_lib_$ac_lib_var=yes"
8376else
8377 echo "configure: failed program was:" >&5
8378 cat conftest.$ac_ext >&5
8379 rm -rf conftest*
8380 eval "ac_cv_lib_$ac_lib_var=no"
8381fi
8382rm -f conftest*
8383LIBS="$ac_save_LIBS"
8384
8385fi
8386if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8387 echo "$ac_t""yes" 1>&6
8388 LIBS="$LIBS -lxpg4"
8389else
8390 echo "$ac_t""no" 1>&6
8391fi
8392
8393
8394echo $ac_n "checking how to create tags""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008395echo "configure:8396: checking how to create tags" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008396test -f tags && mv tags tags.save
8397if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
8398 TAGPRG="ctags"
8399else
8400 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
8401 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
8402 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
8403 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
8404 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
8405 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
8406 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
8407fi
8408test -f tags.save && mv tags.save tags
8409echo "$ac_t""$TAGPRG" 1>&6
8410
8411echo $ac_n "checking how to run man with a section nr""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008412echo "configure:8413: checking how to run man with a section nr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008413MANDEF="man"
8414(eval man -s 2 read) < /dev/null > /dev/null 2>&5 && MANDEF="man -s"
8415echo "$ac_t""$MANDEF" 1>&6
8416if test "$MANDEF" = "man -s"; then
8417 cat >> confdefs.h <<\EOF
8418#define USEMAN_S 1
8419EOF
8420
8421fi
8422
8423echo $ac_n "checking --disable-nls argument""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008424echo "configure:8425: checking --disable-nls argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008425# Check whether --enable-nls or --disable-nls was given.
8426if test "${enable_nls+set}" = set; then
8427 enableval="$enable_nls"
8428 :
8429else
8430 enable_nls="yes"
8431fi
8432
8433
8434if test "$enable_nls" = "yes"; then
8435 echo "$ac_t""no" 1>&6
8436 # Extract the first word of "msgfmt", so it can be a program name with args.
8437set dummy msgfmt; ac_word=$2
8438echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008439echo "configure:8440: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008440if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
8441 echo $ac_n "(cached) $ac_c" 1>&6
8442else
8443 if test -n "$MSGFMT"; then
8444 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
8445else
8446 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8447 ac_dummy="$PATH"
8448 for ac_dir in $ac_dummy; do
8449 test -z "$ac_dir" && ac_dir=.
8450 if test -f $ac_dir/$ac_word; then
8451 ac_cv_prog_MSGFMT="msgfmt"
8452 break
8453 fi
8454 done
8455 IFS="$ac_save_ifs"
8456fi
8457fi
8458MSGFMT="$ac_cv_prog_MSGFMT"
8459if test -n "$MSGFMT"; then
8460 echo "$ac_t""$MSGFMT" 1>&6
8461else
8462 echo "$ac_t""no" 1>&6
8463fi
8464
8465 echo $ac_n "checking for NLS""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008466echo "configure:8467: checking for NLS" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008467 if test -f po/Makefile; then
8468 have_gettext="no"
8469 if test -n "$MSGFMT"; then
8470 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008471#line 8472 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008472#include "confdefs.h"
8473#include <libintl.h>
8474int main() {
8475gettext("Test");
8476; return 0; }
8477EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008478if { (eval echo configure:8479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008479 rm -rf conftest*
8480 echo "$ac_t""gettext() works" 1>&6; have_gettext="yes"
8481else
8482 echo "configure: failed program was:" >&5
8483 cat conftest.$ac_ext >&5
8484 rm -rf conftest*
8485 olibs=$LIBS
8486 LIBS="$LIBS -lintl"
8487 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008488#line 8489 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008489#include "confdefs.h"
8490#include <libintl.h>
8491int main() {
8492gettext("Test");
8493; return 0; }
8494EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008495if { (eval echo configure:8496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008496 rm -rf conftest*
8497 echo "$ac_t""gettext() works with -lintl" 1>&6; have_gettext="yes"
8498else
8499 echo "configure: failed program was:" >&5
8500 cat conftest.$ac_ext >&5
8501 rm -rf conftest*
8502 echo "$ac_t""gettext() doesn't work" 1>&6;
8503 LIBS=$olibs
8504fi
8505rm -f conftest*
8506fi
8507rm -f conftest*
8508 else
8509 echo "$ac_t""msgfmt not found - disabled" 1>&6;
8510 fi
8511 if test $have_gettext = "yes"; then
8512 cat >> confdefs.h <<\EOF
8513#define HAVE_GETTEXT 1
8514EOF
8515
8516 MAKEMO=yes
8517
8518 for ac_func in bind_textdomain_codeset
8519do
8520echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008521echo "configure:8522: checking for $ac_func" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008522if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8523 echo $ac_n "(cached) $ac_c" 1>&6
8524else
8525 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008526#line 8527 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008527#include "confdefs.h"
8528/* System header to define __stub macros and hopefully few prototypes,
8529 which can conflict with char $ac_func(); below. */
8530#include <assert.h>
8531/* Override any gcc2 internal prototype to avoid an error. */
8532/* We use char because int might match the return type of a gcc2
8533 builtin and then its argument prototype would still apply. */
8534char $ac_func();
8535
8536int main() {
8537
8538/* The GNU C library defines this for functions which it implements
8539 to always fail with ENOSYS. Some functions are actually named
8540 something starting with __ and the normal name is an alias. */
8541#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8542choke me
8543#else
8544$ac_func();
8545#endif
8546
8547; return 0; }
8548EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008549if { (eval echo configure:8550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008550 rm -rf conftest*
8551 eval "ac_cv_func_$ac_func=yes"
8552else
8553 echo "configure: failed program was:" >&5
8554 cat conftest.$ac_ext >&5
8555 rm -rf conftest*
8556 eval "ac_cv_func_$ac_func=no"
8557fi
8558rm -f conftest*
8559fi
8560
8561if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8562 echo "$ac_t""yes" 1>&6
8563 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8564 cat >> confdefs.h <<EOF
8565#define $ac_tr_func 1
8566EOF
8567
8568else
8569 echo "$ac_t""no" 1>&6
8570fi
8571done
8572
8573 echo $ac_n "checking for _nl_msg_cat_cntr""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008574echo "configure:8575: checking for _nl_msg_cat_cntr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008575 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008576#line 8577 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008577#include "confdefs.h"
8578#include <libintl.h>
8579 extern int _nl_msg_cat_cntr;
8580int main() {
8581++_nl_msg_cat_cntr;
8582; return 0; }
8583EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008584if { (eval echo configure:8585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008585 rm -rf conftest*
8586 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8587#define HAVE_NL_MSG_CAT_CNTR 1
8588EOF
8589
8590else
8591 echo "configure: failed program was:" >&5
8592 cat conftest.$ac_ext >&5
8593 rm -rf conftest*
8594 echo "$ac_t""no" 1>&6
8595fi
8596rm -f conftest*
8597 fi
8598 else
8599 echo "$ac_t""no "po/Makefile" - disabled" 1>&6;
8600 fi
8601else
8602 echo "$ac_t""yes" 1>&6
8603fi
8604
8605ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
8606echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008607echo "configure:8608: checking for dlfcn.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008608if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8609 echo $ac_n "(cached) $ac_c" 1>&6
8610else
8611 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008612#line 8613 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008613#include "confdefs.h"
8614#include <dlfcn.h>
8615EOF
8616ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008617{ (eval echo configure:8618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008618ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8619if test -z "$ac_err"; then
8620 rm -rf conftest*
8621 eval "ac_cv_header_$ac_safe=yes"
8622else
8623 echo "$ac_err" >&5
8624 echo "configure: failed program was:" >&5
8625 cat conftest.$ac_ext >&5
8626 rm -rf conftest*
8627 eval "ac_cv_header_$ac_safe=no"
8628fi
8629rm -f conftest*
8630fi
8631if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8632 echo "$ac_t""yes" 1>&6
8633 DLL=dlfcn.h
8634else
8635 echo "$ac_t""no" 1>&6
8636ac_safe=`echo "dl.h" | sed 'y%./+-%__p_%'`
8637echo $ac_n "checking for dl.h""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008638echo "configure:8639: checking for dl.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008639if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8640 echo $ac_n "(cached) $ac_c" 1>&6
8641else
8642 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008643#line 8644 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008644#include "confdefs.h"
8645#include <dl.h>
8646EOF
8647ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008648{ (eval echo configure:8649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008649ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8650if test -z "$ac_err"; then
8651 rm -rf conftest*
8652 eval "ac_cv_header_$ac_safe=yes"
8653else
8654 echo "$ac_err" >&5
8655 echo "configure: failed program was:" >&5
8656 cat conftest.$ac_ext >&5
8657 rm -rf conftest*
8658 eval "ac_cv_header_$ac_safe=no"
8659fi
8660rm -f conftest*
8661fi
8662if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8663 echo "$ac_t""yes" 1>&6
8664 DLL=dl.h
8665else
8666 echo "$ac_t""no" 1>&6
8667fi
8668
8669fi
8670
8671if test x${DLL} = xdlfcn.h; then
8672 cat >> confdefs.h <<\EOF
8673#define HAVE_DLFCN_H 1
8674EOF
8675
8676 echo $ac_n "checking for dlopen()""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008677echo "configure:8678: checking for dlopen()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008678 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008679#line 8680 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008680#include "confdefs.h"
8681
8682int main() {
8683
8684 extern void* dlopen();
8685 dlopen();
8686
8687; return 0; }
8688EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008689if { (eval echo configure:8690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008690 rm -rf conftest*
8691 echo "$ac_t""yes" 1>&6;
8692 cat >> confdefs.h <<\EOF
8693#define HAVE_DLOPEN 1
8694EOF
8695
8696else
8697 echo "configure: failed program was:" >&5
8698 cat conftest.$ac_ext >&5
8699 rm -rf conftest*
8700 echo "$ac_t""no" 1>&6;
8701 echo $ac_n "checking for dlopen() in -ldl""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008702echo "configure:8703: checking for dlopen() in -ldl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008703 olibs=$LIBS
8704 LIBS="$LIBS -ldl"
8705 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008706#line 8707 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008707#include "confdefs.h"
8708
8709int main() {
8710
8711 extern void* dlopen();
8712 dlopen();
8713
8714; return 0; }
8715EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008716if { (eval echo configure:8717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008717 rm -rf conftest*
8718 echo "$ac_t""yes" 1>&6;
8719 cat >> confdefs.h <<\EOF
8720#define HAVE_DLOPEN 1
8721EOF
8722
8723else
8724 echo "configure: failed program was:" >&5
8725 cat conftest.$ac_ext >&5
8726 rm -rf conftest*
8727 echo "$ac_t""no" 1>&6;
8728 LIBS=$olibs
8729fi
8730rm -f conftest*
8731fi
8732rm -f conftest*
8733 echo $ac_n "checking for dlsym()""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008734echo "configure:8735: checking for dlsym()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008735 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008736#line 8737 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008737#include "confdefs.h"
8738
8739int main() {
8740
8741 extern void* dlsym();
8742 dlsym();
8743
8744; return 0; }
8745EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008746if { (eval echo configure:8747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008747 rm -rf conftest*
8748 echo "$ac_t""yes" 1>&6;
8749 cat >> confdefs.h <<\EOF
8750#define HAVE_DLSYM 1
8751EOF
8752
8753else
8754 echo "configure: failed program was:" >&5
8755 cat conftest.$ac_ext >&5
8756 rm -rf conftest*
8757 echo "$ac_t""no" 1>&6;
8758 echo $ac_n "checking for dlsym() in -ldl""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008759echo "configure:8760: checking for dlsym() in -ldl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008760 olibs=$LIBS
8761 LIBS="$LIBS -ldl"
8762 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008763#line 8764 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008764#include "confdefs.h"
8765
8766int main() {
8767
8768 extern void* dlsym();
8769 dlsym();
8770
8771; return 0; }
8772EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008773if { (eval echo configure:8774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008774 rm -rf conftest*
8775 echo "$ac_t""yes" 1>&6;
8776 cat >> confdefs.h <<\EOF
8777#define HAVE_DLSYM 1
8778EOF
8779
8780else
8781 echo "configure: failed program was:" >&5
8782 cat conftest.$ac_ext >&5
8783 rm -rf conftest*
8784 echo "$ac_t""no" 1>&6;
8785 LIBS=$olibs
8786fi
8787rm -f conftest*
8788fi
8789rm -f conftest*
8790elif test x${DLL} = xdl.h; then
8791 cat >> confdefs.h <<\EOF
8792#define HAVE_DL_H 1
8793EOF
8794
8795 echo $ac_n "checking for shl_load()""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008796echo "configure:8797: checking for shl_load()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008797 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008798#line 8799 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008799#include "confdefs.h"
8800
8801int main() {
8802
8803 extern void* shl_load();
8804 shl_load();
8805
8806; return 0; }
8807EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008808if { (eval echo configure:8809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008809 rm -rf conftest*
8810 echo "$ac_t""yes" 1>&6;
8811 cat >> confdefs.h <<\EOF
8812#define HAVE_SHL_LOAD 1
8813EOF
8814
8815else
8816 echo "configure: failed program was:" >&5
8817 cat conftest.$ac_ext >&5
8818 rm -rf conftest*
8819 echo "$ac_t""no" 1>&6;
8820 echo $ac_n "checking for shl_load() in -ldld""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008821echo "configure:8822: checking for shl_load() in -ldld" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008822 olibs=$LIBS
8823 LIBS="$LIBS -ldld"
8824 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008825#line 8826 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008826#include "confdefs.h"
8827
8828int main() {
8829
8830 extern void* shl_load();
8831 shl_load();
8832
8833; return 0; }
8834EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008835if { (eval echo configure:8836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008836 rm -rf conftest*
8837 echo "$ac_t""yes" 1>&6;
8838 cat >> confdefs.h <<\EOF
8839#define HAVE_SHL_LOAD 1
8840EOF
8841
8842else
8843 echo "configure: failed program was:" >&5
8844 cat conftest.$ac_ext >&5
8845 rm -rf conftest*
8846 echo "$ac_t""no" 1>&6;
8847 LIBS=$olibs
8848fi
8849rm -f conftest*
8850fi
8851rm -f conftest*
8852fi
8853for ac_hdr in setjmp.h
8854do
8855ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8856echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008857echo "configure:8858: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008858if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8859 echo $ac_n "(cached) $ac_c" 1>&6
8860else
8861 cat > conftest.$ac_ext <<EOF
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008862#line 8863 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008863#include "confdefs.h"
8864#include <$ac_hdr>
8865EOF
8866ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008867{ (eval echo configure:8868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008868ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8869if test -z "$ac_err"; then
8870 rm -rf conftest*
8871 eval "ac_cv_header_$ac_safe=yes"
8872else
8873 echo "$ac_err" >&5
8874 echo "configure: failed program was:" >&5
8875 cat conftest.$ac_ext >&5
8876 rm -rf conftest*
8877 eval "ac_cv_header_$ac_safe=no"
8878fi
8879rm -f conftest*
8880fi
8881if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8882 echo "$ac_t""yes" 1>&6
8883 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8884 cat >> confdefs.h <<EOF
8885#define $ac_tr_hdr 1
8886EOF
8887
8888else
8889 echo "$ac_t""no" 1>&6
8890fi
8891done
8892
8893
8894if test "x$MACOSX" = "xyes" -a -n "$PERL"; then
8895 if echo $LIBS | grep -e '-ldl' >/dev/null; then
8896 LIBS=`echo $LIBS | sed s/-ldl//`
8897 PERL_LIBS="$PERL_LIBS -ldl"
8898 fi
8899fi
8900
8901if test "x$MACOSX" = "xyes" && test "x$CARBON" = "xyes" \
8902 && test "x$GUITYPE" != "xCARBONGUI"; then
8903 echo $ac_n "checking whether we need -framework Carbon""... $ac_c" 1>&6
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00008904echo "configure:8905: checking whether we need -framework Carbon" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008905 if test "x$enable_multibyte" = "xyes" || test "x$features" == "xbig" \
8906 || test "x$features" = "xhuge"; then
8907 LIBS="$LIBS -framework Carbon"
8908 echo "$ac_t""yes" 1>&6
8909 else
8910 echo "$ac_t""no" 1>&6
8911 fi
8912fi
8913
8914
8915trap '' 1 2 15
8916cat > confcache <<\EOF
8917# This file is a shell script that caches the results of configure
8918# tests run on this system so they can be shared between configure
8919# scripts and configure runs. It is not useful on other systems.
8920# If it contains results you don't want to keep, you may remove or edit it.
8921#
8922# By default, configure uses ./config.cache as the cache file,
8923# creating it if it does not exist already. You can give configure
8924# the --cache-file=FILE option to use a different cache file; that is
8925# what configure does when it calls configure scripts in
8926# subdirectories, so they share the cache.
8927# Giving --cache-file=/dev/null disables caching, for debugging configure.
8928# config.status only pays attention to the cache file if you give it the
8929# --recheck option to rerun configure.
8930#
8931EOF
8932# The following way of writing the cache mishandles newlines in values,
8933# but we know of no workaround that is simple, portable, and efficient.
8934# So, don't put newlines in cache variables' values.
8935# Ultrix sh set writes to stderr and can't be redirected directly,
8936# and sets the high bit in the cache file unless we assign to the vars.
8937(set) 2>&1 |
8938 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8939 *ac_space=\ *)
8940 # `set' does not quote correctly, so add quotes (double-quote substitution
8941 # turns \\\\ into \\, and sed turns \\ into \).
8942 sed -n \
8943 -e "s/'/'\\\\''/g" \
8944 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8945 ;;
8946 *)
8947 # `set' quotes correctly as required by POSIX, so do not add quotes.
8948 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8949 ;;
8950 esac >> confcache
8951if cmp -s $cache_file confcache; then
8952 :
8953else
8954 if test -w $cache_file; then
8955 echo "updating cache $cache_file"
8956 cat confcache > $cache_file
8957 else
8958 echo "not updating unwritable cache $cache_file"
8959 fi
8960fi
8961rm -f confcache
8962
8963trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8964
8965test "x$prefix" = xNONE && prefix=$ac_default_prefix
8966# Let make expand exec_prefix.
8967test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8968
8969# Any assignment to VPATH causes Sun make to only execute
8970# the first set of double-colon rules, so remove it if not needed.
8971# If there is a colon in the path, we need to keep it.
8972if test "x$srcdir" = x.; then
8973 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8974fi
8975
8976trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8977
8978DEFS=-DHAVE_CONFIG_H
8979
8980# Without the "./", some shells look in PATH for config.status.
8981: ${CONFIG_STATUS=./config.status}
8982
8983echo creating $CONFIG_STATUS
8984rm -f $CONFIG_STATUS
8985cat > $CONFIG_STATUS <<EOF
8986#! /bin/sh
8987# Generated automatically by configure.
8988# Run this file to recreate the current configuration.
8989# This directory was configured as follows,
8990# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8991#
8992# $0 $ac_configure_args
8993#
8994# Compiler output produced by configure, useful for debugging
8995# configure, is in auto/config.log if it exists.
8996
8997ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8998for ac_option
8999do
9000 case "\$ac_option" in
9001 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9002 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9003 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9004 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9005 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9006 exit 0 ;;
9007 -help | --help | --hel | --he | --h)
9008 echo "\$ac_cs_usage"; exit 0 ;;
9009 *) echo "\$ac_cs_usage"; exit 1 ;;
9010 esac
9011done
9012
9013ac_given_srcdir=$srcdir
9014
9015trap 'rm -fr `echo "auto/config.mk:config.mk.in auto/config.h:config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9016EOF
9017cat >> $CONFIG_STATUS <<EOF
9018
9019# Protect against being on the right side of a sed subst in config.status.
9020sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9021 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9022$ac_vpsub
9023$extrasub
9024s%@SHELL@%$SHELL%g
9025s%@CFLAGS@%$CFLAGS%g
9026s%@CPPFLAGS@%$CPPFLAGS%g
9027s%@CXXFLAGS@%$CXXFLAGS%g
9028s%@FFLAGS@%$FFLAGS%g
9029s%@DEFS@%$DEFS%g
9030s%@LDFLAGS@%$LDFLAGS%g
9031s%@LIBS@%$LIBS%g
9032s%@exec_prefix@%$exec_prefix%g
9033s%@prefix@%$prefix%g
9034s%@program_transform_name@%$program_transform_name%g
9035s%@bindir@%$bindir%g
9036s%@sbindir@%$sbindir%g
9037s%@libexecdir@%$libexecdir%g
9038s%@datadir@%$datadir%g
9039s%@sysconfdir@%$sysconfdir%g
9040s%@sharedstatedir@%$sharedstatedir%g
9041s%@localstatedir@%$localstatedir%g
9042s%@libdir@%$libdir%g
9043s%@includedir@%$includedir%g
9044s%@oldincludedir@%$oldincludedir%g
9045s%@infodir@%$infodir%g
9046s%@mandir@%$mandir%g
9047s%@SET_MAKE@%$SET_MAKE%g
9048s%@CC@%$CC%g
9049s%@CPP@%$CPP%g
9050s%@AWK@%$AWK%g
9051s%@STRIP@%$STRIP%g
9052s%@EXEEXT@%$EXEEXT%g
9053s%@CPP_MM@%$CPP_MM%g
9054s%@OS_EXTRA_SRC@%$OS_EXTRA_SRC%g
9055s%@OS_EXTRA_OBJ@%$OS_EXTRA_OBJ%g
9056s%@VIMNAME@%$VIMNAME%g
9057s%@EXNAME@%$EXNAME%g
9058s%@VIEWNAME@%$VIEWNAME%g
9059s%@line_break@%$line_break%g
9060s%@dovimdiff@%$dovimdiff%g
9061s%@dogvimdiff@%$dogvimdiff%g
9062s%@compiledby@%$compiledby%g
Bram Moolenaar325b7a22004-07-05 15:58:32 +00009063s%@vi_cv_path_mzscheme@%$vi_cv_path_mzscheme%g
9064s%@MZSCHEME_SRC@%$MZSCHEME_SRC%g
9065s%@MZSCHEME_OBJ@%$MZSCHEME_OBJ%g
9066s%@MZSCHEME_PRO@%$MZSCHEME_PRO%g
9067s%@MZSCHEME_LIBS@%$MZSCHEME_LIBS%g
9068s%@MZSCHEME_CFLAGS@%$MZSCHEME_CFLAGS%g
Bram Moolenaar071d4272004-06-13 20:20:40 +00009069s%@vi_cv_path_perl@%$vi_cv_path_perl%g
9070s%@vi_cv_perllib@%$vi_cv_perllib%g
9071s%@shrpenv@%$shrpenv%g
9072s%@PERL_SRC@%$PERL_SRC%g
9073s%@PERL_OBJ@%$PERL_OBJ%g
9074s%@PERL_PRO@%$PERL_PRO%g
9075s%@PERL_CFLAGS@%$PERL_CFLAGS%g
9076s%@PERL_LIBS@%$PERL_LIBS%g
9077s%@vi_cv_path_python@%$vi_cv_path_python%g
9078s%@PYTHON_CONFDIR@%$PYTHON_CONFDIR%g
9079s%@PYTHON_LIBS@%$PYTHON_LIBS%g
9080s%@PYTHON_GETPATH_CFLAGS@%$PYTHON_GETPATH_CFLAGS%g
9081s%@PYTHON_CFLAGS@%$PYTHON_CFLAGS%g
9082s%@PYTHON_SRC@%$PYTHON_SRC%g
9083s%@PYTHON_OBJ@%$PYTHON_OBJ%g
9084s%@vi_cv_path_tcl@%$vi_cv_path_tcl%g
9085s%@TCL_SRC@%$TCL_SRC%g
9086s%@TCL_OBJ@%$TCL_OBJ%g
9087s%@TCL_PRO@%$TCL_PRO%g
9088s%@TCL_CFLAGS@%$TCL_CFLAGS%g
9089s%@TCL_LIBS@%$TCL_LIBS%g
9090s%@vi_cv_path_ruby@%$vi_cv_path_ruby%g
9091s%@RUBY_SRC@%$RUBY_SRC%g
9092s%@RUBY_OBJ@%$RUBY_OBJ%g
9093s%@RUBY_PRO@%$RUBY_PRO%g
9094s%@RUBY_CFLAGS@%$RUBY_CFLAGS%g
9095s%@RUBY_LIBS@%$RUBY_LIBS%g
9096s%@WORKSHOP_SRC@%$WORKSHOP_SRC%g
9097s%@WORKSHOP_OBJ@%$WORKSHOP_OBJ%g
9098s%@NETBEANS_SRC@%$NETBEANS_SRC%g
9099s%@NETBEANS_OBJ@%$NETBEANS_OBJ%g
9100s%@SNIFF_SRC@%$SNIFF_SRC%g
9101s%@SNIFF_OBJ@%$SNIFF_OBJ%g
9102s%@xmkmfpath@%$xmkmfpath%g
9103s%@X_CFLAGS@%$X_CFLAGS%g
9104s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9105s%@X_LIBS@%$X_LIBS%g
9106s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9107s%@X_LIB@%$X_LIB%g
Bram Moolenaar843ee412004-06-30 16:16:41 +00009108s%@MOC@%$MOC%g
9109s%@KDE_CONFIG@%$KDE_CONFIG%g
9110s%@KDE_LIBS@%$KDE_LIBS%g
9111s%@KDE_INCLUDES@%$KDE_INCLUDES%g
9112s%@KDE_PREFIX@%$KDE_PREFIX%g
9113s%@QT_LIBS@%$QT_LIBS%g
9114s%@QT_INCLUDES@%$QT_INCLUDES%g
9115s%@ROOTQT@%$ROOTQT%g
Bram Moolenaar071d4272004-06-13 20:20:40 +00009116s%@GTK_CONFIG@%$GTK_CONFIG%g
9117s%@GTK12_CONFIG@%$GTK12_CONFIG%g
9118s%@PKG_CONFIG@%$PKG_CONFIG%g
9119s%@GTK_CFLAGS@%$GTK_CFLAGS%g
9120s%@GTK_LIBS@%$GTK_LIBS%g
9121s%@GTK_LIBNAME@%$GTK_LIBNAME%g
9122s%@GNOME_LIBS@%$GNOME_LIBS%g
9123s%@GNOME_LIBDIR@%$GNOME_LIBDIR%g
9124s%@GNOME_INCLUDEDIR@%$GNOME_INCLUDEDIR%g
9125s%@GNOME_CONFIG@%$GNOME_CONFIG%g
9126s%@MOTIF_LIBNAME@%$MOTIF_LIBNAME%g
9127s%@NARROW_PROTO@%$NARROW_PROTO%g
9128s%@GUI_INC_LOC@%$GUI_INC_LOC%g
9129s%@GUI_LIB_LOC@%$GUI_LIB_LOC%g
9130s%@GUITYPE@%$GUITYPE%g
9131s%@GUI_X_LIBS@%$GUI_X_LIBS%g
9132s%@HANGULIN_SRC@%$HANGULIN_SRC%g
9133s%@HANGULIN_OBJ@%$HANGULIN_OBJ%g
9134s%@TAGPRG@%$TAGPRG%g
9135s%@MSGFMT@%$MSGFMT%g
9136s%@MAKEMO@%$MAKEMO%g
9137
9138CEOF
9139EOF
9140
9141cat >> $CONFIG_STATUS <<\EOF
9142
9143# Split the substitutions into bite-sized pieces for seds with
9144# small command number limits, like on Digital OSF/1 and HP-UX.
9145ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9146ac_file=1 # Number of current file.
9147ac_beg=1 # First line for current file.
9148ac_end=$ac_max_sed_cmds # Line after last line for current file.
9149ac_more_lines=:
9150ac_sed_cmds=""
9151while $ac_more_lines; do
9152 if test $ac_beg -gt 1; then
9153 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9154 else
9155 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9156 fi
9157 if test ! -s conftest.s$ac_file; then
9158 ac_more_lines=false
9159 rm -f conftest.s$ac_file
9160 else
9161 if test -z "$ac_sed_cmds"; then
9162 ac_sed_cmds="sed -f conftest.s$ac_file"
9163 else
9164 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9165 fi
9166 ac_file=`expr $ac_file + 1`
9167 ac_beg=$ac_end
9168 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9169 fi
9170done
9171if test -z "$ac_sed_cmds"; then
9172 ac_sed_cmds=cat
9173fi
9174EOF
9175
9176cat >> $CONFIG_STATUS <<EOF
9177
9178CONFIG_FILES=\${CONFIG_FILES-"auto/config.mk:config.mk.in"}
9179EOF
9180cat >> $CONFIG_STATUS <<\EOF
9181for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9182 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9183 case "$ac_file" in
9184 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9185 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9186 *) ac_file_in="${ac_file}.in" ;;
9187 esac
9188
9189 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9190
9191 # Remove last slash and all that follows it. Not all systems have dirname.
9192 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9193 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9194 # The file is in a subdirectory.
9195 test ! -d "$ac_dir" && mkdir "$ac_dir"
9196 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9197 # A "../" for each directory in $ac_dir_suffix.
9198 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9199 else
9200 ac_dir_suffix= ac_dots=
9201 fi
9202
9203 case "$ac_given_srcdir" in
9204 .) srcdir=.
9205 if test -z "$ac_dots"; then top_srcdir=.
9206 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9207 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9208 *) # Relative path.
9209 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9210 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9211 esac
9212
9213
9214 echo creating "$ac_file"
9215 rm -f "$ac_file"
9216 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9217 case "$ac_file" in
9218 *Makefile*) ac_comsub="1i\\
9219# $configure_input" ;;
9220 *) ac_comsub= ;;
9221 esac
9222
9223 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9224 sed -e "$ac_comsub
9225s%@configure_input@%$configure_input%g
9226s%@srcdir@%$srcdir%g
9227s%@top_srcdir@%$top_srcdir%g
9228" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9229fi; done
9230rm -f conftest.s*
9231
9232# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9233# NAME is the cpp macro being defined and VALUE is the value it is being given.
9234#
9235# ac_d sets the value in "#define NAME VALUE" lines.
9236ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9237ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9238ac_dC='\3'
9239ac_dD='%g'
9240# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9241ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9242ac_uB='\([ ]\)%\1#\2define\3'
9243ac_uC=' '
9244ac_uD='\4%g'
9245# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9246ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9247ac_eB='$%\1#\2define\3'
9248ac_eC=' '
9249ac_eD='%g'
9250
9251if test "${CONFIG_HEADERS+set}" != set; then
9252EOF
9253cat >> $CONFIG_STATUS <<EOF
9254 CONFIG_HEADERS="auto/config.h:config.h.in"
9255EOF
9256cat >> $CONFIG_STATUS <<\EOF
9257fi
9258for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9259 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9260 case "$ac_file" in
9261 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9262 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9263 *) ac_file_in="${ac_file}.in" ;;
9264 esac
9265
9266 echo creating $ac_file
9267
9268 rm -f conftest.frag conftest.in conftest.out
9269 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9270 cat $ac_file_inputs > conftest.in
9271
9272EOF
9273
9274# Transform confdefs.h into a sed script conftest.vals that substitutes
9275# the proper values into config.h.in to produce config.h. And first:
9276# Protect against being on the right side of a sed subst in config.status.
9277# Protect against being in an unquoted here document in config.status.
9278rm -f conftest.vals
9279cat > conftest.hdr <<\EOF
9280s/[\\&%]/\\&/g
9281s%[\\$`]%\\&%g
9282s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9283s%ac_d%ac_u%gp
9284s%ac_u%ac_e%gp
9285EOF
9286sed -n -f conftest.hdr confdefs.h > conftest.vals
9287rm -f conftest.hdr
9288
9289# This sed command replaces #undef with comments. This is necessary, for
9290# example, in the case of _POSIX_SOURCE, which is predefined and required
9291# on some systems where configure will not decide to define it.
9292cat >> conftest.vals <<\EOF
9293s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9294EOF
9295
9296# Break up conftest.vals because some shells have a limit on
9297# the size of here documents, and old seds have small limits too.
9298
9299rm -f conftest.tail
9300while :
9301do
9302 ac_lines=`grep -c . conftest.vals`
9303 # grep -c gives empty output for an empty file on some AIX systems.
9304 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9305 # Write a limited-size here document to conftest.frag.
9306 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9307 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9308 echo 'CEOF
9309 sed -f conftest.frag conftest.in > conftest.out
9310 rm -f conftest.in
9311 mv conftest.out conftest.in
9312' >> $CONFIG_STATUS
9313 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9314 rm -f conftest.vals
9315 mv conftest.tail conftest.vals
9316done
9317rm -f conftest.vals
9318
9319cat >> $CONFIG_STATUS <<\EOF
9320 rm -f conftest.frag conftest.h
9321 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9322 cat conftest.in >> conftest.h
9323 rm -f conftest.in
9324 if cmp -s $ac_file conftest.h 2>/dev/null; then
9325 echo "$ac_file is unchanged"
9326 rm -f conftest.h
9327 else
9328 # Remove last slash and all that follows it. Not all systems have dirname.
9329 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9330 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9331 # The file is in a subdirectory.
9332 test ! -d "$ac_dir" && mkdir "$ac_dir"
9333 fi
9334 rm -f $ac_file
9335 mv conftest.h $ac_file
9336 fi
9337fi; done
9338
9339EOF
9340cat >> $CONFIG_STATUS <<EOF
9341
9342EOF
9343cat >> $CONFIG_STATUS <<\EOF
9344
9345exit 0
9346EOF
9347chmod +x $CONFIG_STATUS
9348rm -fr confdefs* $ac_clean_files
9349test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9350
9351