blob: ddab04168b0748f5e8837b548997153c47c71412 [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
Bram Moolenaarab79bcb2004-07-18 21:34:53 +00001242 OS_EXTRA_SCR="os_macosx.c os_mac_conv.c";
1243 OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001244 CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -I/Developer/Headers/FlatCarbon -no-cpp-precomp"
1245
Bram Moolenaarab79bcb2004-07-18 21:34:53 +00001246 ac_safe=`echo "Carbon/Carbon.h" | sed 'y%./+-%__p_%'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001247echo $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
Bram Moolenaarab79bcb2004-07-18 21:34:53 +00001280 if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xathena -a "X$enable_gui" != Xgtk -a "X$enable_gui" != Xgtk2; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001281 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"
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001664 elif test "`(uname) 2>/dev/null`" = SunOS &&
1665 uname -r | grep '^5' >/dev/null; then
1666 MZSCHEME_LIBS="$MZSCHEME_LIBS -R ${vi_cv_path_mzscheme_pfx}/lib"
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00001667 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001668 fi
1669 MZSCHEME_CFLAGS="-I${vi_cv_path_mzscheme_pfx}/include \
1670 -DMZSCHEME_COLLECTS='\"${vi_cv_path_mzscheme_pfx}/collects\"'"
1671 MZSCHEME_SRC="if_mzsch.c"
1672 MZSCHEME_OBJ="objects/if_mzsch.o"
1673 MZSCHEME_PRO="if_mzsch.pro"
1674 cat >> confdefs.h <<\EOF
1675#define FEAT_MZSCHEME 1
1676EOF
1677
1678 fi
1679
1680
1681
1682
1683
1684fi
1685
1686
Bram Moolenaar071d4272004-06-13 20:20:40 +00001687echo $ac_n "checking --enable-perlinterp argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001688echo "configure:1689: checking --enable-perlinterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001689# Check whether --enable-perlinterp or --disable-perlinterp was given.
1690if test "${enable_perlinterp+set}" = set; then
1691 enableval="$enable_perlinterp"
1692 :
1693else
1694 enable_perlinterp="no"
1695fi
1696
1697echo "$ac_t""$enable_perlinterp" 1>&6
1698if test "$enable_perlinterp" = "yes"; then
1699
1700 # Extract the first word of "perl", so it can be a program name with args.
1701set dummy perl; ac_word=$2
1702echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001703echo "configure:1704: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001704if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_perl'+set}'`\" = set"; then
1705 echo $ac_n "(cached) $ac_c" 1>&6
1706else
1707 case "$vi_cv_path_perl" in
1708 /*)
1709 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
1710 ;;
1711 ?:/*)
1712 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a dos path.
1713 ;;
1714 *)
1715 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1716 ac_dummy="$PATH"
1717 for ac_dir in $ac_dummy; do
1718 test -z "$ac_dir" && ac_dir=.
1719 if test -f $ac_dir/$ac_word; then
1720 ac_cv_path_vi_cv_path_perl="$ac_dir/$ac_word"
1721 break
1722 fi
1723 done
1724 IFS="$ac_save_ifs"
1725 ;;
1726esac
1727fi
1728vi_cv_path_perl="$ac_cv_path_vi_cv_path_perl"
1729if test -n "$vi_cv_path_perl"; then
1730 echo "$ac_t""$vi_cv_path_perl" 1>&6
1731else
1732 echo "$ac_t""no" 1>&6
1733fi
1734
1735 if test "X$vi_cv_path_perl" != "X"; then
1736 echo $ac_n "checking Perl version""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001737echo "configure:1738: checking Perl version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001738 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
1739 eval `$vi_cv_path_perl -V:usethreads`
1740 if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
1741 badthreads=no
1742 else
1743 if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
1744 eval `$vi_cv_path_perl -V:use5005threads`
1745 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
1746 badthreads=no
1747 else
1748 badthreads=yes
1749 echo "$ac_t"">>> Perl > 5.6 with 5.5 threads cannot be used <<<" 1>&6
1750 fi
1751 else
1752 badthreads=yes
1753 echo "$ac_t"">>> Perl 5.5 with threads cannot be used <<<" 1>&6
1754 fi
1755 fi
1756 if test $badthreads = no; then
1757 echo "$ac_t""OK" 1>&6
1758 eval `$vi_cv_path_perl -V:shrpenv`
1759 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
1760 shrpenv=""
1761 fi
1762 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
1763
1764 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
1765 -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//'`
1766 perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
1767 sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
1768 -e 's/-bE:perl.exp//' -e 's/-lc //'`
1769 perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
1770 -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
1771
1772 echo $ac_n "checking if compile and link flags for Perl are sane""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001773echo "configure:1774: checking if compile and link flags for Perl are sane" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001774 cflags_save=$CFLAGS
1775 libs_save=$LIBS
1776 ldflags_save=$LDFLAGS
1777 CFLAGS="$CFLAGS $perlcppflags"
1778 LIBS="$LIBS $perllibs"
1779 LDFLAGS="$perlldflags $LDFLAGS"
1780 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001781#line 1782 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001782#include "confdefs.h"
1783
1784int main() {
1785
1786; return 0; }
1787EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001788if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001789 rm -rf conftest*
1790 echo "$ac_t""yes" 1>&6; perl_ok=yes
1791else
1792 echo "configure: failed program was:" >&5
1793 cat conftest.$ac_ext >&5
1794 rm -rf conftest*
1795 echo "$ac_t""no: PERL DISABLED" 1>&6; perl_ok=no
1796fi
1797rm -f conftest*
1798 CFLAGS=$cflags_save
1799 LIBS=$libs_save
1800 LDFLAGS=$ldflags_save
1801 if test $perl_ok = yes; then
1802 if test "X$perlcppflags" != "X"; then
1803 PERL_CFLAGS="$perlcppflags"
1804 fi
1805 if test "X$perlldflags" != "X"; then
1806 LDFLAGS="$perlldflags $LDFLAGS"
1807 fi
1808 PERL_LIBS=$perllibs
1809 PERL_SRC="auto/if_perl.c if_perlsfio.c"
1810 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
1811 PERL_PRO="if_perl.pro if_perlsfio.pro"
1812 cat >> confdefs.h <<\EOF
1813#define FEAT_PERL 1
1814EOF
1815
1816 fi
1817 fi
1818 else
1819 echo "$ac_t"">>> too old; need Perl version 5.003_01 or later <<<" 1>&6
1820 fi
1821 fi
1822
1823 if test "x$MACOSX" = "xyes"; then
1824 dir=/System/Library/Perl
1825 darwindir=$dir/darwin
1826 if test -d $darwindir; then
1827 PERL=/usr/bin/perl
1828 else
1829 dir=/System/Library/Perl/5.8.1
1830 darwindir=$dir/darwin-thread-multi-2level
1831 if test -d $darwindir; then
1832 PERL=/usr/bin/perl
1833 fi
1834 fi
1835 if test -n "$PERL"; then
1836 PERL_DIR="$dir"
1837 PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
1838 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
1839 PERL_LIBS="-L$darwindir/CORE -lperl"
1840 fi
1841 fi
1842fi
1843
1844
1845
1846
1847
1848
1849
1850echo $ac_n "checking --enable-pythoninterp argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001851echo "configure:1852: checking --enable-pythoninterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001852# Check whether --enable-pythoninterp or --disable-pythoninterp was given.
1853if test "${enable_pythoninterp+set}" = set; then
1854 enableval="$enable_pythoninterp"
1855 :
1856else
1857 enable_pythoninterp="no"
1858fi
1859
1860echo "$ac_t""$enable_pythoninterp" 1>&6
1861if test "$enable_pythoninterp" = "yes"; then
1862 # Extract the first word of "python", so it can be a program name with args.
1863set dummy python; ac_word=$2
1864echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001865echo "configure:1866: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001866if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_python'+set}'`\" = set"; then
1867 echo $ac_n "(cached) $ac_c" 1>&6
1868else
1869 case "$vi_cv_path_python" in
1870 /*)
1871 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
1872 ;;
1873 ?:/*)
1874 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a dos path.
1875 ;;
1876 *)
1877 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1878 ac_dummy="$PATH"
1879 for ac_dir in $ac_dummy; do
1880 test -z "$ac_dir" && ac_dir=.
1881 if test -f $ac_dir/$ac_word; then
1882 ac_cv_path_vi_cv_path_python="$ac_dir/$ac_word"
1883 break
1884 fi
1885 done
1886 IFS="$ac_save_ifs"
1887 ;;
1888esac
1889fi
1890vi_cv_path_python="$ac_cv_path_vi_cv_path_python"
1891if test -n "$vi_cv_path_python"; then
1892 echo "$ac_t""$vi_cv_path_python" 1>&6
1893else
1894 echo "$ac_t""no" 1>&6
1895fi
1896
1897 if test "X$vi_cv_path_python" != "X"; then
1898
1899 echo $ac_n "checking Python version""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001900echo "configure:1901: checking Python version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001901if eval "test \"`echo '$''{'vi_cv_var_python_version'+set}'`\" = set"; then
1902 echo $ac_n "(cached) $ac_c" 1>&6
1903else
1904 vi_cv_var_python_version=`
1905 ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
1906
1907fi
1908
1909echo "$ac_t""$vi_cv_var_python_version" 1>&6
1910
1911 echo $ac_n "checking Python is 1.4 or better""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001912echo "configure:1913: checking Python is 1.4 or better" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001913 if ${vi_cv_path_python} -c \
1914 "import sys; sys.exit(${vi_cv_var_python_version} < 1.4)"
1915 then
1916 echo "$ac_t""yep" 1>&6
1917
1918 echo $ac_n "checking Python's install prefix""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001919echo "configure:1920: checking Python's install prefix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001920if eval "test \"`echo '$''{'vi_cv_path_python_pfx'+set}'`\" = set"; then
1921 echo $ac_n "(cached) $ac_c" 1>&6
1922else
1923 vi_cv_path_python_pfx=`
1924 ${vi_cv_path_python} -c \
1925 "import sys; print sys.prefix"`
1926fi
1927
1928echo "$ac_t""$vi_cv_path_python_pfx" 1>&6
1929
1930 echo $ac_n "checking Python's execution prefix""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001931echo "configure:1932: checking Python's execution prefix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001932if eval "test \"`echo '$''{'vi_cv_path_python_epfx'+set}'`\" = set"; then
1933 echo $ac_n "(cached) $ac_c" 1>&6
1934else
1935 vi_cv_path_python_epfx=`
1936 ${vi_cv_path_python} -c \
1937 "import sys; print sys.exec_prefix"`
1938fi
1939
1940echo "$ac_t""$vi_cv_path_python_epfx" 1>&6
1941
1942
1943 if eval "test \"`echo '$''{'vi_cv_path_pythonpath'+set}'`\" = set"; then
1944 echo $ac_n "(cached) $ac_c" 1>&6
1945else
1946 vi_cv_path_pythonpath=`
1947 unset PYTHONPATH;
1948 ${vi_cv_path_python} -c \
1949 "import sys, string; print string.join(sys.path,':')"`
1950fi
1951
1952
1953
1954 # Check whether --with-python-config-dir or --without-python-config-dir was given.
1955if test "${with_python_config_dir+set}" = set; then
1956 withval="$with_python_config_dir"
1957 vi_cv_path_python_conf="${withval}"
1958fi
1959
1960
1961 echo $ac_n "checking Python's configuration directory""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00001962echo "configure:1963: checking Python's configuration directory" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001963if eval "test \"`echo '$''{'vi_cv_path_python_conf'+set}'`\" = set"; then
1964 echo $ac_n "(cached) $ac_c" 1>&6
1965else
1966
1967 vi_cv_path_python_conf=
1968 for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
1969 for subdir in lib share; do
1970 d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
1971 if test -d "$d" && test -f "$d/config.c"; then
1972 vi_cv_path_python_conf="$d"
1973 fi
1974 done
1975 done
1976
1977fi
1978
1979echo "$ac_t""$vi_cv_path_python_conf" 1>&6
1980
1981 PYTHON_CONFDIR="${vi_cv_path_python_conf}"
1982
1983 if test "X$PYTHON_CONFDIR" = "X"; then
1984 echo "$ac_t""can't find it!" 1>&6
1985 else
1986
1987 if eval "test \"`echo '$''{'vi_cv_path_python_plibs'+set}'`\" = set"; then
1988 echo $ac_n "(cached) $ac_c" 1>&6
1989else
1990
1991 tmp_mkf="/tmp/Makefile-conf$$"
1992 cat ${PYTHON_CONFDIR}/Makefile - <<'eof' >${tmp_mkf}
1993__:
1994 @echo "python_MODLIBS='$(MODLIBS)'"
1995 @echo "python_LIBS='$(LIBS)'"
1996 @echo "python_SYSLIBS='$(SYSLIBS)'"
1997 @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
1998eof
1999 eval "`cd ${PYTHON_CONFDIR} && make -f ${tmp_mkf} __ | sed '/ directory /d'`"
2000 rm -f ${tmp_mkf}
2001 if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
2002 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
2003 vi_cv_path_python_plibs="-framework Python"
2004 else
2005 if test "${vi_cv_var_python_version}" = "1.4"; then
2006 vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
2007 else
2008 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
2009 fi
2010 vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_MODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
2011 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
2012 fi
2013
2014fi
2015
2016
2017 PYTHON_LIBS="${vi_cv_path_python_plibs}"
2018 if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
2019 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
2020 else
2021 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}"
2022 fi
2023 PYTHON_SRC="if_python.c"
2024 if test "x$MACOSX" = "xyes"; then
2025 PYTHON_OBJ="objects/if_python.o"
2026 else
2027 PYTHON_OBJ="objects/if_python.o objects/py_config.o"
2028 fi
2029 if test "${vi_cv_var_python_version}" = "1.4"; then
2030 PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o"
2031 fi
2032 PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'"
2033
2034 echo $ac_n "checking if -pthread should be used""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002035echo "configure:2036: checking if -pthread should be used" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002036 threadsafe_flag=
2037 thread_lib=
2038 if test "x$MACOSX" != "xyes"; then
2039 test "$GCC" = yes && threadsafe_flag="-pthread"
2040 if test "`(uname) 2>/dev/null`" = FreeBSD; then
2041 threadsafe_flag="-D_THREAD_SAFE"
2042 thread_lib="-pthread"
2043 fi
2044 fi
2045 libs_save_old=$LIBS
2046 if test -n "$threadsafe_flag"; then
2047 cflags_save=$CFLAGS
2048 CFLAGS="$CFLAGS $threadsafe_flag"
2049 LIBS="$LIBS $thread_lib"
2050 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002051#line 2052 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002052#include "confdefs.h"
2053
2054int main() {
2055
2056; return 0; }
2057EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002058if { (eval echo configure:2059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002059 rm -rf conftest*
2060 echo "$ac_t""yes" 1>&6; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
2061else
2062 echo "configure: failed program was:" >&5
2063 cat conftest.$ac_ext >&5
2064 rm -rf conftest*
2065 echo "$ac_t""no" 1>&6; LIBS=$libs_save_old
2066
2067fi
2068rm -f conftest*
2069 CFLAGS=$cflags_save
2070 else
2071 echo "$ac_t""no" 1>&6
2072 fi
2073
2074 echo $ac_n "checking if compile and link flags for Python are sane""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002075echo "configure:2076: checking if compile and link flags for Python are sane" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002076 cflags_save=$CFLAGS
2077 libs_save=$LIBS
2078 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
2079 LIBS="$LIBS $PYTHON_LIBS"
2080 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002081#line 2082 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002082#include "confdefs.h"
2083
2084int main() {
2085
2086; return 0; }
2087EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002088if { (eval echo configure:2089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002089 rm -rf conftest*
2090 echo "$ac_t""yes" 1>&6; python_ok=yes
2091else
2092 echo "configure: failed program was:" >&5
2093 cat conftest.$ac_ext >&5
2094 rm -rf conftest*
2095 echo "$ac_t""no: PYTHON DISABLED" 1>&6; python_ok=no
2096fi
2097rm -f conftest*
2098 CFLAGS=$cflags_save
2099 LIBS=$libs_save
2100 if test $python_ok = yes; then
2101 cat >> confdefs.h <<\EOF
2102#define FEAT_PYTHON 1
2103EOF
2104
2105 else
2106 LIBS=$libs_save_old
2107 PYTHON_SRC=
2108 PYTHON_OBJ=
2109 PYTHON_LIBS=
2110 PYTHON_CFLAGS=
2111 fi
2112
2113 fi
2114 else
2115 echo "$ac_t""too old" 1>&6
2116 fi
2117 fi
2118fi
2119
2120
2121
2122
2123
2124
2125
2126echo $ac_n "checking --enable-tclinterp argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002127echo "configure:2128: checking --enable-tclinterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002128# Check whether --enable-tclinterp or --disable-tclinterp was given.
2129if test "${enable_tclinterp+set}" = set; then
2130 enableval="$enable_tclinterp"
2131 :
2132else
2133 enable_tclinterp="no"
2134fi
2135
2136echo "$ac_t""$enable_tclinterp" 1>&6
2137
2138if test "$enable_tclinterp" = "yes"; then
2139
2140 echo $ac_n "checking --with-tclsh argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002141echo "configure:2142: checking --with-tclsh argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002142 # Check whether --with-tclsh or --without-tclsh was given.
2143if test "${with_tclsh+set}" = set; then
2144 withval="$with_tclsh"
2145 tclsh_name="$withval"; echo "$ac_t""$tclsh_name" 1>&6
2146else
2147 tclsh_name="tclsh8.0"; echo "$ac_t""no" 1>&6
2148fi
2149
2150 # Extract the first word of "$tclsh_name", so it can be a program name with args.
2151set dummy $tclsh_name; ac_word=$2
2152echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002153echo "configure:2154: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002154if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
2155 echo $ac_n "(cached) $ac_c" 1>&6
2156else
2157 case "$vi_cv_path_tcl" in
2158 /*)
2159 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
2160 ;;
2161 ?:/*)
2162 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
2163 ;;
2164 *)
2165 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2166 ac_dummy="$PATH"
2167 for ac_dir in $ac_dummy; do
2168 test -z "$ac_dir" && ac_dir=.
2169 if test -f $ac_dir/$ac_word; then
2170 ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
2171 break
2172 fi
2173 done
2174 IFS="$ac_save_ifs"
2175 ;;
2176esac
2177fi
2178vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
2179if test -n "$vi_cv_path_tcl"; then
2180 echo "$ac_t""$vi_cv_path_tcl" 1>&6
2181else
2182 echo "$ac_t""no" 1>&6
2183fi
2184
2185
2186
2187 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.0"; then
2188 tclsh_name="tclsh8.2"
2189 # Extract the first word of "$tclsh_name", so it can be a program name with args.
2190set dummy $tclsh_name; ac_word=$2
2191echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002192echo "configure:2193: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002193if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
2194 echo $ac_n "(cached) $ac_c" 1>&6
2195else
2196 case "$vi_cv_path_tcl" in
2197 /*)
2198 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
2199 ;;
2200 ?:/*)
2201 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
2202 ;;
2203 *)
2204 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2205 ac_dummy="$PATH"
2206 for ac_dir in $ac_dummy; do
2207 test -z "$ac_dir" && ac_dir=.
2208 if test -f $ac_dir/$ac_word; then
2209 ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
2210 break
2211 fi
2212 done
2213 IFS="$ac_save_ifs"
2214 ;;
2215esac
2216fi
2217vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
2218if test -n "$vi_cv_path_tcl"; then
2219 echo "$ac_t""$vi_cv_path_tcl" 1>&6
2220else
2221 echo "$ac_t""no" 1>&6
2222fi
2223
2224 fi
2225 if test "X$vi_cv_path_tcl" = "X"; then
2226 tclsh_name="tclsh"
2227 # Extract the first word of "$tclsh_name", so it can be a program name with args.
2228set dummy $tclsh_name; ac_word=$2
2229echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002230echo "configure:2231: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002231if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
2232 echo $ac_n "(cached) $ac_c" 1>&6
2233else
2234 case "$vi_cv_path_tcl" in
2235 /*)
2236 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
2237 ;;
2238 ?:/*)
2239 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
2240 ;;
2241 *)
2242 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2243 ac_dummy="$PATH"
2244 for ac_dir in $ac_dummy; do
2245 test -z "$ac_dir" && ac_dir=.
2246 if test -f $ac_dir/$ac_word; then
2247 ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
2248 break
2249 fi
2250 done
2251 IFS="$ac_save_ifs"
2252 ;;
2253esac
2254fi
2255vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
2256if test -n "$vi_cv_path_tcl"; then
2257 echo "$ac_t""$vi_cv_path_tcl" 1>&6
2258else
2259 echo "$ac_t""no" 1>&6
2260fi
2261
2262 fi
2263 if test "X$vi_cv_path_tcl" != "X"; then
2264 echo $ac_n "checking Tcl version""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002265echo "configure:2266: checking Tcl version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002266 if echo 'exit [expr [info tclversion] < 8.0]' | $vi_cv_path_tcl - ; then
2267 tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
2268 echo "$ac_t""$tclver - OK" 1>&6;
2269 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 -`
2270
2271 echo $ac_n "checking for location of Tcl include""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002272echo "configure:2273: checking for location of Tcl include" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002273 if test "x$MACOSX" != "xyes"; then
Bram Moolenaar47136d72004-10-12 20:02:24 +00002274 tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/include"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002275 else
2276 tclinc="/System/Library/Frameworks/Tcl.framework/Headers"
2277 fi
2278 for try in $tclinc; do
2279 if test -f "$try/tcl.h"; then
2280 echo "$ac_t""$try/tcl.h" 1>&6
2281 TCL_INC=$try
2282 break
2283 fi
2284 done
2285 if test -z "$TCL_INC"; then
2286 echo "$ac_t""<not found>" 1>&6
2287 SKIP_TCL=YES
2288 fi
2289 if test -z "$SKIP_TCL"; then
2290 echo $ac_n "checking for location of tclConfig.sh script""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002291echo "configure:2292: checking for location of tclConfig.sh script" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002292 if test "x$MACOSX" != "xyes"; then
2293 tclcnf=`echo $tclinc | sed s/include/lib/g`
2294 else
2295 tclcnf="/System/Library/Frameworks/Tcl.framework"
2296 fi
2297 for try in $tclcnf; do
2298 if test -f $try/tclConfig.sh; then
2299 echo "$ac_t""$try/tclConfig.sh" 1>&6
2300 . $try/tclConfig.sh
2301 TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
2302 TCL_DEFS=`echo $TCL_DEFS | tr ' ' '\012' | sed -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr -d '\012'`
2303 break
2304 fi
2305 done
2306 if test -z "$TCL_LIBS"; then
2307 echo "$ac_t""<not found>" 1>&6
2308 echo $ac_n "checking for Tcl library by myself""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002309echo "configure:2310: checking for Tcl library by myself" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002310 tcllib=`echo $tclinc | sed s/include/lib/g`
2311 for ext in .so .a ; do
2312 for ver in "" $tclver ; do
2313 for try in $tcllib ; do
2314 trylib=tcl$ver$ext
2315 if test -f $try/lib$trylib ; then
2316 echo "$ac_t""$try/lib$trylib" 1>&6
2317 TCL_LIBS="-L$try -ltcl$ver -ldl -lm"
2318 if test "`(uname) 2>/dev/null`" = SunOS &&
2319 uname -r | grep '^5' >/dev/null; then
2320 TCL_LIBS="$TCL_LIBS -R $try"
2321 fi
2322 break 3
2323 fi
2324 done
2325 done
2326 done
2327 if test -z "$TCL_LIBS"; then
2328 echo "$ac_t""<not found>" 1>&6
2329 SKIP_TCL=YES
2330 fi
2331 fi
2332 if test -z "$SKIP_TCL"; then
2333 cat >> confdefs.h <<\EOF
2334#define FEAT_TCL 1
2335EOF
2336
2337 TCL_SRC=if_tcl.c
2338 TCL_OBJ=objects/if_tcl.o
2339 TCL_PRO=if_tcl.pro
2340 TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
2341 fi
2342 fi
2343 else
2344 echo "$ac_t""too old; need Tcl version 8.0 or later" 1>&6
2345 fi
2346 fi
2347fi
2348
2349
2350
2351
2352
2353
2354echo $ac_n "checking --enable-rubyinterp argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002355echo "configure:2356: checking --enable-rubyinterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002356# Check whether --enable-rubyinterp or --disable-rubyinterp was given.
2357if test "${enable_rubyinterp+set}" = set; then
2358 enableval="$enable_rubyinterp"
2359 :
2360else
2361 enable_rubyinterp="no"
2362fi
2363
2364echo "$ac_t""$enable_rubyinterp" 1>&6
2365if test "$enable_rubyinterp" = "yes"; then
2366
2367 # Extract the first word of "ruby", so it can be a program name with args.
2368set dummy ruby; ac_word=$2
2369echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002370echo "configure:2371: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002371if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_ruby'+set}'`\" = set"; then
2372 echo $ac_n "(cached) $ac_c" 1>&6
2373else
2374 case "$vi_cv_path_ruby" in
2375 /*)
2376 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
2377 ;;
2378 ?:/*)
2379 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a dos path.
2380 ;;
2381 *)
2382 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2383 ac_dummy="$PATH"
2384 for ac_dir in $ac_dummy; do
2385 test -z "$ac_dir" && ac_dir=.
2386 if test -f $ac_dir/$ac_word; then
2387 ac_cv_path_vi_cv_path_ruby="$ac_dir/$ac_word"
2388 break
2389 fi
2390 done
2391 IFS="$ac_save_ifs"
2392 ;;
2393esac
2394fi
2395vi_cv_path_ruby="$ac_cv_path_vi_cv_path_ruby"
2396if test -n "$vi_cv_path_ruby"; then
2397 echo "$ac_t""$vi_cv_path_ruby" 1>&6
2398else
2399 echo "$ac_t""no" 1>&6
2400fi
2401
2402 if test "X$vi_cv_path_ruby" != "X"; then
2403 echo $ac_n "checking Ruby version""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002404echo "configure:2405: checking Ruby version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002405 if $vi_cv_path_ruby -e 'VERSION >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
2406 echo "$ac_t""OK" 1>&6
2407 echo $ac_n "checking Ruby header files""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002408echo "configure:2409: checking Ruby header files" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002409 rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null`
2410 if test "X$rubyhdrdir" != "X"; then
2411 echo "$ac_t""$rubyhdrdir" 1>&6
2412 RUBY_CFLAGS="-I$rubyhdrdir"
2413 rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'`
2414 if test "X$rubylibs" != "X"; then
2415 RUBY_LIBS="$rubylibs"
2416 fi
2417 librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'`
2418 if test -f "$rubyhdrdir/$librubyarg"; then
2419 librubyarg="$rubyhdrdir/$librubyarg"
2420 else
2421 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'`
2422 if test -f "$rubylibdir/$librubyarg"; then
2423 librubyarg="$rubylibdir/$librubyarg"
2424 elif test "$librubyarg" = "libruby.a"; then
2425 librubyarg="-lruby"
2426 else
2427 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"`
2428 fi
2429 fi
2430
2431 if test "X$librubyarg" != "X"; then
2432 RUBY_LIBS="$librubyarg $RUBY_LIBS"
2433 fi
2434 rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'`
2435 if test "X$rubyldflags" != "X"; then
2436 LDFLAGS="$rubyldflags $LDFLAGS"
2437 fi
2438 RUBY_SRC="if_ruby.c"
2439 RUBY_OBJ="objects/if_ruby.o"
2440 RUBY_PRO="if_ruby.pro"
2441 cat >> confdefs.h <<\EOF
2442#define FEAT_RUBY 1
2443EOF
2444
2445 else
2446 echo "$ac_t""not found" 1>&6
2447 fi
2448 else
2449 echo "$ac_t""too old; need Ruby version 1.6.0 or later" 1>&6
2450 fi
2451 fi
2452fi
2453
2454
2455
2456
2457
2458
2459echo $ac_n "checking --enable-cscope argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002460echo "configure:2461: checking --enable-cscope argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002461# Check whether --enable-cscope or --disable-cscope was given.
2462if test "${enable_cscope+set}" = set; then
2463 enableval="$enable_cscope"
2464 :
2465else
2466 enable_cscope="no"
2467fi
2468
2469echo "$ac_t""$enable_cscope" 1>&6
2470if test "$enable_cscope" = "yes"; then
2471 cat >> confdefs.h <<\EOF
2472#define FEAT_CSCOPE 1
2473EOF
2474
2475fi
2476
2477echo $ac_n "checking --enable-workshop argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002478echo "configure:2479: checking --enable-workshop argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002479# Check whether --enable-workshop or --disable-workshop was given.
2480if test "${enable_workshop+set}" = set; then
2481 enableval="$enable_workshop"
2482 :
2483else
2484 enable_workshop="no"
2485fi
2486
2487echo "$ac_t""$enable_workshop" 1>&6
2488if test "$enable_workshop" = "yes"; then
2489 cat >> confdefs.h <<\EOF
2490#define FEAT_SUN_WORKSHOP 1
2491EOF
2492
2493 WORKSHOP_SRC="workshop.c integration.c"
2494
2495 WORKSHOP_OBJ="objects/workshop.o objects/integration.o"
2496
2497 if test "${enable_gui-xxx}" = xxx; then
2498 enable_gui=motif
2499 fi
2500fi
2501
2502echo $ac_n "checking --disable-netbeans argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002503echo "configure:2504: checking --disable-netbeans argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002504# Check whether --enable-netbeans or --disable-netbeans was given.
2505if test "${enable_netbeans+set}" = set; then
2506 enableval="$enable_netbeans"
2507 :
2508else
2509 enable_netbeans="yes"
2510fi
2511
2512if test "$enable_netbeans" = "yes"; then
2513 echo "$ac_t""no" 1>&6
2514 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002515echo "configure:2516: checking for socket in -lsocket" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002516ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
2517if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2518 echo $ac_n "(cached) $ac_c" 1>&6
2519else
2520 ac_save_LIBS="$LIBS"
2521LIBS="-lsocket $LIBS"
2522cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002523#line 2524 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002524#include "confdefs.h"
2525/* Override any gcc2 internal prototype to avoid an error. */
2526/* We use char because int might match the return type of a gcc2
2527 builtin and then its argument prototype would still apply. */
2528char socket();
2529
2530int main() {
2531socket()
2532; return 0; }
2533EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002534if { (eval echo configure:2535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002535 rm -rf conftest*
2536 eval "ac_cv_lib_$ac_lib_var=yes"
2537else
2538 echo "configure: failed program was:" >&5
2539 cat conftest.$ac_ext >&5
2540 rm -rf conftest*
2541 eval "ac_cv_lib_$ac_lib_var=no"
2542fi
2543rm -f conftest*
2544LIBS="$ac_save_LIBS"
2545
2546fi
2547if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2548 echo "$ac_t""yes" 1>&6
2549 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2550 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2551 cat >> confdefs.h <<EOF
2552#define $ac_tr_lib 1
2553EOF
2554
2555 LIBS="-lsocket $LIBS"
2556
2557else
2558 echo "$ac_t""no" 1>&6
2559fi
2560
2561 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002562echo "configure:2563: checking for gethostbyname in -lnsl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002563ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2564if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2565 echo $ac_n "(cached) $ac_c" 1>&6
2566else
2567 ac_save_LIBS="$LIBS"
2568LIBS="-lnsl $LIBS"
2569cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002570#line 2571 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002571#include "confdefs.h"
2572/* Override any gcc2 internal prototype to avoid an error. */
2573/* We use char because int might match the return type of a gcc2
2574 builtin and then its argument prototype would still apply. */
2575char gethostbyname();
2576
2577int main() {
2578gethostbyname()
2579; return 0; }
2580EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002581if { (eval echo configure:2582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002582 rm -rf conftest*
2583 eval "ac_cv_lib_$ac_lib_var=yes"
2584else
2585 echo "configure: failed program was:" >&5
2586 cat conftest.$ac_ext >&5
2587 rm -rf conftest*
2588 eval "ac_cv_lib_$ac_lib_var=no"
2589fi
2590rm -f conftest*
2591LIBS="$ac_save_LIBS"
2592
2593fi
2594if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2595 echo "$ac_t""yes" 1>&6
2596 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2597 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2598 cat >> confdefs.h <<EOF
2599#define $ac_tr_lib 1
2600EOF
2601
2602 LIBS="-lnsl $LIBS"
2603
2604else
2605 echo "$ac_t""no" 1>&6
2606fi
2607
2608 echo $ac_n "checking whether compiling netbeans integration is possible""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002609echo "configure:2610: checking whether compiling netbeans integration is possible" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002610 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002611#line 2612 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002612#include "confdefs.h"
2613
2614#include <stdio.h>
2615#include <stdlib.h>
2616#include <stdarg.h>
2617#include <fcntl.h>
2618#include <netdb.h>
2619#include <netinet/in.h>
2620#include <errno.h>
2621#include <sys/types.h>
2622#include <sys/socket.h>
2623 /* Check bitfields */
2624 struct nbbuf {
2625 unsigned int initDone:1;
2626 ushort signmaplen;
2627 };
2628
2629int main() {
2630
2631 /* Check creating a socket. */
2632 struct sockaddr_in server;
2633 (void)socket(AF_INET, SOCK_STREAM, 0);
2634 (void)htons(100);
2635 (void)gethostbyname("microsoft.com");
2636 if (errno == ECONNREFUSED)
2637 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
2638
2639; return 0; }
2640EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002641if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002642 rm -rf conftest*
2643 echo "$ac_t""yes" 1>&6
2644else
2645 echo "configure: failed program was:" >&5
2646 cat conftest.$ac_ext >&5
2647 rm -rf conftest*
2648 echo "$ac_t""no" 1>&6; enable_netbeans="no"
2649fi
2650rm -f conftest*
2651else
2652 echo "$ac_t""yes" 1>&6
2653fi
2654if test "$enable_netbeans" = "yes"; then
2655 cat >> confdefs.h <<\EOF
2656#define FEAT_NETBEANS_INTG 1
2657EOF
2658
2659 NETBEANS_SRC="netbeans.c"
2660
2661 NETBEANS_OBJ="objects/netbeans.o"
2662
2663fi
2664
2665echo $ac_n "checking --enable-sniff argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002666echo "configure:2667: checking --enable-sniff argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002667# Check whether --enable-sniff or --disable-sniff was given.
2668if test "${enable_sniff+set}" = set; then
2669 enableval="$enable_sniff"
2670 :
2671else
2672 enable_sniff="no"
2673fi
2674
2675echo "$ac_t""$enable_sniff" 1>&6
2676if test "$enable_sniff" = "yes"; then
2677 cat >> confdefs.h <<\EOF
2678#define FEAT_SNIFF 1
2679EOF
2680
2681 SNIFF_SRC="if_sniff.c"
2682
2683 SNIFF_OBJ="objects/if_sniff.o"
2684
2685fi
2686
2687echo $ac_n "checking --enable-multibyte argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002688echo "configure:2689: checking --enable-multibyte argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002689# Check whether --enable-multibyte or --disable-multibyte was given.
2690if test "${enable_multibyte+set}" = set; then
2691 enableval="$enable_multibyte"
2692 :
2693else
2694 enable_multibyte="no"
2695fi
2696
2697echo "$ac_t""$enable_multibyte" 1>&6
2698if test "$enable_multibyte" = "yes"; then
2699 cat >> confdefs.h <<\EOF
2700#define FEAT_MBYTE 1
2701EOF
2702
2703fi
2704
2705echo $ac_n "checking --enable-hangulinput argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002706echo "configure:2707: checking --enable-hangulinput argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002707# Check whether --enable-hangulinput or --disable-hangulinput was given.
2708if test "${enable_hangulinput+set}" = set; then
2709 enableval="$enable_hangulinput"
2710 :
2711else
2712 enable_hangulinput="no"
2713fi
2714
2715echo "$ac_t""$enable_hangulinput" 1>&6
2716
2717echo $ac_n "checking --enable-xim argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002718echo "configure:2719: checking --enable-xim argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002719# Check whether --enable-xim or --disable-xim was given.
2720if test "${enable_xim+set}" = set; then
2721 enableval="$enable_xim"
2722 echo "$ac_t""$enable_xim" 1>&6
2723else
2724 enable_xim="auto"; echo "$ac_t""defaulting to auto" 1>&6
2725fi
2726
2727
2728echo $ac_n "checking --enable-fontset argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002729echo "configure:2730: checking --enable-fontset argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002730# Check whether --enable-fontset or --disable-fontset was given.
2731if test "${enable_fontset+set}" = set; then
2732 enableval="$enable_fontset"
2733 :
2734else
2735 enable_fontset="no"
2736fi
2737
2738echo "$ac_t""$enable_fontset" 1>&6
2739
2740test -z "$with_x" && with_x=yes
2741test "${enable_gui-yes}" != no -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
2742if test "$with_x" = no; then
2743 echo "$ac_t""defaulting to: don't HAVE_X11" 1>&6
2744else
2745
2746 # Extract the first word of "xmkmf", so it can be a program name with args.
2747set dummy xmkmf; ac_word=$2
2748echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002749echo "configure:2750: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002750if eval "test \"`echo '$''{'ac_cv_path_xmkmfpath'+set}'`\" = set"; then
2751 echo $ac_n "(cached) $ac_c" 1>&6
2752else
2753 case "$xmkmfpath" in
2754 /*)
2755 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
2756 ;;
2757 ?:/*)
2758 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a dos path.
2759 ;;
2760 *)
2761 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2762 ac_dummy="$PATH"
2763 for ac_dir in $ac_dummy; do
2764 test -z "$ac_dir" && ac_dir=.
2765 if test -f $ac_dir/$ac_word; then
2766 ac_cv_path_xmkmfpath="$ac_dir/$ac_word"
2767 break
2768 fi
2769 done
2770 IFS="$ac_save_ifs"
2771 ;;
2772esac
2773fi
2774xmkmfpath="$ac_cv_path_xmkmfpath"
2775if test -n "$xmkmfpath"; then
2776 echo "$ac_t""$xmkmfpath" 1>&6
2777else
2778 echo "$ac_t""no" 1>&6
2779fi
2780
2781
2782 # If we find X, set shell vars x_includes and x_libraries to the
2783# paths, otherwise set no_x=yes.
2784# Uses ac_ vars as temps to allow command line to override cache and checks.
2785# --without-x overrides everything else, but does not touch the cache.
2786echo $ac_n "checking for X""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002787echo "configure:2788: checking for X" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002788
2789# Check whether --with-x or --without-x was given.
2790if test "${with_x+set}" = set; then
2791 withval="$with_x"
2792 :
2793fi
2794
2795# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2796if test "x$with_x" = xno; then
2797 # The user explicitly disabled X.
2798 have_x=disabled
2799else
2800 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2801 # Both variables are already set.
2802 have_x=yes
2803 else
2804if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2805 echo $ac_n "(cached) $ac_c" 1>&6
2806else
2807 # One or both of the vars are not set, and there is no cached value.
2808ac_x_includes=NO ac_x_libraries=NO
2809rm -fr conftestdir
2810if mkdir conftestdir; then
2811 cd conftestdir
2812 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2813 cat > Imakefile <<'EOF'
2814acfindx:
2815 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2816EOF
2817 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2818 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2819 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2820 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2821 for ac_extension in a so sl; do
2822 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2823 test -f $ac_im_libdir/libX11.$ac_extension; then
2824 ac_im_usrlibdir=$ac_im_libdir; break
2825 fi
2826 done
2827 # Screen out bogus values from the imake configuration. They are
2828 # bogus both because they are the default anyway, and because
2829 # using them would break gcc on systems where it needs fixed includes.
2830 case "$ac_im_incroot" in
2831 /usr/include) ;;
2832 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2833 esac
2834 case "$ac_im_usrlibdir" in
2835 /usr/lib | /lib) ;;
2836 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2837 esac
2838 fi
2839 cd ..
2840 rm -fr conftestdir
2841fi
2842
2843if test "$ac_x_includes" = NO; then
2844 # Guess where to find include files, by looking for this one X11 .h file.
2845 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2846
2847 # First, try using that file with no special directory specified.
2848cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002849#line 2850 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002850#include "confdefs.h"
2851#include <$x_direct_test_include>
2852EOF
2853ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002854{ (eval echo configure:2855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00002855ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2856if test -z "$ac_err"; then
2857 rm -rf conftest*
2858 # We can compile using X headers with no special include directory.
2859ac_x_includes=
2860else
2861 echo "$ac_err" >&5
2862 echo "configure: failed program was:" >&5
2863 cat conftest.$ac_ext >&5
2864 rm -rf conftest*
2865 # Look for the header file in a standard set of common directories.
2866# Check X11 before X11Rn because it is often a symlink to the current release.
2867 for ac_dir in \
2868 /usr/X11/include \
2869 /usr/X11R6/include \
2870 /usr/X11R5/include \
2871 /usr/X11R4/include \
2872 \
2873 /usr/include/X11 \
2874 /usr/include/X11R6 \
2875 /usr/include/X11R5 \
2876 /usr/include/X11R4 \
2877 \
2878 /usr/local/X11/include \
2879 /usr/local/X11R6/include \
2880 /usr/local/X11R5/include \
2881 /usr/local/X11R4/include \
2882 \
2883 /usr/local/include/X11 \
2884 /usr/local/include/X11R6 \
2885 /usr/local/include/X11R5 \
2886 /usr/local/include/X11R4 \
2887 \
2888 /usr/X386/include \
2889 /usr/x386/include \
2890 /usr/XFree86/include/X11 \
2891 \
2892 /usr/include \
2893 /usr/local/include \
2894 /usr/unsupported/include \
2895 /usr/athena/include \
2896 /usr/local/x11r5/include \
2897 /usr/lpp/Xamples/include \
2898 \
2899 /usr/openwin/include \
2900 /usr/openwin/share/include \
2901 ; \
2902 do
2903 if test -r "$ac_dir/$x_direct_test_include"; then
2904 ac_x_includes=$ac_dir
2905 break
2906 fi
2907 done
2908fi
2909rm -f conftest*
2910fi # $ac_x_includes = NO
2911
2912if test "$ac_x_libraries" = NO; then
2913 # Check for the libraries.
2914
2915 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2916 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2917
2918 # See if we find them without any special options.
2919 # Don't add to $LIBS permanently.
2920 ac_save_LIBS="$LIBS"
2921 LIBS="-l$x_direct_test_library $LIBS"
2922cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002923#line 2924 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002924#include "confdefs.h"
2925
2926int main() {
2927${x_direct_test_function}()
2928; return 0; }
2929EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00002930if { (eval echo configure:2931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002931 rm -rf conftest*
2932 LIBS="$ac_save_LIBS"
2933# We can link X programs with no special library path.
2934ac_x_libraries=
2935else
2936 echo "configure: failed program was:" >&5
2937 cat conftest.$ac_ext >&5
2938 rm -rf conftest*
2939 LIBS="$ac_save_LIBS"
2940# First see if replacing the include by lib works.
2941# Check X11 before X11Rn because it is often a symlink to the current release.
2942for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2943 /usr/X11/lib \
2944 /usr/X11R6/lib \
2945 /usr/X11R5/lib \
2946 /usr/X11R4/lib \
2947 \
2948 /usr/lib/X11 \
2949 /usr/lib/X11R6 \
2950 /usr/lib/X11R5 \
2951 /usr/lib/X11R4 \
2952 \
2953 /usr/local/X11/lib \
2954 /usr/local/X11R6/lib \
2955 /usr/local/X11R5/lib \
2956 /usr/local/X11R4/lib \
2957 \
2958 /usr/local/lib/X11 \
2959 /usr/local/lib/X11R6 \
2960 /usr/local/lib/X11R5 \
2961 /usr/local/lib/X11R4 \
2962 \
2963 /usr/X386/lib \
2964 /usr/x386/lib \
2965 /usr/XFree86/lib/X11 \
2966 \
2967 /usr/lib \
2968 /usr/local/lib \
2969 /usr/unsupported/lib \
2970 /usr/athena/lib \
2971 /usr/local/x11r5/lib \
2972 /usr/lpp/Xamples/lib \
2973 /lib/usr/lib/X11 \
2974 \
2975 /usr/openwin/lib \
2976 /usr/openwin/share/lib \
2977 ; \
2978do
2979 for ac_extension in a so sl; do
2980 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2981 ac_x_libraries=$ac_dir
2982 break 2
2983 fi
2984 done
2985done
2986fi
2987rm -f conftest*
2988fi # $ac_x_libraries = NO
2989
2990if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2991 # Didn't find X anywhere. Cache the known absence of X.
2992 ac_cv_have_x="have_x=no"
2993else
2994 # Record where we found X for the cache.
2995 ac_cv_have_x="have_x=yes \
2996 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2997fi
2998fi
2999 fi
3000 eval "$ac_cv_have_x"
3001fi # $with_x != no
3002
3003if test "$have_x" != yes; then
3004 echo "$ac_t""$have_x" 1>&6
3005 no_x=yes
3006else
3007 # If each of the values was on the command line, it overrides each guess.
3008 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3009 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3010 # Update the cache value to reflect the command line values.
3011 ac_cv_have_x="have_x=yes \
3012 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3013 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3014fi
3015
3016if test "$no_x" = yes; then
3017 # Not all programs may use this symbol, but it does not hurt to define it.
3018 cat >> confdefs.h <<\EOF
3019#define X_DISPLAY_MISSING 1
3020EOF
3021
3022 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
3023else
3024 if test -n "$x_includes"; then
3025 X_CFLAGS="$X_CFLAGS -I$x_includes"
3026 fi
3027
3028 # It would also be nice to do this for all -L options, not just this one.
3029 if test -n "$x_libraries"; then
3030 X_LIBS="$X_LIBS -L$x_libraries"
3031 # For Solaris; some versions of Sun CC require a space after -R and
3032 # others require no space. Words are not sufficient . . . .
3033 case "`(uname -sr) 2>/dev/null`" in
3034 "SunOS 5"*)
3035 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003036echo "configure:3037: checking whether -R must be followed by a space" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003037 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
3038 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003039#line 3040 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003040#include "confdefs.h"
3041
3042int main() {
3043
3044; return 0; }
3045EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003046if { (eval echo configure:3047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003047 rm -rf conftest*
3048 ac_R_nospace=yes
3049else
3050 echo "configure: failed program was:" >&5
3051 cat conftest.$ac_ext >&5
3052 rm -rf conftest*
3053 ac_R_nospace=no
3054fi
3055rm -f conftest*
3056 if test $ac_R_nospace = yes; then
3057 echo "$ac_t""no" 1>&6
3058 X_LIBS="$X_LIBS -R$x_libraries"
3059 else
3060 LIBS="$ac_xsave_LIBS -R $x_libraries"
3061 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003062#line 3063 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003063#include "confdefs.h"
3064
3065int main() {
3066
3067; return 0; }
3068EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003069if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003070 rm -rf conftest*
3071 ac_R_space=yes
3072else
3073 echo "configure: failed program was:" >&5
3074 cat conftest.$ac_ext >&5
3075 rm -rf conftest*
3076 ac_R_space=no
3077fi
3078rm -f conftest*
3079 if test $ac_R_space = yes; then
3080 echo "$ac_t""yes" 1>&6
3081 X_LIBS="$X_LIBS -R $x_libraries"
3082 else
3083 echo "$ac_t""neither works" 1>&6
3084 fi
3085 fi
3086 LIBS="$ac_xsave_LIBS"
3087 esac
3088 fi
3089
3090 # Check for system-dependent libraries X programs must link with.
3091 # Do this before checking for the system-independent R6 libraries
3092 # (-lICE), since we may need -lsocket or whatever for X linking.
3093
3094 if test "$ISC" = yes; then
3095 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
3096 else
3097 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
3098 # libraries were built with DECnet support. And karl@cs.umb.edu says
3099 # the Alpha needs dnet_stub (dnet does not exist).
3100 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003101echo "configure:3102: checking for dnet_ntoa in -ldnet" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003102ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3103if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3104 echo $ac_n "(cached) $ac_c" 1>&6
3105else
3106 ac_save_LIBS="$LIBS"
3107LIBS="-ldnet $LIBS"
3108cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003109#line 3110 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003110#include "confdefs.h"
3111/* Override any gcc2 internal prototype to avoid an error. */
3112/* We use char because int might match the return type of a gcc2
3113 builtin and then its argument prototype would still apply. */
3114char dnet_ntoa();
3115
3116int main() {
3117dnet_ntoa()
3118; return 0; }
3119EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003120if { (eval echo configure:3121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003121 rm -rf conftest*
3122 eval "ac_cv_lib_$ac_lib_var=yes"
3123else
3124 echo "configure: failed program was:" >&5
3125 cat conftest.$ac_ext >&5
3126 rm -rf conftest*
3127 eval "ac_cv_lib_$ac_lib_var=no"
3128fi
3129rm -f conftest*
3130LIBS="$ac_save_LIBS"
3131
3132fi
3133if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3134 echo "$ac_t""yes" 1>&6
3135 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
3136else
3137 echo "$ac_t""no" 1>&6
3138fi
3139
3140 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
3141 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003142echo "configure:3143: checking for dnet_ntoa in -ldnet_stub" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003143ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3144if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3145 echo $ac_n "(cached) $ac_c" 1>&6
3146else
3147 ac_save_LIBS="$LIBS"
3148LIBS="-ldnet_stub $LIBS"
3149cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003150#line 3151 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003151#include "confdefs.h"
3152/* Override any gcc2 internal prototype to avoid an error. */
3153/* We use char because int might match the return type of a gcc2
3154 builtin and then its argument prototype would still apply. */
3155char dnet_ntoa();
3156
3157int main() {
3158dnet_ntoa()
3159; return 0; }
3160EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003161if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003162 rm -rf conftest*
3163 eval "ac_cv_lib_$ac_lib_var=yes"
3164else
3165 echo "configure: failed program was:" >&5
3166 cat conftest.$ac_ext >&5
3167 rm -rf conftest*
3168 eval "ac_cv_lib_$ac_lib_var=no"
3169fi
3170rm -f conftest*
3171LIBS="$ac_save_LIBS"
3172
3173fi
3174if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3175 echo "$ac_t""yes" 1>&6
3176 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
3177else
3178 echo "$ac_t""no" 1>&6
3179fi
3180
3181 fi
3182
3183 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
3184 # to get the SysV transport functions.
3185 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
3186 # needs -lnsl.
3187 # The nsl library prevents programs from opening the X display
3188 # on Irix 5.2, according to dickey@clark.net.
3189 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003190echo "configure:3191: checking for gethostbyname" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003191if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3192 echo $ac_n "(cached) $ac_c" 1>&6
3193else
3194 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003195#line 3196 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003196#include "confdefs.h"
3197/* System header to define __stub macros and hopefully few prototypes,
3198 which can conflict with char gethostbyname(); below. */
3199#include <assert.h>
3200/* Override any gcc2 internal prototype to avoid an error. */
3201/* We use char because int might match the return type of a gcc2
3202 builtin and then its argument prototype would still apply. */
3203char gethostbyname();
3204
3205int main() {
3206
3207/* The GNU C library defines this for functions which it implements
3208 to always fail with ENOSYS. Some functions are actually named
3209 something starting with __ and the normal name is an alias. */
3210#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3211choke me
3212#else
3213gethostbyname();
3214#endif
3215
3216; return 0; }
3217EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003218if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003219 rm -rf conftest*
3220 eval "ac_cv_func_gethostbyname=yes"
3221else
3222 echo "configure: failed program was:" >&5
3223 cat conftest.$ac_ext >&5
3224 rm -rf conftest*
3225 eval "ac_cv_func_gethostbyname=no"
3226fi
3227rm -f conftest*
3228fi
3229
3230if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3231 echo "$ac_t""yes" 1>&6
3232 :
3233else
3234 echo "$ac_t""no" 1>&6
3235fi
3236
3237 if test $ac_cv_func_gethostbyname = no; then
3238 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003239echo "configure:3240: checking for gethostbyname in -lnsl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003240ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3241if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3242 echo $ac_n "(cached) $ac_c" 1>&6
3243else
3244 ac_save_LIBS="$LIBS"
3245LIBS="-lnsl $LIBS"
3246cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003247#line 3248 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003248#include "confdefs.h"
3249/* Override any gcc2 internal prototype to avoid an error. */
3250/* We use char because int might match the return type of a gcc2
3251 builtin and then its argument prototype would still apply. */
3252char gethostbyname();
3253
3254int main() {
3255gethostbyname()
3256; return 0; }
3257EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003258if { (eval echo configure:3259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003259 rm -rf conftest*
3260 eval "ac_cv_lib_$ac_lib_var=yes"
3261else
3262 echo "configure: failed program was:" >&5
3263 cat conftest.$ac_ext >&5
3264 rm -rf conftest*
3265 eval "ac_cv_lib_$ac_lib_var=no"
3266fi
3267rm -f conftest*
3268LIBS="$ac_save_LIBS"
3269
3270fi
3271if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3272 echo "$ac_t""yes" 1>&6
3273 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
3274else
3275 echo "$ac_t""no" 1>&6
3276fi
3277
3278 fi
3279
3280 # lieder@skyler.mavd.honeywell.com says without -lsocket,
3281 # socket/setsockopt and other routines are undefined under SCO ODT
3282 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
3283 # on later versions), says simon@lia.di.epfl.ch: it contains
3284 # gethostby* variants that don't use the nameserver (or something).
3285 # -lsocket must be given before -lnsl if both are needed.
3286 # We assume that if connect needs -lnsl, so does gethostbyname.
3287 echo $ac_n "checking for connect""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003288echo "configure:3289: checking for connect" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003289if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3290 echo $ac_n "(cached) $ac_c" 1>&6
3291else
3292 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003293#line 3294 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003294#include "confdefs.h"
3295/* System header to define __stub macros and hopefully few prototypes,
3296 which can conflict with char connect(); below. */
3297#include <assert.h>
3298/* Override any gcc2 internal prototype to avoid an error. */
3299/* We use char because int might match the return type of a gcc2
3300 builtin and then its argument prototype would still apply. */
3301char connect();
3302
3303int main() {
3304
3305/* The GNU C library defines this for functions which it implements
3306 to always fail with ENOSYS. Some functions are actually named
3307 something starting with __ and the normal name is an alias. */
3308#if defined (__stub_connect) || defined (__stub___connect)
3309choke me
3310#else
3311connect();
3312#endif
3313
3314; return 0; }
3315EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003316if { (eval echo configure:3317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003317 rm -rf conftest*
3318 eval "ac_cv_func_connect=yes"
3319else
3320 echo "configure: failed program was:" >&5
3321 cat conftest.$ac_ext >&5
3322 rm -rf conftest*
3323 eval "ac_cv_func_connect=no"
3324fi
3325rm -f conftest*
3326fi
3327
3328if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3329 echo "$ac_t""yes" 1>&6
3330 :
3331else
3332 echo "$ac_t""no" 1>&6
3333fi
3334
3335 if test $ac_cv_func_connect = no; then
3336 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003337echo "configure:3338: checking for connect in -lsocket" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003338ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3339if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3340 echo $ac_n "(cached) $ac_c" 1>&6
3341else
3342 ac_save_LIBS="$LIBS"
3343LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
3344cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003345#line 3346 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003346#include "confdefs.h"
3347/* Override any gcc2 internal prototype to avoid an error. */
3348/* We use char because int might match the return type of a gcc2
3349 builtin and then its argument prototype would still apply. */
3350char connect();
3351
3352int main() {
3353connect()
3354; return 0; }
3355EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003356if { (eval echo configure:3357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003357 rm -rf conftest*
3358 eval "ac_cv_lib_$ac_lib_var=yes"
3359else
3360 echo "configure: failed program was:" >&5
3361 cat conftest.$ac_ext >&5
3362 rm -rf conftest*
3363 eval "ac_cv_lib_$ac_lib_var=no"
3364fi
3365rm -f conftest*
3366LIBS="$ac_save_LIBS"
3367
3368fi
3369if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3370 echo "$ac_t""yes" 1>&6
3371 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3372else
3373 echo "$ac_t""no" 1>&6
3374fi
3375
3376 fi
3377
3378 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3379 echo $ac_n "checking for remove""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003380echo "configure:3381: checking for remove" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003381if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3382 echo $ac_n "(cached) $ac_c" 1>&6
3383else
3384 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003385#line 3386 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003386#include "confdefs.h"
3387/* System header to define __stub macros and hopefully few prototypes,
3388 which can conflict with char remove(); below. */
3389#include <assert.h>
3390/* Override any gcc2 internal prototype to avoid an error. */
3391/* We use char because int might match the return type of a gcc2
3392 builtin and then its argument prototype would still apply. */
3393char remove();
3394
3395int main() {
3396
3397/* The GNU C library defines this for functions which it implements
3398 to always fail with ENOSYS. Some functions are actually named
3399 something starting with __ and the normal name is an alias. */
3400#if defined (__stub_remove) || defined (__stub___remove)
3401choke me
3402#else
3403remove();
3404#endif
3405
3406; return 0; }
3407EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003408if { (eval echo configure:3409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003409 rm -rf conftest*
3410 eval "ac_cv_func_remove=yes"
3411else
3412 echo "configure: failed program was:" >&5
3413 cat conftest.$ac_ext >&5
3414 rm -rf conftest*
3415 eval "ac_cv_func_remove=no"
3416fi
3417rm -f conftest*
3418fi
3419
3420if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3421 echo "$ac_t""yes" 1>&6
3422 :
3423else
3424 echo "$ac_t""no" 1>&6
3425fi
3426
3427 if test $ac_cv_func_remove = no; then
3428 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003429echo "configure:3430: checking for remove in -lposix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003430ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3431if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3432 echo $ac_n "(cached) $ac_c" 1>&6
3433else
3434 ac_save_LIBS="$LIBS"
3435LIBS="-lposix $LIBS"
3436cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003437#line 3438 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003438#include "confdefs.h"
3439/* Override any gcc2 internal prototype to avoid an error. */
3440/* We use char because int might match the return type of a gcc2
3441 builtin and then its argument prototype would still apply. */
3442char remove();
3443
3444int main() {
3445remove()
3446; return 0; }
3447EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003448if { (eval echo configure:3449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003449 rm -rf conftest*
3450 eval "ac_cv_lib_$ac_lib_var=yes"
3451else
3452 echo "configure: failed program was:" >&5
3453 cat conftest.$ac_ext >&5
3454 rm -rf conftest*
3455 eval "ac_cv_lib_$ac_lib_var=no"
3456fi
3457rm -f conftest*
3458LIBS="$ac_save_LIBS"
3459
3460fi
3461if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3462 echo "$ac_t""yes" 1>&6
3463 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3464else
3465 echo "$ac_t""no" 1>&6
3466fi
3467
3468 fi
3469
3470 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3471 echo $ac_n "checking for shmat""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003472echo "configure:3473: checking for shmat" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003473if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3474 echo $ac_n "(cached) $ac_c" 1>&6
3475else
3476 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003477#line 3478 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003478#include "confdefs.h"
3479/* System header to define __stub macros and hopefully few prototypes,
3480 which can conflict with char shmat(); below. */
3481#include <assert.h>
3482/* Override any gcc2 internal prototype to avoid an error. */
3483/* We use char because int might match the return type of a gcc2
3484 builtin and then its argument prototype would still apply. */
3485char shmat();
3486
3487int main() {
3488
3489/* The GNU C library defines this for functions which it implements
3490 to always fail with ENOSYS. Some functions are actually named
3491 something starting with __ and the normal name is an alias. */
3492#if defined (__stub_shmat) || defined (__stub___shmat)
3493choke me
3494#else
3495shmat();
3496#endif
3497
3498; return 0; }
3499EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003500if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003501 rm -rf conftest*
3502 eval "ac_cv_func_shmat=yes"
3503else
3504 echo "configure: failed program was:" >&5
3505 cat conftest.$ac_ext >&5
3506 rm -rf conftest*
3507 eval "ac_cv_func_shmat=no"
3508fi
3509rm -f conftest*
3510fi
3511
3512if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3513 echo "$ac_t""yes" 1>&6
3514 :
3515else
3516 echo "$ac_t""no" 1>&6
3517fi
3518
3519 if test $ac_cv_func_shmat = no; then
3520 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003521echo "configure:3522: checking for shmat in -lipc" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003522ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3523if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3524 echo $ac_n "(cached) $ac_c" 1>&6
3525else
3526 ac_save_LIBS="$LIBS"
3527LIBS="-lipc $LIBS"
3528cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003529#line 3530 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003530#include "confdefs.h"
3531/* Override any gcc2 internal prototype to avoid an error. */
3532/* We use char because int might match the return type of a gcc2
3533 builtin and then its argument prototype would still apply. */
3534char shmat();
3535
3536int main() {
3537shmat()
3538; return 0; }
3539EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003540if { (eval echo configure:3541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003541 rm -rf conftest*
3542 eval "ac_cv_lib_$ac_lib_var=yes"
3543else
3544 echo "configure: failed program was:" >&5
3545 cat conftest.$ac_ext >&5
3546 rm -rf conftest*
3547 eval "ac_cv_lib_$ac_lib_var=no"
3548fi
3549rm -f conftest*
3550LIBS="$ac_save_LIBS"
3551
3552fi
3553if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3554 echo "$ac_t""yes" 1>&6
3555 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3556else
3557 echo "$ac_t""no" 1>&6
3558fi
3559
3560 fi
3561 fi
3562
3563 # Check for libraries that X11R6 Xt/Xaw programs need.
3564 ac_save_LDFLAGS="$LDFLAGS"
3565 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3566 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3567 # check for ICE first), but we must link in the order -lSM -lICE or
3568 # we get undefined symbols. So assume we have SM if we have ICE.
3569 # These have to be linked with before -lX11, unlike the other
3570 # libraries we check for below, so use a different variable.
3571 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3572 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003573echo "configure:3574: checking for IceConnectionNumber in -lICE" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003574ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3575if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3576 echo $ac_n "(cached) $ac_c" 1>&6
3577else
3578 ac_save_LIBS="$LIBS"
3579LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3580cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003581#line 3582 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003582#include "confdefs.h"
3583/* Override any gcc2 internal prototype to avoid an error. */
3584/* We use char because int might match the return type of a gcc2
3585 builtin and then its argument prototype would still apply. */
3586char IceConnectionNumber();
3587
3588int main() {
3589IceConnectionNumber()
3590; return 0; }
3591EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003592if { (eval echo configure:3593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003593 rm -rf conftest*
3594 eval "ac_cv_lib_$ac_lib_var=yes"
3595else
3596 echo "configure: failed program was:" >&5
3597 cat conftest.$ac_ext >&5
3598 rm -rf conftest*
3599 eval "ac_cv_lib_$ac_lib_var=no"
3600fi
3601rm -f conftest*
3602LIBS="$ac_save_LIBS"
3603
3604fi
3605if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3606 echo "$ac_t""yes" 1>&6
3607 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3608else
3609 echo "$ac_t""no" 1>&6
3610fi
3611
3612 LDFLAGS="$ac_save_LDFLAGS"
3613
3614fi
3615
3616
3617 if test "$OS390Unix" = "yes"; then
3618 CFLAGS="$CFLAGS -W c,dll"
3619 LDFLAGS="$LDFLAGS -W l,dll"
3620 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
3621 fi
3622
3623
3624 if test -d "$x_includes" && test ! -d "$x_libraries"; then
3625 x_libraries=`echo "$x_includes" | sed s/include/lib/`
3626 echo "$ac_t""Corrected X libraries to $x_libraries" 1>&6
3627 X_LIBS="$X_LIBS -L$x_libraries"
3628 if test "`(uname) 2>/dev/null`" = SunOS &&
3629 uname -r | grep '^5' >/dev/null; then
3630 X_LIBS="$X_LIBS -R $x_libraries"
3631 fi
3632 fi
3633
3634 if test -d "$x_libraries" && test ! -d "$x_includes"; then
3635 x_includes=`echo "$x_libraries" | sed s/lib/include/`
3636 echo "$ac_t""Corrected X includes to $x_includes" 1>&6
3637 X_CFLAGS="$X_CFLAGS -I$x_includes"
3638 fi
3639
3640 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`"
3641 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`"
3642 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
3643
3644
3645 echo $ac_n "checking if X11 header files can be found""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003646echo "configure:3647: checking if X11 header files can be found" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003647 cflags_save=$CFLAGS
3648 CFLAGS="$CFLAGS $X_CFLAGS"
3649 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003650#line 3651 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003651#include "confdefs.h"
3652#include <X11/Xlib.h>
3653int main() {
3654
3655; return 0; }
3656EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003657if { (eval echo configure:3658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003658 rm -rf conftest*
3659 echo "$ac_t""yes" 1>&6
3660else
3661 echo "configure: failed program was:" >&5
3662 cat conftest.$ac_ext >&5
3663 rm -rf conftest*
3664 echo "$ac_t""no" 1>&6; no_x=yes
3665fi
3666rm -f conftest*
3667 CFLAGS=$cflags_save
3668
3669 if test "${no_x-no}" = yes; then
3670 with_x=no
3671 else
3672 cat >> confdefs.h <<\EOF
3673#define HAVE_X11 1
3674EOF
3675
3676 X_LIB="-lXt -lX11";
3677
3678
3679 ac_save_LDFLAGS="$LDFLAGS"
3680 LDFLAGS="-L$x_libraries $LDFLAGS"
3681
3682 echo $ac_n "checking for _XdmcpAuthDoIt in -lXdmcp""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003683echo "configure:3684: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003684ac_lib_var=`echo Xdmcp'_'_XdmcpAuthDoIt | sed 'y%./+-%__p_%'`
3685if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3686 echo $ac_n "(cached) $ac_c" 1>&6
3687else
3688 ac_save_LIBS="$LIBS"
3689LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
3690cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003691#line 3692 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003692#include "confdefs.h"
3693/* Override any gcc2 internal prototype to avoid an error. */
3694/* We use char because int might match the return type of a gcc2
3695 builtin and then its argument prototype would still apply. */
3696char _XdmcpAuthDoIt();
3697
3698int main() {
3699_XdmcpAuthDoIt()
3700; return 0; }
3701EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003702if { (eval echo configure:3703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003703 rm -rf conftest*
3704 eval "ac_cv_lib_$ac_lib_var=yes"
3705else
3706 echo "configure: failed program was:" >&5
3707 cat conftest.$ac_ext >&5
3708 rm -rf conftest*
3709 eval "ac_cv_lib_$ac_lib_var=no"
3710fi
3711rm -f conftest*
3712LIBS="$ac_save_LIBS"
3713
3714fi
3715if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3716 echo "$ac_t""yes" 1>&6
3717 X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
3718else
3719 echo "$ac_t""no" 1>&6
3720fi
3721
3722
3723 echo $ac_n "checking for IceOpenConnection in -lICE""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003724echo "configure:3725: checking for IceOpenConnection in -lICE" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003725ac_lib_var=`echo ICE'_'IceOpenConnection | sed 'y%./+-%__p_%'`
3726if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3727 echo $ac_n "(cached) $ac_c" 1>&6
3728else
3729 ac_save_LIBS="$LIBS"
3730LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3731cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003732#line 3733 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003733#include "confdefs.h"
3734/* Override any gcc2 internal prototype to avoid an error. */
3735/* We use char because int might match the return type of a gcc2
3736 builtin and then its argument prototype would still apply. */
3737char IceOpenConnection();
3738
3739int main() {
3740IceOpenConnection()
3741; return 0; }
3742EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003743if { (eval echo configure:3744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003744 rm -rf conftest*
3745 eval "ac_cv_lib_$ac_lib_var=yes"
3746else
3747 echo "configure: failed program was:" >&5
3748 cat conftest.$ac_ext >&5
3749 rm -rf conftest*
3750 eval "ac_cv_lib_$ac_lib_var=no"
3751fi
3752rm -f conftest*
3753LIBS="$ac_save_LIBS"
3754
3755fi
3756if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3757 echo "$ac_t""yes" 1>&6
3758 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
3759else
3760 echo "$ac_t""no" 1>&6
3761fi
3762
3763
3764 LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
3765 echo $ac_n "checking for XpmCreatePixmapFromData in -lXpm""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003766echo "configure:3767: checking for XpmCreatePixmapFromData in -lXpm" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003767ac_lib_var=`echo Xpm'_'XpmCreatePixmapFromData | sed 'y%./+-%__p_%'`
3768if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3769 echo $ac_n "(cached) $ac_c" 1>&6
3770else
3771 ac_save_LIBS="$LIBS"
3772LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
3773cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003774#line 3775 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003775#include "confdefs.h"
3776/* Override any gcc2 internal prototype to avoid an error. */
3777/* We use char because int might match the return type of a gcc2
3778 builtin and then its argument prototype would still apply. */
3779char XpmCreatePixmapFromData();
3780
3781int main() {
3782XpmCreatePixmapFromData()
3783; return 0; }
3784EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003785if { (eval echo configure:3786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003786 rm -rf conftest*
3787 eval "ac_cv_lib_$ac_lib_var=yes"
3788else
3789 echo "configure: failed program was:" >&5
3790 cat conftest.$ac_ext >&5
3791 rm -rf conftest*
3792 eval "ac_cv_lib_$ac_lib_var=no"
3793fi
3794rm -f conftest*
3795LIBS="$ac_save_LIBS"
3796
3797fi
3798if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3799 echo "$ac_t""yes" 1>&6
3800 X_PRE_LIBS="$X_PRE_LIBS -lXpm"
3801else
3802 echo "$ac_t""no" 1>&6
3803fi
3804
3805
3806 echo $ac_n "checking if X11 header files implicitly declare return values""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003807echo "configure:3808: checking if X11 header files implicitly declare return values" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003808 cflags_save=$CFLAGS
3809 CFLAGS="$CFLAGS $X_CFLAGS -Werror"
3810 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003811#line 3812 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003812#include "confdefs.h"
3813#include <X11/Xlib.h>
3814int main() {
3815
3816; return 0; }
3817EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003818if { (eval echo configure:3819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003819 rm -rf conftest*
3820 echo "$ac_t""no" 1>&6
3821else
3822 echo "configure: failed program was:" >&5
3823 cat conftest.$ac_ext >&5
3824 rm -rf conftest*
3825 CFLAGS="$CFLAGS -Wno-implicit-int"
3826 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003827#line 3828 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003828#include "confdefs.h"
3829#include <X11/Xlib.h>
3830int main() {
3831
3832; return 0; }
3833EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003834if { (eval echo configure:3835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003835 rm -rf conftest*
3836 echo "$ac_t""yes" 1>&6; cflags_save="$cflags_save -Wno-implicit-int"
3837else
3838 echo "configure: failed program was:" >&5
3839 cat conftest.$ac_ext >&5
3840 rm -rf conftest*
3841 echo "$ac_t""test failed" 1>&6
3842
3843fi
3844rm -f conftest*
3845
3846fi
3847rm -f conftest*
3848 CFLAGS=$cflags_save
3849
3850 LDFLAGS="$ac_save_LDFLAGS"
3851
3852 fi
3853fi
3854
3855test "x$with_x" = xno -a "x$BEOS" != "xyes" -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
3856
3857echo $ac_n "checking --enable-gui argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003858echo "configure:3859: checking --enable-gui argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003859# Check whether --enable-gui or --disable-gui was given.
3860if test "${enable_gui+set}" = set; then
3861 enableval="$enable_gui"
3862 :
3863else
3864 enable_gui="auto"
3865fi
3866
3867
3868enable_gui_canon=`echo "_$enable_gui" | \
3869 sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
3870
3871SKIP_GTK=YES
3872SKIP_GTK2=YES
3873SKIP_GNOME=YES
Bram Moolenaar592e0a22004-07-03 16:05:59 +00003874SKIP_KDE=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00003875SKIP_MOTIF=YES
3876SKIP_ATHENA=YES
3877SKIP_NEXTAW=YES
3878SKIP_PHOTON=YES
3879SKIP_BEOS=YES
3880SKIP_CARBON=YES
3881GUITYPE=NONE
3882
3883if test "x$BEOS" = "xyes"; then
3884 SKIP_BEOS=
3885 case "$enable_gui_canon" in
3886 no) echo "$ac_t""no GUI support" 1>&6
3887 SKIP_BEOS=YES ;;
3888 yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
3889 auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
3890 beos) echo "$ac_t""BeOS GUI support" 1>&6 ;;
3891 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
3892 SKIP_BEOS=YES ;;
3893 esac
3894
3895elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
3896 SKIP_PHOTON=
3897 case "$enable_gui_canon" in
3898 no) echo "$ac_t""no GUI support" 1>&6
3899 SKIP_PHOTON=YES ;;
3900 yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
3901 auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
3902 photon) echo "$ac_t""Photon GUI support" 1>&6 ;;
3903 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
3904 SKIP_PHOTON=YES ;;
3905 esac
3906
3907elif test "x$MACOSX" = "xyes" -a "x$with_x" = "xno" ; then
3908 SKIP_CARBON=
3909 case "$enable_gui_canon" in
3910 no) echo "$ac_t""no GUI support" 1>&6
3911 SKIP_CARBON=YES ;;
3912 yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
3913 auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
3914 carbon) echo "$ac_t""Carbon GUI support" 1>&6 ;;
3915 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
3916 SKIP_CARBON=YES ;;
3917 esac
3918
3919else
3920
Bram Moolenaar071d4272004-06-13 20:20:40 +00003921 case "$enable_gui_canon" in
3922 no|none) echo "$ac_t""no GUI support" 1>&6 ;;
3923 yes|""|auto) echo "$ac_t""yes/auto - automatic GUI support" 1>&6
3924 SKIP_GTK=
3925 SKIP_GTK2=
3926 SKIP_GNOME=
3927 SKIP_MOTIF=
3928 SKIP_ATHENA=
3929 SKIP_NEXTAW=
3930 SKIP_CARBON=;;
Bram Moolenaar843ee412004-06-30 16:16:41 +00003931 kde|Kde|KDE) echo "$ac_t""KDE 2.x or 3.x GUI support" 1>&6
3932 SKIP_KDE=;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00003933 gtk) echo "$ac_t""GTK+ 1.x GUI support" 1>&6
3934 SKIP_GTK=;;
3935 gtk2) echo "$ac_t""GTK+ 2.x GUI support" 1>&6
3936 SKIP_GTK=
3937 SKIP_GTK2=;;
3938 gnome) echo "$ac_t""GNOME 1.x GUI support" 1>&6
3939 SKIP_GNOME=
3940 SKIP_GTK=;;
3941 gnome2) echo "$ac_t""GNOME 2.x GUI support" 1>&6
3942 SKIP_GNOME=
3943 SKIP_GTK=
3944 SKIP_GTK2=;;
3945 motif) echo "$ac_t""Motif GUI support" 1>&6
3946 SKIP_MOTIF=;;
3947 athena) echo "$ac_t""Athena GUI support" 1>&6
3948 SKIP_ATHENA=;;
3949 nextaw) echo "$ac_t""neXtaw GUI support" 1>&6
3950 SKIP_NEXTAW=;;
3951 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;;
3952 esac
3953
3954fi
3955
Bram Moolenaar843ee412004-06-30 16:16:41 +00003956if test "x$SKIP_KDE" != "xYES" -a "$enable_gui_canon" != "kde"; then
3957 echo $ac_n "checking whether or not to look for KDE""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003958echo "configure:3959: checking whether or not to look for KDE" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00003959 # Check whether --enable-kde-check or --disable-kde-check was given.
3960if test "${enable_kde_check+set}" = set; then
3961 enableval="$enable_kde_check"
3962 :
3963else
3964 enable_kde_check="no"
3965fi
3966
3967 echo "$ac_t""$enable_kde_check" 1>&6;
3968 if test "x$enable_kde_check" = "xno"; then
3969 SKIP_KDE=YES
3970 fi
3971fi
3972
Bram Moolenaar071d4272004-06-13 20:20:40 +00003973if test "x$SKIP_GTK" != "xYES" -a "$enable_gui_canon" != "gtk" -a "$enable_gui_canon" != "gtk2"; then
3974 echo $ac_n "checking whether or not to look for GTK""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003975echo "configure:3976: checking whether or not to look for GTK" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003976 # Check whether --enable-gtk-check or --disable-gtk-check was given.
3977if test "${enable_gtk_check+set}" = set; then
3978 enableval="$enable_gtk_check"
3979 :
3980else
3981 enable_gtk_check="yes"
3982fi
3983
3984 echo "$ac_t""$enable_gtk_check" 1>&6
3985 if test "x$enable_gtk_check" = "xno"; then
3986 SKIP_GTK=YES
3987 SKIP_GNOME=YES
3988 fi
3989fi
3990
3991if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
3992 -a "$enable_gui_canon" != "gnome2"; then
3993 echo $ac_n "checking whether or not to look for GTK+ 2""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00003994echo "configure:3995: checking whether or not to look for GTK+ 2" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003995 # Check whether --enable-gtk2-check or --disable-gtk2-check was given.
3996if test "${enable_gtk2_check+set}" = set; then
3997 enableval="$enable_gtk2_check"
3998 :
3999else
4000 enable_gtk2_check="yes"
4001fi
4002
4003 echo "$ac_t""$enable_gtk2_check" 1>&6
4004 if test "x$enable_gtk2_check" = "xno"; then
4005 SKIP_GTK2=YES
4006 fi
4007fi
4008
4009if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome" \
4010 -a "$enable_gui_canon" != "gnome2"; then
4011 echo $ac_n "checking whether or not to look for GNOME""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004012echo "configure:4013: checking whether or not to look for GNOME" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004013 # Check whether --enable-gnome-check or --disable-gnome-check was given.
4014if test "${enable_gnome_check+set}" = set; then
4015 enableval="$enable_gnome_check"
4016 :
4017else
4018 enable_gnome_check="no"
4019fi
4020
4021 echo "$ac_t""$enable_gnome_check" 1>&6
4022 if test "x$enable_gnome_check" = "xno"; then
4023 SKIP_GNOME=YES
4024 fi
4025fi
4026
4027if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
4028 echo $ac_n "checking whether or not to look for Motif""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004029echo "configure:4030: checking whether or not to look for Motif" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004030 # Check whether --enable-motif-check or --disable-motif-check was given.
4031if test "${enable_motif_check+set}" = set; then
4032 enableval="$enable_motif_check"
4033 :
4034else
4035 enable_motif_check="yes"
4036fi
4037
4038 echo "$ac_t""$enable_motif_check" 1>&6
4039 if test "x$enable_motif_check" = "xno"; then
4040 SKIP_MOTIF=YES
4041 fi
4042fi
4043
4044if test "x$SKIP_ATHENA" != "xYES" -a "$enable_gui_canon" != "athena"; then
4045 echo $ac_n "checking whether or not to look for Athena""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004046echo "configure:4047: checking whether or not to look for Athena" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004047 # Check whether --enable-athena-check or --disable-athena-check was given.
4048if test "${enable_athena_check+set}" = set; then
4049 enableval="$enable_athena_check"
4050 :
4051else
4052 enable_athena_check="yes"
4053fi
4054
4055 echo "$ac_t""$enable_athena_check" 1>&6
4056 if test "x$enable_athena_check" = "xno"; then
4057 SKIP_ATHENA=YES
4058 fi
4059fi
4060
4061if test "x$SKIP_NEXTAW" != "xYES" -a "$enable_gui_canon" != "nextaw"; then
4062 echo $ac_n "checking whether or not to look for neXtaw""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004063echo "configure:4064: checking whether or not to look for neXtaw" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004064 # Check whether --enable-nextaw-check or --disable-nextaw-check was given.
4065if test "${enable_nextaw_check+set}" = set; then
4066 enableval="$enable_nextaw_check"
4067 :
4068else
4069 enable_nextaw_check="yes"
4070fi
4071
4072 echo "$ac_t""$enable_nextaw_check" 1>&6;
4073 if test "x$enable_nextaw_check" = "xno"; then
4074 SKIP_NEXTAW=YES
4075 fi
4076fi
4077
4078if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
4079 echo $ac_n "checking whether or not to look for Carbon""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004080echo "configure:4081: checking whether or not to look for Carbon" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004081 # Check whether --enable-carbon-check or --disable-carbon-check was given.
4082if test "${enable_carbon_check+set}" = set; then
4083 enableval="$enable_carbon_check"
4084 :
4085else
4086 enable_carbon_check="yes"
4087fi
4088
4089 echo "$ac_t""$enable_carbon_check" 1>&6;
4090 if test "x$enable_carbon_check" = "xno"; then
4091 SKIP_CARBON=YES
4092 fi
4093fi
4094
Bram Moolenaar843ee412004-06-30 16:16:41 +00004095
4096if test -z "$SKIP_KDE"; then
4097# Check whether --with-qt-dir or --without-qt-dir was given.
4098if test "${with_qt_dir+set}" = set; then
4099 withval="$with_qt_dir"
4100
4101 ROOTQT="$withval"
4102 MOC="$withval"/bin/moc
4103 QT_INCLUDES="$withval"/include
4104 QT_LIBS="$withval"/lib
4105
4106fi
4107
4108
4109if test "x$ROOTQT" = "x"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004110 if test -z "$QTDIR"; then
4111 # Extract the first word of "moc", so it can be a program name with args.
Bram Moolenaar843ee412004-06-30 16:16:41 +00004112set dummy moc; ac_word=$2
4113echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004114echo "configure:4115: checking for $ac_word" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004115if eval "test \"`echo '$''{'ac_cv_path_MOC'+set}'`\" = set"; then
4116 echo $ac_n "(cached) $ac_c" 1>&6
4117else
4118 case "$MOC" in
4119 /*)
4120 ac_cv_path_MOC="$MOC" # Let the user override the test with a path.
4121 ;;
4122 ?:/*)
4123 ac_cv_path_MOC="$MOC" # Let the user override the test with a dos path.
4124 ;;
4125 *)
4126 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4127 ac_dummy="$PATH"
4128 for ac_dir in $ac_dummy; do
4129 test -z "$ac_dir" && ac_dir=.
4130 if test -f $ac_dir/$ac_word; then
4131 ac_cv_path_MOC="$ac_dir/$ac_word"
4132 break
4133 fi
4134 done
4135 IFS="$ac_save_ifs"
4136 test -z "$ac_cv_path_MOC" && ac_cv_path_MOC="no"
4137 ;;
4138esac
4139fi
4140MOC="$ac_cv_path_MOC"
4141if test -n "$MOC"; then
4142 echo "$ac_t""$MOC" 1>&6
4143else
4144 echo "$ac_t""no" 1>&6
4145fi
4146
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004147 if test "x$MOC" = "xno"; then
4148 { echo "configure: error: could not find Qt directory" 1>&2; exit 1; }
4149 else
4150 ROOTQT=`echo $MOC | sed 's+/bin/moc++'`
4151 fi
4152 else
4153 ROOTQT="$QTDIR"
4154 fi
Bram Moolenaar843ee412004-06-30 16:16:41 +00004155fi
4156MOC="$ROOTQT"/bin/moc
4157QT_INCLUDES="$ROOTQT"/include
4158QT_LIBS="$ROOTQT"/lib
4159
4160# Check whether --with-qt-includes or --without-qt-includes was given.
4161if test "${with_qt_includes+set}" = set; then
4162 withval="$with_qt_includes"
4163 QT_INCLUDES="$withval"
4164
4165fi
4166
4167
4168# Check whether --with-qt-libraries or --without-qt-libraries was given.
4169if test "${with_qt_libraries+set}" = set; then
4170 withval="$with_qt_libraries"
4171 QT_LIBS="$withval"
4172
4173fi
4174
4175
4176if test "x$QT_LIBS" = "x" ; then
4177 QT_LIBS="$ROOTQT"/lib
4178fi
4179if test "x$QT_INCLUDES" = "x" ; then
4180 QT_INCLUDES="$ROOTQT"/include
4181fi
4182
4183echo $ac_n "checking whether or not to use a KDE Toolbar in KVim""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004184echo "configure:4185: checking whether or not to use a KDE Toolbar in KVim" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004185# Check whether --enable-kde-toolbar or --disable-kde-toolbar was given.
4186if test "${enable_kde_toolbar+set}" = set; then
4187 enableval="$enable_kde_toolbar"
4188 :
4189else
4190 enable_kde_toolbar="no"
4191fi
4192
4193if test "x$enable_kde_toolbar" != "xno"; then
4194 cat >> confdefs.h <<\EOF
4195#define FEAT_KDETOOLBAR 1
4196EOF
4197
4198fi
4199echo "$ac_t""$enable_kde_toolbar" 1>&6;
4200fi
4201
4202
4203if test -z "$SKIP_KDE"; then
4204
4205
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004206
4207
Bram Moolenaar843ee412004-06-30 16:16:41 +00004208echo $ac_n "checking --disable-rpath argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004209echo "configure:4210: checking --disable-rpath argument" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004210# Check whether --enable-rpath or --disable-rpath was given.
4211if test "${enable_rpath+set}" = set; then
4212 enableval="$enable_rpath"
4213 :
4214else
4215 enable_rpath="yes"
4216fi
4217
4218if test "$enable_rpath" = "yes"; then
4219 echo "$ac_t""no" 1>&6
4220else
4221 echo "$ac_t""yes" 1>&6
4222fi
4223
4224echo $ac_n "checking --with-kde-prefix argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004225echo "configure:4226: checking --with-kde-prefix argument" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004226# Check whether --with-kde-prefix or --without-kde-prefix was given.
4227if test "${with_kde_prefix+set}" = set; then
4228 withval="$with_kde_prefix"
4229 kde_config_prefix="$withval";
4230echo "$ac_t""$kde_config_prefix" 1>&6
4231else
4232 kde_config_prefix="";echo "$ac_t""no" 1>&6
4233fi
4234
4235
4236# Check whether --with-kde-includes or --without-kde-includes was given.
4237if test "${with_kde_includes+set}" = set; then
4238 withval="$with_kde_includes"
4239 KDE_INCLUDES="$withval"
4240
4241fi
4242
4243
4244# Check whether --with-kde-libraries or --without-kde-libraries was given.
4245if test "${with_kde_libraries+set}" = set; then
4246 withval="$with_kde_libraries"
4247 KDE_LIBS="$withval"
4248
4249fi
4250
4251
4252echo $ac_n "checking --disable-kdetest argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004253echo "configure:4254: checking --disable-kdetest argument" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004254# Check whether --enable-kdetest or --disable-kdetest was given.
4255if test "${enable_kdetest+set}" = set; then
4256 enableval="$enable_kdetest"
4257 enable_kdetest=yes
4258fi
4259
4260
4261if test "x$enable_kdetest" = "xyes" ; then
4262 echo "$ac_t""kde test enabled" 1>&6
4263else
4264 echo "$ac_t""kde test disabled" 1>&6
4265fi
4266
4267if test "x$kde_config_prefix" != "x" ; then
Bram Moolenaar843ee412004-06-30 16:16:41 +00004268 KDE_CONFIG=$kde_config_prefix/bin/kde-config
4269fi
4270
4271if test "X$KDE_CONFIG" = "X"; then
4272 # Extract the first word of "kde-config", so it can be a program name with args.
4273set dummy kde-config; ac_word=$2
4274echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004275echo "configure:4276: checking for $ac_word" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004276if eval "test \"`echo '$''{'ac_cv_path_KDE_CONFIG'+set}'`\" = set"; then
4277 echo $ac_n "(cached) $ac_c" 1>&6
4278else
4279 case "$KDE_CONFIG" in
4280 /*)
4281 ac_cv_path_KDE_CONFIG="$KDE_CONFIG" # Let the user override the test with a path.
4282 ;;
4283 ?:/*)
4284 ac_cv_path_KDE_CONFIG="$KDE_CONFIG" # Let the user override the test with a dos path.
4285 ;;
4286 *)
4287 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4288 ac_dummy="$PATH"
4289 for ac_dir in $ac_dummy; do
4290 test -z "$ac_dir" && ac_dir=.
4291 if test -f $ac_dir/$ac_word; then
4292 ac_cv_path_KDE_CONFIG="$ac_dir/$ac_word"
4293 break
4294 fi
4295 done
4296 IFS="$ac_save_ifs"
4297 test -z "$ac_cv_path_KDE_CONFIG" && ac_cv_path_KDE_CONFIG="no"
4298 ;;
4299esac
4300fi
4301KDE_CONFIG="$ac_cv_path_KDE_CONFIG"
4302if test -n "$KDE_CONFIG"; then
4303 echo "$ac_t""$KDE_CONFIG" 1>&6
4304else
4305 echo "$ac_t""no" 1>&6
4306fi
4307
4308else
4309 echo "$ac_t""Using KDE configuration program $KDE_CONFIG" 1>&6
4310fi
4311
4312if test "X$KDE_CONFIG" != "X" ; then
4313
4314 if test "X$KDE_CONFIG" != "X"; then
4315 min_kde_version=2.0.0
4316 echo $ac_n "checking for KDE version >= $min_kde_version""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004317echo "configure:4318: checking for KDE version >= $min_kde_version" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004318 no_kde=""
4319 if test "$KDE_CONFIG" = "no" ; then
4320 no_kde=yes
4321 else
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004322 KDE_PREFIX=`$KDE_CONFIG --prefix`
Bram Moolenaar843ee412004-06-30 16:16:41 +00004323 if test "x$KDE_LIBS" = "x"; then
4324 KDE_LIBS="$KDE_PREFIX/lib"
4325 fi
4326 if test "x$KDE_INCLUDES" = "x"; then
Bram Moolenaar592e0a22004-07-03 16:05:59 +00004327 KDE_INCLUDES="$KDE_PREFIX/include"
4328 if test -d "$KDE_INCLUDES/kde"; then
4329 KDE_INCLUDES="$KDE_INCLUDES/kde"
4330 fi
Bram Moolenaar843ee412004-06-30 16:16:41 +00004331 fi
4332 kde_major_version=`$KDE_CONFIG --version | grep KDE | \
4333sed 's/KDE:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\1/'`
4334 kde_minor_version=`$KDE_CONFIG --version | grep KDE | \
4335sed 's/KDE:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\2/'`
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004336
Bram Moolenaar843ee412004-06-30 16:16:41 +00004337 qt_major_version=`$KDE_CONFIG --version | grep Qt | sed -e \
4338's/Qt:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\1/'`
4339 qt_minor_version=`$KDE_CONFIG --version | grep Qt | sed -e \
4340's/Qt:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\2/'`
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004341
Bram Moolenaar843ee412004-06-30 16:16:41 +00004342 if test "x$enable-kdetest" = "xyes" ; then
4343 ac_save_LIBS="$LIBS"
4344 LIBS="$LIBS $KDE_LIBS"
4345
4346 if test "$cross_compiling" = yes; then
4347 echo $ac_n "cross compiling KDE ? ? how can i remove that ? :)"
4348else
4349 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004350#line 4351 "configure"
Bram Moolenaar843ee412004-06-30 16:16:41 +00004351#include "confdefs.h"
4352
4353#include <stdio.h>
4354int
4355main()
4356{ return 0; }
4357
4358EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004359if { (eval echo configure:4360: \"$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 +00004360then
4361 :
4362else
4363 echo "configure: failed program was:" >&5
4364 cat conftest.$ac_ext >&5
4365 rm -fr conftest*
4366 no_kde=yes
4367fi
4368rm -fr conftest*
4369fi
4370
4371 LIBS="$ac_save_LIBS"
4372 fi
4373 fi
4374 if test "x$no_kde" = x ; then
4375 echo "$ac_t""found KDE $kde_major_version.$kde_minor_version" 1>&6
4376 GUI_LIB_LOC="-L$KDE_LIBS -lkdeui -lkdecore -lDCOP"
4377 GUI_INC_LOC="-I$KDE_INCLUDES"
4378 KDEDIR="$KDE_PREFIX"
4379 else
4380 echo "$ac_t""no" 1>&6
4381 KDE_LIBS=""
4382 :
4383 fi
4384else
4385 echo "$ac_t""no" 1>&6
4386 KDE_LIBS=""
4387 :
4388fi
4389
4390
4391
4392
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004393
Bram Moolenaar843ee412004-06-30 16:16:41 +00004394 if test "x$KDE_PREFIX" != "x"; then
4395 echo $ac_n "checking for QT version $qt_major_version.x""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004396echo "configure:4397: checking for QT version $qt_major_version.x" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004397 if test "x$ROOTQT" != "x" ; then
4398 GUI_INC_LOC="-I$QT_INCLUDES $GUI_INC_LOC"
4399 if test $qt_major_version -lt 2; then
4400 { 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; }
4401 fi
4402 if test "`(uname) 2>/dev/null`" = "FreeBSD"; then
4403 CFLAGS="$CFLAGS -D_THREAD_SAFE"
4404 CXXFLAGS="$CXXFLAGS -D_THREAD_SAFE"
4405 GUI_LIB_LOC="$GUI_LIB_LOC -pthread"
4406 LIBS="$LIBS -pthread"
4407 fi
4408
4409 if test "x$enable_rpath" = "xyes"; then
4410 if test $qt_major_version = 2; then
4411 GUI_LIB_LOC="-L$KDE_LIBS -lkfile -L$QT_LIBS -lqt $GUI_LIB_LOC \
4412-Wl,--rpath -Wl,$KDE_LIBS -Wl,--rpath -Wl,$QT_LIBS"
4413 else
4414 GUI_LIB_LOC="-L$KDE_LIBS -lkio -L$QT_LIBS -lqt-mt $GUI_LIB_LOC \
4415-Wl,--rpath -Wl,$KDE_LIBS -Wl,--rpath -Wl,$QT_LIBS"
4416 fi
4417 else
4418 if test $qt_major_version = 2; then
4419 GUI_LIB_LOC="-L$KDE_LIBS -lkfile -L$QT_LIBS -lqt $GUI_LIB_LOC"
4420 else
4421 GUI_LIB_LOC="-L$KDE_LIBS -lkio -L$QT_LIBS -lqt-mt $GUI_LIB_LOC"
4422 fi
4423 fi
4424
4425 GUI_INC_LOC="`echo $GUI_INC_LOC\ | sed 's%-I/usr/include %%'`"
4426
4427 echo "$ac_t""found $qt_major_version.$qt_minor_version in $ROOTQT" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004428
4429
4430 qt_incdir=NO
4431 for i in $QT_INCLUDES;
4432 do
4433 for j in qstyle.h;
4434 do
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004435 echo "configure: 4436: $i/$j" >&5
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004436 if test -r "$i/$j"; then
4437 echo "taking that" >&5
4438 qt_incdir=$i
4439 break 2
4440 fi
4441 done
4442 done
4443
4444 if test "x$qt_incdir" = "xNO"; then
4445 { echo "configure: error: Could not find Qt headers in $QT_INCLUDES" 1>&2; exit 1; }
4446 fi
4447
4448 kde_incdir=NO
4449 for i in $KDE_INCLUDES;
4450 do
4451 for j in kapplication.h;
4452 do
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004453 echo "configure: 4454: $i/$j" >&5
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004454 if test -r "$i/$j"; then
4455 echo "taking that" >&5
4456 kde_incdir=$i
4457 break 2
4458 fi
4459 done
4460 done
4461
4462 if test "x$kde_incdir" = "xNO"; then
4463 { echo "configure: error: Could not find KDE headers in $KDE_INCLUDES" 1>&2; exit 1; }
4464 fi
4465
4466
4467 ac_ext=C
4468# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4469ac_cpp='$CXXCPP $CPPFLAGS'
4470ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4471ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4472cross_compiling=$ac_cv_prog_cxx_cross
4473
4474 ac_save_LIBS="$LIBS"
4475 LIBS="$GUI_LIB_LOC"
4476 ac_save_CXXFLAGS="$CXXFLAGS"
4477 CXXFLAGS="$CXXFLAGS $GUI_INC_LOC"
4478 echo $ac_n "checking whether Qt libraries are usable""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004479echo "configure:4480: checking whether Qt libraries are usable" >&5
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004480 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004481#line 4482 "configure"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004482#include "confdefs.h"
4483#include <qapplication.h>
4484int main() {
4485
4486 int argc;
4487 char** argv;
4488 QApplication app(argc, argv);
4489
4490; return 0; }
4491EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004492if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004493 rm -rf conftest*
4494 echo "$ac_t""yes" 1>&6
4495else
4496 echo "configure: failed program was:" >&5
4497 cat conftest.$ac_ext >&5
4498 rm -rf conftest*
4499 echo "$ac_t""no" 1>&6;{ echo "configure: error: Qt fails to link a simple application" 1>&2; exit 1; }
4500fi
4501rm -f conftest*
4502
4503 echo $ac_n "checking whether KDE libraries are usable""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004504echo "configure:4505: checking whether KDE libraries are usable" >&5
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004505 cat > conftest.$ac_ext <<EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004506#line 4507 "configure"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004507#include "confdefs.h"
4508#include <kapplication.h>
4509int main() {
4510
4511 int argc;
4512 char** argv;
4513 KApplication app(argc, argv);
4514
4515; return 0; }
4516EOF
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004517if { (eval echo configure:4518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004518 rm -rf conftest*
4519 echo "$ac_t""yes" 1>&6
4520else
4521 echo "configure: failed program was:" >&5
4522 cat conftest.$ac_ext >&5
4523 rm -rf conftest*
4524 echo "$ac_t""no" 1>&6;{ echo "configure: error: KDE fails to link a simple application" 1>&2; exit 1; }
4525fi
4526rm -f conftest*
4527
4528 LIBS="$ac_save_LIBS"
4529 CXXFLAGS="$ac_save_CXXFLAGS"
4530 ac_ext=c
4531# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4532ac_cpp='$CPP $CPPFLAGS'
4533ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4534ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4535cross_compiling=$ac_cv_prog_cc_cross
4536
4537
4538
Bram Moolenaar843ee412004-06-30 16:16:41 +00004539 SKIP_GTK=YES
4540 SKIP_ATHENA=YES
4541 SKIP_MOTIF=YES
4542 GUITYPE=KDE
4543
4544
4545
4546
4547
4548 cat >> confdefs.h <<\EOF
4549#define FEAT_GUI_KDE 1
4550EOF
4551
4552 else
4553 { echo "configure: error: Detected QT version mismatched" 1>&2; exit 1; }
4554 fi
4555 else
4556 { echo "configure: error: Could not find KDE installation prefix" 1>&2; exit 1; }
4557 fi
4558fi
4559fi
4560
Bram Moolenaar071d4272004-06-13 20:20:40 +00004561if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
4562 echo $ac_n "checking for Carbon GUI""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004563echo "configure:4564: checking for Carbon GUI" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004564 echo "$ac_t""yes" 1>&6;
4565 GUITYPE=CARBONGUI
4566 SKIP_GTK=YES;
4567 SKIP_GTK2=YES;
4568 SKIP_GNOME=YES;
4569 SKIP_MOTIF=YES;
4570 SKIP_ATHENA=YES;
4571 SKIP_NEXTAW=YES;
4572 SKIP_PHOTON=YES;
4573 SKIP_BEOS=YES;
4574 SKIP_CARBON=YES
4575fi
4576
4577
4578
4579
4580
4581
4582
4583
4584
Bram Moolenaar071d4272004-06-13 20:20:40 +00004585if test -z "$SKIP_GTK"; then
4586
4587 echo $ac_n "checking --with-gtk-prefix argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004588echo "configure:4589: checking --with-gtk-prefix argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004589 # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
4590if test "${with_gtk_prefix+set}" = set; then
4591 withval="$with_gtk_prefix"
4592 gtk_config_prefix="$withval"; echo "$ac_t""$gtk_config_prefix" 1>&6
4593else
4594 gtk_config_prefix=""; echo "$ac_t""no" 1>&6
4595fi
4596
4597
4598 echo $ac_n "checking --with-gtk-exec-prefix argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004599echo "configure:4600: checking --with-gtk-exec-prefix argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004600 # Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
4601if test "${with_gtk_exec_prefix+set}" = set; then
4602 withval="$with_gtk_exec_prefix"
4603 gtk_config_exec_prefix="$withval"; echo "$ac_t""$gtk_config_prefix" 1>&6
4604else
4605 gtk_config_exec_prefix=""; echo "$ac_t""no" 1>&6
4606fi
4607
4608
4609 echo $ac_n "checking --disable-gtktest argument""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004610echo "configure:4611: checking --disable-gtktest argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004611 # Check whether --enable-gtktest or --disable-gtktest was given.
4612if test "${enable_gtktest+set}" = set; then
4613 enableval="$enable_gtktest"
4614 :
4615else
4616 enable_gtktest=yes
4617fi
4618
4619 if test "x$enable_gtktest" = "xyes" ; then
4620 echo "$ac_t""gtk test enabled" 1>&6
4621 else
4622 echo "$ac_t""gtk test disabled" 1>&6
4623 fi
4624
4625 if test "x$gtk_config_prefix" != "x" ; then
4626 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
4627 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
4628 fi
4629 if test "x$gtk_config_exec_prefix" != "x" ; then
4630 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
4631 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
4632 fi
4633 if test "X$GTK_CONFIG" = "X"; then
4634 # Extract the first word of "gtk-config", so it can be a program name with args.
4635set dummy gtk-config; ac_word=$2
4636echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004637echo "configure:4638: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004638if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
4639 echo $ac_n "(cached) $ac_c" 1>&6
4640else
4641 case "$GTK_CONFIG" in
4642 /*)
4643 ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
4644 ;;
4645 ?:/*)
4646 ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
4647 ;;
4648 *)
4649 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4650 ac_dummy="$PATH"
4651 for ac_dir in $ac_dummy; do
4652 test -z "$ac_dir" && ac_dir=.
4653 if test -f $ac_dir/$ac_word; then
4654 ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
4655 break
4656 fi
4657 done
4658 IFS="$ac_save_ifs"
4659 test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
4660 ;;
4661esac
4662fi
4663GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
4664if test -n "$GTK_CONFIG"; then
4665 echo "$ac_t""$GTK_CONFIG" 1>&6
4666else
4667 echo "$ac_t""no" 1>&6
4668fi
4669
4670 if test "X$GTK_CONFIG" = "Xno"; then
4671 # Extract the first word of "gtk12-config", so it can be a program name with args.
4672set dummy gtk12-config; ac_word=$2
4673echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004674echo "configure:4675: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004675if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
4676 echo $ac_n "(cached) $ac_c" 1>&6
4677else
4678 case "$GTK12_CONFIG" in
4679 /*)
4680 ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a path.
4681 ;;
4682 ?:/*)
4683 ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a dos path.
4684 ;;
4685 *)
4686 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4687 ac_dummy="$PATH"
4688 for ac_dir in $ac_dummy; do
4689 test -z "$ac_dir" && ac_dir=.
4690 if test -f $ac_dir/$ac_word; then
4691 ac_cv_path_GTK12_CONFIG="$ac_dir/$ac_word"
4692 break
4693 fi
4694 done
4695 IFS="$ac_save_ifs"
4696 test -z "$ac_cv_path_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
4697 ;;
4698esac
4699fi
4700GTK12_CONFIG="$ac_cv_path_GTK12_CONFIG"
4701if test -n "$GTK12_CONFIG"; then
4702 echo "$ac_t""$GTK12_CONFIG" 1>&6
4703else
4704 echo "$ac_t""no" 1>&6
4705fi
4706
4707 GTK_CONFIG="$GTK12_CONFIG"
4708 fi
4709 else
4710 echo "$ac_t""Using GTK configuration program $GTK_CONFIG" 1>&6
4711 fi
4712 if test "X$PKG_CONFIG" = "X"; then
4713 # Extract the first word of "pkg-config", so it can be a program name with args.
4714set dummy pkg-config; ac_word=$2
4715echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004716echo "configure:4717: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004717if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
4718 echo $ac_n "(cached) $ac_c" 1>&6
4719else
4720 case "$PKG_CONFIG" in
4721 /*)
4722 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4723 ;;
4724 ?:/*)
4725 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
4726 ;;
4727 *)
4728 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4729 ac_dummy="$PATH"
4730 for ac_dir in $ac_dummy; do
4731 test -z "$ac_dir" && ac_dir=.
4732 if test -f $ac_dir/$ac_word; then
4733 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4734 break
4735 fi
4736 done
4737 IFS="$ac_save_ifs"
4738 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
4739 ;;
4740esac
4741fi
4742PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4743if test -n "$PKG_CONFIG"; then
4744 echo "$ac_t""$PKG_CONFIG" 1>&6
4745else
4746 echo "$ac_t""no" 1>&6
4747fi
4748
4749 fi
4750
4751 if test "x$GTK_CONFIG:$PKG_CONFIG" != "xno:no"; then
4752 if test "X$SKIP_GTK2" != "XYES"; then
4753
4754 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
4755 {
4756 min_gtk_version=2.2.0
4757 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
Bram Moolenaar21cf8232004-07-16 20:18:37 +00004758echo "configure:4759: checking for GTK - version >= $min_gtk_version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004759 no_gtk=""
4760 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
4761 && $PKG_CONFIG --exists gtk+-2.0; then
4762 {
4763 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00004764 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
Bram Moolenaar071d4272004-06-13 20:20:40 +00004765 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
4766 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4767 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4768 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4769 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4770 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4771 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4772 }
4773 elif test "X$GTK_CONFIG" != "Xno"; then
4774 {
4775 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00004776 GTK_LIBDIR=
Bram Moolenaar071d4272004-06-13 20:20:40 +00004777 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
4778 gtk_major_version=`$GTK_CONFIG $gtk_config_args --version | \
4779 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4780 gtk_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
4781 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4782 gtk_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
4783 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4784 }
4785 else
4786 no_gtk=yes
4787 fi
4788
4789 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
4790 {
4791 ac_save_CFLAGS="$CFLAGS"
4792 ac_save_LIBS="$LIBS"
4793 CFLAGS="$CFLAGS $GTK_CFLAGS"
4794 LIBS="$LIBS $GTK_LIBS"
4795
4796 rm -f conf.gtktest
4797 if test "$cross_compiling" = yes; then
4798 echo $ac_n "cross compiling; assumed OK... $ac_c"
4799else
4800 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00004801#line 4802 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00004802#include "confdefs.h"
4803
4804#include <gtk/gtk.h>
4805#include <stdio.h>
4806
4807int
4808main ()
4809{
4810int major, minor, micro;
4811char *tmp_version;
4812
4813system ("touch conf.gtktest");
4814
4815/* HP/UX 9 (%@#!) writes to sscanf strings */
4816tmp_version = g_strdup("$min_gtk_version");
4817if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
4818 printf("%s, bad version string\n", "$min_gtk_version");
4819 exit(1);
4820 }
4821
4822if ((gtk_major_version > major) ||
4823 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
4824 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
4825 (gtk_micro_version >= micro)))
4826{
4827 return 0;
4828}
4829return 1;
4830}
4831
4832EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00004833if { (eval echo configure:4834: \"$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 +00004834then
4835 :
4836else
4837 echo "configure: failed program was:" >&5
4838 cat conftest.$ac_ext >&5
4839 rm -fr conftest*
4840 no_gtk=yes
4841fi
4842rm -fr conftest*
4843fi
4844
4845 CFLAGS="$ac_save_CFLAGS"
4846 LIBS="$ac_save_LIBS"
4847 }
4848 fi
4849 if test "x$no_gtk" = x ; then
4850 if test "x$enable_gtktest" = "xyes"; then
4851 echo "$ac_t""yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4852 else
4853 echo "$ac_t""found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4854 fi
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00004855 GUI_LIB_LOC="$GTK_LIBDIR"
4856 GTK_LIBNAME="$GTK_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00004857 GUI_INC_LOC="$GTK_CFLAGS"
4858 else
4859 {
4860 echo "$ac_t""no" 1>&6
4861 GTK_CFLAGS=""
4862 GTK_LIBS=""
4863 :
4864 }
4865 fi
4866 }
4867 else
4868 GTK_CFLAGS=""
4869 GTK_LIBS=""
4870 :
4871 fi
4872
4873
4874 rm -f conf.gtktest
4875
4876 if test "x$GTK_CFLAGS" != "x"; then
4877 SKIP_ATHENA=YES
4878 SKIP_NEXTAW=YES
4879 SKIP_MOTIF=YES
4880 GUITYPE=GTK
4881
4882 fi
4883 fi
4884
4885 if test "x$GUITYPE" != "xGTK"; then
4886 SKIP_GTK2=YES
4887
4888 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
4889 {
4890 min_gtk_version=1.1.16
4891 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00004892echo "configure:4893: checking for GTK - version >= $min_gtk_version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004893 no_gtk=""
4894 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
4895 && $PKG_CONFIG --exists gtk+-2.0; then
4896 {
4897 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00004898 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
Bram Moolenaar071d4272004-06-13 20:20:40 +00004899 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
4900 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4901 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4902 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4903 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4904 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4905 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4906 }
4907 elif test "X$GTK_CONFIG" != "Xno"; then
4908 {
4909 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00004910 GTK_LIBDIR=
Bram Moolenaar071d4272004-06-13 20:20:40 +00004911 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
4912 gtk_major_version=`$GTK_CONFIG $gtk_config_args --version | \
4913 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4914 gtk_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
4915 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4916 gtk_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
4917 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4918 }
4919 else
4920 no_gtk=yes
4921 fi
4922
4923 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
4924 {
4925 ac_save_CFLAGS="$CFLAGS"
4926 ac_save_LIBS="$LIBS"
4927 CFLAGS="$CFLAGS $GTK_CFLAGS"
4928 LIBS="$LIBS $GTK_LIBS"
4929
4930 rm -f conf.gtktest
4931 if test "$cross_compiling" = yes; then
4932 echo $ac_n "cross compiling; assumed OK... $ac_c"
4933else
4934 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00004935#line 4936 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00004936#include "confdefs.h"
4937
4938#include <gtk/gtk.h>
4939#include <stdio.h>
4940
4941int
4942main ()
4943{
4944int major, minor, micro;
4945char *tmp_version;
4946
4947system ("touch conf.gtktest");
4948
4949/* HP/UX 9 (%@#!) writes to sscanf strings */
4950tmp_version = g_strdup("$min_gtk_version");
4951if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
4952 printf("%s, bad version string\n", "$min_gtk_version");
4953 exit(1);
4954 }
4955
4956if ((gtk_major_version > major) ||
4957 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
4958 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
4959 (gtk_micro_version >= micro)))
4960{
4961 return 0;
4962}
4963return 1;
4964}
4965
4966EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00004967if { (eval echo configure:4968: \"$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 +00004968then
4969 :
4970else
4971 echo "configure: failed program was:" >&5
4972 cat conftest.$ac_ext >&5
4973 rm -fr conftest*
4974 no_gtk=yes
4975fi
4976rm -fr conftest*
4977fi
4978
4979 CFLAGS="$ac_save_CFLAGS"
4980 LIBS="$ac_save_LIBS"
4981 }
4982 fi
4983 if test "x$no_gtk" = x ; then
4984 if test "x$enable_gtktest" = "xyes"; then
4985 echo "$ac_t""yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4986 else
4987 echo "$ac_t""found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4988 fi
4989 GTK_LIBNAME="$GTK_LIBS"
4990 GUI_INC_LOC="$GTK_CFLAGS"
4991 else
4992 {
4993 echo "$ac_t""no" 1>&6
4994 GTK_CFLAGS=""
4995 GTK_LIBS=""
4996 :
4997 }
4998 fi
4999 }
5000 else
5001 GTK_CFLAGS=""
5002 GTK_LIBS=""
5003 :
5004 fi
5005
5006
5007 rm -f conf.gtktest
5008
5009 if test "x$GTK_CFLAGS" != "x"; then
5010 SKIP_ATHENA=YES
5011 SKIP_NEXTAW=YES
5012 SKIP_MOTIF=YES
5013 GUITYPE=GTK
5014
5015 fi
5016 fi
5017 fi
5018 if test "x$GUITYPE" = "xGTK"; then
5019 if test "$gtk_major_version" = 1 -a "0$gtk_minor_version" -lt 2 \
5020 -o "$gtk_major_version" = 1 -a "$gtk_minor_version" = 2 -a "0$gtk_micro_version" -lt 3; then
5021 echo "$ac_t""this GTK version is old; version 1.2.3 or later is recommended" 1>&6
5022 else
5023 {
5024 if test "0$gtk_major_version" -ge 2; then
5025 cat >> confdefs.h <<\EOF
5026#define HAVE_GTK2 1
5027EOF
5028
5029 if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \
5030 || test "0$gtk_minor_version" -ge 2 \
5031 || test "0$gtk_major_version" -gt 2; then
5032 cat >> confdefs.h <<\EOF
5033#define HAVE_GTK_MULTIHEAD 1
5034EOF
5035
5036 fi
5037 fi
5038 if test -z "$SKIP_GNOME"; then
5039 {
5040
5041
5042
5043
5044
5045 # Check whether --with-gnome-includes or --without-gnome-includes was given.
5046if test "${with_gnome_includes+set}" = set; then
5047 withval="$with_gnome_includes"
5048 CFLAGS="$CFLAGS -I$withval"
5049
5050fi
5051
5052
5053 # Check whether --with-gnome-libs or --without-gnome-libs was given.
5054if test "${with_gnome_libs+set}" = set; then
5055 withval="$with_gnome_libs"
5056 LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
5057
5058fi
5059
5060
5061 # Check whether --with-gnome or --without-gnome was given.
5062if test "${with_gnome+set}" = set; then
5063 withval="$with_gnome"
5064 if test x$withval = xyes; then
5065 want_gnome=yes
5066 have_gnome=yes
5067 else
5068 if test "x$withval" = xno; then
5069 want_gnome=no
5070 else
5071 want_gnome=yes
5072 LDFLAGS="$LDFLAGS -L$withval/lib"
5073 CFLAGS="$CFLAGS -I$withval/include"
5074 gnome_prefix=$withval/lib
5075 fi
5076 fi
5077else
5078 want_gnome=yes
5079fi
5080
5081
5082 if test "x$want_gnome" = xyes -a "0$gtk_major_version" -ge 2; then
5083 {
5084 echo $ac_n "checking for libgnomeui-2.0""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005085echo "configure:5086: checking for libgnomeui-2.0" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005086 if $PKG_CONFIG --exists libgnomeui-2.0; then
5087 echo "$ac_t""yes" 1>&6
5088 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
5089 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
5090 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
5091 have_gnome=yes
5092 else
5093 echo "$ac_t""not found" 1>&6
5094 if test "x" = xfail; then
5095 { echo "configure: error: Could not find libgnomeui-2.0 via pkg-config" 1>&2; exit 1; }
5096 fi
5097 fi
5098 }
5099 elif test "x$want_gnome" = xyes; then
5100 {
5101 # Extract the first word of "gnome-config", so it can be a program name with args.
5102set dummy gnome-config; ac_word=$2
5103echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005104echo "configure:5105: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005105if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
5106 echo $ac_n "(cached) $ac_c" 1>&6
5107else
5108 case "$GNOME_CONFIG" in
5109 /*)
5110 ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
5111 ;;
5112 ?:/*)
5113 ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
5114 ;;
5115 *)
5116 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5117 ac_dummy="$PATH"
5118 for ac_dir in $ac_dummy; do
5119 test -z "$ac_dir" && ac_dir=.
5120 if test -f $ac_dir/$ac_word; then
5121 ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
5122 break
5123 fi
5124 done
5125 IFS="$ac_save_ifs"
5126 test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
5127 ;;
5128esac
5129fi
5130GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
5131if test -n "$GNOME_CONFIG"; then
5132 echo "$ac_t""$GNOME_CONFIG" 1>&6
5133else
5134 echo "$ac_t""no" 1>&6
5135fi
5136
5137 if test "$GNOME_CONFIG" = "no"; then
5138 no_gnome_config="yes"
5139 else
5140 echo $ac_n "checking if $GNOME_CONFIG works""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005141echo "configure:5142: checking if $GNOME_CONFIG works" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005142 if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
5143 echo "$ac_t""yes" 1>&6
5144 GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome gnomeui`"
5145 GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
5146 GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
5147 have_gnome=yes
5148 else
5149 echo "$ac_t""no" 1>&6
5150 no_gnome_config="yes"
5151 fi
5152 fi
5153
5154 if test x$exec_prefix = xNONE; then
5155 if test x$prefix = xNONE; then
5156 gnome_prefix=$ac_default_prefix/lib
5157 else
5158 gnome_prefix=$prefix/lib
5159 fi
5160 else
5161 gnome_prefix=`eval echo \`echo $libdir\``
5162 fi
5163
5164 if test "$no_gnome_config" = "yes"; then
5165 echo $ac_n "checking for gnomeConf.sh file in $gnome_prefix""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005166echo "configure:5167: checking for gnomeConf.sh file in $gnome_prefix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005167 if test -f $gnome_prefix/gnomeConf.sh; then
5168 echo "$ac_t""found" 1>&6
5169 echo "loading gnome configuration from" \
5170 "$gnome_prefix/gnomeConf.sh"
5171 . $gnome_prefix/gnomeConf.sh
5172 have_gnome=yes
5173 else
5174 echo "$ac_t""not found" 1>&6
5175 if test x = xfail; then
5176 { echo "configure: error: Could not find the gnomeConf.sh file that is generated by gnome-libs install" 1>&2; exit 1; }
5177 fi
5178 fi
5179 fi
5180 }
5181 fi
5182
5183 if test x$have_gnome = xyes ; then
5184 cat >> confdefs.h <<\EOF
5185#define FEAT_GUI_GNOME 1
5186EOF
5187
5188 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
5189 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
5190 fi
5191 }
5192 fi
5193 }
5194 fi
5195 fi
5196fi
5197
5198
5199if test -z "$SKIP_MOTIF"; then
5200 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"
5201 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
5202
5203 echo $ac_n "checking for location of Motif GUI includes""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005204echo "configure:5205: checking for location of Motif GUI includes" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005205 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
5206 GUI_INC_LOC=
5207 for try in $gui_includes; do
5208 if test -f "$try/Xm/Xm.h"; then
5209 GUI_INC_LOC=$try
5210 fi
5211 done
5212 if test -n "$GUI_INC_LOC"; then
5213 if test "$GUI_INC_LOC" = /usr/include; then
5214 GUI_INC_LOC=
5215 echo "$ac_t""in default path" 1>&6
5216 else
5217 echo "$ac_t""$GUI_INC_LOC" 1>&6
5218 fi
5219 else
5220 echo "$ac_t""<not found>" 1>&6
5221 SKIP_MOTIF=YES
5222 fi
5223fi
5224
5225
5226if test -z "$SKIP_MOTIF"; then
5227 echo $ac_n "checking --with-motif-lib argument""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005228echo "configure:5229: checking --with-motif-lib argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005229 # Check whether --with-motif-lib or --without-motif-lib was given.
5230if test "${with_motif_lib+set}" = set; then
5231 withval="$with_motif_lib"
5232 MOTIF_LIBNAME="${withval}"
5233fi
5234
5235
5236 if test -n "$MOTIF_LIBNAME"; then
5237 echo "$ac_t""$MOTIF_LIBNAME" 1>&6
5238 GUI_LIB_LOC=
5239 else
5240 echo "$ac_t""no" 1>&6
5241
5242 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
5243
5244 echo $ac_n "checking for location of Motif GUI libs""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005245echo "configure:5246: checking for location of Motif GUI libs" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005246 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"
5247 GUI_LIB_LOC=
5248 for try in $gui_libs; do
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005249 for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
Bram Moolenaar071d4272004-06-13 20:20:40 +00005250 if test -f "$libtry"; then
5251 GUI_LIB_LOC=$try
5252 fi
5253 done
5254 done
5255 if test -n "$GUI_LIB_LOC"; then
5256 if test "$GUI_LIB_LOC" = /usr/lib; then
5257 GUI_LIB_LOC=
5258 echo "$ac_t""in default path" 1>&6
5259 else
5260 if test -n "$GUI_LIB_LOC"; then
5261 echo "$ac_t""$GUI_LIB_LOC" 1>&6
5262 if test "`(uname) 2>/dev/null`" = SunOS &&
5263 uname -r | grep '^5' >/dev/null; then
5264 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
5265 fi
5266 fi
5267 fi
5268 MOTIF_LIBNAME=-lXm
5269 else
5270 echo "$ac_t""<not found>" 1>&6
5271 SKIP_MOTIF=YES
5272 fi
5273 fi
5274fi
5275
5276if test -z "$SKIP_MOTIF"; then
5277 SKIP_ATHENA=YES
5278 SKIP_NEXTAW=YES
5279 GUITYPE=MOTIF
5280
5281fi
5282
5283
5284GUI_X_LIBS=
5285
5286if test -z "$SKIP_ATHENA"; then
5287 echo $ac_n "checking if Athena header files can be found""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005288echo "configure:5289: checking if Athena header files can be found" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005289 cflags_save=$CFLAGS
5290 CFLAGS="$CFLAGS $X_CFLAGS"
5291 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005292#line 5293 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005293#include "confdefs.h"
5294
5295#include <X11/Intrinsic.h>
5296#include <X11/Xaw/Paned.h>
5297int main() {
5298
5299; return 0; }
5300EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005301if { (eval echo configure:5302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005302 rm -rf conftest*
5303 echo "$ac_t""yes" 1>&6
5304else
5305 echo "configure: failed program was:" >&5
5306 cat conftest.$ac_ext >&5
5307 rm -rf conftest*
5308 echo "$ac_t""no" 1>&6; SKIP_ATHENA=YES
5309fi
5310rm -f conftest*
5311 CFLAGS=$cflags_save
5312fi
5313
5314if test -z "$SKIP_ATHENA"; then
5315 GUITYPE=ATHENA
5316fi
5317
5318if test -z "$SKIP_NEXTAW"; then
5319 echo $ac_n "checking if neXtaw header files can be found""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005320echo "configure:5321: checking if neXtaw header files can be found" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005321 cflags_save=$CFLAGS
5322 CFLAGS="$CFLAGS $X_CFLAGS"
5323 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005324#line 5325 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005325#include "confdefs.h"
5326
5327#include <X11/Intrinsic.h>
5328#include <X11/neXtaw/Paned.h>
5329int main() {
5330
5331; return 0; }
5332EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005333if { (eval echo configure:5334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005334 rm -rf conftest*
5335 echo "$ac_t""yes" 1>&6
5336else
5337 echo "configure: failed program was:" >&5
5338 cat conftest.$ac_ext >&5
5339 rm -rf conftest*
5340 echo "$ac_t""no" 1>&6; SKIP_NEXTAW=YES
5341fi
5342rm -f conftest*
5343 CFLAGS=$cflags_save
5344fi
5345
5346if test -z "$SKIP_NEXTAW"; then
5347 GUITYPE=NEXTAW
5348fi
5349
5350if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
5351 if test -n "$GUI_INC_LOC"; then
5352 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
5353 fi
5354 if test -n "$GUI_LIB_LOC"; then
5355 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
5356 fi
5357
5358 ldflags_save=$LDFLAGS
5359 LDFLAGS="$X_LIBS $LDFLAGS"
5360 echo $ac_n "checking for XShapeQueryExtension in -lXext""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005361echo "configure:5362: checking for XShapeQueryExtension in -lXext" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005362ac_lib_var=`echo Xext'_'XShapeQueryExtension | sed 'y%./+-%__p_%'`
5363if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5364 echo $ac_n "(cached) $ac_c" 1>&6
5365else
5366 ac_save_LIBS="$LIBS"
5367LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5368cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005369#line 5370 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005370#include "confdefs.h"
5371/* Override any gcc2 internal prototype to avoid an error. */
5372/* We use char because int might match the return type of a gcc2
5373 builtin and then its argument prototype would still apply. */
5374char XShapeQueryExtension();
5375
5376int main() {
5377XShapeQueryExtension()
5378; return 0; }
5379EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005380if { (eval echo configure:5381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005381 rm -rf conftest*
5382 eval "ac_cv_lib_$ac_lib_var=yes"
5383else
5384 echo "configure: failed program was:" >&5
5385 cat conftest.$ac_ext >&5
5386 rm -rf conftest*
5387 eval "ac_cv_lib_$ac_lib_var=no"
5388fi
5389rm -f conftest*
5390LIBS="$ac_save_LIBS"
5391
5392fi
5393if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5394 echo "$ac_t""yes" 1>&6
5395 GUI_X_LIBS="-lXext"
5396else
5397 echo "$ac_t""no" 1>&6
5398fi
5399
5400 echo $ac_n "checking for wslen in -lw""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005401echo "configure:5402: checking for wslen in -lw" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005402ac_lib_var=`echo w'_'wslen | sed 'y%./+-%__p_%'`
5403if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5404 echo $ac_n "(cached) $ac_c" 1>&6
5405else
5406 ac_save_LIBS="$LIBS"
5407LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5408cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005409#line 5410 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005410#include "confdefs.h"
5411/* Override any gcc2 internal prototype to avoid an error. */
5412/* We use char because int might match the return type of a gcc2
5413 builtin and then its argument prototype would still apply. */
5414char wslen();
5415
5416int main() {
5417wslen()
5418; return 0; }
5419EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005420if { (eval echo configure:5421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005421 rm -rf conftest*
5422 eval "ac_cv_lib_$ac_lib_var=yes"
5423else
5424 echo "configure: failed program was:" >&5
5425 cat conftest.$ac_ext >&5
5426 rm -rf conftest*
5427 eval "ac_cv_lib_$ac_lib_var=no"
5428fi
5429rm -f conftest*
5430LIBS="$ac_save_LIBS"
5431
5432fi
5433if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5434 echo "$ac_t""yes" 1>&6
5435 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
5436else
5437 echo "$ac_t""no" 1>&6
5438fi
5439
5440 echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005441echo "configure:5442: checking for dlsym in -ldl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005442ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
5443if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5444 echo $ac_n "(cached) $ac_c" 1>&6
5445else
5446 ac_save_LIBS="$LIBS"
5447LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5448cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005449#line 5450 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005450#include "confdefs.h"
5451/* Override any gcc2 internal prototype to avoid an error. */
5452/* We use char because int might match the return type of a gcc2
5453 builtin and then its argument prototype would still apply. */
5454char dlsym();
5455
5456int main() {
5457dlsym()
5458; return 0; }
5459EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005460if { (eval echo configure:5461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005461 rm -rf conftest*
5462 eval "ac_cv_lib_$ac_lib_var=yes"
5463else
5464 echo "configure: failed program was:" >&5
5465 cat conftest.$ac_ext >&5
5466 rm -rf conftest*
5467 eval "ac_cv_lib_$ac_lib_var=no"
5468fi
5469rm -f conftest*
5470LIBS="$ac_save_LIBS"
5471
5472fi
5473if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5474 echo "$ac_t""yes" 1>&6
5475 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
5476else
5477 echo "$ac_t""no" 1>&6
5478fi
5479
5480 echo $ac_n "checking for XmuCreateStippledPixmap in -lXmu""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005481echo "configure:5482: checking for XmuCreateStippledPixmap in -lXmu" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005482ac_lib_var=`echo Xmu'_'XmuCreateStippledPixmap | sed 'y%./+-%__p_%'`
5483if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5484 echo $ac_n "(cached) $ac_c" 1>&6
5485else
5486 ac_save_LIBS="$LIBS"
5487LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5488cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005489#line 5490 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005490#include "confdefs.h"
5491/* Override any gcc2 internal prototype to avoid an error. */
5492/* We use char because int might match the return type of a gcc2
5493 builtin and then its argument prototype would still apply. */
5494char XmuCreateStippledPixmap();
5495
5496int main() {
5497XmuCreateStippledPixmap()
5498; return 0; }
5499EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005500if { (eval echo configure:5501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005501 rm -rf conftest*
5502 eval "ac_cv_lib_$ac_lib_var=yes"
5503else
5504 echo "configure: failed program was:" >&5
5505 cat conftest.$ac_ext >&5
5506 rm -rf conftest*
5507 eval "ac_cv_lib_$ac_lib_var=no"
5508fi
5509rm -f conftest*
5510LIBS="$ac_save_LIBS"
5511
5512fi
5513if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5514 echo "$ac_t""yes" 1>&6
5515 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
5516else
5517 echo "$ac_t""no" 1>&6
5518fi
5519
5520 if test -z "$SKIP_MOTIF"; then
5521 echo $ac_n "checking for XpEndJob in -lXp""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005522echo "configure:5523: checking for XpEndJob in -lXp" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005523ac_lib_var=`echo Xp'_'XpEndJob | sed 'y%./+-%__p_%'`
5524if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5525 echo $ac_n "(cached) $ac_c" 1>&6
5526else
5527 ac_save_LIBS="$LIBS"
5528LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5529cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005530#line 5531 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005531#include "confdefs.h"
5532/* Override any gcc2 internal prototype to avoid an error. */
5533/* We use char because int might match the return type of a gcc2
5534 builtin and then its argument prototype would still apply. */
5535char XpEndJob();
5536
5537int main() {
5538XpEndJob()
5539; return 0; }
5540EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005541if { (eval echo configure:5542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005542 rm -rf conftest*
5543 eval "ac_cv_lib_$ac_lib_var=yes"
5544else
5545 echo "configure: failed program was:" >&5
5546 cat conftest.$ac_ext >&5
5547 rm -rf conftest*
5548 eval "ac_cv_lib_$ac_lib_var=no"
5549fi
5550rm -f conftest*
5551LIBS="$ac_save_LIBS"
5552
5553fi
5554if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5555 echo "$ac_t""yes" 1>&6
5556 GUI_X_LIBS="-lXp $GUI_X_LIBS"
5557else
5558 echo "$ac_t""no" 1>&6
5559fi
5560
5561 fi
5562 LDFLAGS=$ldflags_save
5563
5564 echo $ac_n "checking for extra X11 defines""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005565echo "configure:5566: checking for extra X11 defines" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005566 NARROW_PROTO=
5567 rm -fr conftestdir
5568 if mkdir conftestdir; then
5569 cd conftestdir
5570 cat > Imakefile <<'EOF'
5571acfindx:
5572 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
5573EOF
5574 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5575 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5576 fi
5577 cd ..
5578 rm -fr conftestdir
5579 fi
5580 if test -z "$NARROW_PROTO"; then
5581 echo "$ac_t""no" 1>&6
5582 else
5583 echo "$ac_t""$NARROW_PROTO" 1>&6
5584 fi
5585
5586fi
5587
5588if test "$enable_xsmp" = "yes"; then
5589 cppflags_save=$CPPFLAGS
5590 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5591 for ac_hdr in X11/SM/SMlib.h
5592do
5593ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5594echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005595echo "configure:5596: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005596if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5597 echo $ac_n "(cached) $ac_c" 1>&6
5598else
5599 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005600#line 5601 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005601#include "confdefs.h"
5602#include <$ac_hdr>
5603EOF
5604ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005605{ (eval echo configure:5606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005606ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5607if test -z "$ac_err"; then
5608 rm -rf conftest*
5609 eval "ac_cv_header_$ac_safe=yes"
5610else
5611 echo "$ac_err" >&5
5612 echo "configure: failed program was:" >&5
5613 cat conftest.$ac_ext >&5
5614 rm -rf conftest*
5615 eval "ac_cv_header_$ac_safe=no"
5616fi
5617rm -f conftest*
5618fi
5619if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5620 echo "$ac_t""yes" 1>&6
5621 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5622 cat >> confdefs.h <<EOF
5623#define $ac_tr_hdr 1
5624EOF
5625
5626else
5627 echo "$ac_t""no" 1>&6
5628fi
5629done
5630
5631 CPPFLAGS=$cppflags_save
5632fi
5633
5634
5635if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_GTK"; then
5636 cppflags_save=$CPPFLAGS
5637 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5638 for ac_hdr in X11/xpm.h X11/Sunkeysym.h
5639do
5640ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5641echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005642echo "configure:5643: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005643if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5644 echo $ac_n "(cached) $ac_c" 1>&6
5645else
5646 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005647#line 5648 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005648#include "confdefs.h"
5649#include <$ac_hdr>
5650EOF
5651ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005652{ (eval echo configure:5653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005653ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5654if test -z "$ac_err"; then
5655 rm -rf conftest*
5656 eval "ac_cv_header_$ac_safe=yes"
5657else
5658 echo "$ac_err" >&5
5659 echo "configure: failed program was:" >&5
5660 cat conftest.$ac_ext >&5
5661 rm -rf conftest*
5662 eval "ac_cv_header_$ac_safe=no"
5663fi
5664rm -f conftest*
5665fi
5666if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5667 echo "$ac_t""yes" 1>&6
5668 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5669 cat >> confdefs.h <<EOF
5670#define $ac_tr_hdr 1
5671EOF
5672
5673else
5674 echo "$ac_t""no" 1>&6
5675fi
5676done
5677
5678
5679 if test ! "$enable_xim" = "no"; then
5680 echo $ac_n "checking for XIMText in X11/Xlib.h""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005681echo "configure:5682: checking for XIMText in X11/Xlib.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005682 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005683#line 5684 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005684#include "confdefs.h"
5685#include <X11/Xlib.h>
5686EOF
5687if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5688 egrep "XIMText" >/dev/null 2>&1; then
5689 rm -rf conftest*
5690 echo "$ac_t""yes" 1>&6
5691else
5692 rm -rf conftest*
5693 echo "$ac_t""no; xim has been disabled" 1>&6; enable_xim = "no"
5694fi
5695rm -f conftest*
5696
5697 fi
5698 CPPFLAGS=$cppflags_save
5699
5700 if test "$enable_xim" = "auto" -a "$enable_hangulinput" != "yes" \
5701 -a "x$GUITYPE" != "xNONE" ; then
5702 echo "$ac_t""X GUI selected; xim has been enabled" 1>&6
5703 enable_xim="yes"
5704 fi
5705fi
5706
5707if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
5708 cppflags_save=$CPPFLAGS
5709 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5710 for ac_hdr in X11/Xmu/Editres.h
5711do
5712ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5713echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005714echo "configure:5715: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005715if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5716 echo $ac_n "(cached) $ac_c" 1>&6
5717else
5718 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005719#line 5720 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005720#include "confdefs.h"
5721#include <$ac_hdr>
5722EOF
5723ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005724{ (eval echo configure:5725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005725ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5726if test -z "$ac_err"; then
5727 rm -rf conftest*
5728 eval "ac_cv_header_$ac_safe=yes"
5729else
5730 echo "$ac_err" >&5
5731 echo "configure: failed program was:" >&5
5732 cat conftest.$ac_ext >&5
5733 rm -rf conftest*
5734 eval "ac_cv_header_$ac_safe=no"
5735fi
5736rm -f conftest*
5737fi
5738if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5739 echo "$ac_t""yes" 1>&6
5740 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5741 cat >> confdefs.h <<EOF
5742#define $ac_tr_hdr 1
5743EOF
5744
5745else
5746 echo "$ac_t""no" 1>&6
5747fi
5748done
5749
5750 CPPFLAGS=$cppflags_save
5751fi
5752
5753if test -z "$SKIP_MOTIF"; then
5754 cppflags_save=$CPPFLAGS
5755 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5756 for ac_hdr in Xm/Xm.h Xm/XpmP.h
5757do
5758ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5759echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005760echo "configure:5761: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005761if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5762 echo $ac_n "(cached) $ac_c" 1>&6
5763else
5764 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005765#line 5766 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005766#include "confdefs.h"
5767#include <$ac_hdr>
5768EOF
5769ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005770{ (eval echo configure:5771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005771ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5772if test -z "$ac_err"; then
5773 rm -rf conftest*
5774 eval "ac_cv_header_$ac_safe=yes"
5775else
5776 echo "$ac_err" >&5
5777 echo "configure: failed program was:" >&5
5778 cat conftest.$ac_ext >&5
5779 rm -rf conftest*
5780 eval "ac_cv_header_$ac_safe=no"
5781fi
5782rm -f conftest*
5783fi
5784if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5785 echo "$ac_t""yes" 1>&6
5786 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5787 cat >> confdefs.h <<EOF
5788#define $ac_tr_hdr 1
5789EOF
5790
5791else
5792 echo "$ac_t""no" 1>&6
5793fi
5794done
5795
5796 CPPFLAGS=$cppflags_save
5797fi
5798
5799if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
5800 echo "$ac_t""no GUI selected; xim has been disabled" 1>&6
5801 enable_xim="no"
5802fi
5803if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
5804 echo "$ac_t""no GUI selected; fontset has been disabled" 1>&6
5805 enable_fontset="no"
5806fi
5807if test "x$GUITYPE:$enable_fontset" = "xGTK:yes" -a "0$gtk_major_version" -ge 2; then
5808 echo "$ac_t""GTK+ 2 GUI selected; fontset has been disabled" 1>&6
5809 enable_fontset="no"
5810fi
5811
5812if test -z "$SKIP_BEOS"; then
5813 GUITYPE=BEOSGUI
5814fi
5815
5816if test -z "$SKIP_PHOTON"; then
5817 GUITYPE=PHOTONGUI
5818fi
5819
5820
5821
5822
5823
5824
5825if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
5826 { echo "configure: error: cannot use workshop without Motif" 1>&2; exit 1; }
5827fi
5828
5829if test "$enable_xim" = "yes"; then
5830 cat >> confdefs.h <<\EOF
5831#define FEAT_XIM 1
5832EOF
5833
5834fi
5835if test "$enable_fontset" = "yes"; then
5836 cat >> confdefs.h <<\EOF
5837#define FEAT_XFONTSET 1
5838EOF
5839
5840fi
5841
5842
5843
5844
5845if test "$enable_hangulinput" = "yes"; then
5846 if test "x$GUITYPE" = "xNONE"; then
5847 echo "$ac_t""no GUI selected; hangul input has been disabled" 1>&6
5848 enable_hangulinput=no
5849 else
5850 cat >> confdefs.h <<\EOF
5851#define FEAT_HANGULIN 1
5852EOF
5853
5854 HANGULIN_SRC=hangulin.c
5855
5856 HANGULIN_OBJ=objects/hangulin.o
5857
5858 fi
5859fi
5860
5861
5862echo $ac_n "checking quality of toupper""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005863echo "configure:5864: checking quality of toupper" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005864if test "$cross_compiling" = yes; then
5865 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
5866else
5867 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005868#line 5869 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005869#include "confdefs.h"
5870#include <ctype.h>
5871main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
5872EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005873if { (eval echo configure:5874: \"$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 +00005874then
5875 cat >> confdefs.h <<\EOF
5876#define BROKEN_TOUPPER 1
5877EOF
5878 echo "$ac_t""bad" 1>&6
5879else
5880 echo "configure: failed program was:" >&5
5881 cat conftest.$ac_ext >&5
5882 rm -fr conftest*
5883 echo "$ac_t""good" 1>&6
5884fi
5885rm -fr conftest*
5886fi
5887
5888
5889echo $ac_n "checking whether __DATE__ and __TIME__ work""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005890echo "configure:5891: checking whether __DATE__ and __TIME__ work" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005891cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005892#line 5893 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005893#include "confdefs.h"
5894
5895int main() {
5896printf("(" __DATE__ " " __TIME__ ")");
5897; return 0; }
5898EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005899if { (eval echo configure:5900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005900 rm -rf conftest*
5901 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
5902#define HAVE_DATE_TIME 1
5903EOF
5904
5905else
5906 echo "configure: failed program was:" >&5
5907 cat conftest.$ac_ext >&5
5908 rm -rf conftest*
5909 echo "$ac_t""no" 1>&6
5910fi
5911rm -f conftest*
5912
5913ac_safe=`echo "elf.h" | sed 'y%./+-%__p_%'`
5914echo $ac_n "checking for elf.h""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005915echo "configure:5916: checking for elf.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005916if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5917 echo $ac_n "(cached) $ac_c" 1>&6
5918else
5919 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005920#line 5921 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005921#include "confdefs.h"
5922#include <elf.h>
5923EOF
5924ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005925{ (eval echo configure:5926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005926ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5927if test -z "$ac_err"; then
5928 rm -rf conftest*
5929 eval "ac_cv_header_$ac_safe=yes"
5930else
5931 echo "$ac_err" >&5
5932 echo "configure: failed program was:" >&5
5933 cat conftest.$ac_ext >&5
5934 rm -rf conftest*
5935 eval "ac_cv_header_$ac_safe=no"
5936fi
5937rm -f conftest*
5938fi
5939if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5940 echo "$ac_t""yes" 1>&6
5941 HAS_ELF=1
5942else
5943 echo "$ac_t""no" 1>&6
5944fi
5945
5946if test "$HAS_ELF" = 1; then
5947 echo $ac_n "checking for main in -lelf""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005948echo "configure:5949: checking for main in -lelf" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005949ac_lib_var=`echo elf'_'main | sed 'y%./+-%__p_%'`
5950if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5951 echo $ac_n "(cached) $ac_c" 1>&6
5952else
5953 ac_save_LIBS="$LIBS"
5954LIBS="-lelf $LIBS"
5955cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005956#line 5957 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005957#include "confdefs.h"
5958
5959int main() {
5960main()
5961; return 0; }
5962EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005963if { (eval echo configure:5964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005964 rm -rf conftest*
5965 eval "ac_cv_lib_$ac_lib_var=yes"
5966else
5967 echo "configure: failed program was:" >&5
5968 cat conftest.$ac_ext >&5
5969 rm -rf conftest*
5970 eval "ac_cv_lib_$ac_lib_var=no"
5971fi
5972rm -f conftest*
5973LIBS="$ac_save_LIBS"
5974
5975fi
5976if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5977 echo "$ac_t""yes" 1>&6
5978 ac_tr_lib=HAVE_LIB`echo elf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5979 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5980 cat >> confdefs.h <<EOF
5981#define $ac_tr_lib 1
5982EOF
5983
5984 LIBS="-lelf $LIBS"
5985
5986else
5987 echo "$ac_t""no" 1>&6
5988fi
5989
5990fi
5991
5992ac_header_dirent=no
5993for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
5994do
5995ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5996echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00005997echo "configure:5998: checking for $ac_hdr that defines DIR" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005998if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
5999 echo $ac_n "(cached) $ac_c" 1>&6
6000else
6001 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006002#line 6003 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006003#include "confdefs.h"
6004#include <sys/types.h>
6005#include <$ac_hdr>
6006int main() {
6007DIR *dirp = 0;
6008; return 0; }
6009EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006010if { (eval echo configure:6011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006011 rm -rf conftest*
6012 eval "ac_cv_header_dirent_$ac_safe=yes"
6013else
6014 echo "configure: failed program was:" >&5
6015 cat conftest.$ac_ext >&5
6016 rm -rf conftest*
6017 eval "ac_cv_header_dirent_$ac_safe=no"
6018fi
6019rm -f conftest*
6020fi
6021if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
6022 echo "$ac_t""yes" 1>&6
6023 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6024 cat >> confdefs.h <<EOF
6025#define $ac_tr_hdr 1
6026EOF
6027 ac_header_dirent=$ac_hdr; break
6028else
6029 echo "$ac_t""no" 1>&6
6030fi
6031done
6032# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6033if test $ac_header_dirent = dirent.h; then
6034echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006035echo "configure:6036: checking for opendir in -ldir" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006036ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
6037if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6038 echo $ac_n "(cached) $ac_c" 1>&6
6039else
6040 ac_save_LIBS="$LIBS"
6041LIBS="-ldir $LIBS"
6042cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006043#line 6044 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006044#include "confdefs.h"
6045/* Override any gcc2 internal prototype to avoid an error. */
6046/* We use char because int might match the return type of a gcc2
6047 builtin and then its argument prototype would still apply. */
6048char opendir();
6049
6050int main() {
6051opendir()
6052; return 0; }
6053EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006054if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006055 rm -rf conftest*
6056 eval "ac_cv_lib_$ac_lib_var=yes"
6057else
6058 echo "configure: failed program was:" >&5
6059 cat conftest.$ac_ext >&5
6060 rm -rf conftest*
6061 eval "ac_cv_lib_$ac_lib_var=no"
6062fi
6063rm -f conftest*
6064LIBS="$ac_save_LIBS"
6065
6066fi
6067if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6068 echo "$ac_t""yes" 1>&6
6069 LIBS="$LIBS -ldir"
6070else
6071 echo "$ac_t""no" 1>&6
6072fi
6073
6074else
6075echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006076echo "configure:6077: checking for opendir in -lx" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006077ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
6078if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6079 echo $ac_n "(cached) $ac_c" 1>&6
6080else
6081 ac_save_LIBS="$LIBS"
6082LIBS="-lx $LIBS"
6083cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006084#line 6085 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006085#include "confdefs.h"
6086/* Override any gcc2 internal prototype to avoid an error. */
6087/* We use char because int might match the return type of a gcc2
6088 builtin and then its argument prototype would still apply. */
6089char opendir();
6090
6091int main() {
6092opendir()
6093; return 0; }
6094EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006095if { (eval echo configure:6096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006096 rm -rf conftest*
6097 eval "ac_cv_lib_$ac_lib_var=yes"
6098else
6099 echo "configure: failed program was:" >&5
6100 cat conftest.$ac_ext >&5
6101 rm -rf conftest*
6102 eval "ac_cv_lib_$ac_lib_var=no"
6103fi
6104rm -f conftest*
6105LIBS="$ac_save_LIBS"
6106
6107fi
6108if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6109 echo "$ac_t""yes" 1>&6
6110 LIBS="$LIBS -lx"
6111else
6112 echo "$ac_t""no" 1>&6
6113fi
6114
6115fi
6116
6117
6118echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006119echo "configure:6120: checking for ANSI C header files" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006120if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
6121 echo $ac_n "(cached) $ac_c" 1>&6
6122else
6123 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006124#line 6125 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006125#include "confdefs.h"
6126#include <stdlib.h>
6127#include <stdarg.h>
6128#include <string.h>
6129#include <float.h>
6130EOF
6131ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006132{ (eval echo configure:6133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006133ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6134if test -z "$ac_err"; then
6135 rm -rf conftest*
6136 ac_cv_header_stdc=yes
6137else
6138 echo "$ac_err" >&5
6139 echo "configure: failed program was:" >&5
6140 cat conftest.$ac_ext >&5
6141 rm -rf conftest*
6142 ac_cv_header_stdc=no
6143fi
6144rm -f conftest*
6145
6146if test $ac_cv_header_stdc = yes; then
6147 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6148cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006149#line 6150 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006150#include "confdefs.h"
6151#include <string.h>
6152EOF
6153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6154 egrep "memchr" >/dev/null 2>&1; then
6155 :
6156else
6157 rm -rf conftest*
6158 ac_cv_header_stdc=no
6159fi
6160rm -f conftest*
6161
6162fi
6163
6164if test $ac_cv_header_stdc = yes; then
6165 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6166cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006167#line 6168 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006168#include "confdefs.h"
6169#include <stdlib.h>
6170EOF
6171if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6172 egrep "free" >/dev/null 2>&1; then
6173 :
6174else
6175 rm -rf conftest*
6176 ac_cv_header_stdc=no
6177fi
6178rm -f conftest*
6179
6180fi
6181
6182if test $ac_cv_header_stdc = yes; then
6183 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6184if test "$cross_compiling" = yes; then
6185 :
6186else
6187 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006188#line 6189 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006189#include "confdefs.h"
6190#include <ctype.h>
6191#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6192#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6193#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6194int main () { int i; for (i = 0; i < 256; i++)
6195if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
6196exit (0); }
6197
6198EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006199if { (eval echo configure:6200: \"$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 +00006200then
6201 :
6202else
6203 echo "configure: failed program was:" >&5
6204 cat conftest.$ac_ext >&5
6205 rm -fr conftest*
6206 ac_cv_header_stdc=no
6207fi
6208rm -fr conftest*
6209fi
6210
6211fi
6212fi
6213
6214echo "$ac_t""$ac_cv_header_stdc" 1>&6
6215if test $ac_cv_header_stdc = yes; then
6216 cat >> confdefs.h <<\EOF
6217#define STDC_HEADERS 1
6218EOF
6219
6220fi
6221
6222echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006223echo "configure:6224: checking for sys/wait.h that is POSIX.1 compatible" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006224if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
6225 echo $ac_n "(cached) $ac_c" 1>&6
6226else
6227 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006228#line 6229 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006229#include "confdefs.h"
6230#include <sys/types.h>
6231#include <sys/wait.h>
6232#ifndef WEXITSTATUS
6233#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6234#endif
6235#ifndef WIFEXITED
6236#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6237#endif
6238int main() {
6239int s;
6240wait (&s);
6241s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6242; return 0; }
6243EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006244if { (eval echo configure:6245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006245 rm -rf conftest*
6246 ac_cv_header_sys_wait_h=yes
6247else
6248 echo "configure: failed program was:" >&5
6249 cat conftest.$ac_ext >&5
6250 rm -rf conftest*
6251 ac_cv_header_sys_wait_h=no
6252fi
6253rm -f conftest*
6254fi
6255
6256echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
6257if test $ac_cv_header_sys_wait_h = yes; then
6258 cat >> confdefs.h <<\EOF
6259#define HAVE_SYS_WAIT_H 1
6260EOF
6261
6262fi
6263
6264
6265if test $ac_cv_header_sys_wait_h = no; then
6266 echo $ac_n "checking for sys/wait.h that defines union wait""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006267echo "configure:6268: checking for sys/wait.h that defines union wait" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006268 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006269#line 6270 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006270#include "confdefs.h"
6271#include <sys/wait.h>
6272int main() {
6273union wait xx, yy; xx = yy
6274; return 0; }
6275EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006276if { (eval echo configure:6277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006277 rm -rf conftest*
6278 echo "$ac_t""yes" 1>&6
6279 cat >> confdefs.h <<\EOF
6280#define HAVE_SYS_WAIT_H 1
6281EOF
6282
6283 cat >> confdefs.h <<\EOF
6284#define HAVE_UNION_WAIT 1
6285EOF
6286
6287else
6288 echo "configure: failed program was:" >&5
6289 cat conftest.$ac_ext >&5
6290 rm -rf conftest*
6291 echo "$ac_t""no" 1>&6
6292fi
6293rm -f conftest*
6294fi
6295
6296for ac_hdr in stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \
6297 termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \
6298 iconv.h langinfo.h unistd.h stropts.h errno.h \
6299 sys/resource.h sys/systeminfo.h locale.h \
6300 sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \
6301 poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \
6302 libgen.h util/debug.h util/msg18n.h frame.h pthread_np.h \
6303 sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h wchar.h
6304do
6305ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6306echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006307echo "configure:6308: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006308if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6309 echo $ac_n "(cached) $ac_c" 1>&6
6310else
6311 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006312#line 6313 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006313#include "confdefs.h"
6314#include <$ac_hdr>
6315EOF
6316ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006317{ (eval echo configure:6318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006318ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6319if test -z "$ac_err"; then
6320 rm -rf conftest*
6321 eval "ac_cv_header_$ac_safe=yes"
6322else
6323 echo "$ac_err" >&5
6324 echo "configure: failed program was:" >&5
6325 cat conftest.$ac_ext >&5
6326 rm -rf conftest*
6327 eval "ac_cv_header_$ac_safe=no"
6328fi
6329rm -f conftest*
6330fi
6331if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6332 echo "$ac_t""yes" 1>&6
6333 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6334 cat >> confdefs.h <<EOF
6335#define $ac_tr_hdr 1
6336EOF
6337
6338else
6339 echo "$ac_t""no" 1>&6
6340fi
6341done
6342
6343
6344if test "x$MACOSX" != "xyes"; then
6345 for ac_hdr in strings.h
6346do
6347ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6348echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006349echo "configure:6350: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006350if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6351 echo $ac_n "(cached) $ac_c" 1>&6
6352else
6353 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006354#line 6355 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006355#include "confdefs.h"
6356#include <$ac_hdr>
6357EOF
6358ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006359{ (eval echo configure:6360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006360ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6361if test -z "$ac_err"; then
6362 rm -rf conftest*
6363 eval "ac_cv_header_$ac_safe=yes"
6364else
6365 echo "$ac_err" >&5
6366 echo "configure: failed program was:" >&5
6367 cat conftest.$ac_ext >&5
6368 rm -rf conftest*
6369 eval "ac_cv_header_$ac_safe=no"
6370fi
6371rm -f conftest*
6372fi
6373if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6374 echo "$ac_t""yes" 1>&6
6375 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6376 cat >> confdefs.h <<EOF
6377#define $ac_tr_hdr 1
6378EOF
6379
6380else
6381 echo "$ac_t""no" 1>&6
6382fi
6383done
6384
6385fi
6386
6387echo $ac_n "checking if strings.h can be included after string.h""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006388echo "configure:6389: checking if strings.h can be included after string.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006389cppflags_save=$CPPFLAGS
6390CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6391cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006392#line 6393 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006393#include "confdefs.h"
6394
6395#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
6396# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
6397 /* but don't do it on AIX 5.1 (Uribarri) */
6398#endif
6399#ifdef HAVE_XM_XM_H
6400# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
6401#endif
6402#ifdef HAVE_STRING_H
6403# include <string.h>
6404#endif
6405#if defined(HAVE_STRINGS_H)
6406# include <strings.h>
6407#endif
6408
6409int main() {
6410int i; i = 0;
6411; return 0; }
6412EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006413if { (eval echo configure:6414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006414 rm -rf conftest*
6415 echo "$ac_t""yes" 1>&6
6416else
6417 echo "configure: failed program was:" >&5
6418 cat conftest.$ac_ext >&5
6419 rm -rf conftest*
6420 cat >> confdefs.h <<\EOF
6421#define NO_STRINGS_WITH_STRING_H 1
6422EOF
6423
6424 echo "$ac_t""no" 1>&6
6425fi
6426rm -f conftest*
6427CPPFLAGS=$cppflags_save
6428
6429if test $ac_cv_prog_gcc = yes; then
6430 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006431echo "configure:6432: checking whether ${CC-cc} needs -traditional" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006432if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
6433 echo $ac_n "(cached) $ac_c" 1>&6
6434else
6435 ac_pattern="Autoconf.*'x'"
6436 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006437#line 6438 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006438#include "confdefs.h"
6439#include <sgtty.h>
6440Autoconf TIOCGETP
6441EOF
6442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6443 egrep "$ac_pattern" >/dev/null 2>&1; then
6444 rm -rf conftest*
6445 ac_cv_prog_gcc_traditional=yes
6446else
6447 rm -rf conftest*
6448 ac_cv_prog_gcc_traditional=no
6449fi
6450rm -f conftest*
6451
6452
6453 if test $ac_cv_prog_gcc_traditional = no; then
6454 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006455#line 6456 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006456#include "confdefs.h"
6457#include <termio.h>
6458Autoconf TCGETA
6459EOF
6460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6461 egrep "$ac_pattern" >/dev/null 2>&1; then
6462 rm -rf conftest*
6463 ac_cv_prog_gcc_traditional=yes
6464fi
6465rm -f conftest*
6466
6467 fi
6468fi
6469
6470echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
6471 if test $ac_cv_prog_gcc_traditional = yes; then
6472 CC="$CC -traditional"
6473 fi
6474fi
6475
6476echo $ac_n "checking for working const""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006477echo "configure:6478: checking for working const" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006478if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6479 echo $ac_n "(cached) $ac_c" 1>&6
6480else
6481 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006482#line 6483 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006483#include "confdefs.h"
6484
6485int main() {
6486
6487/* Ultrix mips cc rejects this. */
6488typedef int charset[2]; const charset x;
6489/* SunOS 4.1.1 cc rejects this. */
6490char const *const *ccp;
6491char **p;
6492/* NEC SVR4.0.2 mips cc rejects this. */
6493struct point {int x, y;};
6494static struct point const zero = {0,0};
6495/* AIX XL C 1.02.0.0 rejects this.
6496 It does not let you subtract one const X* pointer from another in an arm
6497 of an if-expression whose if-part is not a constant expression */
6498const char *g = "string";
6499ccp = &g + (g ? g-g : 0);
6500/* HPUX 7.0 cc rejects these. */
6501++ccp;
6502p = (char**) ccp;
6503ccp = (char const *const *) p;
6504{ /* SCO 3.2v4 cc rejects this. */
6505 char *t;
6506 char const *s = 0 ? (char *) 0 : (char const *) 0;
6507
6508 *t++ = 0;
6509}
6510{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6511 int x[] = {25, 17};
6512 const int *foo = &x[0];
6513 ++foo;
6514}
6515{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6516 typedef const int *iptr;
6517 iptr p = 0;
6518 ++p;
6519}
6520{ /* AIX XL C 1.02.0.0 rejects this saying
6521 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6522 struct s { int j; const int *ap[3]; };
6523 struct s *b; b->j = 5;
6524}
6525{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6526 const int foo = 10;
6527}
6528
6529; return 0; }
6530EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006531if { (eval echo configure:6532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006532 rm -rf conftest*
6533 ac_cv_c_const=yes
6534else
6535 echo "configure: failed program was:" >&5
6536 cat conftest.$ac_ext >&5
6537 rm -rf conftest*
6538 ac_cv_c_const=no
6539fi
6540rm -f conftest*
6541fi
6542
6543echo "$ac_t""$ac_cv_c_const" 1>&6
6544if test $ac_cv_c_const = no; then
6545 cat >> confdefs.h <<\EOF
6546#define const
6547EOF
6548
6549fi
6550
6551echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006552echo "configure:6553: checking for mode_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006553if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
6554 echo $ac_n "(cached) $ac_c" 1>&6
6555else
6556 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006557#line 6558 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006558#include "confdefs.h"
6559#include <sys/types.h>
6560#if STDC_HEADERS
6561#include <stdlib.h>
6562#include <stddef.h>
6563#endif
6564EOF
6565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6566 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6567 rm -rf conftest*
6568 ac_cv_type_mode_t=yes
6569else
6570 rm -rf conftest*
6571 ac_cv_type_mode_t=no
6572fi
6573rm -f conftest*
6574
6575fi
6576echo "$ac_t""$ac_cv_type_mode_t" 1>&6
6577if test $ac_cv_type_mode_t = no; then
6578 cat >> confdefs.h <<\EOF
6579#define mode_t int
6580EOF
6581
6582fi
6583
6584echo $ac_n "checking for off_t""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006585echo "configure:6586: checking for off_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006586if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
6587 echo $ac_n "(cached) $ac_c" 1>&6
6588else
6589 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006590#line 6591 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006591#include "confdefs.h"
6592#include <sys/types.h>
6593#if STDC_HEADERS
6594#include <stdlib.h>
6595#include <stddef.h>
6596#endif
6597EOF
6598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6599 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6600 rm -rf conftest*
6601 ac_cv_type_off_t=yes
6602else
6603 rm -rf conftest*
6604 ac_cv_type_off_t=no
6605fi
6606rm -f conftest*
6607
6608fi
6609echo "$ac_t""$ac_cv_type_off_t" 1>&6
6610if test $ac_cv_type_off_t = no; then
6611 cat >> confdefs.h <<\EOF
6612#define off_t long
6613EOF
6614
6615fi
6616
6617echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006618echo "configure:6619: checking for pid_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006619if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6620 echo $ac_n "(cached) $ac_c" 1>&6
6621else
6622 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006623#line 6624 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006624#include "confdefs.h"
6625#include <sys/types.h>
6626#if STDC_HEADERS
6627#include <stdlib.h>
6628#include <stddef.h>
6629#endif
6630EOF
6631if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6632 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6633 rm -rf conftest*
6634 ac_cv_type_pid_t=yes
6635else
6636 rm -rf conftest*
6637 ac_cv_type_pid_t=no
6638fi
6639rm -f conftest*
6640
6641fi
6642echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6643if test $ac_cv_type_pid_t = no; then
6644 cat >> confdefs.h <<\EOF
6645#define pid_t int
6646EOF
6647
6648fi
6649
6650echo $ac_n "checking for size_t""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006651echo "configure:6652: checking for size_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006652if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6653 echo $ac_n "(cached) $ac_c" 1>&6
6654else
6655 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006656#line 6657 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006657#include "confdefs.h"
6658#include <sys/types.h>
6659#if STDC_HEADERS
6660#include <stdlib.h>
6661#include <stddef.h>
6662#endif
6663EOF
6664if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6665 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6666 rm -rf conftest*
6667 ac_cv_type_size_t=yes
6668else
6669 rm -rf conftest*
6670 ac_cv_type_size_t=no
6671fi
6672rm -f conftest*
6673
6674fi
6675echo "$ac_t""$ac_cv_type_size_t" 1>&6
6676if test $ac_cv_type_size_t = no; then
6677 cat >> confdefs.h <<\EOF
6678#define size_t unsigned
6679EOF
6680
6681fi
6682
6683echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006684echo "configure:6685: checking for uid_t in sys/types.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006685if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
6686 echo $ac_n "(cached) $ac_c" 1>&6
6687else
6688 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006689#line 6690 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006690#include "confdefs.h"
6691#include <sys/types.h>
6692EOF
6693if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6694 egrep "uid_t" >/dev/null 2>&1; then
6695 rm -rf conftest*
6696 ac_cv_type_uid_t=yes
6697else
6698 rm -rf conftest*
6699 ac_cv_type_uid_t=no
6700fi
6701rm -f conftest*
6702
6703fi
6704
6705echo "$ac_t""$ac_cv_type_uid_t" 1>&6
6706if test $ac_cv_type_uid_t = no; then
6707 cat >> confdefs.h <<\EOF
6708#define uid_t int
6709EOF
6710
6711 cat >> confdefs.h <<\EOF
6712#define gid_t int
6713EOF
6714
6715fi
6716
6717echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006718echo "configure:6719: checking whether time.h and sys/time.h may both be included" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006719if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
6720 echo $ac_n "(cached) $ac_c" 1>&6
6721else
6722 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006723#line 6724 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006724#include "confdefs.h"
6725#include <sys/types.h>
6726#include <sys/time.h>
6727#include <time.h>
6728int main() {
6729struct tm *tp;
6730; return 0; }
6731EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006732if { (eval echo configure:6733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006733 rm -rf conftest*
6734 ac_cv_header_time=yes
6735else
6736 echo "configure: failed program was:" >&5
6737 cat conftest.$ac_ext >&5
6738 rm -rf conftest*
6739 ac_cv_header_time=no
6740fi
6741rm -f conftest*
6742fi
6743
6744echo "$ac_t""$ac_cv_header_time" 1>&6
6745if test $ac_cv_header_time = yes; then
6746 cat >> confdefs.h <<\EOF
6747#define TIME_WITH_SYS_TIME 1
6748EOF
6749
6750fi
6751
6752echo $ac_n "checking for ino_t""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006753echo "configure:6754: checking for ino_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006754if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
6755 echo $ac_n "(cached) $ac_c" 1>&6
6756else
6757 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006758#line 6759 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006759#include "confdefs.h"
6760#include <sys/types.h>
6761#if STDC_HEADERS
6762#include <stdlib.h>
6763#include <stddef.h>
6764#endif
6765EOF
6766if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6767 egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6768 rm -rf conftest*
6769 ac_cv_type_ino_t=yes
6770else
6771 rm -rf conftest*
6772 ac_cv_type_ino_t=no
6773fi
6774rm -f conftest*
6775
6776fi
6777echo "$ac_t""$ac_cv_type_ino_t" 1>&6
6778if test $ac_cv_type_ino_t = no; then
6779 cat >> confdefs.h <<\EOF
6780#define ino_t long
6781EOF
6782
6783fi
6784
6785echo $ac_n "checking for dev_t""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006786echo "configure:6787: checking for dev_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006787if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
6788 echo $ac_n "(cached) $ac_c" 1>&6
6789else
6790 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006791#line 6792 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006792#include "confdefs.h"
6793#include <sys/types.h>
6794#if STDC_HEADERS
6795#include <stdlib.h>
6796#include <stddef.h>
6797#endif
6798EOF
6799if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6800 egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6801 rm -rf conftest*
6802 ac_cv_type_dev_t=yes
6803else
6804 rm -rf conftest*
6805 ac_cv_type_dev_t=no
6806fi
6807rm -f conftest*
6808
6809fi
6810echo "$ac_t""$ac_cv_type_dev_t" 1>&6
6811if test $ac_cv_type_dev_t = no; then
6812 cat >> confdefs.h <<\EOF
6813#define dev_t unsigned
6814EOF
6815
6816fi
6817
6818
6819echo $ac_n "checking for rlim_t""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006820echo "configure:6821: checking for rlim_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006821if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
6822 echo "$ac_t""(cached) $ac_cv_type_rlim_t" 1>&6
6823else
6824 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006825#line 6826 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006826#include "confdefs.h"
6827
6828#include <sys/types.h>
6829#if STDC_HEADERS
6830#include <stdlib.h>
6831#include <stddef.h>
6832#endif
6833#ifdef HAVE_SYS_RESOURCE_H
6834#include <sys/resource.h>
6835#endif
6836
6837EOF
6838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6839 egrep "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6840 rm -rf conftest*
6841 ac_cv_type_rlim_t=yes
6842else
6843 rm -rf conftest*
6844 ac_cv_type_rlim_t=no
6845fi
6846rm -f conftest*
6847
6848 echo "$ac_t""$ac_cv_type_rlim_t" 1>&6
6849fi
6850if test $ac_cv_type_rlim_t = no; then
6851 cat >> confdefs.h <<\EOF
6852#define rlim_t unsigned long
6853EOF
6854fi
6855
6856echo $ac_n "checking for stack_t""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006857echo "configure:6858: checking for stack_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006858if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
6859 echo "$ac_t""(cached) $ac_cv_type_stack_t" 1>&6
6860else
6861 cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006862#line 6863 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006863#include "confdefs.h"
6864
6865#include <sys/types.h>
6866#if STDC_HEADERS
6867#include <stdlib.h>
6868#include <stddef.h>
6869#endif
6870#include <signal.h>
6871
6872EOF
6873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6874 egrep "stack_t" >/dev/null 2>&1; then
6875 rm -rf conftest*
6876 ac_cv_type_stack_t=yes
6877else
6878 rm -rf conftest*
6879 ac_cv_type_stack_t=no
6880fi
6881rm -f conftest*
6882
6883 echo "$ac_t""$ac_cv_type_stack_t" 1>&6
6884fi
6885if test $ac_cv_type_stack_t = no; then
6886 cat >> confdefs.h <<\EOF
6887#define stack_t struct sigaltstack
6888EOF
6889fi
6890
6891echo $ac_n "checking whether stack_t has an ss_base field""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006892echo "configure:6893: checking whether stack_t has an ss_base field" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006893cat > conftest.$ac_ext <<EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006894#line 6895 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006895#include "confdefs.h"
6896
6897#include <sys/types.h>
6898#if STDC_HEADERS
6899#include <stdlib.h>
6900#include <stddef.h>
6901#endif
6902#include <signal.h>
6903#include "confdefs.h"
6904
6905int main() {
6906stack_t sigstk; sigstk.ss_base = 0;
6907; return 0; }
6908EOF
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006909if { (eval echo configure:6910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006910 rm -rf conftest*
6911 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
6912#define HAVE_SS_BASE 1
6913EOF
6914
6915else
6916 echo "configure: failed program was:" >&5
6917 cat conftest.$ac_ext >&5
6918 rm -rf conftest*
6919 echo "$ac_t""no" 1>&6
6920fi
6921rm -f conftest*
6922
6923olibs="$LIBS"
6924echo $ac_n "checking --with-tlib argument""... $ac_c" 1>&6
Bram Moolenaar7b0294c2004-10-11 10:16:09 +00006925echo "configure:6926: checking --with-tlib argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006926# Check whether --with-tlib or --without-tlib was given.
6927if test "${with_tlib+set}" = set; then
6928 withval="$with_tlib"
6929 :
6930fi
6931
6932if test -n "$with_tlib"; then
6933 echo "$ac_t""$with_tlib" 1>&6
6934 LIBS="$LIBS -l$with_tlib"
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00006935 echo $ac_n "checking for linking with $with_tlib library""... $ac_c" 1>&6
6936echo "configure:6937: checking for linking with $with_tlib library" >&5
6937 cat > conftest.$ac_ext <<EOF
6938#line 6939 "configure"
6939#include "confdefs.h"
6940
6941int main() {
6942
6943; return 0; }
6944EOF
6945if { (eval echo configure:6946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6946 rm -rf conftest*
6947 echo "$ac_t""OK" 1>&6
Bram Moolenaar071d4272004-06-13 20:20:40 +00006948else
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00006949 echo "configure: failed program was:" >&5
6950 cat conftest.$ac_ext >&5
6951 rm -rf conftest*
6952 { echo "configure: error: FAILED" 1>&2; exit 1; }
6953fi
6954rm -f conftest*
6955 olibs="$LIBS"
6956else
6957 echo "$ac_t""empty: automatic terminal library selection" 1>&6
Bram Moolenaar071d4272004-06-13 20:20:40 +00006958 case "`uname -s 2>/dev/null`" in
6959 OSF1) tlibs="ncurses curses termlib termcap";;
6960 *) tlibs="ncurses termlib termcap curses";;
6961 esac
6962 for libname in $tlibs; do
6963 echo $ac_n "checking for tgetent in -l${libname}""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00006964echo "configure:6965: checking for tgetent in -l${libname}" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006965ac_lib_var=`echo ${libname}'_'tgetent | sed 'y%./+-%__p_%'`
6966if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6967 echo $ac_n "(cached) $ac_c" 1>&6
6968else
6969 ac_save_LIBS="$LIBS"
6970LIBS="-l${libname} $LIBS"
6971cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00006972#line 6973 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006973#include "confdefs.h"
6974/* Override any gcc2 internal prototype to avoid an error. */
6975/* We use char because int might match the return type of a gcc2
6976 builtin and then its argument prototype would still apply. */
6977char tgetent();
6978
6979int main() {
6980tgetent()
6981; return 0; }
6982EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00006983if { (eval echo configure:6984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006984 rm -rf conftest*
6985 eval "ac_cv_lib_$ac_lib_var=yes"
6986else
6987 echo "configure: failed program was:" >&5
6988 cat conftest.$ac_ext >&5
6989 rm -rf conftest*
6990 eval "ac_cv_lib_$ac_lib_var=no"
6991fi
6992rm -f conftest*
6993LIBS="$ac_save_LIBS"
6994
6995fi
6996if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6997 echo "$ac_t""yes" 1>&6
6998 ac_tr_lib=HAVE_LIB`echo ${libname} | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6999 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7000 cat >> confdefs.h <<EOF
7001#define $ac_tr_lib 1
7002EOF
7003
7004 LIBS="-l${libname} $LIBS"
7005
7006else
7007 echo "$ac_t""no" 1>&6
7008fi
7009
7010 if test "x$olibs" != "x$LIBS"; then
7011 if test "$cross_compiling" = yes; then
7012 res="FAIL"
7013else
7014 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007015#line 7016 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007016#include "confdefs.h"
7017
7018#ifdef HAVE_TERMCAP_H
7019# include <termcap.h>
7020#endif
7021main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
7022EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007023if { (eval echo configure:7024: \"$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 +00007024then
7025 res="OK"
7026else
7027 echo "configure: failed program was:" >&5
7028 cat conftest.$ac_ext >&5
7029 rm -fr conftest*
7030 res="FAIL"
7031fi
7032rm -fr conftest*
7033fi
7034
7035 if test "$res" = "OK"; then
7036 break
7037 fi
7038 echo "$ac_t""$libname library is not usable" 1>&6
7039 LIBS="$olibs"
7040 fi
7041 done
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007042 if test "x$olibs" = "x$LIBS"; then
7043 echo "$ac_t""no terminal library found" 1>&6
7044 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007045fi
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007046
7047if test "x$olibs" = "x$LIBS"; then
7048 echo $ac_n "checking for tgetent()""... $ac_c" 1>&6
7049echo "configure:7050: checking for tgetent()" >&5
7050 cat > conftest.$ac_ext <<EOF
7051#line 7052 "configure"
7052#include "confdefs.h"
7053
7054int main() {
7055char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
7056; return 0; }
7057EOF
7058if { (eval echo configure:7059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7059 rm -rf conftest*
7060 echo "$ac_t""yes" 1>&6
7061else
7062 echo "configure: failed program was:" >&5
7063 cat conftest.$ac_ext >&5
7064 rm -rf conftest*
7065 { echo "configure: error: NOT FOUND!
7066 You need to install a terminal library; for example ncurses.
7067 Or specify the name of the library with --with-tlib." 1>&2; exit 1; }
7068fi
7069rm -f conftest*
7070fi
7071
7072echo $ac_n "checking whether we talk terminfo""... $ac_c" 1>&6
7073echo "configure:7074: checking whether we talk terminfo" >&5
7074if test "$cross_compiling" = yes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007075 { echo "configure: error: failed to compile test program." 1>&2; exit 1; }
7076else
7077 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007078#line 7079 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007079#include "confdefs.h"
7080
7081#ifdef HAVE_TERMCAP_H
7082# include <termcap.h>
7083#endif
7084main()
7085{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
7086EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007087if { (eval echo configure:7088: \"$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 +00007088then
7089 echo "$ac_t""no -- we are in termcap land" 1>&6
7090else
7091 echo "configure: failed program was:" >&5
7092 cat conftest.$ac_ext >&5
7093 rm -fr conftest*
7094 echo "$ac_t""yes -- terminfo spoken here" 1>&6; cat >> confdefs.h <<\EOF
7095#define TERMINFO 1
7096EOF
7097
7098fi
7099rm -fr conftest*
7100fi
7101
Bram Moolenaar071d4272004-06-13 20:20:40 +00007102
7103if test "x$olibs" != "x$LIBS"; then
7104 echo $ac_n "checking what tgetent() returns for an unknown terminal""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007105echo "configure:7106: checking what tgetent() returns for an unknown terminal" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007106 if test "$cross_compiling" = yes; then
7107 { echo "configure: error: failed to compile test program." 1>&2; exit 1; }
7108else
7109 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +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
7116main()
7117{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
7118EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007119if { (eval echo configure:7120: \"$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 +00007120then
7121 echo "$ac_t""zero" 1>&6; cat >> confdefs.h <<\EOF
7122#define TGETENT_ZERO_ERR 0
7123EOF
7124
7125else
7126 echo "configure: failed program was:" >&5
7127 cat conftest.$ac_ext >&5
7128 rm -fr conftest*
7129 echo "$ac_t""non-zero" 1>&6
7130fi
7131rm -fr conftest*
7132fi
7133
7134fi
7135
7136echo $ac_n "checking whether termcap.h contains ospeed""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007137echo "configure:7138: checking whether termcap.h contains ospeed" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007138cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007139#line 7140 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007140#include "confdefs.h"
7141
7142#ifdef HAVE_TERMCAP_H
7143# include <termcap.h>
7144#endif
7145
7146int main() {
7147ospeed = 20000
7148; return 0; }
7149EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007150if { (eval echo configure:7151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007151 rm -rf conftest*
7152 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7153#define HAVE_OSPEED 1
7154EOF
7155
7156else
7157 echo "configure: failed program was:" >&5
7158 cat conftest.$ac_ext >&5
7159 rm -rf conftest*
7160 echo "$ac_t""no" 1>&6
7161 echo $ac_n "checking whether ospeed can be extern""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007162echo "configure:7163: checking whether ospeed can be extern" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007163 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007164#line 7165 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007165#include "confdefs.h"
7166
7167#ifdef HAVE_TERMCAP_H
7168# include <termcap.h>
7169#endif
7170extern short ospeed;
7171
7172int main() {
7173ospeed = 20000
7174; return 0; }
7175EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007176if { (eval echo configure:7177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007177 rm -rf conftest*
7178 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7179#define OSPEED_EXTERN 1
7180EOF
7181
7182else
7183 echo "configure: failed program was:" >&5
7184 cat conftest.$ac_ext >&5
7185 rm -rf conftest*
7186 echo "$ac_t""no" 1>&6
7187fi
7188rm -f conftest*
7189
7190fi
7191rm -f conftest*
7192
7193echo $ac_n "checking whether termcap.h contains UP, BC and PC""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007194echo "configure:7195: checking whether termcap.h contains UP, BC and PC" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007195cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007196#line 7197 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007197#include "confdefs.h"
7198
7199#ifdef HAVE_TERMCAP_H
7200# include <termcap.h>
7201#endif
7202
7203int main() {
7204if (UP == 0 && BC == 0) PC = 1
7205; return 0; }
7206EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007207if { (eval echo configure:7208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007208 rm -rf conftest*
7209 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7210#define HAVE_UP_BC_PC 1
7211EOF
7212
7213else
7214 echo "configure: failed program was:" >&5
7215 cat conftest.$ac_ext >&5
7216 rm -rf conftest*
7217 echo "$ac_t""no" 1>&6
7218 echo $ac_n "checking whether UP, BC and PC can be extern""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007219echo "configure:7220: checking whether UP, BC and PC can be extern" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007220 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007221#line 7222 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007222#include "confdefs.h"
7223
7224#ifdef HAVE_TERMCAP_H
7225# include <termcap.h>
7226#endif
7227extern char *UP, *BC, PC;
7228
7229int main() {
7230if (UP == 0 && BC == 0) PC = 1
7231; return 0; }
7232EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007233if { (eval echo configure:7234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007234 rm -rf conftest*
7235 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7236#define UP_BC_PC_EXTERN 1
7237EOF
7238
7239else
7240 echo "configure: failed program was:" >&5
7241 cat conftest.$ac_ext >&5
7242 rm -rf conftest*
7243 echo "$ac_t""no" 1>&6
7244fi
7245rm -f conftest*
7246
7247fi
7248rm -f conftest*
7249
7250echo $ac_n "checking whether tputs() uses outfuntype""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007251echo "configure:7252: checking whether tputs() uses outfuntype" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007252cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007253#line 7254 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007254#include "confdefs.h"
7255
7256#ifdef HAVE_TERMCAP_H
7257# include <termcap.h>
7258#endif
7259
7260int main() {
7261extern int xx(); tputs("test", 1, (outfuntype)xx)
7262; return 0; }
7263EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007264if { (eval echo configure:7265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007265 rm -rf conftest*
7266 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7267#define HAVE_OUTFUNTYPE 1
7268EOF
7269
7270else
7271 echo "configure: failed program was:" >&5
7272 cat conftest.$ac_ext >&5
7273 rm -rf conftest*
7274 echo "$ac_t""no" 1>&6
7275fi
7276rm -f conftest*
7277
7278echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007279echo "configure:7280: checking whether sys/select.h and sys/time.h may both be included" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007280cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007281#line 7282 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007282#include "confdefs.h"
7283
7284#include <sys/types.h>
7285#include <sys/time.h>
7286#include <sys/select.h>
7287int main() {
7288
7289; return 0; }
7290EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007291if { (eval echo configure:7292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007292 rm -rf conftest*
7293 echo "$ac_t""yes" 1>&6
7294 cat >> confdefs.h <<\EOF
7295#define SYS_SELECT_WITH_SYS_TIME 1
7296EOF
7297
7298else
7299 echo "configure: failed program was:" >&5
7300 cat conftest.$ac_ext >&5
7301 rm -rf conftest*
7302 echo "$ac_t""no" 1>&6
7303fi
7304rm -f conftest*
7305
7306
7307echo $ac_n "checking for /dev/ptc""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007308echo "configure:7309: checking for /dev/ptc" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007309if test -r /dev/ptc; then
7310 cat >> confdefs.h <<\EOF
7311#define HAVE_DEV_PTC 1
7312EOF
7313
7314 echo "$ac_t""yes" 1>&6
7315else
7316 echo "$ac_t""no" 1>&6
7317fi
7318
7319echo $ac_n "checking for SVR4 ptys""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007320echo "configure:7321: checking for SVR4 ptys" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007321if test -c /dev/ptmx ; then
7322 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007323#line 7324 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007324#include "confdefs.h"
7325
7326int main() {
7327ptsname(0);grantpt(0);unlockpt(0);
7328; return 0; }
7329EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007330if { (eval echo configure:7331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007331 rm -rf conftest*
7332 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7333#define HAVE_SVR4_PTYS 1
7334EOF
7335
7336else
7337 echo "configure: failed program was:" >&5
7338 cat conftest.$ac_ext >&5
7339 rm -rf conftest*
7340 echo "$ac_t""no" 1>&6
7341fi
7342rm -f conftest*
7343else
7344 echo "$ac_t""no" 1>&6
7345fi
7346
7347echo $ac_n "checking for ptyranges""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007348echo "configure:7349: checking for ptyranges" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007349if test -d /dev/ptym ; then
7350 pdir='/dev/ptym'
7351else
7352 pdir='/dev'
7353fi
7354cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007355#line 7356 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007356#include "confdefs.h"
7357#ifdef M_UNIX
7358 yes;
7359#endif
7360
7361EOF
7362if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7363 egrep "yes" >/dev/null 2>&1; then
7364 rm -rf conftest*
7365 ptys=`echo /dev/ptyp??`
7366else
7367 rm -rf conftest*
7368 ptys=`echo $pdir/pty??`
7369fi
7370rm -f conftest*
7371
7372if test "$ptys" != "$pdir/pty??" ; then
7373 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
7374 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
7375 cat >> confdefs.h <<EOF
7376#define PTYRANGE0 "$p0"
7377EOF
7378
7379 cat >> confdefs.h <<EOF
7380#define PTYRANGE1 "$p1"
7381EOF
7382
7383 echo "$ac_t""$p0 / $p1" 1>&6
7384else
7385 echo "$ac_t""don't know" 1>&6
7386fi
7387
7388echo $ac_n "checking default tty permissions/group""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007389echo "configure:7390: checking default tty permissions/group" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007390rm -f conftest_grp
7391if test "$cross_compiling" = yes; then
7392 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7393else
7394 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007395#line 7396 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007396#include "confdefs.h"
7397
7398#include <sys/types.h>
7399#include <sys/stat.h>
7400#include <stdio.h>
7401main()
7402{
7403 struct stat sb;
7404 char *x,*ttyname();
7405 int om, m;
7406 FILE *fp;
7407
7408 if (!(x = ttyname(0))) exit(1);
7409 if (stat(x, &sb)) exit(1);
7410 om = sb.st_mode;
7411 if (om & 002) exit(0);
7412 m = system("mesg y");
7413 if (m == -1 || m == 127) exit(1);
7414 if (stat(x, &sb)) exit(1);
7415 m = sb.st_mode;
7416 if (chmod(x, om)) exit(1);
7417 if (m & 002) exit(0);
7418 if (sb.st_gid == getgid()) exit(1);
7419 if (!(fp=fopen("conftest_grp", "w")))
7420 exit(1);
7421 fprintf(fp, "%d\n", sb.st_gid);
7422 fclose(fp);
7423 exit(0);
7424}
7425
7426EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007427if { (eval echo configure:7428: \"$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 +00007428then
7429
7430 if test -f conftest_grp; then
7431 ptygrp=`cat conftest_grp`
7432 echo "$ac_t""pty mode: 0620, group: $ptygrp" 1>&6
7433 cat >> confdefs.h <<\EOF
7434#define PTYMODE 0620
7435EOF
7436
7437 cat >> confdefs.h <<EOF
7438#define PTYGROUP $ptygrp
7439EOF
7440
7441 else
7442 echo "$ac_t""ptys are world accessable" 1>&6
7443 fi
7444
7445else
7446 echo "configure: failed program was:" >&5
7447 cat conftest.$ac_ext >&5
7448 rm -fr conftest*
7449 echo "$ac_t""can't determine - assume ptys are world accessable" 1>&6
7450fi
7451rm -fr conftest*
7452fi
7453
7454rm -f conftest_grp
7455
7456
7457echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007458echo "configure:7459: checking return type of signal handlers" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007459if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
7460 echo $ac_n "(cached) $ac_c" 1>&6
7461else
7462 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007463#line 7464 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007464#include "confdefs.h"
7465#include <sys/types.h>
7466#include <signal.h>
7467#ifdef signal
7468#undef signal
7469#endif
7470#ifdef __cplusplus
7471extern "C" void (*signal (int, void (*)(int)))(int);
7472#else
7473void (*signal ()) ();
7474#endif
7475
7476int main() {
7477int i;
7478; return 0; }
7479EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007480if { (eval echo configure:7481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007481 rm -rf conftest*
7482 ac_cv_type_signal=void
7483else
7484 echo "configure: failed program was:" >&5
7485 cat conftest.$ac_ext >&5
7486 rm -rf conftest*
7487 ac_cv_type_signal=int
7488fi
7489rm -f conftest*
7490fi
7491
7492echo "$ac_t""$ac_cv_type_signal" 1>&6
7493cat >> confdefs.h <<EOF
7494#define RETSIGTYPE $ac_cv_type_signal
7495EOF
7496
7497
7498
7499if test $ac_cv_type_signal = void; then
7500 cat >> confdefs.h <<\EOF
7501#define SIGRETURN return
7502EOF
7503
7504else
7505 cat >> confdefs.h <<\EOF
7506#define SIGRETURN return 0
7507EOF
7508
7509fi
7510
7511echo $ac_n "checking for struct sigcontext""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007512echo "configure:7513: checking for struct sigcontext" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007513cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007514#line 7515 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007515#include "confdefs.h"
7516
7517#include <signal.h>
7518test_sig()
7519{
7520 struct sigcontext *scont;
7521 scont = (struct sigcontext *)0;
7522 return 1;
7523}
7524int main() {
7525
7526; return 0; }
7527EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007528if { (eval echo configure:7529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007529 rm -rf conftest*
7530 echo "$ac_t""yes" 1>&6
7531 cat >> confdefs.h <<\EOF
7532#define HAVE_SIGCONTEXT 1
7533EOF
7534
7535else
7536 echo "configure: failed program was:" >&5
7537 cat conftest.$ac_ext >&5
7538 rm -rf conftest*
7539 echo "$ac_t""no" 1>&6
7540fi
7541rm -f conftest*
7542
7543echo $ac_n "checking getcwd implementation""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007544echo "configure:7545: checking getcwd implementation" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007545if test "$cross_compiling" = yes; then
7546 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7547else
7548 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007549#line 7550 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007550#include "confdefs.h"
7551
7552char *dagger[] = { "IFS=pwd", 0 };
7553main()
7554{
7555 char buffer[500];
7556 extern char **environ;
7557 environ = dagger;
7558 return getcwd(buffer, 500) ? 0 : 1;
7559}
7560EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007561if { (eval echo configure:7562: \"$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 +00007562then
7563 echo "$ac_t""it is usable" 1>&6
7564else
7565 echo "configure: failed program was:" >&5
7566 cat conftest.$ac_ext >&5
7567 rm -fr conftest*
7568 echo "$ac_t""it stinks" 1>&6
7569 cat >> confdefs.h <<\EOF
7570#define BAD_GETCWD 1
7571EOF
7572
7573fi
7574rm -fr conftest*
7575fi
7576
7577
7578for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \
7579 getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
7580 memset nanosleep opendir putenv qsort readlink select setenv \
7581 setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
7582 sigvec snprintf strcasecmp strerror strftime stricmp strncasecmp \
7583 strnicmp strpbrk strtol tgetent towlower towupper usleep utime utimes
7584do
7585echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007586echo "configure:7587: checking for $ac_func" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007587if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7588 echo $ac_n "(cached) $ac_c" 1>&6
7589else
7590 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007591#line 7592 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007592#include "confdefs.h"
7593/* System header to define __stub macros and hopefully few prototypes,
7594 which can conflict with char $ac_func(); below. */
7595#include <assert.h>
7596/* Override any gcc2 internal prototype to avoid an error. */
7597/* We use char because int might match the return type of a gcc2
7598 builtin and then its argument prototype would still apply. */
7599char $ac_func();
7600
7601int main() {
7602
7603/* The GNU C library defines this for functions which it implements
7604 to always fail with ENOSYS. Some functions are actually named
7605 something starting with __ and the normal name is an alias. */
7606#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7607choke me
7608#else
7609$ac_func();
7610#endif
7611
7612; return 0; }
7613EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007614if { (eval echo configure:7615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007615 rm -rf conftest*
7616 eval "ac_cv_func_$ac_func=yes"
7617else
7618 echo "configure: failed program was:" >&5
7619 cat conftest.$ac_ext >&5
7620 rm -rf conftest*
7621 eval "ac_cv_func_$ac_func=no"
7622fi
7623rm -f conftest*
7624fi
7625
7626if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7627 echo "$ac_t""yes" 1>&6
7628 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7629 cat >> confdefs.h <<EOF
7630#define $ac_tr_func 1
7631EOF
7632
7633else
7634 echo "$ac_t""no" 1>&6
7635fi
7636done
7637
7638
7639echo $ac_n "checking for st_blksize""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007640echo "configure:7641: checking for st_blksize" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007641cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007642#line 7643 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007643#include "confdefs.h"
7644#include <sys/types.h>
7645#include <sys/stat.h>
7646int main() {
7647 struct stat st;
7648 int n;
7649
7650 stat("/", &st);
7651 n = (int)st.st_blksize;
7652; return 0; }
7653EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007654if { (eval echo configure:7655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007655 rm -rf conftest*
7656 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7657#define HAVE_ST_BLKSIZE 1
7658EOF
7659
7660else
7661 echo "configure: failed program was:" >&5
7662 cat conftest.$ac_ext >&5
7663 rm -rf conftest*
7664 echo "$ac_t""no" 1>&6
7665fi
7666rm -f conftest*
7667
7668echo $ac_n "checking whether stat() ignores a trailing slash""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007669echo "configure:7670: checking whether stat() ignores a trailing slash" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007670if test "$cross_compiling" = yes; then
7671 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7672else
7673 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007674#line 7675 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007675#include "confdefs.h"
7676#include <sys/types.h>
7677#include <sys/stat.h>
7678main() {struct stat st; exit(stat("configure/", &st) != 0); }
7679EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007680if { (eval echo configure:7681: \"$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 +00007681then
7682 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7683#define STAT_IGNORES_SLASH 1
7684EOF
7685
7686else
7687 echo "configure: failed program was:" >&5
7688 cat conftest.$ac_ext >&5
7689 rm -fr conftest*
7690 echo "$ac_t""no" 1>&6
7691fi
7692rm -fr conftest*
7693fi
7694
7695
7696echo $ac_n "checking for iconv_open()""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007697echo "configure:7698: checking for iconv_open()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007698save_LIBS="$LIBS"
7699LIBS="$LIBS -liconv"
7700cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007701#line 7702 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007702#include "confdefs.h"
7703
7704#ifdef HAVE_ICONV_H
7705# include <iconv.h>
7706#endif
7707
7708int main() {
7709iconv_open("fr", "to");
7710; return 0; }
7711EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +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; with -liconv" 1>&6; cat >> confdefs.h <<\EOF
7715#define HAVE_ICONV 1
7716EOF
7717
7718else
7719 echo "configure: failed program was:" >&5
7720 cat conftest.$ac_ext >&5
7721 rm -rf conftest*
7722 LIBS="$save_LIBS"
7723 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007724#line 7725 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007725#include "confdefs.h"
7726
7727#ifdef HAVE_ICONV_H
7728# include <iconv.h>
7729#endif
7730
7731int main() {
7732iconv_open("fr", "to");
7733; return 0; }
7734EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007735if { (eval echo configure:7736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007736 rm -rf conftest*
7737 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7738#define HAVE_ICONV 1
7739EOF
7740
7741else
7742 echo "configure: failed program was:" >&5
7743 cat conftest.$ac_ext >&5
7744 rm -rf conftest*
7745 echo "$ac_t""no" 1>&6
7746fi
7747rm -f conftest*
7748fi
7749rm -f conftest*
7750
7751
7752echo $ac_n "checking for nl_langinfo(CODESET)""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007753echo "configure:7754: checking for nl_langinfo(CODESET)" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007754cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007755#line 7756 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007756#include "confdefs.h"
7757
7758#ifdef HAVE_LANGINFO_H
7759# include <langinfo.h>
7760#endif
7761
7762int main() {
7763char *cs = nl_langinfo(CODESET);
7764; return 0; }
7765EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007766if { (eval echo configure:7767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007767 rm -rf conftest*
7768 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7769#define HAVE_NL_LANGINFO_CODESET 1
7770EOF
7771
7772else
7773 echo "configure: failed program was:" >&5
7774 cat conftest.$ac_ext >&5
7775 rm -rf conftest*
7776 echo "$ac_t""no" 1>&6
7777fi
7778rm -f conftest*
7779
7780echo $ac_n "checking --disable-acl argument""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007781echo "configure:7782: checking --disable-acl argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007782# Check whether --enable-acl or --disable-acl was given.
7783if test "${enable_acl+set}" = set; then
7784 enableval="$enable_acl"
7785 :
7786else
7787 enable_acl="yes"
7788fi
7789
7790if test "$enable_acl" = "yes"; then
7791echo "$ac_t""no" 1>&6
7792echo $ac_n "checking for acl_get_file in -lposix1e""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007793echo "configure:7794: checking for acl_get_file in -lposix1e" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007794ac_lib_var=`echo posix1e'_'acl_get_file | sed 'y%./+-%__p_%'`
7795if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7796 echo $ac_n "(cached) $ac_c" 1>&6
7797else
7798 ac_save_LIBS="$LIBS"
7799LIBS="-lposix1e $LIBS"
7800cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007801#line 7802 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007802#include "confdefs.h"
7803/* Override any gcc2 internal prototype to avoid an error. */
7804/* We use char because int might match the return type of a gcc2
7805 builtin and then its argument prototype would still apply. */
7806char acl_get_file();
7807
7808int main() {
7809acl_get_file()
7810; return 0; }
7811EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007812if { (eval echo configure:7813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007813 rm -rf conftest*
7814 eval "ac_cv_lib_$ac_lib_var=yes"
7815else
7816 echo "configure: failed program was:" >&5
7817 cat conftest.$ac_ext >&5
7818 rm -rf conftest*
7819 eval "ac_cv_lib_$ac_lib_var=no"
7820fi
7821rm -f conftest*
7822LIBS="$ac_save_LIBS"
7823
7824fi
7825if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7826 echo "$ac_t""yes" 1>&6
7827 LIBS="$LIBS -lposix1e"
7828else
7829 echo "$ac_t""no" 1>&6
7830echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007831echo "configure:7832: checking for acl_get_file in -lacl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007832ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
7833if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7834 echo $ac_n "(cached) $ac_c" 1>&6
7835else
7836 ac_save_LIBS="$LIBS"
7837LIBS="-lacl $LIBS"
7838cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007839#line 7840 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007840#include "confdefs.h"
7841/* Override any gcc2 internal prototype to avoid an error. */
7842/* We use char because int might match the return type of a gcc2
7843 builtin and then its argument prototype would still apply. */
7844char acl_get_file();
7845
7846int main() {
7847acl_get_file()
7848; return 0; }
7849EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007850if { (eval echo configure:7851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007851 rm -rf conftest*
7852 eval "ac_cv_lib_$ac_lib_var=yes"
7853else
7854 echo "configure: failed program was:" >&5
7855 cat conftest.$ac_ext >&5
7856 rm -rf conftest*
7857 eval "ac_cv_lib_$ac_lib_var=no"
7858fi
7859rm -f conftest*
7860LIBS="$ac_save_LIBS"
7861
7862fi
7863if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7864 echo "$ac_t""yes" 1>&6
7865 LIBS="$LIBS -lacl"
7866 echo $ac_n "checking for fgetxattr in -lattr""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007867echo "configure:7868: checking for fgetxattr in -lattr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007868ac_lib_var=`echo attr'_'fgetxattr | sed 'y%./+-%__p_%'`
7869if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7870 echo $ac_n "(cached) $ac_c" 1>&6
7871else
7872 ac_save_LIBS="$LIBS"
7873LIBS="-lattr $LIBS"
7874cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007875#line 7876 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007876#include "confdefs.h"
7877/* Override any gcc2 internal prototype to avoid an error. */
7878/* We use char because int might match the return type of a gcc2
7879 builtin and then its argument prototype would still apply. */
7880char fgetxattr();
7881
7882int main() {
7883fgetxattr()
7884; return 0; }
7885EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007886if { (eval echo configure:7887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007887 rm -rf conftest*
7888 eval "ac_cv_lib_$ac_lib_var=yes"
7889else
7890 echo "configure: failed program was:" >&5
7891 cat conftest.$ac_ext >&5
7892 rm -rf conftest*
7893 eval "ac_cv_lib_$ac_lib_var=no"
7894fi
7895rm -f conftest*
7896LIBS="$ac_save_LIBS"
7897
7898fi
7899if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7900 echo "$ac_t""yes" 1>&6
7901 LIBS="$LIBS -lattr"
7902else
7903 echo "$ac_t""no" 1>&6
7904fi
7905
7906else
7907 echo "$ac_t""no" 1>&6
7908fi
7909
7910fi
7911
7912
7913echo $ac_n "checking for POSIX ACL support""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007914echo "configure:7915: checking for POSIX ACL support" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007915cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007916#line 7917 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007917#include "confdefs.h"
7918
7919#include <sys/types.h>
7920#ifdef HAVE_SYS_ACL_H
7921# include <sys/acl.h>
7922#endif
7923acl_t acl;
7924int main() {
7925acl = acl_get_file("foo", ACL_TYPE_ACCESS);
7926 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
7927 acl_free(acl);
7928; return 0; }
7929EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007930if { (eval echo configure:7931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007931 rm -rf conftest*
7932 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7933#define HAVE_POSIX_ACL 1
7934EOF
7935
7936else
7937 echo "configure: failed program was:" >&5
7938 cat conftest.$ac_ext >&5
7939 rm -rf conftest*
7940 echo "$ac_t""no" 1>&6
7941fi
7942rm -f conftest*
7943
7944echo $ac_n "checking for Solaris ACL support""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007945echo "configure:7946: checking for Solaris ACL support" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007946cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007947#line 7948 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007948#include "confdefs.h"
7949
7950#ifdef HAVE_SYS_ACL_H
7951# include <sys/acl.h>
7952#endif
7953int main() {
7954acl("foo", GETACLCNT, 0, NULL);
7955
7956; return 0; }
7957EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007958if { (eval echo configure:7959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007959 rm -rf conftest*
7960 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7961#define HAVE_SOLARIS_ACL 1
7962EOF
7963
7964else
7965 echo "configure: failed program was:" >&5
7966 cat conftest.$ac_ext >&5
7967 rm -rf conftest*
7968 echo "$ac_t""no" 1>&6
7969fi
7970rm -f conftest*
7971
7972echo $ac_n "checking for AIX ACL support""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007973echo "configure:7974: checking for AIX ACL support" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007974cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007975#line 7976 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007976#include "confdefs.h"
7977
7978#ifdef HAVE_SYS_ACL_H
7979# include <sys/acl.h>
7980#endif
7981#ifdef HAVE_SYS_ACCESS_H
7982# include <sys/access.h>
7983#endif
7984#define _ALL_SOURCE
7985
7986#include <sys/stat.h>
7987
7988int aclsize;
7989struct acl *aclent;
7990int main() {
7991aclsize = sizeof(struct acl);
7992 aclent = (void *)malloc(aclsize);
7993 statacl("foo", STX_NORMAL, aclent, aclsize);
7994
7995; return 0; }
7996EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00007997if { (eval echo configure:7998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007998 rm -rf conftest*
7999 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8000#define HAVE_AIX_ACL 1
8001EOF
8002
8003else
8004 echo "configure: failed program was:" >&5
8005 cat conftest.$ac_ext >&5
8006 rm -rf conftest*
8007 echo "$ac_t""no" 1>&6
8008fi
8009rm -f conftest*
8010else
8011 echo "$ac_t""yes" 1>&6
8012fi
8013
8014echo $ac_n "checking --disable-gpm argument""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008015echo "configure:8016: checking --disable-gpm argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008016# Check whether --enable-gpm or --disable-gpm was given.
8017if test "${enable_gpm+set}" = set; then
8018 enableval="$enable_gpm"
8019 :
8020else
8021 enable_gpm="yes"
8022fi
8023
8024
8025if test "$enable_gpm" = "yes"; then
8026 echo "$ac_t""no" 1>&6
8027 echo $ac_n "checking for gpm""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008028echo "configure:8029: checking for gpm" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008029if eval "test \"`echo '$''{'vi_cv_have_gpm'+set}'`\" = set"; then
8030 echo $ac_n "(cached) $ac_c" 1>&6
8031else
8032 olibs="$LIBS" ; LIBS="-lgpm"
8033 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008034#line 8035 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008035#include "confdefs.h"
8036#include <gpm.h>
8037 #include <linux/keyboard.h>
8038int main() {
8039Gpm_GetLibVersion(NULL);
8040; return 0; }
8041EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008042if { (eval echo configure:8043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008043 rm -rf conftest*
8044 vi_cv_have_gpm=yes
8045else
8046 echo "configure: failed program was:" >&5
8047 cat conftest.$ac_ext >&5
8048 rm -rf conftest*
8049 vi_cv_have_gpm=no
8050fi
8051rm -f conftest*
8052 LIBS="$olibs"
8053
8054fi
8055
8056echo "$ac_t""$vi_cv_have_gpm" 1>&6
8057 if test $vi_cv_have_gpm = yes; then
8058 LIBS="$LIBS -lgpm"
8059 cat >> confdefs.h <<\EOF
8060#define HAVE_GPM 1
8061EOF
8062
8063 fi
8064else
8065 echo "$ac_t""yes" 1>&6
8066fi
8067
8068echo $ac_n "checking for vsnprintf()""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008069echo "configure:8070: checking for vsnprintf()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008070if test "$cross_compiling" = yes; then
8071 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8072else
8073 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008074#line 8075 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008075#include "confdefs.h"
8076
8077#include <stdio.h>
8078#include <stdarg.h>
8079 /* Check use of vsnprintf() */
8080 void warn(char *fmt, ...);
8081 void warn(char *fmt, ...)
8082 {
8083 va_list ap; char buf[20];
8084 va_start(ap, fmt);
8085 vsnprintf(buf, 20, fmt, ap);
8086 va_end(ap);
8087 }
8088 main()
8089 {
8090 warn("testing %s\n", "a very long string that won't fit");
8091 exit(0);
8092 }
8093
8094EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008095if { (eval echo configure:8096: \"$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 +00008096then
8097 cat >> confdefs.h <<\EOF
8098#define HAVE_VSNPRINTF 1
8099EOF
8100 echo "$ac_t""yes" 1>&6
8101else
8102 echo "configure: failed program was:" >&5
8103 cat conftest.$ac_ext >&5
8104 rm -fr conftest*
8105 echo "$ac_t""no" 1>&6
8106fi
8107rm -fr conftest*
8108fi
8109
8110
8111
8112echo $ac_n "checking for rename""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008113echo "configure:8114: checking for rename" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008114cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008115#line 8116 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008116#include "confdefs.h"
8117#include <stdio.h>
8118int main() {
8119rename("this", "that")
8120; return 0; }
8121EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008122if { (eval echo configure:8123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008123 rm -rf conftest*
8124 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8125#define HAVE_RENAME 1
8126EOF
8127
8128else
8129 echo "configure: failed program was:" >&5
8130 cat conftest.$ac_ext >&5
8131 rm -rf conftest*
8132 echo "$ac_t""no" 1>&6
8133fi
8134rm -f conftest*
8135
8136echo $ac_n "checking for sysctl""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008137echo "configure:8138: checking for sysctl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008138cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008139#line 8140 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008140#include "confdefs.h"
8141#include <sys/types.h>
8142#include <sys/sysctl.h>
8143int main() {
8144 int mib[2], r;
8145 size_t len;
8146
8147 mib[0] = CTL_HW;
8148 mib[1] = HW_USERMEM;
8149 len = sizeof(r);
8150 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
8151
8152; return 0; }
8153EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008154if { (eval echo configure:8155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008155 rm -rf conftest*
8156 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8157#define HAVE_SYSCTL 1
8158EOF
8159
8160else
8161 echo "configure: failed program was:" >&5
8162 cat conftest.$ac_ext >&5
8163 rm -rf conftest*
8164 echo "$ac_t""not usable" 1>&6
8165fi
8166rm -f conftest*
8167
8168echo $ac_n "checking for sysinfo""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008169echo "configure:8170: checking for sysinfo" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008170cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008171#line 8172 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008172#include "confdefs.h"
8173#include <sys/types.h>
8174#include <sys/sysinfo.h>
8175int main() {
8176 struct sysinfo sinfo;
8177 int t;
8178
8179 (void)sysinfo(&sinfo);
8180 t = sinfo.totalram;
8181
8182; return 0; }
8183EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008184if { (eval echo configure:8185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008185 rm -rf conftest*
8186 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8187#define HAVE_SYSINFO 1
8188EOF
8189
8190else
8191 echo "configure: failed program was:" >&5
8192 cat conftest.$ac_ext >&5
8193 rm -rf conftest*
8194 echo "$ac_t""not usable" 1>&6
8195fi
8196rm -f conftest*
8197
8198echo $ac_n "checking for sysconf""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008199echo "configure:8200: checking for sysconf" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008200cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008201#line 8202 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008202#include "confdefs.h"
8203#include <unistd.h>
8204int main() {
8205 (void)sysconf(_SC_PAGESIZE);
8206 (void)sysconf(_SC_PHYS_PAGES);
8207
8208; return 0; }
8209EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008210if { (eval echo configure:8211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008211 rm -rf conftest*
8212 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8213#define HAVE_SYSCONF 1
8214EOF
8215
8216else
8217 echo "configure: failed program was:" >&5
8218 cat conftest.$ac_ext >&5
8219 rm -rf conftest*
8220 echo "$ac_t""not usable" 1>&6
8221fi
8222rm -f conftest*
8223
8224
8225echo $ac_n "checking size of int""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008226echo "configure:8227: checking size of int" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008227if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
8228 echo $ac_n "(cached) $ac_c" 1>&6
8229else
8230 if test "$cross_compiling" = yes; then
8231 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8232else
8233 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008234#line 8235 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008235#include "confdefs.h"
8236#include <stdio.h>
8237 main()
8238 {
8239 FILE *f=fopen("conftestval", "w");
8240 if (!f) exit(1);
8241 fprintf(f, "%d\n", (int)sizeof(int));
8242 exit(0);
8243 }
8244EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008245if { (eval echo configure:8246: \"$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 +00008246then
8247 ac_cv_sizeof_int=`cat conftestval`
8248else
8249 echo "configure: failed program was:" >&5
8250 cat conftest.$ac_ext >&5
8251 rm -fr conftest*
8252 ac_cv_sizeof_int=0
8253fi
8254rm -fr conftest*
8255fi
8256
8257fi
8258
8259echo "$ac_t""$ac_cv_sizeof_int" 1>&6
8260cat >> confdefs.h <<EOF
8261#define SIZEOF_INT $ac_cv_sizeof_int
8262EOF
8263
8264
8265echo $ac_n "checking whether memmove/bcopy/memcpy handle overlaps""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008266echo "configure:8267: checking whether memmove/bcopy/memcpy handle overlaps" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008267bcopy_test_prog='
8268main() {
8269 char buf[10];
8270 strcpy(buf, "abcdefghi");
8271 mch_memmove(buf, buf + 2, 3);
8272 if (strncmp(buf, "ababcf", 6))
8273 exit(1);
8274 strcpy(buf, "abcdefghi");
8275 mch_memmove(buf + 2, buf, 3);
8276 if (strncmp(buf, "cdedef", 6))
8277 exit(1);
8278 exit(0); /* libc version works properly. */
8279}'
8280
8281
8282if test "$cross_compiling" = yes; then
8283 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8284else
8285 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008286#line 8287 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008287#include "confdefs.h"
8288#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
8289EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008290if { (eval echo configure:8291: \"$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 +00008291then
8292 cat >> confdefs.h <<\EOF
8293#define USEMEMMOVE 1
8294EOF
8295 echo "$ac_t""memmove does" 1>&6
8296else
8297 echo "configure: failed program was:" >&5
8298 cat conftest.$ac_ext >&5
8299 rm -fr conftest*
8300 if test "$cross_compiling" = yes; then
8301 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8302else
8303 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008304#line 8305 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008305#include "confdefs.h"
8306#define mch_memmove(s,d,l) bcopy(d,s,l) $bcopy_test_prog
8307EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008308if { (eval echo configure:8309: \"$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 +00008309then
8310 cat >> confdefs.h <<\EOF
8311#define USEBCOPY 1
8312EOF
8313 echo "$ac_t""bcopy does" 1>&6
8314else
8315 echo "configure: failed program was:" >&5
8316 cat conftest.$ac_ext >&5
8317 rm -fr conftest*
8318 if test "$cross_compiling" = yes; then
8319 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8320else
8321 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008322#line 8323 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008323#include "confdefs.h"
8324#define mch_memmove(s,d,l) memcpy(d,s,l) $bcopy_test_prog
8325EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008326if { (eval echo configure:8327: \"$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 +00008327then
8328 cat >> confdefs.h <<\EOF
8329#define USEMEMCPY 1
8330EOF
8331 echo "$ac_t""memcpy does" 1>&6
8332else
8333 echo "configure: failed program was:" >&5
8334 cat conftest.$ac_ext >&5
8335 rm -fr conftest*
8336 echo "$ac_t""no" 1>&6
8337fi
8338rm -fr conftest*
8339fi
8340
8341fi
8342rm -fr conftest*
8343fi
8344
8345fi
8346rm -fr conftest*
8347fi
8348
8349
8350
8351if test "$enable_multibyte" = "yes"; then
8352 cflags_save=$CFLAGS
8353 ldflags_save=$LDFLAGS
8354 if test -n "$x_includes" ; then
8355 CFLAGS="$CFLAGS -I$x_includes"
8356 LDFLAGS="$X_LIBS $LDFLAGS -lX11"
8357 echo $ac_n "checking whether X_LOCALE needed""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008358echo "configure:8359: checking whether X_LOCALE needed" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008359 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008360#line 8361 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008361#include "confdefs.h"
8362#include <X11/Xlocale.h>
8363int main() {
8364
8365; return 0; }
8366EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008367if { (eval echo configure:8368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008368 rm -rf conftest*
8369 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008370#line 8371 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008371#include "confdefs.h"
8372/* Override any gcc2 internal prototype to avoid an error. */
8373/* We use char because int might match the return type of a gcc2
8374 builtin and then its argument prototype would still apply. */
8375char _Xsetlocale();
8376
8377int main() {
8378_Xsetlocale()
8379; return 0; }
8380EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008381if { (eval echo configure:8382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008382 rm -rf conftest*
8383 echo "$ac_t""yes" 1>&6
8384 cat >> confdefs.h <<\EOF
8385#define X_LOCALE 1
8386EOF
8387
8388else
8389 echo "configure: failed program was:" >&5
8390 cat conftest.$ac_ext >&5
8391 rm -rf conftest*
8392 echo "$ac_t""no" 1>&6
8393fi
8394rm -f conftest*
8395else
8396 echo "configure: failed program was:" >&5
8397 cat conftest.$ac_ext >&5
8398 rm -rf conftest*
8399 echo "$ac_t""no" 1>&6
8400fi
8401rm -f conftest*
8402 fi
8403 CFLAGS=$cflags_save
8404 LDFLAGS=$ldflags_save
8405fi
8406
8407echo $ac_n "checking for _xpg4_setrunelocale in -lxpg4""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008408echo "configure:8409: checking for _xpg4_setrunelocale in -lxpg4" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008409ac_lib_var=`echo xpg4'_'_xpg4_setrunelocale | sed 'y%./+-%__p_%'`
8410if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8411 echo $ac_n "(cached) $ac_c" 1>&6
8412else
8413 ac_save_LIBS="$LIBS"
8414LIBS="-lxpg4 $LIBS"
8415cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008416#line 8417 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008417#include "confdefs.h"
8418/* Override any gcc2 internal prototype to avoid an error. */
8419/* We use char because int might match the return type of a gcc2
8420 builtin and then its argument prototype would still apply. */
8421char _xpg4_setrunelocale();
8422
8423int main() {
8424_xpg4_setrunelocale()
8425; return 0; }
8426EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008427if { (eval echo configure:8428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008428 rm -rf conftest*
8429 eval "ac_cv_lib_$ac_lib_var=yes"
8430else
8431 echo "configure: failed program was:" >&5
8432 cat conftest.$ac_ext >&5
8433 rm -rf conftest*
8434 eval "ac_cv_lib_$ac_lib_var=no"
8435fi
8436rm -f conftest*
8437LIBS="$ac_save_LIBS"
8438
8439fi
8440if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8441 echo "$ac_t""yes" 1>&6
8442 LIBS="$LIBS -lxpg4"
8443else
8444 echo "$ac_t""no" 1>&6
8445fi
8446
8447
8448echo $ac_n "checking how to create tags""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008449echo "configure:8450: checking how to create tags" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008450test -f tags && mv tags tags.save
8451if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
8452 TAGPRG="ctags"
8453else
8454 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
8455 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
8456 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
8457 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
8458 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
8459 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
8460 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
8461fi
8462test -f tags.save && mv tags.save tags
8463echo "$ac_t""$TAGPRG" 1>&6
8464
8465echo $ac_n "checking how to run man with a section nr""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008466echo "configure:8467: checking how to run man with a section nr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008467MANDEF="man"
8468(eval man -s 2 read) < /dev/null > /dev/null 2>&5 && MANDEF="man -s"
8469echo "$ac_t""$MANDEF" 1>&6
8470if test "$MANDEF" = "man -s"; then
8471 cat >> confdefs.h <<\EOF
8472#define USEMAN_S 1
8473EOF
8474
8475fi
8476
8477echo $ac_n "checking --disable-nls argument""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008478echo "configure:8479: checking --disable-nls argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008479# Check whether --enable-nls or --disable-nls was given.
8480if test "${enable_nls+set}" = set; then
8481 enableval="$enable_nls"
8482 :
8483else
8484 enable_nls="yes"
8485fi
8486
8487
8488if test "$enable_nls" = "yes"; then
8489 echo "$ac_t""no" 1>&6
8490 # Extract the first word of "msgfmt", so it can be a program name with args.
8491set dummy msgfmt; ac_word=$2
8492echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008493echo "configure:8494: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008494if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
8495 echo $ac_n "(cached) $ac_c" 1>&6
8496else
8497 if test -n "$MSGFMT"; then
8498 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
8499else
8500 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8501 ac_dummy="$PATH"
8502 for ac_dir in $ac_dummy; do
8503 test -z "$ac_dir" && ac_dir=.
8504 if test -f $ac_dir/$ac_word; then
8505 ac_cv_prog_MSGFMT="msgfmt"
8506 break
8507 fi
8508 done
8509 IFS="$ac_save_ifs"
8510fi
8511fi
8512MSGFMT="$ac_cv_prog_MSGFMT"
8513if test -n "$MSGFMT"; then
8514 echo "$ac_t""$MSGFMT" 1>&6
8515else
8516 echo "$ac_t""no" 1>&6
8517fi
8518
8519 echo $ac_n "checking for NLS""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008520echo "configure:8521: checking for NLS" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008521 if test -f po/Makefile; then
8522 have_gettext="no"
8523 if test -n "$MSGFMT"; then
8524 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008525#line 8526 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008526#include "confdefs.h"
8527#include <libintl.h>
8528int main() {
8529gettext("Test");
8530; return 0; }
8531EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008532if { (eval echo configure:8533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008533 rm -rf conftest*
8534 echo "$ac_t""gettext() works" 1>&6; have_gettext="yes"
8535else
8536 echo "configure: failed program was:" >&5
8537 cat conftest.$ac_ext >&5
8538 rm -rf conftest*
8539 olibs=$LIBS
8540 LIBS="$LIBS -lintl"
8541 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008542#line 8543 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008543#include "confdefs.h"
8544#include <libintl.h>
8545int main() {
8546gettext("Test");
8547; return 0; }
8548EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +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 echo "$ac_t""gettext() works with -lintl" 1>&6; have_gettext="yes"
8552else
8553 echo "configure: failed program was:" >&5
8554 cat conftest.$ac_ext >&5
8555 rm -rf conftest*
8556 echo "$ac_t""gettext() doesn't work" 1>&6;
8557 LIBS=$olibs
8558fi
8559rm -f conftest*
8560fi
8561rm -f conftest*
8562 else
8563 echo "$ac_t""msgfmt not found - disabled" 1>&6;
8564 fi
8565 if test $have_gettext = "yes"; then
8566 cat >> confdefs.h <<\EOF
8567#define HAVE_GETTEXT 1
8568EOF
8569
8570 MAKEMO=yes
8571
8572 for ac_func in bind_textdomain_codeset
8573do
8574echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008575echo "configure:8576: checking for $ac_func" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008576if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8577 echo $ac_n "(cached) $ac_c" 1>&6
8578else
8579 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008580#line 8581 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008581#include "confdefs.h"
8582/* System header to define __stub macros and hopefully few prototypes,
8583 which can conflict with char $ac_func(); below. */
8584#include <assert.h>
8585/* Override any gcc2 internal prototype to avoid an error. */
8586/* We use char because int might match the return type of a gcc2
8587 builtin and then its argument prototype would still apply. */
8588char $ac_func();
8589
8590int main() {
8591
8592/* The GNU C library defines this for functions which it implements
8593 to always fail with ENOSYS. Some functions are actually named
8594 something starting with __ and the normal name is an alias. */
8595#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8596choke me
8597#else
8598$ac_func();
8599#endif
8600
8601; return 0; }
8602EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008603if { (eval echo configure:8604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008604 rm -rf conftest*
8605 eval "ac_cv_func_$ac_func=yes"
8606else
8607 echo "configure: failed program was:" >&5
8608 cat conftest.$ac_ext >&5
8609 rm -rf conftest*
8610 eval "ac_cv_func_$ac_func=no"
8611fi
8612rm -f conftest*
8613fi
8614
8615if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8616 echo "$ac_t""yes" 1>&6
8617 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8618 cat >> confdefs.h <<EOF
8619#define $ac_tr_func 1
8620EOF
8621
8622else
8623 echo "$ac_t""no" 1>&6
8624fi
8625done
8626
8627 echo $ac_n "checking for _nl_msg_cat_cntr""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008628echo "configure:8629: checking for _nl_msg_cat_cntr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008629 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008630#line 8631 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008631#include "confdefs.h"
8632#include <libintl.h>
8633 extern int _nl_msg_cat_cntr;
8634int main() {
8635++_nl_msg_cat_cntr;
8636; return 0; }
8637EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008638if { (eval echo configure:8639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008639 rm -rf conftest*
8640 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8641#define HAVE_NL_MSG_CAT_CNTR 1
8642EOF
8643
8644else
8645 echo "configure: failed program was:" >&5
8646 cat conftest.$ac_ext >&5
8647 rm -rf conftest*
8648 echo "$ac_t""no" 1>&6
8649fi
8650rm -f conftest*
8651 fi
8652 else
8653 echo "$ac_t""no "po/Makefile" - disabled" 1>&6;
8654 fi
8655else
8656 echo "$ac_t""yes" 1>&6
8657fi
8658
8659ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
8660echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008661echo "configure:8662: checking for dlfcn.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008662if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8663 echo $ac_n "(cached) $ac_c" 1>&6
8664else
8665 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008666#line 8667 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008667#include "confdefs.h"
8668#include <dlfcn.h>
8669EOF
8670ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008671{ (eval echo configure:8672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008672ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8673if test -z "$ac_err"; then
8674 rm -rf conftest*
8675 eval "ac_cv_header_$ac_safe=yes"
8676else
8677 echo "$ac_err" >&5
8678 echo "configure: failed program was:" >&5
8679 cat conftest.$ac_ext >&5
8680 rm -rf conftest*
8681 eval "ac_cv_header_$ac_safe=no"
8682fi
8683rm -f conftest*
8684fi
8685if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8686 echo "$ac_t""yes" 1>&6
8687 DLL=dlfcn.h
8688else
8689 echo "$ac_t""no" 1>&6
8690ac_safe=`echo "dl.h" | sed 'y%./+-%__p_%'`
8691echo $ac_n "checking for dl.h""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008692echo "configure:8693: checking for dl.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008693if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8694 echo $ac_n "(cached) $ac_c" 1>&6
8695else
8696 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008697#line 8698 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008698#include "confdefs.h"
8699#include <dl.h>
8700EOF
8701ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008702{ (eval echo configure:8703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008703ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8704if test -z "$ac_err"; then
8705 rm -rf conftest*
8706 eval "ac_cv_header_$ac_safe=yes"
8707else
8708 echo "$ac_err" >&5
8709 echo "configure: failed program was:" >&5
8710 cat conftest.$ac_ext >&5
8711 rm -rf conftest*
8712 eval "ac_cv_header_$ac_safe=no"
8713fi
8714rm -f conftest*
8715fi
8716if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8717 echo "$ac_t""yes" 1>&6
8718 DLL=dl.h
8719else
8720 echo "$ac_t""no" 1>&6
8721fi
8722
8723fi
8724
8725if test x${DLL} = xdlfcn.h; then
8726 cat >> confdefs.h <<\EOF
8727#define HAVE_DLFCN_H 1
8728EOF
8729
8730 echo $ac_n "checking for dlopen()""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008731echo "configure:8732: checking for dlopen()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008732 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008733#line 8734 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008734#include "confdefs.h"
8735
8736int main() {
8737
8738 extern void* dlopen();
8739 dlopen();
8740
8741; return 0; }
8742EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008743if { (eval echo configure:8744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008744 rm -rf conftest*
8745 echo "$ac_t""yes" 1>&6;
8746 cat >> confdefs.h <<\EOF
8747#define HAVE_DLOPEN 1
8748EOF
8749
8750else
8751 echo "configure: failed program was:" >&5
8752 cat conftest.$ac_ext >&5
8753 rm -rf conftest*
8754 echo "$ac_t""no" 1>&6;
8755 echo $ac_n "checking for dlopen() in -ldl""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008756echo "configure:8757: checking for dlopen() in -ldl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008757 olibs=$LIBS
8758 LIBS="$LIBS -ldl"
8759 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008760#line 8761 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008761#include "confdefs.h"
8762
8763int main() {
8764
8765 extern void* dlopen();
8766 dlopen();
8767
8768; return 0; }
8769EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008770if { (eval echo configure:8771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008771 rm -rf conftest*
8772 echo "$ac_t""yes" 1>&6;
8773 cat >> confdefs.h <<\EOF
8774#define HAVE_DLOPEN 1
8775EOF
8776
8777else
8778 echo "configure: failed program was:" >&5
8779 cat conftest.$ac_ext >&5
8780 rm -rf conftest*
8781 echo "$ac_t""no" 1>&6;
8782 LIBS=$olibs
8783fi
8784rm -f conftest*
8785fi
8786rm -f conftest*
8787 echo $ac_n "checking for dlsym()""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008788echo "configure:8789: checking for dlsym()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008789 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008790#line 8791 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008791#include "confdefs.h"
8792
8793int main() {
8794
8795 extern void* dlsym();
8796 dlsym();
8797
8798; return 0; }
8799EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008800if { (eval echo configure:8801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008801 rm -rf conftest*
8802 echo "$ac_t""yes" 1>&6;
8803 cat >> confdefs.h <<\EOF
8804#define HAVE_DLSYM 1
8805EOF
8806
8807else
8808 echo "configure: failed program was:" >&5
8809 cat conftest.$ac_ext >&5
8810 rm -rf conftest*
8811 echo "$ac_t""no" 1>&6;
8812 echo $ac_n "checking for dlsym() in -ldl""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008813echo "configure:8814: checking for dlsym() in -ldl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008814 olibs=$LIBS
8815 LIBS="$LIBS -ldl"
8816 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008817#line 8818 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008818#include "confdefs.h"
8819
8820int main() {
8821
8822 extern void* dlsym();
8823 dlsym();
8824
8825; return 0; }
8826EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008827if { (eval echo configure:8828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008828 rm -rf conftest*
8829 echo "$ac_t""yes" 1>&6;
8830 cat >> confdefs.h <<\EOF
8831#define HAVE_DLSYM 1
8832EOF
8833
8834else
8835 echo "configure: failed program was:" >&5
8836 cat conftest.$ac_ext >&5
8837 rm -rf conftest*
8838 echo "$ac_t""no" 1>&6;
8839 LIBS=$olibs
8840fi
8841rm -f conftest*
8842fi
8843rm -f conftest*
8844elif test x${DLL} = xdl.h; then
8845 cat >> confdefs.h <<\EOF
8846#define HAVE_DL_H 1
8847EOF
8848
8849 echo $ac_n "checking for shl_load()""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008850echo "configure:8851: checking for shl_load()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008851 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008852#line 8853 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008853#include "confdefs.h"
8854
8855int main() {
8856
8857 extern void* shl_load();
8858 shl_load();
8859
8860; return 0; }
8861EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008862if { (eval echo configure:8863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008863 rm -rf conftest*
8864 echo "$ac_t""yes" 1>&6;
8865 cat >> confdefs.h <<\EOF
8866#define HAVE_SHL_LOAD 1
8867EOF
8868
8869else
8870 echo "configure: failed program was:" >&5
8871 cat conftest.$ac_ext >&5
8872 rm -rf conftest*
8873 echo "$ac_t""no" 1>&6;
8874 echo $ac_n "checking for shl_load() in -ldld""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008875echo "configure:8876: checking for shl_load() in -ldld" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008876 olibs=$LIBS
8877 LIBS="$LIBS -ldld"
8878 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008879#line 8880 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008880#include "confdefs.h"
8881
8882int main() {
8883
8884 extern void* shl_load();
8885 shl_load();
8886
8887; return 0; }
8888EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008889if { (eval echo configure:8890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008890 rm -rf conftest*
8891 echo "$ac_t""yes" 1>&6;
8892 cat >> confdefs.h <<\EOF
8893#define HAVE_SHL_LOAD 1
8894EOF
8895
8896else
8897 echo "configure: failed program was:" >&5
8898 cat conftest.$ac_ext >&5
8899 rm -rf conftest*
8900 echo "$ac_t""no" 1>&6;
8901 LIBS=$olibs
8902fi
8903rm -f conftest*
8904fi
8905rm -f conftest*
8906fi
8907for ac_hdr in setjmp.h
8908do
8909ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8910echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008911echo "configure:8912: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008912if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8913 echo $ac_n "(cached) $ac_c" 1>&6
8914else
8915 cat > conftest.$ac_ext <<EOF
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008916#line 8917 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008917#include "confdefs.h"
8918#include <$ac_hdr>
8919EOF
8920ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008921{ (eval echo configure:8922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008922ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8923if test -z "$ac_err"; then
8924 rm -rf conftest*
8925 eval "ac_cv_header_$ac_safe=yes"
8926else
8927 echo "$ac_err" >&5
8928 echo "configure: failed program was:" >&5
8929 cat conftest.$ac_ext >&5
8930 rm -rf conftest*
8931 eval "ac_cv_header_$ac_safe=no"
8932fi
8933rm -f conftest*
8934fi
8935if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8936 echo "$ac_t""yes" 1>&6
8937 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8938 cat >> confdefs.h <<EOF
8939#define $ac_tr_hdr 1
8940EOF
8941
8942else
8943 echo "$ac_t""no" 1>&6
8944fi
8945done
8946
8947
8948if test "x$MACOSX" = "xyes" -a -n "$PERL"; then
8949 if echo $LIBS | grep -e '-ldl' >/dev/null; then
8950 LIBS=`echo $LIBS | sed s/-ldl//`
8951 PERL_LIBS="$PERL_LIBS -ldl"
8952 fi
8953fi
8954
8955if test "x$MACOSX" = "xyes" && test "x$CARBON" = "xyes" \
8956 && test "x$GUITYPE" != "xCARBONGUI"; then
8957 echo $ac_n "checking whether we need -framework Carbon""... $ac_c" 1>&6
Bram Moolenaar1cd871b2004-12-19 22:46:22 +00008958echo "configure:8959: checking whether we need -framework Carbon" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008959 if test "x$enable_multibyte" = "xyes" || test "x$features" == "xbig" \
8960 || test "x$features" = "xhuge"; then
8961 LIBS="$LIBS -framework Carbon"
8962 echo "$ac_t""yes" 1>&6
8963 else
8964 echo "$ac_t""no" 1>&6
8965 fi
8966fi
8967
8968
8969trap '' 1 2 15
8970cat > confcache <<\EOF
8971# This file is a shell script that caches the results of configure
8972# tests run on this system so they can be shared between configure
8973# scripts and configure runs. It is not useful on other systems.
8974# If it contains results you don't want to keep, you may remove or edit it.
8975#
8976# By default, configure uses ./config.cache as the cache file,
8977# creating it if it does not exist already. You can give configure
8978# the --cache-file=FILE option to use a different cache file; that is
8979# what configure does when it calls configure scripts in
8980# subdirectories, so they share the cache.
8981# Giving --cache-file=/dev/null disables caching, for debugging configure.
8982# config.status only pays attention to the cache file if you give it the
8983# --recheck option to rerun configure.
8984#
8985EOF
8986# The following way of writing the cache mishandles newlines in values,
8987# but we know of no workaround that is simple, portable, and efficient.
8988# So, don't put newlines in cache variables' values.
8989# Ultrix sh set writes to stderr and can't be redirected directly,
8990# and sets the high bit in the cache file unless we assign to the vars.
8991(set) 2>&1 |
8992 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8993 *ac_space=\ *)
8994 # `set' does not quote correctly, so add quotes (double-quote substitution
8995 # turns \\\\ into \\, and sed turns \\ into \).
8996 sed -n \
8997 -e "s/'/'\\\\''/g" \
8998 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8999 ;;
9000 *)
9001 # `set' quotes correctly as required by POSIX, so do not add quotes.
9002 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9003 ;;
9004 esac >> confcache
9005if cmp -s $cache_file confcache; then
9006 :
9007else
9008 if test -w $cache_file; then
9009 echo "updating cache $cache_file"
9010 cat confcache > $cache_file
9011 else
9012 echo "not updating unwritable cache $cache_file"
9013 fi
9014fi
9015rm -f confcache
9016
9017trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9018
9019test "x$prefix" = xNONE && prefix=$ac_default_prefix
9020# Let make expand exec_prefix.
9021test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9022
9023# Any assignment to VPATH causes Sun make to only execute
9024# the first set of double-colon rules, so remove it if not needed.
9025# If there is a colon in the path, we need to keep it.
9026if test "x$srcdir" = x.; then
9027 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9028fi
9029
9030trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9031
9032DEFS=-DHAVE_CONFIG_H
9033
9034# Without the "./", some shells look in PATH for config.status.
9035: ${CONFIG_STATUS=./config.status}
9036
9037echo creating $CONFIG_STATUS
9038rm -f $CONFIG_STATUS
9039cat > $CONFIG_STATUS <<EOF
9040#! /bin/sh
9041# Generated automatically by configure.
9042# Run this file to recreate the current configuration.
9043# This directory was configured as follows,
9044# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9045#
9046# $0 $ac_configure_args
9047#
9048# Compiler output produced by configure, useful for debugging
9049# configure, is in auto/config.log if it exists.
9050
9051ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9052for ac_option
9053do
9054 case "\$ac_option" in
9055 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9056 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9057 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9058 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9059 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9060 exit 0 ;;
9061 -help | --help | --hel | --he | --h)
9062 echo "\$ac_cs_usage"; exit 0 ;;
9063 *) echo "\$ac_cs_usage"; exit 1 ;;
9064 esac
9065done
9066
9067ac_given_srcdir=$srcdir
9068
9069trap 'rm -fr `echo "auto/config.mk:config.mk.in auto/config.h:config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9070EOF
9071cat >> $CONFIG_STATUS <<EOF
9072
9073# Protect against being on the right side of a sed subst in config.status.
9074sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9075 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9076$ac_vpsub
9077$extrasub
9078s%@SHELL@%$SHELL%g
9079s%@CFLAGS@%$CFLAGS%g
9080s%@CPPFLAGS@%$CPPFLAGS%g
9081s%@CXXFLAGS@%$CXXFLAGS%g
9082s%@FFLAGS@%$FFLAGS%g
9083s%@DEFS@%$DEFS%g
9084s%@LDFLAGS@%$LDFLAGS%g
9085s%@LIBS@%$LIBS%g
9086s%@exec_prefix@%$exec_prefix%g
9087s%@prefix@%$prefix%g
9088s%@program_transform_name@%$program_transform_name%g
9089s%@bindir@%$bindir%g
9090s%@sbindir@%$sbindir%g
9091s%@libexecdir@%$libexecdir%g
9092s%@datadir@%$datadir%g
9093s%@sysconfdir@%$sysconfdir%g
9094s%@sharedstatedir@%$sharedstatedir%g
9095s%@localstatedir@%$localstatedir%g
9096s%@libdir@%$libdir%g
9097s%@includedir@%$includedir%g
9098s%@oldincludedir@%$oldincludedir%g
9099s%@infodir@%$infodir%g
9100s%@mandir@%$mandir%g
9101s%@SET_MAKE@%$SET_MAKE%g
9102s%@CC@%$CC%g
9103s%@CPP@%$CPP%g
9104s%@AWK@%$AWK%g
9105s%@STRIP@%$STRIP%g
9106s%@EXEEXT@%$EXEEXT%g
9107s%@CPP_MM@%$CPP_MM%g
9108s%@OS_EXTRA_SRC@%$OS_EXTRA_SRC%g
9109s%@OS_EXTRA_OBJ@%$OS_EXTRA_OBJ%g
9110s%@VIMNAME@%$VIMNAME%g
9111s%@EXNAME@%$EXNAME%g
9112s%@VIEWNAME@%$VIEWNAME%g
9113s%@line_break@%$line_break%g
9114s%@dovimdiff@%$dovimdiff%g
9115s%@dogvimdiff@%$dogvimdiff%g
9116s%@compiledby@%$compiledby%g
Bram Moolenaar325b7a22004-07-05 15:58:32 +00009117s%@vi_cv_path_mzscheme@%$vi_cv_path_mzscheme%g
9118s%@MZSCHEME_SRC@%$MZSCHEME_SRC%g
9119s%@MZSCHEME_OBJ@%$MZSCHEME_OBJ%g
9120s%@MZSCHEME_PRO@%$MZSCHEME_PRO%g
9121s%@MZSCHEME_LIBS@%$MZSCHEME_LIBS%g
9122s%@MZSCHEME_CFLAGS@%$MZSCHEME_CFLAGS%g
Bram Moolenaar071d4272004-06-13 20:20:40 +00009123s%@vi_cv_path_perl@%$vi_cv_path_perl%g
9124s%@vi_cv_perllib@%$vi_cv_perllib%g
9125s%@shrpenv@%$shrpenv%g
9126s%@PERL_SRC@%$PERL_SRC%g
9127s%@PERL_OBJ@%$PERL_OBJ%g
9128s%@PERL_PRO@%$PERL_PRO%g
9129s%@PERL_CFLAGS@%$PERL_CFLAGS%g
9130s%@PERL_LIBS@%$PERL_LIBS%g
9131s%@vi_cv_path_python@%$vi_cv_path_python%g
9132s%@PYTHON_CONFDIR@%$PYTHON_CONFDIR%g
9133s%@PYTHON_LIBS@%$PYTHON_LIBS%g
9134s%@PYTHON_GETPATH_CFLAGS@%$PYTHON_GETPATH_CFLAGS%g
9135s%@PYTHON_CFLAGS@%$PYTHON_CFLAGS%g
9136s%@PYTHON_SRC@%$PYTHON_SRC%g
9137s%@PYTHON_OBJ@%$PYTHON_OBJ%g
9138s%@vi_cv_path_tcl@%$vi_cv_path_tcl%g
9139s%@TCL_SRC@%$TCL_SRC%g
9140s%@TCL_OBJ@%$TCL_OBJ%g
9141s%@TCL_PRO@%$TCL_PRO%g
9142s%@TCL_CFLAGS@%$TCL_CFLAGS%g
9143s%@TCL_LIBS@%$TCL_LIBS%g
9144s%@vi_cv_path_ruby@%$vi_cv_path_ruby%g
9145s%@RUBY_SRC@%$RUBY_SRC%g
9146s%@RUBY_OBJ@%$RUBY_OBJ%g
9147s%@RUBY_PRO@%$RUBY_PRO%g
9148s%@RUBY_CFLAGS@%$RUBY_CFLAGS%g
9149s%@RUBY_LIBS@%$RUBY_LIBS%g
9150s%@WORKSHOP_SRC@%$WORKSHOP_SRC%g
9151s%@WORKSHOP_OBJ@%$WORKSHOP_OBJ%g
9152s%@NETBEANS_SRC@%$NETBEANS_SRC%g
9153s%@NETBEANS_OBJ@%$NETBEANS_OBJ%g
9154s%@SNIFF_SRC@%$SNIFF_SRC%g
9155s%@SNIFF_OBJ@%$SNIFF_OBJ%g
9156s%@xmkmfpath@%$xmkmfpath%g
9157s%@X_CFLAGS@%$X_CFLAGS%g
9158s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9159s%@X_LIBS@%$X_LIBS%g
9160s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9161s%@X_LIB@%$X_LIB%g
Bram Moolenaar843ee412004-06-30 16:16:41 +00009162s%@MOC@%$MOC%g
9163s%@KDE_CONFIG@%$KDE_CONFIG%g
9164s%@KDE_LIBS@%$KDE_LIBS%g
9165s%@KDE_INCLUDES@%$KDE_INCLUDES%g
9166s%@KDE_PREFIX@%$KDE_PREFIX%g
9167s%@QT_LIBS@%$QT_LIBS%g
9168s%@QT_INCLUDES@%$QT_INCLUDES%g
9169s%@ROOTQT@%$ROOTQT%g
Bram Moolenaar071d4272004-06-13 20:20:40 +00009170s%@GTK_CONFIG@%$GTK_CONFIG%g
9171s%@GTK12_CONFIG@%$GTK12_CONFIG%g
9172s%@PKG_CONFIG@%$PKG_CONFIG%g
9173s%@GTK_CFLAGS@%$GTK_CFLAGS%g
9174s%@GTK_LIBS@%$GTK_LIBS%g
9175s%@GTK_LIBNAME@%$GTK_LIBNAME%g
9176s%@GNOME_LIBS@%$GNOME_LIBS%g
9177s%@GNOME_LIBDIR@%$GNOME_LIBDIR%g
9178s%@GNOME_INCLUDEDIR@%$GNOME_INCLUDEDIR%g
9179s%@GNOME_CONFIG@%$GNOME_CONFIG%g
9180s%@MOTIF_LIBNAME@%$MOTIF_LIBNAME%g
9181s%@NARROW_PROTO@%$NARROW_PROTO%g
9182s%@GUI_INC_LOC@%$GUI_INC_LOC%g
9183s%@GUI_LIB_LOC@%$GUI_LIB_LOC%g
9184s%@GUITYPE@%$GUITYPE%g
9185s%@GUI_X_LIBS@%$GUI_X_LIBS%g
9186s%@HANGULIN_SRC@%$HANGULIN_SRC%g
9187s%@HANGULIN_OBJ@%$HANGULIN_OBJ%g
9188s%@TAGPRG@%$TAGPRG%g
9189s%@MSGFMT@%$MSGFMT%g
9190s%@MAKEMO@%$MAKEMO%g
9191
9192CEOF
9193EOF
9194
9195cat >> $CONFIG_STATUS <<\EOF
9196
9197# Split the substitutions into bite-sized pieces for seds with
9198# small command number limits, like on Digital OSF/1 and HP-UX.
9199ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9200ac_file=1 # Number of current file.
9201ac_beg=1 # First line for current file.
9202ac_end=$ac_max_sed_cmds # Line after last line for current file.
9203ac_more_lines=:
9204ac_sed_cmds=""
9205while $ac_more_lines; do
9206 if test $ac_beg -gt 1; then
9207 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9208 else
9209 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9210 fi
9211 if test ! -s conftest.s$ac_file; then
9212 ac_more_lines=false
9213 rm -f conftest.s$ac_file
9214 else
9215 if test -z "$ac_sed_cmds"; then
9216 ac_sed_cmds="sed -f conftest.s$ac_file"
9217 else
9218 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9219 fi
9220 ac_file=`expr $ac_file + 1`
9221 ac_beg=$ac_end
9222 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9223 fi
9224done
9225if test -z "$ac_sed_cmds"; then
9226 ac_sed_cmds=cat
9227fi
9228EOF
9229
9230cat >> $CONFIG_STATUS <<EOF
9231
9232CONFIG_FILES=\${CONFIG_FILES-"auto/config.mk:config.mk.in"}
9233EOF
9234cat >> $CONFIG_STATUS <<\EOF
9235for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9236 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9237 case "$ac_file" in
9238 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9239 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9240 *) ac_file_in="${ac_file}.in" ;;
9241 esac
9242
9243 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9244
9245 # Remove last slash and all that follows it. Not all systems have dirname.
9246 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9247 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9248 # The file is in a subdirectory.
9249 test ! -d "$ac_dir" && mkdir "$ac_dir"
9250 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9251 # A "../" for each directory in $ac_dir_suffix.
9252 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9253 else
9254 ac_dir_suffix= ac_dots=
9255 fi
9256
9257 case "$ac_given_srcdir" in
9258 .) srcdir=.
9259 if test -z "$ac_dots"; then top_srcdir=.
9260 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9261 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9262 *) # Relative path.
9263 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9264 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9265 esac
9266
9267
9268 echo creating "$ac_file"
9269 rm -f "$ac_file"
9270 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9271 case "$ac_file" in
9272 *Makefile*) ac_comsub="1i\\
9273# $configure_input" ;;
9274 *) ac_comsub= ;;
9275 esac
9276
9277 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9278 sed -e "$ac_comsub
9279s%@configure_input@%$configure_input%g
9280s%@srcdir@%$srcdir%g
9281s%@top_srcdir@%$top_srcdir%g
9282" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9283fi; done
9284rm -f conftest.s*
9285
9286# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9287# NAME is the cpp macro being defined and VALUE is the value it is being given.
9288#
9289# ac_d sets the value in "#define NAME VALUE" lines.
9290ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9291ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9292ac_dC='\3'
9293ac_dD='%g'
9294# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9295ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9296ac_uB='\([ ]\)%\1#\2define\3'
9297ac_uC=' '
9298ac_uD='\4%g'
9299# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9300ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9301ac_eB='$%\1#\2define\3'
9302ac_eC=' '
9303ac_eD='%g'
9304
9305if test "${CONFIG_HEADERS+set}" != set; then
9306EOF
9307cat >> $CONFIG_STATUS <<EOF
9308 CONFIG_HEADERS="auto/config.h:config.h.in"
9309EOF
9310cat >> $CONFIG_STATUS <<\EOF
9311fi
9312for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9313 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9314 case "$ac_file" in
9315 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9316 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9317 *) ac_file_in="${ac_file}.in" ;;
9318 esac
9319
9320 echo creating $ac_file
9321
9322 rm -f conftest.frag conftest.in conftest.out
9323 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9324 cat $ac_file_inputs > conftest.in
9325
9326EOF
9327
9328# Transform confdefs.h into a sed script conftest.vals that substitutes
9329# the proper values into config.h.in to produce config.h. And first:
9330# Protect against being on the right side of a sed subst in config.status.
9331# Protect against being in an unquoted here document in config.status.
9332rm -f conftest.vals
9333cat > conftest.hdr <<\EOF
9334s/[\\&%]/\\&/g
9335s%[\\$`]%\\&%g
9336s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9337s%ac_d%ac_u%gp
9338s%ac_u%ac_e%gp
9339EOF
9340sed -n -f conftest.hdr confdefs.h > conftest.vals
9341rm -f conftest.hdr
9342
9343# This sed command replaces #undef with comments. This is necessary, for
9344# example, in the case of _POSIX_SOURCE, which is predefined and required
9345# on some systems where configure will not decide to define it.
9346cat >> conftest.vals <<\EOF
9347s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9348EOF
9349
9350# Break up conftest.vals because some shells have a limit on
9351# the size of here documents, and old seds have small limits too.
9352
9353rm -f conftest.tail
9354while :
9355do
9356 ac_lines=`grep -c . conftest.vals`
9357 # grep -c gives empty output for an empty file on some AIX systems.
9358 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9359 # Write a limited-size here document to conftest.frag.
9360 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9361 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9362 echo 'CEOF
9363 sed -f conftest.frag conftest.in > conftest.out
9364 rm -f conftest.in
9365 mv conftest.out conftest.in
9366' >> $CONFIG_STATUS
9367 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9368 rm -f conftest.vals
9369 mv conftest.tail conftest.vals
9370done
9371rm -f conftest.vals
9372
9373cat >> $CONFIG_STATUS <<\EOF
9374 rm -f conftest.frag conftest.h
9375 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9376 cat conftest.in >> conftest.h
9377 rm -f conftest.in
9378 if cmp -s $ac_file conftest.h 2>/dev/null; then
9379 echo "$ac_file is unchanged"
9380 rm -f conftest.h
9381 else
9382 # Remove last slash and all that follows it. Not all systems have dirname.
9383 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9384 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9385 # The file is in a subdirectory.
9386 test ! -d "$ac_dir" && mkdir "$ac_dir"
9387 fi
9388 rm -f $ac_file
9389 mv conftest.h $ac_file
9390 fi
9391fi; done
9392
9393EOF
9394cat >> $CONFIG_STATUS <<EOF
9395
9396EOF
9397cat >> $CONFIG_STATUS <<\EOF
9398
9399exit 0
9400EOF
9401chmod +x $CONFIG_STATUS
9402rm -fr confdefs* $ac_clean_files
9403test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9404
9405