blob: 402689ea9b933743fd33294a8ec3ecccdb4c5576 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --disable-darwin Disable Darwin (Mac OS X) support."
16ac_help="$ac_help
17 --with-vim-name=NAME what to call the Vim executable"
18ac_help="$ac_help
19 --with-ex-name=NAME what to call the Ex executable"
20ac_help="$ac_help
21 --with-view-name=NAME what to call the View executable"
22ac_help="$ac_help
23 --with-global-runtime=DIR global runtime directory in 'runtimepath'"
24ac_help="$ac_help
25 --with-modified-by=NAME name of who modified a release version"
26ac_help="$ac_help
27 --with-features=TYPE tiny, small, normal, big or huge (default: normal)"
28ac_help="$ac_help
29 --with-compiledby=NAME name to show in :version message"
30ac_help="$ac_help
31 --disable-xsmp Disable XSMP session management"
32ac_help="$ac_help
33 --disable-xsmp-interact Disable XSMP interaction"
34ac_help="$ac_help
Bram Moolenaar325b7a22004-07-05 15:58:32 +000035 --enable-mzschemeinterp Include MzScheme interpreter."
36ac_help="$ac_help
37 --with-plthome=PLTHOME Use PLTHOME."
38ac_help="$ac_help
Bram Moolenaar071d4272004-06-13 20:20:40 +000039 --enable-perlinterp Include Perl interpreter."
40ac_help="$ac_help
41 --enable-pythoninterp Include Python interpreter."
42ac_help="$ac_help
43 --with-python-config-dir=PATH Python's config directory"
44ac_help="$ac_help
45 --enable-tclinterp Include Tcl interpreter."
46ac_help="$ac_help
47 --with-tclsh=PATH which tclsh to use (default: tclsh8.0)"
48ac_help="$ac_help
49 --enable-rubyinterp Include Ruby interpreter."
50ac_help="$ac_help
51 --enable-cscope Include cscope interface."
52ac_help="$ac_help
53 --enable-workshop Include Sun Visual Workshop support."
54ac_help="$ac_help
55 --disable-netbeans Disable NetBeans integration support."
56ac_help="$ac_help
57 --enable-sniff Include Sniff interface."
58ac_help="$ac_help
59 --enable-multibyte Include multibyte editing support."
60ac_help="$ac_help
61 --enable-hangulinput Include Hangul input support."
62ac_help="$ac_help
63 --enable-xim Include XIM input support."
64ac_help="$ac_help
65 --enable-fontset Include X fontset output support."
66ac_help="$ac_help
67 --with-x use the X Window System"
68ac_help="$ac_help
Bram Moolenaar843ee412004-06-30 16:16:41 +000069 --enable-gui[=OPTS] X11 GUI [default=auto] [OPTS=auto/no/gtk/gtk2/gnome/gnome2/kde/motif/athena/neXtaw/beos/photon/carbon]"
70ac_help="$ac_help
71 --enable-kde-check If auto-select GUI, check for KDE [default=no]"
Bram Moolenaar071d4272004-06-13 20:20:40 +000072ac_help="$ac_help
73 --enable-gtk-check If auto-select GUI, check for GTK [default=yes]"
74ac_help="$ac_help
75 --enable-gtk2-check If GTK GUI, check for GTK+ 2 [default=yes]"
76ac_help="$ac_help
77 --enable-gnome-check If GTK GUI, check for GNOME [default=no]"
78ac_help="$ac_help
79 --enable-motif-check If auto-select GUI, check for Motif [default=yes]"
80ac_help="$ac_help
81 --enable-athena-check If auto-select GUI, check for Athena [default=yes]"
82ac_help="$ac_help
83 --enable-nextaw-check If auto-select GUI, check for neXtaw [default=yes]"
84ac_help="$ac_help
85 --enable-carbon-check If auto-select GUI, check for Carbon [default=yes]"
86ac_help="$ac_help
Bram Moolenaar843ee412004-06-30 16:16:41 +000087 --with-qt-dir=DIR Specify prefix of QT files"
88ac_help="$ac_help
89 --with-qt-includes=DIR Specify location of Qt headers"
90ac_help="$ac_help
91 --with-qt-libs=DIR Specify location of Qt libraries"
92ac_help="$ac_help
93 --enable-kde-toolbar if KDE GUI is selected, enable a KDE-look toolbar [default=no]"
94ac_help="$ac_help
95 --disable-rpath Disable rpath."
96ac_help="$ac_help
97 --with-kde-prefix=PFX Prefix where KDE is installed (optional)"
98ac_help="$ac_help
99 --with-kde-includes=DIR Specify location of KDE headers"
100ac_help="$ac_help
101 --with-kde-libs=DIR Specify location of KDE libraries"
102ac_help="$ac_help
103 --disable-kdetest Do not try to compile and run a test KDE program"
104ac_help="$ac_help
Bram Moolenaar071d4272004-06-13 20:20:40 +0000105 --with-gtk-prefix=PFX Prefix where GTK is installed (optional)"
106ac_help="$ac_help
107 --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)"
108ac_help="$ac_help
109 --disable-gtktest Do not try to compile and run a test GTK program"
110ac_help="$ac_help
111 --with-gnome-includes=DIR Specify location of GNOME headers"
112ac_help="$ac_help
113 --with-gnome-libs=DIR Specify location of GNOME libs"
114ac_help="$ac_help
115 --with-gnome Specify prefix for GNOME files"
116ac_help="$ac_help
117 --with-motif-lib=STRING Library for Motif "
118ac_help="$ac_help
119 --with-tlib=library terminal library to be used "
120ac_help="$ac_help
121 --disable-acl Don't check for ACL support."
122ac_help="$ac_help
123 --disable-gpm Don't use gpm (Linux mouse daemon)."
124ac_help="$ac_help
125 --disable-nls Don't support NLS (gettext())."
126
127# Initialize some variables set by options.
128# The variables have the same names as the options, with
129# dashes changed to underlines.
130build=NONE
131cache_file=./config.cache
132exec_prefix=NONE
133host=NONE
134no_create=
135nonopt=NONE
136no_recursion=
137prefix=NONE
138program_prefix=NONE
139program_suffix=NONE
140program_transform_name=s,x,x,
141silent=
142site=
143srcdir=
144target=NONE
145verbose=
146x_includes=NONE
147x_libraries=NONE
148bindir='${exec_prefix}/bin'
149sbindir='${exec_prefix}/sbin'
150libexecdir='${exec_prefix}/libexec'
151datadir='${prefix}/share'
152sysconfdir='${prefix}/etc'
153sharedstatedir='${prefix}/com'
154localstatedir='${prefix}/var'
155libdir='${exec_prefix}/lib'
156includedir='${prefix}/include'
157oldincludedir='/usr/include'
158infodir='${prefix}/info'
159mandir='${prefix}/man'
160
161# Initialize some other variables.
162subdirs=
163MFLAGS= MAKEFLAGS=
164SHELL=${CONFIG_SHELL-/bin/sh}
165# Maximum number of lines to put in a shell here document.
166ac_max_here_lines=12
167
168ac_prev=
169for ac_option
170do
171
172 # If the previous option needs an argument, assign it.
173 if test -n "$ac_prev"; then
174 eval "$ac_prev=\$ac_option"
175 ac_prev=
176 continue
177 fi
178
179 case "$ac_option" in
180 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
181 *) ac_optarg= ;;
182 esac
183
184 # Accept the important Cygnus configure options, so we can diagnose typos.
185
186 case "$ac_option" in
187
188 -bindir | --bindir | --bindi | --bind | --bin | --bi)
189 ac_prev=bindir ;;
190 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
191 bindir="$ac_optarg" ;;
192
193 -build | --build | --buil | --bui | --bu)
194 ac_prev=build ;;
195 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
196 build="$ac_optarg" ;;
197
198 -cache-file | --cache-file | --cache-fil | --cache-fi \
199 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
200 ac_prev=cache_file ;;
201 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
202 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
203 cache_file="$ac_optarg" ;;
204
205 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
206 ac_prev=datadir ;;
207 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
208 | --da=*)
209 datadir="$ac_optarg" ;;
210
211 -disable-* | --disable-*)
212 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
213 # Reject names that are not valid shell variable names.
214 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
215 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
216 fi
217 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
218 eval "enable_${ac_feature}=no" ;;
219
220 -enable-* | --enable-*)
221 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
222 # Reject names that are not valid shell variable names.
223 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
224 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
225 fi
226 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
227 case "$ac_option" in
228 *=*) ;;
229 *) ac_optarg=yes ;;
230 esac
231 eval "enable_${ac_feature}='$ac_optarg'" ;;
232
233 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
234 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
235 | --exec | --exe | --ex)
236 ac_prev=exec_prefix ;;
237 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
238 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
239 | --exec=* | --exe=* | --ex=*)
240 exec_prefix="$ac_optarg" ;;
241
242 -gas | --gas | --ga | --g)
243 # Obsolete; use --with-gas.
244 with_gas=yes ;;
245
246 -help | --help | --hel | --he)
247 # Omit some internal or obsolete options to make the list less imposing.
248 # This message is too long to be a string in the A/UX 3.1 sh.
249 cat << EOF
250Usage: configure [options] [host]
251Options: [defaults in brackets after descriptions]
252Configuration:
253 --cache-file=FILE cache test results in FILE
254 --help print this message
255 --no-create do not create output files
256 --quiet, --silent do not print \`checking...' messages
257 --version print the version of autoconf that created configure
258Directory and file names:
259 --prefix=PREFIX install architecture-independent files in PREFIX
260 [$ac_default_prefix]
261 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
262 [same as prefix]
263 --bindir=DIR user executables in DIR [EPREFIX/bin]
264 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
265 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
266 --datadir=DIR read-only architecture-independent data in DIR
267 [PREFIX/share]
268 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
269 --sharedstatedir=DIR modifiable architecture-independent data in DIR
270 [PREFIX/com]
271 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
272 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
273 --includedir=DIR C header files in DIR [PREFIX/include]
274 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
275 --infodir=DIR info documentation in DIR [PREFIX/info]
276 --mandir=DIR man documentation in DIR [PREFIX/man]
277 --srcdir=DIR find the sources in DIR [configure dir or ..]
278 --program-prefix=PREFIX prepend PREFIX to installed program names
279 --program-suffix=SUFFIX append SUFFIX to installed program names
280 --program-transform-name=PROGRAM
281 run sed PROGRAM on installed program names
282EOF
283 cat << EOF
284Host type:
285 --build=BUILD configure for building on BUILD [BUILD=HOST]
286 --host=HOST configure for HOST [guessed]
287 --target=TARGET configure for TARGET [TARGET=HOST]
288Features and packages:
289 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
290 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
291 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
292 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
293 --x-includes=DIR X include files are in DIR
294 --x-libraries=DIR X library files are in DIR
295EOF
296 if test -n "$ac_help"; then
297 echo "--enable and --with options recognized:$ac_help"
298 fi
299 exit 0 ;;
300
301 -host | --host | --hos | --ho)
302 ac_prev=host ;;
303 -host=* | --host=* | --hos=* | --ho=*)
304 host="$ac_optarg" ;;
305
306 -includedir | --includedir | --includedi | --included | --include \
307 | --includ | --inclu | --incl | --inc)
308 ac_prev=includedir ;;
309 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
310 | --includ=* | --inclu=* | --incl=* | --inc=*)
311 includedir="$ac_optarg" ;;
312
313 -infodir | --infodir | --infodi | --infod | --info | --inf)
314 ac_prev=infodir ;;
315 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
316 infodir="$ac_optarg" ;;
317
318 -libdir | --libdir | --libdi | --libd)
319 ac_prev=libdir ;;
320 -libdir=* | --libdir=* | --libdi=* | --libd=*)
321 libdir="$ac_optarg" ;;
322
323 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
324 | --libexe | --libex | --libe)
325 ac_prev=libexecdir ;;
326 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
327 | --libexe=* | --libex=* | --libe=*)
328 libexecdir="$ac_optarg" ;;
329
330 -localstatedir | --localstatedir | --localstatedi | --localstated \
331 | --localstate | --localstat | --localsta | --localst \
332 | --locals | --local | --loca | --loc | --lo)
333 ac_prev=localstatedir ;;
334 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
335 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
336 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
337 localstatedir="$ac_optarg" ;;
338
339 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
340 ac_prev=mandir ;;
341 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
342 mandir="$ac_optarg" ;;
343
344 -nfp | --nfp | --nf)
345 # Obsolete; use --without-fp.
346 with_fp=no ;;
347
348 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
349 | --no-cr | --no-c)
350 no_create=yes ;;
351
352 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
353 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
354 no_recursion=yes ;;
355
356 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
357 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
358 | --oldin | --oldi | --old | --ol | --o)
359 ac_prev=oldincludedir ;;
360 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
361 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
362 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
363 oldincludedir="$ac_optarg" ;;
364
365 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
366 ac_prev=prefix ;;
367 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
368 prefix="$ac_optarg" ;;
369
370 -program-prefix | --program-prefix | --program-prefi | --program-pref \
371 | --program-pre | --program-pr | --program-p)
372 ac_prev=program_prefix ;;
373 -program-prefix=* | --program-prefix=* | --program-prefi=* \
374 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
375 program_prefix="$ac_optarg" ;;
376
377 -program-suffix | --program-suffix | --program-suffi | --program-suff \
378 | --program-suf | --program-su | --program-s)
379 ac_prev=program_suffix ;;
380 -program-suffix=* | --program-suffix=* | --program-suffi=* \
381 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
382 program_suffix="$ac_optarg" ;;
383
384 -program-transform-name | --program-transform-name \
385 | --program-transform-nam | --program-transform-na \
386 | --program-transform-n | --program-transform- \
387 | --program-transform | --program-transfor \
388 | --program-transfo | --program-transf \
389 | --program-trans | --program-tran \
390 | --progr-tra | --program-tr | --program-t)
391 ac_prev=program_transform_name ;;
392 -program-transform-name=* | --program-transform-name=* \
393 | --program-transform-nam=* | --program-transform-na=* \
394 | --program-transform-n=* | --program-transform-=* \
395 | --program-transform=* | --program-transfor=* \
396 | --program-transfo=* | --program-transf=* \
397 | --program-trans=* | --program-tran=* \
398 | --progr-tra=* | --program-tr=* | --program-t=*)
399 program_transform_name="$ac_optarg" ;;
400
401 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
402 | -silent | --silent | --silen | --sile | --sil)
403 silent=yes ;;
404
405 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
406 ac_prev=sbindir ;;
407 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
408 | --sbi=* | --sb=*)
409 sbindir="$ac_optarg" ;;
410
411 -sharedstatedir | --sharedstatedir | --sharedstatedi \
412 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
413 | --sharedst | --shareds | --shared | --share | --shar \
414 | --sha | --sh)
415 ac_prev=sharedstatedir ;;
416 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
417 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
418 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
419 | --sha=* | --sh=*)
420 sharedstatedir="$ac_optarg" ;;
421
422 -site | --site | --sit)
423 ac_prev=site ;;
424 -site=* | --site=* | --sit=*)
425 site="$ac_optarg" ;;
426
427 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
428 ac_prev=srcdir ;;
429 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
430 srcdir="$ac_optarg" ;;
431
432 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
433 | --syscon | --sysco | --sysc | --sys | --sy)
434 ac_prev=sysconfdir ;;
435 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
436 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
437 sysconfdir="$ac_optarg" ;;
438
439 -target | --target | --targe | --targ | --tar | --ta | --t)
440 ac_prev=target ;;
441 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
442 target="$ac_optarg" ;;
443
444 -v | -verbose | --verbose | --verbos | --verbo | --verb)
445 verbose=yes ;;
446
447 -version | --version | --versio | --versi | --vers)
448 echo "configure generated by autoconf version 2.13"
449 exit 0 ;;
450
451 -with-* | --with-*)
452 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
453 # Reject names that are not valid shell variable names.
454 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
455 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
456 fi
457 ac_package=`echo $ac_package| sed 's/-/_/g'`
458 case "$ac_option" in
459 *=*) ;;
460 *) ac_optarg=yes ;;
461 esac
462 eval "with_${ac_package}='$ac_optarg'" ;;
463
464 -without-* | --without-*)
465 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
466 # Reject names that are not valid shell variable names.
467 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
468 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
469 fi
470 ac_package=`echo $ac_package| sed 's/-/_/g'`
471 eval "with_${ac_package}=no" ;;
472
473 --x)
474 # Obsolete; use --with-x.
475 with_x=yes ;;
476
477 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
478 | --x-incl | --x-inc | --x-in | --x-i)
479 ac_prev=x_includes ;;
480 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
481 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
482 x_includes="$ac_optarg" ;;
483
484 -x-libraries | --x-libraries | --x-librarie | --x-librari \
485 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
486 ac_prev=x_libraries ;;
487 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
488 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
489 x_libraries="$ac_optarg" ;;
490
491 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
492 ;;
493
494 *)
495 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
496 echo "configure: warning: $ac_option: invalid host type" 1>&2
497 fi
498 if test "x$nonopt" != xNONE; then
499 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
500 fi
501 nonopt="$ac_option"
502 ;;
503
504 esac
505done
506
507if test -n "$ac_prev"; then
508 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
509fi
510
511trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
512
513# File descriptor usage:
514# 0 standard input
515# 1 file creation
516# 2 errors and warnings
517# 3 some systems may open it to /dev/tty
518# 4 used on the Kubota Titan
519# 6 checking for... messages and results
520# 5 compiler messages saved in config.log
521if test "$silent" = yes; then
522 exec 6>/dev/null
523else
524 exec 6>&1
525fi
526exec 5>auto/config.log
527
528echo "\
529This file contains any messages produced by compilers while
530running configure, to aid debugging if configure makes a mistake.
531" 1>&5
532
533# Strip out --no-create and --no-recursion so they do not pile up.
534# Also quote any args containing shell metacharacters.
535ac_configure_args=
536for ac_arg
537do
538 case "$ac_arg" in
539 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
540 | --no-cr | --no-c) ;;
541 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
542 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
543 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
544 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
545 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
546 esac
547done
548
549# NLS nuisances.
550# Only set these to C if already set. These must not be set unconditionally
551# because not all systems understand e.g. LANG=C (notably SCO).
552# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
553# Non-C LC_CTYPE values break the ctype check.
554if test "${LANG+set}" = set; then LANG=C; export LANG; fi
555if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
556if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
557if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
558
559# confdefs.h avoids OS command line length limits that DEFS can exceed.
560rm -rf conftest* confdefs.h
561# AIX cpp loses on an empty file, so make sure it contains at least a newline.
562echo > confdefs.h
563
564# A filename unique to this package, relative to the directory that
565# configure is in, which we can look for to find out if srcdir is correct.
566ac_unique_file=vim.h
567
568# Find the source files, if location was not specified.
569if test -z "$srcdir"; then
570 ac_srcdir_defaulted=yes
571 # Try the directory containing this script, then its parent.
572 ac_prog=$0
573 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
574 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
575 srcdir=$ac_confdir
576 if test ! -r $srcdir/$ac_unique_file; then
577 srcdir=..
578 fi
579else
580 ac_srcdir_defaulted=no
581fi
582if test ! -r $srcdir/$ac_unique_file; then
583 if test "$ac_srcdir_defaulted" = yes; then
584 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
585 else
586 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
587 fi
588fi
589srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
590
591# Prefer explicitly selected file to automatically selected ones.
592if test -z "$CONFIG_SITE"; then
593 if test "x$prefix" != xNONE; then
594 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
595 else
596 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
597 fi
598fi
599for ac_site_file in $CONFIG_SITE; do
600 if test -r "$ac_site_file"; then
601 echo "loading site script $ac_site_file"
602 . "$ac_site_file"
603 fi
604done
605
606if test -r "$cache_file"; then
607 echo "loading cache $cache_file"
608 . $cache_file
609else
610 echo "creating cache $cache_file"
611 > $cache_file
612fi
613
614ac_ext=c
615# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
616ac_cpp='$CPP $CPPFLAGS'
617ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
618ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
619cross_compiling=$ac_cv_prog_cc_cross
620
621ac_exeext=
622ac_objext=o
623if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
624 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
625 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
626 ac_n= ac_c='
627' ac_t=' '
628 else
629 ac_n=-n ac_c= ac_t=
630 fi
631else
632 ac_n= ac_c='\c' ac_t=
633fi
634
635
636
637
638cat >> confdefs.h <<\EOF
639#define UNIX 1
640EOF
641
642echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000643echo "configure:644: checking whether ${MAKE-make} sets \${MAKE}" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000644set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
645if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647else
648 cat > conftestmake <<\EOF
649all:
650 @echo 'ac_maketemp="${MAKE}"'
651EOF
652# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
653eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
654if test -n "$ac_maketemp"; then
655 eval ac_cv_prog_make_${ac_make}_set=yes
656else
657 eval ac_cv_prog_make_${ac_make}_set=no
658fi
659rm -f conftestmake
660fi
661if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
662 echo "$ac_t""yes" 1>&6
663 SET_MAKE=
664else
665 echo "$ac_t""no" 1>&6
666 SET_MAKE="MAKE=${MAKE-make}"
667fi
668
669
670# Extract the first word of "gcc", so it can be a program name with args.
671set dummy gcc; ac_word=$2
672echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000673echo "configure:674: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000674if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
675 echo $ac_n "(cached) $ac_c" 1>&6
676else
677 if test -n "$CC"; then
678 ac_cv_prog_CC="$CC" # Let the user override the test.
679else
680 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
681 ac_dummy="$PATH"
682 for ac_dir in $ac_dummy; do
683 test -z "$ac_dir" && ac_dir=.
684 if test -f $ac_dir/$ac_word; then
685 ac_cv_prog_CC="gcc"
686 break
687 fi
688 done
689 IFS="$ac_save_ifs"
690fi
691fi
692CC="$ac_cv_prog_CC"
693if test -n "$CC"; then
694 echo "$ac_t""$CC" 1>&6
695else
696 echo "$ac_t""no" 1>&6
697fi
698
699if test -z "$CC"; then
700 # Extract the first word of "cc", so it can be a program name with args.
701set dummy cc; ac_word=$2
702echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000703echo "configure:704: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000704if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
705 echo $ac_n "(cached) $ac_c" 1>&6
706else
707 if test -n "$CC"; then
708 ac_cv_prog_CC="$CC" # Let the user override the test.
709else
710 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
711 ac_prog_rejected=no
712 ac_dummy="$PATH"
713 for ac_dir in $ac_dummy; do
714 test -z "$ac_dir" && ac_dir=.
715 if test -f $ac_dir/$ac_word; then
716 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
717 ac_prog_rejected=yes
718 continue
719 fi
720 ac_cv_prog_CC="cc"
721 break
722 fi
723 done
724 IFS="$ac_save_ifs"
725if test $ac_prog_rejected = yes; then
726 # We found a bogon in the path, so make sure we never use it.
727 set dummy $ac_cv_prog_CC
728 shift
729 if test $# -gt 0; then
730 # We chose a different compiler from the bogus one.
731 # However, it has the same basename, so the bogon will be chosen
732 # first if we set CC to just the basename; use the full file name.
733 shift
734 set dummy "$ac_dir/$ac_word" "$@"
735 shift
736 ac_cv_prog_CC="$@"
737 fi
738fi
739fi
740fi
741CC="$ac_cv_prog_CC"
742if test -n "$CC"; then
743 echo "$ac_t""$CC" 1>&6
744else
745 echo "$ac_t""no" 1>&6
746fi
747
748 if test -z "$CC"; then
749 case "`uname -s`" in
750 *win32* | *WIN32*)
751 # Extract the first word of "cl", so it can be a program name with args.
752set dummy cl; ac_word=$2
753echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000754echo "configure:755: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000755if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
756 echo $ac_n "(cached) $ac_c" 1>&6
757else
758 if test -n "$CC"; then
759 ac_cv_prog_CC="$CC" # Let the user override the test.
760else
761 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
762 ac_dummy="$PATH"
763 for ac_dir in $ac_dummy; do
764 test -z "$ac_dir" && ac_dir=.
765 if test -f $ac_dir/$ac_word; then
766 ac_cv_prog_CC="cl"
767 break
768 fi
769 done
770 IFS="$ac_save_ifs"
771fi
772fi
773CC="$ac_cv_prog_CC"
774if test -n "$CC"; then
775 echo "$ac_t""$CC" 1>&6
776else
777 echo "$ac_t""no" 1>&6
778fi
779 ;;
780 esac
781 fi
782 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
783fi
784
785echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000786echo "configure:787: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000787
788ac_ext=c
789# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
790ac_cpp='$CPP $CPPFLAGS'
791ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
792ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
793cross_compiling=$ac_cv_prog_cc_cross
794
795cat > conftest.$ac_ext << EOF
796
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000797#line 798 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000798#include "confdefs.h"
799
800main(){return(0);}
801EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000802if { (eval echo configure:803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +0000803 ac_cv_prog_cc_works=yes
804 # If we can't run a trivial program, we are probably using a cross compiler.
805 if (./conftest; exit) 2>/dev/null; then
806 ac_cv_prog_cc_cross=no
807 else
808 ac_cv_prog_cc_cross=yes
809 fi
810else
811 echo "configure: failed program was:" >&5
812 cat conftest.$ac_ext >&5
813 ac_cv_prog_cc_works=no
814fi
815rm -fr conftest*
816ac_ext=c
817# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
818ac_cpp='$CPP $CPPFLAGS'
819ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
820ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
821cross_compiling=$ac_cv_prog_cc_cross
822
823echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
824if test $ac_cv_prog_cc_works = no; then
825 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
826fi
827echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000828echo "configure:829: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000829echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
830cross_compiling=$ac_cv_prog_cc_cross
831
832echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000833echo "configure:834: checking whether we are using GNU C" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000834if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
835 echo $ac_n "(cached) $ac_c" 1>&6
836else
837 cat > conftest.c <<EOF
838#ifdef __GNUC__
839 yes;
840#endif
841EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000842if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Bram Moolenaar071d4272004-06-13 20:20:40 +0000843 ac_cv_prog_gcc=yes
844else
845 ac_cv_prog_gcc=no
846fi
847fi
848
849echo "$ac_t""$ac_cv_prog_gcc" 1>&6
850
851if test $ac_cv_prog_gcc = yes; then
852 GCC=yes
853else
854 GCC=
855fi
856
857ac_test_CFLAGS="${CFLAGS+set}"
858ac_save_CFLAGS="$CFLAGS"
859CFLAGS=
860echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000861echo "configure:862: checking whether ${CC-cc} accepts -g" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000862if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
863 echo $ac_n "(cached) $ac_c" 1>&6
864else
865 echo 'void f(){}' > conftest.c
866if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
867 ac_cv_prog_cc_g=yes
868else
869 ac_cv_prog_cc_g=no
870fi
871rm -f conftest*
872
873fi
874
875echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
876if test "$ac_test_CFLAGS" = set; then
877 CFLAGS="$ac_save_CFLAGS"
878elif test $ac_cv_prog_cc_g = yes; then
879 if test "$GCC" = yes; then
880 CFLAGS="-g -O2"
881 else
882 CFLAGS="-g"
883 fi
884else
885 if test "$GCC" = yes; then
886 CFLAGS="-O2"
887 else
888 CFLAGS=
889 fi
890fi
891 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000892echo "configure:893: checking how to run the C preprocessor" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000893# On Suns, sometimes $CPP names a directory.
894if test -n "$CPP" && test -d "$CPP"; then
895 CPP=
896fi
897if test -z "$CPP"; then
898if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
899 echo $ac_n "(cached) $ac_c" 1>&6
900else
901 # This must be in double quotes, not single quotes, because CPP may get
902 # substituted into the Makefile and "${CC-cc}" will confuse make.
903 CPP="${CC-cc} -E"
904 # On the NeXT, cc -E runs the code through the compiler's parser,
905 # not just through cpp.
906 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000907#line 908 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000908#include "confdefs.h"
909#include <assert.h>
910Syntax Error
911EOF
912ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000913{ (eval echo configure:914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +0000914ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
915if test -z "$ac_err"; then
916 :
917else
918 echo "$ac_err" >&5
919 echo "configure: failed program was:" >&5
920 cat conftest.$ac_ext >&5
921 rm -rf conftest*
922 CPP="${CC-cc} -E -traditional-cpp"
923 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000924#line 925 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000925#include "confdefs.h"
926#include <assert.h>
927Syntax Error
928EOF
929ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000930{ (eval echo configure:931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +0000931ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
932if test -z "$ac_err"; then
933 :
934else
935 echo "$ac_err" >&5
936 echo "configure: failed program was:" >&5
937 cat conftest.$ac_ext >&5
938 rm -rf conftest*
939 CPP="${CC-cc} -nologo -E"
940 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000941#line 942 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000942#include "confdefs.h"
943#include <assert.h>
944Syntax Error
945EOF
946ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000947{ (eval echo configure:948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +0000948ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
949if test -z "$ac_err"; then
950 :
951else
952 echo "$ac_err" >&5
953 echo "configure: failed program was:" >&5
954 cat conftest.$ac_ext >&5
955 rm -rf conftest*
956 CPP=/lib/cpp
957fi
958rm -f conftest*
959fi
960rm -f conftest*
961fi
962rm -f conftest*
963 ac_cv_prog_CPP="$CPP"
964fi
965 CPP="$ac_cv_prog_CPP"
966else
967 ac_cv_prog_CPP="$CPP"
968fi
969echo "$ac_t""$CPP" 1>&6
970 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000971#line 972 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000972#include "confdefs.h"
973
974EOF
975if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
976 egrep "" >/dev/null 2>&1; then
977 :
978fi
979rm -f conftest*
980 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000981echo "configure:982: checking for POSIXized ISC" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +0000982if test -d /etc/conf/kconfig.d &&
983 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
984then
985 echo "$ac_t""yes" 1>&6
986 ISC=yes # If later tests want to check for ISC.
987 cat >> confdefs.h <<\EOF
988#define _POSIX_SOURCE 1
989EOF
990
991 if test "$GCC" = yes; then
992 CC="$CC -posix"
993 else
994 CC="$CC -Xp"
995 fi
996else
997 echo "$ac_t""no" 1>&6
998 ISC=
999fi
1000 for ac_prog in mawk gawk nawk awk
1001do
1002# Extract the first word of "$ac_prog", so it can be a program name with args.
1003set dummy $ac_prog; ac_word=$2
1004echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001005echo "configure:1006: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001006if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1007 echo $ac_n "(cached) $ac_c" 1>&6
1008else
1009 if test -n "$AWK"; then
1010 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1011else
1012 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1013 ac_dummy="$PATH"
1014 for ac_dir in $ac_dummy; do
1015 test -z "$ac_dir" && ac_dir=.
1016 if test -f $ac_dir/$ac_word; then
1017 ac_cv_prog_AWK="$ac_prog"
1018 break
1019 fi
1020 done
1021 IFS="$ac_save_ifs"
1022fi
1023fi
1024AWK="$ac_cv_prog_AWK"
1025if test -n "$AWK"; then
1026 echo "$ac_t""$AWK" 1>&6
1027else
1028 echo "$ac_t""no" 1>&6
1029fi
1030
1031test -n "$AWK" && break
1032done
1033
1034# Extract the first word of "strip", so it can be a program name with args.
1035set dummy strip; ac_word=$2
1036echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001037echo "configure:1038: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001038if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1039 echo $ac_n "(cached) $ac_c" 1>&6
1040else
1041 if test -n "$STRIP"; then
1042 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1043else
1044 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1045 ac_dummy="$PATH"
1046 for ac_dir in $ac_dummy; do
1047 test -z "$ac_dir" && ac_dir=.
1048 if test -f $ac_dir/$ac_word; then
1049 ac_cv_prog_STRIP="strip"
1050 break
1051 fi
1052 done
1053 IFS="$ac_save_ifs"
1054 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
1055fi
1056fi
1057STRIP="$ac_cv_prog_STRIP"
1058if test -n "$STRIP"; then
1059 echo "$ac_t""$STRIP" 1>&6
1060else
1061 echo "$ac_t""no" 1>&6
1062fi
1063
1064
1065echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001066echo "configure:1067: checking for Cygwin environment" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001067if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1068 echo $ac_n "(cached) $ac_c" 1>&6
1069else
1070 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001071#line 1072 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001072#include "confdefs.h"
1073
1074int main() {
1075
1076#ifndef __CYGWIN__
1077#define __CYGWIN__ __CYGWIN32__
1078#endif
1079return __CYGWIN__;
1080; return 0; }
1081EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001082if { (eval echo configure:1083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001083 rm -rf conftest*
1084 ac_cv_cygwin=yes
1085else
1086 echo "configure: failed program was:" >&5
1087 cat conftest.$ac_ext >&5
1088 rm -rf conftest*
1089 ac_cv_cygwin=no
1090fi
1091rm -f conftest*
1092rm -f conftest*
1093fi
1094
1095echo "$ac_t""$ac_cv_cygwin" 1>&6
1096CYGWIN=
1097test "$ac_cv_cygwin" = yes && CYGWIN=yes
1098echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001099echo "configure:1100: checking for mingw32 environment" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001100if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1101 echo $ac_n "(cached) $ac_c" 1>&6
1102else
1103 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001104#line 1105 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001105#include "confdefs.h"
1106
1107int main() {
1108return __MINGW32__;
1109; return 0; }
1110EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001111if { (eval echo configure:1112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001112 rm -rf conftest*
1113 ac_cv_mingw32=yes
1114else
1115 echo "configure: failed program was:" >&5
1116 cat conftest.$ac_ext >&5
1117 rm -rf conftest*
1118 ac_cv_mingw32=no
1119fi
1120rm -f conftest*
1121rm -f conftest*
1122fi
1123
1124echo "$ac_t""$ac_cv_mingw32" 1>&6
1125MINGW32=
1126test "$ac_cv_mingw32" = yes && MINGW32=yes
1127
1128
1129echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001130echo "configure:1131: checking for executable suffix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001131if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1132 echo $ac_n "(cached) $ac_c" 1>&6
1133else
1134 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1135 ac_cv_exeext=.exe
1136else
1137 rm -f conftest*
1138 echo 'int main () { return 0; }' > conftest.$ac_ext
1139 ac_cv_exeext=
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001140 if { (eval echo configure:1141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001141 for file in conftest.*; do
1142 case $file in
1143 *.c | *.o | *.obj) ;;
1144 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1145 esac
1146 done
1147 else
1148 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1149 fi
1150 rm -f conftest*
1151 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1152fi
1153fi
1154
1155EXEEXT=""
1156test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1157echo "$ac_t""${ac_cv_exeext}" 1>&6
1158ac_exeext=$EXEEXT
1159
1160
1161if test -z "$CFLAGS"; then
1162 CFLAGS="-O"
1163 test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall"
1164fi
1165if test "$GCC" = yes; then
1166 gccversion=`"$CC" --version | sed -e '2,$d;s/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'`
1167 if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2"; then
1168 echo 'GCC 3.0.x has a bug in the optimizer, disabling "-O#"'
1169 CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
1170 else
1171 if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
1172 echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
1173 CFLAGS="$CFLAGS -fno-strength-reduce"
1174 fi
1175 fi
1176fi
1177
1178if test "$cross_compiling" = yes; then
1179 { echo "configure: error: cannot compile a simple program, check CC and CFLAGS
1180 (cross compiling doesn't work)" 1>&2; exit 1; }
1181fi
1182
1183test "$GCC" = yes && CPP_MM=M;
1184
1185if test -f ./toolcheck; then
1186 echo "checking for buggy tools" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001187echo "configure:1188: checking for buggy tools" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001188 sh ./toolcheck 1>&6
1189fi
1190
1191OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
1192
1193echo $ac_n "checking for BeOS""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001194echo "configure:1195: checking for BeOS" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001195case `uname` in
1196 BeOS) OS_EXTRA_SRC=os_beos.c; OS_EXTRA_OBJ=objects/os_beos.o
1197 BEOS=yes; echo "$ac_t""yes" 1>&6;;
1198 *) BEOS=no; echo "$ac_t""no" 1>&6;;
1199esac
1200
1201echo $ac_n "checking for QNX""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001202echo "configure:1203: checking for QNX" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001203case `uname` in
1204 QNX) OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
1205 test -z "$with_x" && with_x=no
1206 QNX=yes; echo "$ac_t""yes" 1>&6;;
1207 *) QNX=no; echo "$ac_t""no" 1>&6;;
1208esac
1209
1210DEFAULT_VIMNAME=vim
1211echo $ac_n "checking for Darwin (Mac OS X)""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001212echo "configure:1213: checking for Darwin (Mac OS X)" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001213if test "`(uname) 2>/dev/null`" = Darwin; then
1214 echo "$ac_t""yes" 1>&6
1215
1216 echo $ac_n "checking --disable-darwin argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001217echo "configure:1218: checking --disable-darwin argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001218 # Check whether --enable-darwin or --disable-darwin was given.
1219if test "${enable_darwin+set}" = set; then
1220 enableval="$enable_darwin"
1221 :
1222else
1223 enable_darwin="yes"
1224fi
1225
1226 if test "$enable_darwin" = "yes"; then
1227 echo "$ac_t""no" 1>&6
1228 echo $ac_n "checking if Darwin files are there""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001229echo "configure:1230: checking if Darwin files are there" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001230 if test -f os_macosx.c; then
1231 echo "$ac_t""yes" 1>&6
1232 else
1233 echo "$ac_t""no, Darwin support disabled" 1>&6
1234 enable_darwin=no
1235 fi
1236 else
1237 echo "$ac_t""yes, Darwin support excluded" 1>&6
1238 fi
1239
1240 if test "$enable_darwin" = "yes"; then
1241 MACOSX=yes
1242 OS_EXTRA_SCR="os_macosx.c";
1243 OS_EXTRA_OBJ="objects/os_macosx.o"
1244 CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -I/Developer/Headers/FlatCarbon -no-cpp-precomp"
1245
1246 ac_safe=`echo "Carbon/Carbon.h" | sed 'y%./+-%__p_%'`
1247echo $ac_n "checking for Carbon/Carbon.h""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001248echo "configure:1249: checking for Carbon/Carbon.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001249if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1250 echo $ac_n "(cached) $ac_c" 1>&6
1251else
1252 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001253#line 1254 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001254#include "confdefs.h"
1255#include <Carbon/Carbon.h>
1256EOF
1257ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001258{ (eval echo configure:1259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00001259ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1260if test -z "$ac_err"; then
1261 rm -rf conftest*
1262 eval "ac_cv_header_$ac_safe=yes"
1263else
1264 echo "$ac_err" >&5
1265 echo "configure: failed program was:" >&5
1266 cat conftest.$ac_ext >&5
1267 rm -rf conftest*
1268 eval "ac_cv_header_$ac_safe=no"
1269fi
1270rm -f conftest*
1271fi
1272if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1273 echo "$ac_t""yes" 1>&6
1274 CARBON=yes
1275else
1276 echo "$ac_t""no" 1>&6
1277fi
1278
1279 if test "x$CARBON" = "xyes"; then
1280 if test -z "$with_x"; then
1281 with_x=no
1282 DEFAULT_VIMNAME=Vim
1283 fi
1284 fi
1285 fi
1286else
1287 echo "$ac_t""no" 1>&6
1288fi
1289
1290
1291
1292
1293have_local_include=''
1294have_local_lib=''
1295if test "$GCC" = yes; then
1296 echo 'void f(){}' > conftest.c
1297 have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 2>&1 | grep '/usr/local/include'`
1298 have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep '/usr/local/lib'`
1299 rm -f conftest.c conftest.o
1300fi
1301if test -z "$have_local_lib" -a -d /usr/local/lib; then
1302 tt=`echo "$LDFLAGS" | sed -e 's+-L/usr/local/lib ++g' -e 's+-L/usr/local/lib$++g'`
1303 if test "$tt" = "$LDFLAGS"; then
1304 LDFLAGS="$LDFLAGS -L/usr/local/lib"
1305 fi
1306fi
1307if test -z "$have_local_include" -a -d /usr/local/include; then
1308 tt=`echo "$CPPFLAGS" | sed -e 's+-I/usr/local/include ++g' -e 's+-I/usr/local/include$++g'`
1309 if test "$tt" = "$CPPFLAGS"; then
1310 CPPFLAGS="$CPPFLAGS -I/usr/local/include"
1311 fi
1312fi
1313
1314echo $ac_n "checking --with-vim-name argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001315echo "configure:1316: checking --with-vim-name argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001316# Check whether --with-vim-name or --without-vim-name was given.
1317if test "${with_vim_name+set}" = set; then
1318 withval="$with_vim_name"
1319 VIMNAME="$withval"; echo "$ac_t""$VIMNAME" 1>&6
1320else
1321 VIMNAME="$DEFAULT_VIMNAME"; echo "$ac_t""Defaulting to $VIMNAME" 1>&6
1322fi
1323
1324
1325echo $ac_n "checking --with-ex-name argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001326echo "configure:1327: checking --with-ex-name argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001327# Check whether --with-ex-name or --without-ex-name was given.
1328if test "${with_ex_name+set}" = set; then
1329 withval="$with_ex_name"
1330 EXNAME="$withval"; echo "$ac_t""$EXNAME" 1>&6
1331else
1332 EXNAME="ex"; echo "$ac_t""Defaulting to ex" 1>&6
1333fi
1334
1335
1336echo $ac_n "checking --with-view-name argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001337echo "configure:1338: checking --with-view-name argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001338# Check whether --with-view-name or --without-view-name was given.
1339if test "${with_view_name+set}" = set; then
1340 withval="$with_view_name"
1341 VIEWNAME="$withval"; echo "$ac_t""$VIEWNAME" 1>&6
1342else
1343 VIEWNAME="view"; echo "$ac_t""Defaulting to view" 1>&6
1344fi
1345
1346
1347
1348echo $ac_n "checking --with-global-runtime argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001349echo "configure:1350: checking --with-global-runtime argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001350# Check whether --with-global-runtime or --without-global-runtime was given.
1351if test "${with_global_runtime+set}" = set; then
1352 withval="$with_global_runtime"
1353 echo "$ac_t""$withval" 1>&6; cat >> confdefs.h <<EOF
1354#define RUNTIME_GLOBAL "$withval"
1355EOF
1356
1357else
1358 echo "$ac_t""no" 1>&6
1359fi
1360
1361
1362echo $ac_n "checking --with-modified-by argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001363echo "configure:1364: checking --with-modified-by argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001364# Check whether --with-modified-by or --without-modified-by was given.
1365if test "${with_modified_by+set}" = set; then
1366 withval="$with_modified_by"
1367 echo "$ac_t""$withval" 1>&6; cat >> confdefs.h <<EOF
1368#define MODIFIED_BY "$withval"
1369EOF
1370
1371else
1372 echo "$ac_t""no" 1>&6
1373fi
1374
1375
1376echo $ac_n "checking if character set is EBCDIC""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001377echo "configure:1378: checking if character set is EBCDIC" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001378cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001379#line 1380 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001380#include "confdefs.h"
1381
1382int main() {
1383 /* TryCompile function for CharSet.
1384 Treat any failure as ASCII for compatibility with existing art.
1385 Use compile-time rather than run-time tests for cross-compiler
1386 tolerance. */
1387#if '0'!=240
1388make an error "Character set is not EBCDIC"
1389#endif
1390; return 0; }
1391EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001392if { (eval echo configure:1393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001393 rm -rf conftest*
1394 # TryCompile action if true
1395cf_cv_ebcdic=yes
1396else
1397 echo "configure: failed program was:" >&5
1398 cat conftest.$ac_ext >&5
1399 rm -rf conftest*
1400 # TryCompile action if false
1401cf_cv_ebcdic=no
1402fi
1403rm -f conftest*
1404# end of TryCompile ])
1405# end of CacheVal CvEbcdic
1406echo "$ac_t""$cf_cv_ebcdic" 1>&6
1407case "$cf_cv_ebcdic" in #(vi
1408 yes) cat >> confdefs.h <<\EOF
1409#define EBCDIC 1
1410EOF
1411
1412 line_break='"\\n"'
1413 ;;
1414 *) line_break='"\\012"';;
1415esac
1416
1417
1418if test "$cf_cv_ebcdic" = "yes"; then
1419echo $ac_n "checking for OS/390 Unix""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001420echo "configure:1421: checking for OS/390 Unix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001421case `uname` in
1422 OS/390) OS390Unix="yes";
1423 if test "$CC" = "cc"; then
1424 ccm="$_CC_CCMODE"
1425 ccn="CC"
1426 else
1427 if test "$CC" = "c89"; then
1428 ccm="$_CC_C89MODE"
1429 ccn="C89"
1430 else
1431 ccm=1
1432 fi
1433 fi
1434 if test "$ccm" != "1"; then
1435 echo ""
1436 echo "------------------------------------------"
1437 echo " On OS/390 Unix, the environment variable"
1438 echo " __CC_${ccn}MODE must be set to \"1\"!"
1439 echo " Do:"
1440 echo " export _CC_${ccn}MODE=1"
1441 echo " and then call configure again."
1442 echo "------------------------------------------"
1443 exit 1
1444 fi
1445 CFLAGS="$CFLAGS -D_ALL_SOURCE"; LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
1446 echo "$ac_t""yes" 1>&6
1447 ;;
1448 *) OS390Unix="no";
1449 echo "$ac_t""no" 1>&6
1450 ;;
1451esac
1452fi
1453
1454
1455
1456echo $ac_n "checking --with-features argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001457echo "configure:1458: checking --with-features argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001458# Check whether --with-features or --without-features was given.
1459if test "${with_features+set}" = set; then
1460 withval="$with_features"
1461 features="$withval"; echo "$ac_t""$features" 1>&6
1462else
1463 features="normal"; echo "$ac_t""Defaulting to normal" 1>&6
1464fi
1465
1466
1467dovimdiff=""
1468dogvimdiff=""
1469case "$features" in
1470 tiny) cat >> confdefs.h <<\EOF
1471#define FEAT_TINY 1
1472EOF
1473 ;;
1474 small) cat >> confdefs.h <<\EOF
1475#define FEAT_SMALL 1
1476EOF
1477 ;;
1478 normal) cat >> confdefs.h <<\EOF
1479#define FEAT_NORMAL 1
1480EOF
1481 dovimdiff="installvimdiff";
1482 dogvimdiff="installgvimdiff" ;;
1483 big) cat >> confdefs.h <<\EOF
1484#define FEAT_BIG 1
1485EOF
1486 dovimdiff="installvimdiff";
1487 dogvimdiff="installgvimdiff" ;;
1488 huge) cat >> confdefs.h <<\EOF
1489#define FEAT_HUGE 1
1490EOF
1491 dovimdiff="installvimdiff";
1492 dogvimdiff="installgvimdiff" ;;
1493 *) echo "$ac_t""Sorry, $features is not supported" 1>&6 ;;
1494esac
1495
1496
1497
1498
1499echo $ac_n "checking --with-compiledby argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001500echo "configure:1501: checking --with-compiledby argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001501# Check whether --with-compiledby or --without-compiledby was given.
1502if test "${with_compiledby+set}" = set; then
1503 withval="$with_compiledby"
1504 compiledby="$withval"; echo "$ac_t""$withval" 1>&6
1505else
1506 compiledby=""; echo "$ac_t""no" 1>&6
1507fi
1508
1509
1510
1511echo $ac_n "checking --disable-xsmp argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001512echo "configure:1513: checking --disable-xsmp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001513# Check whether --enable-xsmp or --disable-xsmp was given.
1514if test "${enable_xsmp+set}" = set; then
1515 enableval="$enable_xsmp"
1516 :
1517else
1518 enable_xsmp="yes"
1519fi
1520
1521
1522if test "$enable_xsmp" = "yes"; then
1523 echo "$ac_t""no" 1>&6
1524 echo $ac_n "checking --disable-xsmp-interact argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001525echo "configure:1526: checking --disable-xsmp-interact argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001526 # Check whether --enable-xsmp-interact or --disable-xsmp-interact was given.
1527if test "${enable_xsmp_interact+set}" = set; then
1528 enableval="$enable_xsmp_interact"
1529 :
1530else
1531 enable_xsmp_interact="yes"
1532fi
1533
1534 if test "$enable_xsmp_interact" = "yes"; then
1535 echo "$ac_t""no" 1>&6
1536 cat >> confdefs.h <<\EOF
1537#define USE_XSMP_INTERACT 1
1538EOF
1539
1540 else
1541 echo "$ac_t""yes" 1>&6
1542 fi
1543else
1544 echo "$ac_t""yes" 1>&6
1545fi
1546
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001547echo $ac_n "checking --enable-mzschemeinterp argument""... $ac_c" 1>&6
1548echo "configure:1549: checking --enable-mzschemeinterp argument" >&5
1549# Check whether --enable-mzschemeinterp or --disable-mzschemeinterp was given.
1550if test "${enable_mzschemeinterp+set}" = set; then
1551 enableval="$enable_mzschemeinterp"
1552 :
1553else
1554 enable_mzschemeinterp="no"
1555fi
1556
1557echo "$ac_t""$enable_mzschemeinterp" 1>&6
1558
1559if test "$enable_mzschemeinterp" = "yes"; then
1560
1561
1562 echo $ac_n "checking --with-plthome argument""... $ac_c" 1>&6
1563echo "configure:1564: checking --with-plthome argument" >&5
1564 # Check whether --with-plthome or --without-plthome was given.
1565if test "${with_plthome+set}" = set; then
1566 withval="$with_plthome"
1567 with_plthome="$withval"; echo "$ac_t""$with_plthome" 1>&6
1568else
1569 with_plthome="";echo "$ac_t"""no"" 1>&6
1570fi
1571
1572
1573 if test "X$with_plthome" != "X"; then
1574 vi_cv_path_mzscheme_pfx="$with_plthome"
1575 else
1576 echo $ac_n "checking PLTHOME environment var""... $ac_c" 1>&6
1577echo "configure:1578: checking PLTHOME environment var" >&5
1578 if test "X$PLTHOME" != "X"; then
1579 echo "$ac_t"""$PLTHOME"" 1>&6
1580 vi_cv_path_mzscheme_pfx="$PLTHOME"
1581 else
1582 echo "$ac_t"""not set"" 1>&6
1583 # Extract the first word of "mzscheme", so it can be a program name with args.
1584set dummy mzscheme; ac_word=$2
1585echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1586echo "configure:1587: checking for $ac_word" >&5
1587if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_mzscheme'+set}'`\" = set"; then
1588 echo $ac_n "(cached) $ac_c" 1>&6
1589else
1590 case "$vi_cv_path_mzscheme" in
1591 /*)
1592 ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
1593 ;;
1594 ?:/*)
1595 ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a dos path.
1596 ;;
1597 *)
1598 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1599 ac_dummy="$PATH"
1600 for ac_dir in $ac_dummy; do
1601 test -z "$ac_dir" && ac_dir=.
1602 if test -f $ac_dir/$ac_word; then
1603 ac_cv_path_vi_cv_path_mzscheme="$ac_dir/$ac_word"
1604 break
1605 fi
1606 done
1607 IFS="$ac_save_ifs"
1608 ;;
1609esac
1610fi
1611vi_cv_path_mzscheme="$ac_cv_path_vi_cv_path_mzscheme"
1612if test -n "$vi_cv_path_mzscheme"; then
1613 echo "$ac_t""$vi_cv_path_mzscheme" 1>&6
1614else
1615 echo "$ac_t""no" 1>&6
1616fi
1617
1618
1619 if test "X$vi_cv_path_mzscheme" != "X"; then
1620 lsout=`ls -l $vi_cv_path_mzscheme`
1621 if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
1622 vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
1623 fi
1624 fi
1625
1626 if test "X$vi_cv_path_mzscheme" != "X"; then
1627 echo $ac_n "checking MzScheme install prefix""... $ac_c" 1>&6
1628echo "configure:1629: checking MzScheme install prefix" >&5
1629if eval "test \"`echo '$''{'vi_cv_path_mzscheme_pfx'+set}'`\" = set"; then
1630 echo $ac_n "(cached) $ac_c" 1>&6
1631else
1632 vi_cv_path_mzscheme_pfx=`
1633 ${vi_cv_path_mzscheme} -evm \
1634 "(display (simplify-path \
1635 (build-path (call-with-values \
1636 (lambda () (split-path (find-system-path (quote exec-file)))) \
1637 (lambda (base name must-be-dir?) base)) (quote up))))"`
1638fi
1639
1640echo "$ac_t""$vi_cv_path_mzscheme_pfx" 1>&6
1641 vi_cv_path_mzscheme_pfx=`echo "$vi_cv_path_mzscheme_pfx" | sed 's+/$++'`
1642 fi
1643 fi
1644 fi
1645
1646 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
1647 echo $ac_n "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include""... $ac_c" 1>&6
1648echo "configure:1649: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
1649 if test -f $vi_cv_path_mzscheme_pfx/include/scheme.h; then
1650 echo "$ac_t"""yes"" 1>&6
1651 else
1652 echo "$ac_t"""no"" 1>&6
1653 vi_cv_path_mzscheme_pfx=
1654 fi
1655 fi
1656
1657 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
1658 if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a"; then
1659 MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzgc.a ${vi_cv_path_mzscheme_pfx}/lib/libmzscheme.a"
1660 else
1661 MZSCHEME_LIBS="-L${vi_cv_path_mzscheme_pfx}/lib -lmzgc -lmzscheme"
1662 fi
1663 MZSCHEME_CFLAGS="-I${vi_cv_path_mzscheme_pfx}/include \
1664 -DMZSCHEME_COLLECTS='\"${vi_cv_path_mzscheme_pfx}/collects\"'"
1665 MZSCHEME_SRC="if_mzsch.c"
1666 MZSCHEME_OBJ="objects/if_mzsch.o"
1667 MZSCHEME_PRO="if_mzsch.pro"
1668 cat >> confdefs.h <<\EOF
1669#define FEAT_MZSCHEME 1
1670EOF
1671
1672 fi
1673
1674
1675
1676
1677
1678fi
1679
1680
Bram Moolenaar071d4272004-06-13 20:20:40 +00001681echo $ac_n "checking --enable-perlinterp argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001682echo "configure:1683: checking --enable-perlinterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001683# Check whether --enable-perlinterp or --disable-perlinterp was given.
1684if test "${enable_perlinterp+set}" = set; then
1685 enableval="$enable_perlinterp"
1686 :
1687else
1688 enable_perlinterp="no"
1689fi
1690
1691echo "$ac_t""$enable_perlinterp" 1>&6
1692if test "$enable_perlinterp" = "yes"; then
1693
1694 # Extract the first word of "perl", so it can be a program name with args.
1695set dummy perl; ac_word=$2
1696echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001697echo "configure:1698: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001698if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_perl'+set}'`\" = set"; then
1699 echo $ac_n "(cached) $ac_c" 1>&6
1700else
1701 case "$vi_cv_path_perl" in
1702 /*)
1703 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
1704 ;;
1705 ?:/*)
1706 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a dos path.
1707 ;;
1708 *)
1709 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1710 ac_dummy="$PATH"
1711 for ac_dir in $ac_dummy; do
1712 test -z "$ac_dir" && ac_dir=.
1713 if test -f $ac_dir/$ac_word; then
1714 ac_cv_path_vi_cv_path_perl="$ac_dir/$ac_word"
1715 break
1716 fi
1717 done
1718 IFS="$ac_save_ifs"
1719 ;;
1720esac
1721fi
1722vi_cv_path_perl="$ac_cv_path_vi_cv_path_perl"
1723if test -n "$vi_cv_path_perl"; then
1724 echo "$ac_t""$vi_cv_path_perl" 1>&6
1725else
1726 echo "$ac_t""no" 1>&6
1727fi
1728
1729 if test "X$vi_cv_path_perl" != "X"; then
1730 echo $ac_n "checking Perl version""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001731echo "configure:1732: checking Perl version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001732 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
1733 eval `$vi_cv_path_perl -V:usethreads`
1734 if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
1735 badthreads=no
1736 else
1737 if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
1738 eval `$vi_cv_path_perl -V:use5005threads`
1739 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
1740 badthreads=no
1741 else
1742 badthreads=yes
1743 echo "$ac_t"">>> Perl > 5.6 with 5.5 threads cannot be used <<<" 1>&6
1744 fi
1745 else
1746 badthreads=yes
1747 echo "$ac_t"">>> Perl 5.5 with threads cannot be used <<<" 1>&6
1748 fi
1749 fi
1750 if test $badthreads = no; then
1751 echo "$ac_t""OK" 1>&6
1752 eval `$vi_cv_path_perl -V:shrpenv`
1753 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
1754 shrpenv=""
1755 fi
1756 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
1757
1758 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
1759 -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//'`
1760 perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
1761 sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
1762 -e 's/-bE:perl.exp//' -e 's/-lc //'`
1763 perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
1764 -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
1765
1766 echo $ac_n "checking if compile and link flags for Perl are sane""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001767echo "configure:1768: checking if compile and link flags for Perl are sane" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001768 cflags_save=$CFLAGS
1769 libs_save=$LIBS
1770 ldflags_save=$LDFLAGS
1771 CFLAGS="$CFLAGS $perlcppflags"
1772 LIBS="$LIBS $perllibs"
1773 LDFLAGS="$perlldflags $LDFLAGS"
1774 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001775#line 1776 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001776#include "confdefs.h"
1777
1778int main() {
1779
1780; return 0; }
1781EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001782if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001783 rm -rf conftest*
1784 echo "$ac_t""yes" 1>&6; perl_ok=yes
1785else
1786 echo "configure: failed program was:" >&5
1787 cat conftest.$ac_ext >&5
1788 rm -rf conftest*
1789 echo "$ac_t""no: PERL DISABLED" 1>&6; perl_ok=no
1790fi
1791rm -f conftest*
1792 CFLAGS=$cflags_save
1793 LIBS=$libs_save
1794 LDFLAGS=$ldflags_save
1795 if test $perl_ok = yes; then
1796 if test "X$perlcppflags" != "X"; then
1797 PERL_CFLAGS="$perlcppflags"
1798 fi
1799 if test "X$perlldflags" != "X"; then
1800 LDFLAGS="$perlldflags $LDFLAGS"
1801 fi
1802 PERL_LIBS=$perllibs
1803 PERL_SRC="auto/if_perl.c if_perlsfio.c"
1804 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
1805 PERL_PRO="if_perl.pro if_perlsfio.pro"
1806 cat >> confdefs.h <<\EOF
1807#define FEAT_PERL 1
1808EOF
1809
1810 fi
1811 fi
1812 else
1813 echo "$ac_t"">>> too old; need Perl version 5.003_01 or later <<<" 1>&6
1814 fi
1815 fi
1816
1817 if test "x$MACOSX" = "xyes"; then
1818 dir=/System/Library/Perl
1819 darwindir=$dir/darwin
1820 if test -d $darwindir; then
1821 PERL=/usr/bin/perl
1822 else
1823 dir=/System/Library/Perl/5.8.1
1824 darwindir=$dir/darwin-thread-multi-2level
1825 if test -d $darwindir; then
1826 PERL=/usr/bin/perl
1827 fi
1828 fi
1829 if test -n "$PERL"; then
1830 PERL_DIR="$dir"
1831 PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
1832 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
1833 PERL_LIBS="-L$darwindir/CORE -lperl"
1834 fi
1835 fi
1836fi
1837
1838
1839
1840
1841
1842
1843
1844echo $ac_n "checking --enable-pythoninterp argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001845echo "configure:1846: checking --enable-pythoninterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001846# Check whether --enable-pythoninterp or --disable-pythoninterp was given.
1847if test "${enable_pythoninterp+set}" = set; then
1848 enableval="$enable_pythoninterp"
1849 :
1850else
1851 enable_pythoninterp="no"
1852fi
1853
1854echo "$ac_t""$enable_pythoninterp" 1>&6
1855if test "$enable_pythoninterp" = "yes"; then
1856 # Extract the first word of "python", so it can be a program name with args.
1857set dummy python; ac_word=$2
1858echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001859echo "configure:1860: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001860if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_python'+set}'`\" = set"; then
1861 echo $ac_n "(cached) $ac_c" 1>&6
1862else
1863 case "$vi_cv_path_python" in
1864 /*)
1865 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
1866 ;;
1867 ?:/*)
1868 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a dos path.
1869 ;;
1870 *)
1871 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1872 ac_dummy="$PATH"
1873 for ac_dir in $ac_dummy; do
1874 test -z "$ac_dir" && ac_dir=.
1875 if test -f $ac_dir/$ac_word; then
1876 ac_cv_path_vi_cv_path_python="$ac_dir/$ac_word"
1877 break
1878 fi
1879 done
1880 IFS="$ac_save_ifs"
1881 ;;
1882esac
1883fi
1884vi_cv_path_python="$ac_cv_path_vi_cv_path_python"
1885if test -n "$vi_cv_path_python"; then
1886 echo "$ac_t""$vi_cv_path_python" 1>&6
1887else
1888 echo "$ac_t""no" 1>&6
1889fi
1890
1891 if test "X$vi_cv_path_python" != "X"; then
1892
1893 echo $ac_n "checking Python version""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001894echo "configure:1895: checking Python version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001895if eval "test \"`echo '$''{'vi_cv_var_python_version'+set}'`\" = set"; then
1896 echo $ac_n "(cached) $ac_c" 1>&6
1897else
1898 vi_cv_var_python_version=`
1899 ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
1900
1901fi
1902
1903echo "$ac_t""$vi_cv_var_python_version" 1>&6
1904
1905 echo $ac_n "checking Python is 1.4 or better""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001906echo "configure:1907: checking Python is 1.4 or better" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001907 if ${vi_cv_path_python} -c \
1908 "import sys; sys.exit(${vi_cv_var_python_version} < 1.4)"
1909 then
1910 echo "$ac_t""yep" 1>&6
1911
1912 echo $ac_n "checking Python's install prefix""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001913echo "configure:1914: checking Python's install prefix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001914if eval "test \"`echo '$''{'vi_cv_path_python_pfx'+set}'`\" = set"; then
1915 echo $ac_n "(cached) $ac_c" 1>&6
1916else
1917 vi_cv_path_python_pfx=`
1918 ${vi_cv_path_python} -c \
1919 "import sys; print sys.prefix"`
1920fi
1921
1922echo "$ac_t""$vi_cv_path_python_pfx" 1>&6
1923
1924 echo $ac_n "checking Python's execution prefix""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001925echo "configure:1926: checking Python's execution prefix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001926if eval "test \"`echo '$''{'vi_cv_path_python_epfx'+set}'`\" = set"; then
1927 echo $ac_n "(cached) $ac_c" 1>&6
1928else
1929 vi_cv_path_python_epfx=`
1930 ${vi_cv_path_python} -c \
1931 "import sys; print sys.exec_prefix"`
1932fi
1933
1934echo "$ac_t""$vi_cv_path_python_epfx" 1>&6
1935
1936
1937 if eval "test \"`echo '$''{'vi_cv_path_pythonpath'+set}'`\" = set"; then
1938 echo $ac_n "(cached) $ac_c" 1>&6
1939else
1940 vi_cv_path_pythonpath=`
1941 unset PYTHONPATH;
1942 ${vi_cv_path_python} -c \
1943 "import sys, string; print string.join(sys.path,':')"`
1944fi
1945
1946
1947
1948 # Check whether --with-python-config-dir or --without-python-config-dir was given.
1949if test "${with_python_config_dir+set}" = set; then
1950 withval="$with_python_config_dir"
1951 vi_cv_path_python_conf="${withval}"
1952fi
1953
1954
1955 echo $ac_n "checking Python's configuration directory""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00001956echo "configure:1957: checking Python's configuration directory" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00001957if eval "test \"`echo '$''{'vi_cv_path_python_conf'+set}'`\" = set"; then
1958 echo $ac_n "(cached) $ac_c" 1>&6
1959else
1960
1961 vi_cv_path_python_conf=
1962 for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
1963 for subdir in lib share; do
1964 d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
1965 if test -d "$d" && test -f "$d/config.c"; then
1966 vi_cv_path_python_conf="$d"
1967 fi
1968 done
1969 done
1970
1971fi
1972
1973echo "$ac_t""$vi_cv_path_python_conf" 1>&6
1974
1975 PYTHON_CONFDIR="${vi_cv_path_python_conf}"
1976
1977 if test "X$PYTHON_CONFDIR" = "X"; then
1978 echo "$ac_t""can't find it!" 1>&6
1979 else
1980
1981 if eval "test \"`echo '$''{'vi_cv_path_python_plibs'+set}'`\" = set"; then
1982 echo $ac_n "(cached) $ac_c" 1>&6
1983else
1984
1985 tmp_mkf="/tmp/Makefile-conf$$"
1986 cat ${PYTHON_CONFDIR}/Makefile - <<'eof' >${tmp_mkf}
1987__:
1988 @echo "python_MODLIBS='$(MODLIBS)'"
1989 @echo "python_LIBS='$(LIBS)'"
1990 @echo "python_SYSLIBS='$(SYSLIBS)'"
1991 @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
1992eof
1993 eval "`cd ${PYTHON_CONFDIR} && make -f ${tmp_mkf} __ | sed '/ directory /d'`"
1994 rm -f ${tmp_mkf}
1995 if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
1996 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
1997 vi_cv_path_python_plibs="-framework Python"
1998 else
1999 if test "${vi_cv_var_python_version}" = "1.4"; then
2000 vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
2001 else
2002 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
2003 fi
2004 vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_MODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
2005 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
2006 fi
2007
2008fi
2009
2010
2011 PYTHON_LIBS="${vi_cv_path_python_plibs}"
2012 if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
2013 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
2014 else
2015 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}"
2016 fi
2017 PYTHON_SRC="if_python.c"
2018 if test "x$MACOSX" = "xyes"; then
2019 PYTHON_OBJ="objects/if_python.o"
2020 else
2021 PYTHON_OBJ="objects/if_python.o objects/py_config.o"
2022 fi
2023 if test "${vi_cv_var_python_version}" = "1.4"; then
2024 PYTHON_OBJ="$PYTHON_OBJ objects/py_getpath.o"
2025 fi
2026 PYTHON_GETPATH_CFLAGS="-DPYTHONPATH='\"${vi_cv_path_pythonpath}\"' -DPREFIX='\"${vi_cv_path_python_pfx}\"' -DEXEC_PREFIX='\"${vi_cv_path_python_epfx}\"'"
2027
2028 echo $ac_n "checking if -pthread should be used""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002029echo "configure:2030: checking if -pthread should be used" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002030 threadsafe_flag=
2031 thread_lib=
2032 if test "x$MACOSX" != "xyes"; then
2033 test "$GCC" = yes && threadsafe_flag="-pthread"
2034 if test "`(uname) 2>/dev/null`" = FreeBSD; then
2035 threadsafe_flag="-D_THREAD_SAFE"
2036 thread_lib="-pthread"
2037 fi
2038 fi
2039 libs_save_old=$LIBS
2040 if test -n "$threadsafe_flag"; then
2041 cflags_save=$CFLAGS
2042 CFLAGS="$CFLAGS $threadsafe_flag"
2043 LIBS="$LIBS $thread_lib"
2044 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002045#line 2046 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002046#include "confdefs.h"
2047
2048int main() {
2049
2050; return 0; }
2051EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002052if { (eval echo configure:2053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002053 rm -rf conftest*
2054 echo "$ac_t""yes" 1>&6; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
2055else
2056 echo "configure: failed program was:" >&5
2057 cat conftest.$ac_ext >&5
2058 rm -rf conftest*
2059 echo "$ac_t""no" 1>&6; LIBS=$libs_save_old
2060
2061fi
2062rm -f conftest*
2063 CFLAGS=$cflags_save
2064 else
2065 echo "$ac_t""no" 1>&6
2066 fi
2067
2068 echo $ac_n "checking if compile and link flags for Python are sane""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002069echo "configure:2070: checking if compile and link flags for Python are sane" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002070 cflags_save=$CFLAGS
2071 libs_save=$LIBS
2072 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
2073 LIBS="$LIBS $PYTHON_LIBS"
2074 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002075#line 2076 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002076#include "confdefs.h"
2077
2078int main() {
2079
2080; return 0; }
2081EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002082if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002083 rm -rf conftest*
2084 echo "$ac_t""yes" 1>&6; python_ok=yes
2085else
2086 echo "configure: failed program was:" >&5
2087 cat conftest.$ac_ext >&5
2088 rm -rf conftest*
2089 echo "$ac_t""no: PYTHON DISABLED" 1>&6; python_ok=no
2090fi
2091rm -f conftest*
2092 CFLAGS=$cflags_save
2093 LIBS=$libs_save
2094 if test $python_ok = yes; then
2095 cat >> confdefs.h <<\EOF
2096#define FEAT_PYTHON 1
2097EOF
2098
2099 else
2100 LIBS=$libs_save_old
2101 PYTHON_SRC=
2102 PYTHON_OBJ=
2103 PYTHON_LIBS=
2104 PYTHON_CFLAGS=
2105 fi
2106
2107 fi
2108 else
2109 echo "$ac_t""too old" 1>&6
2110 fi
2111 fi
2112fi
2113
2114
2115
2116
2117
2118
2119
2120echo $ac_n "checking --enable-tclinterp argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002121echo "configure:2122: checking --enable-tclinterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002122# Check whether --enable-tclinterp or --disable-tclinterp was given.
2123if test "${enable_tclinterp+set}" = set; then
2124 enableval="$enable_tclinterp"
2125 :
2126else
2127 enable_tclinterp="no"
2128fi
2129
2130echo "$ac_t""$enable_tclinterp" 1>&6
2131
2132if test "$enable_tclinterp" = "yes"; then
2133
2134 echo $ac_n "checking --with-tclsh argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002135echo "configure:2136: checking --with-tclsh argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002136 # Check whether --with-tclsh or --without-tclsh was given.
2137if test "${with_tclsh+set}" = set; then
2138 withval="$with_tclsh"
2139 tclsh_name="$withval"; echo "$ac_t""$tclsh_name" 1>&6
2140else
2141 tclsh_name="tclsh8.0"; echo "$ac_t""no" 1>&6
2142fi
2143
2144 # Extract the first word of "$tclsh_name", so it can be a program name with args.
2145set dummy $tclsh_name; ac_word=$2
2146echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002147echo "configure:2148: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002148if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
2149 echo $ac_n "(cached) $ac_c" 1>&6
2150else
2151 case "$vi_cv_path_tcl" in
2152 /*)
2153 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
2154 ;;
2155 ?:/*)
2156 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
2157 ;;
2158 *)
2159 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2160 ac_dummy="$PATH"
2161 for ac_dir in $ac_dummy; do
2162 test -z "$ac_dir" && ac_dir=.
2163 if test -f $ac_dir/$ac_word; then
2164 ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
2165 break
2166 fi
2167 done
2168 IFS="$ac_save_ifs"
2169 ;;
2170esac
2171fi
2172vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
2173if test -n "$vi_cv_path_tcl"; then
2174 echo "$ac_t""$vi_cv_path_tcl" 1>&6
2175else
2176 echo "$ac_t""no" 1>&6
2177fi
2178
2179
2180
2181 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.0"; then
2182 tclsh_name="tclsh8.2"
2183 # Extract the first word of "$tclsh_name", so it can be a program name with args.
2184set dummy $tclsh_name; ac_word=$2
2185echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002186echo "configure:2187: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002187if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
2188 echo $ac_n "(cached) $ac_c" 1>&6
2189else
2190 case "$vi_cv_path_tcl" in
2191 /*)
2192 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
2193 ;;
2194 ?:/*)
2195 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
2196 ;;
2197 *)
2198 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2199 ac_dummy="$PATH"
2200 for ac_dir in $ac_dummy; do
2201 test -z "$ac_dir" && ac_dir=.
2202 if test -f $ac_dir/$ac_word; then
2203 ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
2204 break
2205 fi
2206 done
2207 IFS="$ac_save_ifs"
2208 ;;
2209esac
2210fi
2211vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
2212if test -n "$vi_cv_path_tcl"; then
2213 echo "$ac_t""$vi_cv_path_tcl" 1>&6
2214else
2215 echo "$ac_t""no" 1>&6
2216fi
2217
2218 fi
2219 if test "X$vi_cv_path_tcl" = "X"; then
2220 tclsh_name="tclsh"
2221 # Extract the first word of "$tclsh_name", so it can be a program name with args.
2222set dummy $tclsh_name; ac_word=$2
2223echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002224echo "configure:2225: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002225if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_tcl'+set}'`\" = set"; then
2226 echo $ac_n "(cached) $ac_c" 1>&6
2227else
2228 case "$vi_cv_path_tcl" in
2229 /*)
2230 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
2231 ;;
2232 ?:/*)
2233 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a dos path.
2234 ;;
2235 *)
2236 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2237 ac_dummy="$PATH"
2238 for ac_dir in $ac_dummy; do
2239 test -z "$ac_dir" && ac_dir=.
2240 if test -f $ac_dir/$ac_word; then
2241 ac_cv_path_vi_cv_path_tcl="$ac_dir/$ac_word"
2242 break
2243 fi
2244 done
2245 IFS="$ac_save_ifs"
2246 ;;
2247esac
2248fi
2249vi_cv_path_tcl="$ac_cv_path_vi_cv_path_tcl"
2250if test -n "$vi_cv_path_tcl"; then
2251 echo "$ac_t""$vi_cv_path_tcl" 1>&6
2252else
2253 echo "$ac_t""no" 1>&6
2254fi
2255
2256 fi
2257 if test "X$vi_cv_path_tcl" != "X"; then
2258 echo $ac_n "checking Tcl version""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002259echo "configure:2260: checking Tcl version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002260 if echo 'exit [expr [info tclversion] < 8.0]' | $vi_cv_path_tcl - ; then
2261 tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
2262 echo "$ac_t""$tclver - OK" 1>&6;
2263 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 -`
2264
2265 echo $ac_n "checking for location of Tcl include""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002266echo "configure:2267: checking for location of Tcl include" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002267 if test "x$MACOSX" != "xyes"; then
2268 tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include"
2269 else
2270 tclinc="/System/Library/Frameworks/Tcl.framework/Headers"
2271 fi
2272 for try in $tclinc; do
2273 if test -f "$try/tcl.h"; then
2274 echo "$ac_t""$try/tcl.h" 1>&6
2275 TCL_INC=$try
2276 break
2277 fi
2278 done
2279 if test -z "$TCL_INC"; then
2280 echo "$ac_t""<not found>" 1>&6
2281 SKIP_TCL=YES
2282 fi
2283 if test -z "$SKIP_TCL"; then
2284 echo $ac_n "checking for location of tclConfig.sh script""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002285echo "configure:2286: checking for location of tclConfig.sh script" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002286 if test "x$MACOSX" != "xyes"; then
2287 tclcnf=`echo $tclinc | sed s/include/lib/g`
2288 else
2289 tclcnf="/System/Library/Frameworks/Tcl.framework"
2290 fi
2291 for try in $tclcnf; do
2292 if test -f $try/tclConfig.sh; then
2293 echo "$ac_t""$try/tclConfig.sh" 1>&6
2294 . $try/tclConfig.sh
2295 TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
2296 TCL_DEFS=`echo $TCL_DEFS | tr ' ' '\012' | sed -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr -d '\012'`
2297 break
2298 fi
2299 done
2300 if test -z "$TCL_LIBS"; then
2301 echo "$ac_t""<not found>" 1>&6
2302 echo $ac_n "checking for Tcl library by myself""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002303echo "configure:2304: checking for Tcl library by myself" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002304 tcllib=`echo $tclinc | sed s/include/lib/g`
2305 for ext in .so .a ; do
2306 for ver in "" $tclver ; do
2307 for try in $tcllib ; do
2308 trylib=tcl$ver$ext
2309 if test -f $try/lib$trylib ; then
2310 echo "$ac_t""$try/lib$trylib" 1>&6
2311 TCL_LIBS="-L$try -ltcl$ver -ldl -lm"
2312 if test "`(uname) 2>/dev/null`" = SunOS &&
2313 uname -r | grep '^5' >/dev/null; then
2314 TCL_LIBS="$TCL_LIBS -R $try"
2315 fi
2316 break 3
2317 fi
2318 done
2319 done
2320 done
2321 if test -z "$TCL_LIBS"; then
2322 echo "$ac_t""<not found>" 1>&6
2323 SKIP_TCL=YES
2324 fi
2325 fi
2326 if test -z "$SKIP_TCL"; then
2327 cat >> confdefs.h <<\EOF
2328#define FEAT_TCL 1
2329EOF
2330
2331 TCL_SRC=if_tcl.c
2332 TCL_OBJ=objects/if_tcl.o
2333 TCL_PRO=if_tcl.pro
2334 TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
2335 fi
2336 fi
2337 else
2338 echo "$ac_t""too old; need Tcl version 8.0 or later" 1>&6
2339 fi
2340 fi
2341fi
2342
2343
2344
2345
2346
2347
2348echo $ac_n "checking --enable-rubyinterp argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002349echo "configure:2350: checking --enable-rubyinterp argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002350# Check whether --enable-rubyinterp or --disable-rubyinterp was given.
2351if test "${enable_rubyinterp+set}" = set; then
2352 enableval="$enable_rubyinterp"
2353 :
2354else
2355 enable_rubyinterp="no"
2356fi
2357
2358echo "$ac_t""$enable_rubyinterp" 1>&6
2359if test "$enable_rubyinterp" = "yes"; then
2360
2361 # Extract the first word of "ruby", so it can be a program name with args.
2362set dummy ruby; ac_word=$2
2363echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002364echo "configure:2365: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002365if eval "test \"`echo '$''{'ac_cv_path_vi_cv_path_ruby'+set}'`\" = set"; then
2366 echo $ac_n "(cached) $ac_c" 1>&6
2367else
2368 case "$vi_cv_path_ruby" in
2369 /*)
2370 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
2371 ;;
2372 ?:/*)
2373 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a dos path.
2374 ;;
2375 *)
2376 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2377 ac_dummy="$PATH"
2378 for ac_dir in $ac_dummy; do
2379 test -z "$ac_dir" && ac_dir=.
2380 if test -f $ac_dir/$ac_word; then
2381 ac_cv_path_vi_cv_path_ruby="$ac_dir/$ac_word"
2382 break
2383 fi
2384 done
2385 IFS="$ac_save_ifs"
2386 ;;
2387esac
2388fi
2389vi_cv_path_ruby="$ac_cv_path_vi_cv_path_ruby"
2390if test -n "$vi_cv_path_ruby"; then
2391 echo "$ac_t""$vi_cv_path_ruby" 1>&6
2392else
2393 echo "$ac_t""no" 1>&6
2394fi
2395
2396 if test "X$vi_cv_path_ruby" != "X"; then
2397 echo $ac_n "checking Ruby version""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002398echo "configure:2399: checking Ruby version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002399 if $vi_cv_path_ruby -e 'VERSION >= "1.6.0" or exit 1' >/dev/null 2>/dev/null; then
2400 echo "$ac_t""OK" 1>&6
2401 echo $ac_n "checking Ruby header files""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002402echo "configure:2403: checking Ruby header files" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002403 rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e 'print Config::CONFIG["archdir"] || $hdrdir' 2>/dev/null`
2404 if test "X$rubyhdrdir" != "X"; then
2405 echo "$ac_t""$rubyhdrdir" 1>&6
2406 RUBY_CFLAGS="-I$rubyhdrdir"
2407 rubylibs=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LIBS"]'`
2408 if test "X$rubylibs" != "X"; then
2409 RUBY_LIBS="$rubylibs"
2410 fi
2411 librubyarg=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["LIBRUBYARG"])'`
2412 if test -f "$rubyhdrdir/$librubyarg"; then
2413 librubyarg="$rubyhdrdir/$librubyarg"
2414 else
2415 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'`
2416 if test -f "$rubylibdir/$librubyarg"; then
2417 librubyarg="$rubylibdir/$librubyarg"
2418 elif test "$librubyarg" = "libruby.a"; then
2419 librubyarg="-lruby"
2420 else
2421 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print '$librubyarg'.gsub(/-L\./, %'-L#{Config.expand(Config::CONFIG[\"libdir\"])}')"`
2422 fi
2423 fi
2424
2425 if test "X$librubyarg" != "X"; then
2426 RUBY_LIBS="$librubyarg $RUBY_LIBS"
2427 fi
2428 rubyldflags=`$vi_cv_path_ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'`
2429 if test "X$rubyldflags" != "X"; then
2430 LDFLAGS="$rubyldflags $LDFLAGS"
2431 fi
2432 RUBY_SRC="if_ruby.c"
2433 RUBY_OBJ="objects/if_ruby.o"
2434 RUBY_PRO="if_ruby.pro"
2435 cat >> confdefs.h <<\EOF
2436#define FEAT_RUBY 1
2437EOF
2438
2439 else
2440 echo "$ac_t""not found" 1>&6
2441 fi
2442 else
2443 echo "$ac_t""too old; need Ruby version 1.6.0 or later" 1>&6
2444 fi
2445 fi
2446fi
2447
2448
2449
2450
2451
2452
2453echo $ac_n "checking --enable-cscope argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002454echo "configure:2455: checking --enable-cscope argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002455# Check whether --enable-cscope or --disable-cscope was given.
2456if test "${enable_cscope+set}" = set; then
2457 enableval="$enable_cscope"
2458 :
2459else
2460 enable_cscope="no"
2461fi
2462
2463echo "$ac_t""$enable_cscope" 1>&6
2464if test "$enable_cscope" = "yes"; then
2465 cat >> confdefs.h <<\EOF
2466#define FEAT_CSCOPE 1
2467EOF
2468
2469fi
2470
2471echo $ac_n "checking --enable-workshop argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002472echo "configure:2473: checking --enable-workshop argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002473# Check whether --enable-workshop or --disable-workshop was given.
2474if test "${enable_workshop+set}" = set; then
2475 enableval="$enable_workshop"
2476 :
2477else
2478 enable_workshop="no"
2479fi
2480
2481echo "$ac_t""$enable_workshop" 1>&6
2482if test "$enable_workshop" = "yes"; then
2483 cat >> confdefs.h <<\EOF
2484#define FEAT_SUN_WORKSHOP 1
2485EOF
2486
2487 WORKSHOP_SRC="workshop.c integration.c"
2488
2489 WORKSHOP_OBJ="objects/workshop.o objects/integration.o"
2490
2491 if test "${enable_gui-xxx}" = xxx; then
2492 enable_gui=motif
2493 fi
2494fi
2495
2496echo $ac_n "checking --disable-netbeans argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002497echo "configure:2498: checking --disable-netbeans argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002498# Check whether --enable-netbeans or --disable-netbeans was given.
2499if test "${enable_netbeans+set}" = set; then
2500 enableval="$enable_netbeans"
2501 :
2502else
2503 enable_netbeans="yes"
2504fi
2505
2506if test "$enable_netbeans" = "yes"; then
2507 echo "$ac_t""no" 1>&6
2508 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002509echo "configure:2510: checking for socket in -lsocket" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002510ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
2511if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2512 echo $ac_n "(cached) $ac_c" 1>&6
2513else
2514 ac_save_LIBS="$LIBS"
2515LIBS="-lsocket $LIBS"
2516cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002517#line 2518 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002518#include "confdefs.h"
2519/* Override any gcc2 internal prototype to avoid an error. */
2520/* We use char because int might match the return type of a gcc2
2521 builtin and then its argument prototype would still apply. */
2522char socket();
2523
2524int main() {
2525socket()
2526; return 0; }
2527EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002528if { (eval echo configure:2529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002529 rm -rf conftest*
2530 eval "ac_cv_lib_$ac_lib_var=yes"
2531else
2532 echo "configure: failed program was:" >&5
2533 cat conftest.$ac_ext >&5
2534 rm -rf conftest*
2535 eval "ac_cv_lib_$ac_lib_var=no"
2536fi
2537rm -f conftest*
2538LIBS="$ac_save_LIBS"
2539
2540fi
2541if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2542 echo "$ac_t""yes" 1>&6
2543 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2544 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2545 cat >> confdefs.h <<EOF
2546#define $ac_tr_lib 1
2547EOF
2548
2549 LIBS="-lsocket $LIBS"
2550
2551else
2552 echo "$ac_t""no" 1>&6
2553fi
2554
2555 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002556echo "configure:2557: checking for gethostbyname in -lnsl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002557ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2558if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2559 echo $ac_n "(cached) $ac_c" 1>&6
2560else
2561 ac_save_LIBS="$LIBS"
2562LIBS="-lnsl $LIBS"
2563cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002564#line 2565 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002565#include "confdefs.h"
2566/* Override any gcc2 internal prototype to avoid an error. */
2567/* We use char because int might match the return type of a gcc2
2568 builtin and then its argument prototype would still apply. */
2569char gethostbyname();
2570
2571int main() {
2572gethostbyname()
2573; return 0; }
2574EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002575if { (eval echo configure:2576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002576 rm -rf conftest*
2577 eval "ac_cv_lib_$ac_lib_var=yes"
2578else
2579 echo "configure: failed program was:" >&5
2580 cat conftest.$ac_ext >&5
2581 rm -rf conftest*
2582 eval "ac_cv_lib_$ac_lib_var=no"
2583fi
2584rm -f conftest*
2585LIBS="$ac_save_LIBS"
2586
2587fi
2588if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2589 echo "$ac_t""yes" 1>&6
2590 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2591 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2592 cat >> confdefs.h <<EOF
2593#define $ac_tr_lib 1
2594EOF
2595
2596 LIBS="-lnsl $LIBS"
2597
2598else
2599 echo "$ac_t""no" 1>&6
2600fi
2601
2602 echo $ac_n "checking whether compiling netbeans integration is possible""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002603echo "configure:2604: checking whether compiling netbeans integration is possible" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002604 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002605#line 2606 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002606#include "confdefs.h"
2607
2608#include <stdio.h>
2609#include <stdlib.h>
2610#include <stdarg.h>
2611#include <fcntl.h>
2612#include <netdb.h>
2613#include <netinet/in.h>
2614#include <errno.h>
2615#include <sys/types.h>
2616#include <sys/socket.h>
2617 /* Check bitfields */
2618 struct nbbuf {
2619 unsigned int initDone:1;
2620 ushort signmaplen;
2621 };
2622
2623int main() {
2624
2625 /* Check creating a socket. */
2626 struct sockaddr_in server;
2627 (void)socket(AF_INET, SOCK_STREAM, 0);
2628 (void)htons(100);
2629 (void)gethostbyname("microsoft.com");
2630 if (errno == ECONNREFUSED)
2631 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
2632
2633; return 0; }
2634EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002635if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002636 rm -rf conftest*
2637 echo "$ac_t""yes" 1>&6
2638else
2639 echo "configure: failed program was:" >&5
2640 cat conftest.$ac_ext >&5
2641 rm -rf conftest*
2642 echo "$ac_t""no" 1>&6; enable_netbeans="no"
2643fi
2644rm -f conftest*
2645else
2646 echo "$ac_t""yes" 1>&6
2647fi
2648if test "$enable_netbeans" = "yes"; then
2649 cat >> confdefs.h <<\EOF
2650#define FEAT_NETBEANS_INTG 1
2651EOF
2652
2653 NETBEANS_SRC="netbeans.c"
2654
2655 NETBEANS_OBJ="objects/netbeans.o"
2656
2657fi
2658
2659echo $ac_n "checking --enable-sniff argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002660echo "configure:2661: checking --enable-sniff argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002661# Check whether --enable-sniff or --disable-sniff was given.
2662if test "${enable_sniff+set}" = set; then
2663 enableval="$enable_sniff"
2664 :
2665else
2666 enable_sniff="no"
2667fi
2668
2669echo "$ac_t""$enable_sniff" 1>&6
2670if test "$enable_sniff" = "yes"; then
2671 cat >> confdefs.h <<\EOF
2672#define FEAT_SNIFF 1
2673EOF
2674
2675 SNIFF_SRC="if_sniff.c"
2676
2677 SNIFF_OBJ="objects/if_sniff.o"
2678
2679fi
2680
2681echo $ac_n "checking --enable-multibyte argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002682echo "configure:2683: checking --enable-multibyte argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002683# Check whether --enable-multibyte or --disable-multibyte was given.
2684if test "${enable_multibyte+set}" = set; then
2685 enableval="$enable_multibyte"
2686 :
2687else
2688 enable_multibyte="no"
2689fi
2690
2691echo "$ac_t""$enable_multibyte" 1>&6
2692if test "$enable_multibyte" = "yes"; then
2693 cat >> confdefs.h <<\EOF
2694#define FEAT_MBYTE 1
2695EOF
2696
2697fi
2698
2699echo $ac_n "checking --enable-hangulinput argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002700echo "configure:2701: checking --enable-hangulinput argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002701# Check whether --enable-hangulinput or --disable-hangulinput was given.
2702if test "${enable_hangulinput+set}" = set; then
2703 enableval="$enable_hangulinput"
2704 :
2705else
2706 enable_hangulinput="no"
2707fi
2708
2709echo "$ac_t""$enable_hangulinput" 1>&6
2710
2711echo $ac_n "checking --enable-xim argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002712echo "configure:2713: checking --enable-xim argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002713# Check whether --enable-xim or --disable-xim was given.
2714if test "${enable_xim+set}" = set; then
2715 enableval="$enable_xim"
2716 echo "$ac_t""$enable_xim" 1>&6
2717else
2718 enable_xim="auto"; echo "$ac_t""defaulting to auto" 1>&6
2719fi
2720
2721
2722echo $ac_n "checking --enable-fontset argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002723echo "configure:2724: checking --enable-fontset argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002724# Check whether --enable-fontset or --disable-fontset was given.
2725if test "${enable_fontset+set}" = set; then
2726 enableval="$enable_fontset"
2727 :
2728else
2729 enable_fontset="no"
2730fi
2731
2732echo "$ac_t""$enable_fontset" 1>&6
2733
2734test -z "$with_x" && with_x=yes
2735test "${enable_gui-yes}" != no -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
2736if test "$with_x" = no; then
2737 echo "$ac_t""defaulting to: don't HAVE_X11" 1>&6
2738else
2739
2740 # Extract the first word of "xmkmf", so it can be a program name with args.
2741set dummy xmkmf; ac_word=$2
2742echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002743echo "configure:2744: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002744if eval "test \"`echo '$''{'ac_cv_path_xmkmfpath'+set}'`\" = set"; then
2745 echo $ac_n "(cached) $ac_c" 1>&6
2746else
2747 case "$xmkmfpath" in
2748 /*)
2749 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
2750 ;;
2751 ?:/*)
2752 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a dos path.
2753 ;;
2754 *)
2755 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2756 ac_dummy="$PATH"
2757 for ac_dir in $ac_dummy; do
2758 test -z "$ac_dir" && ac_dir=.
2759 if test -f $ac_dir/$ac_word; then
2760 ac_cv_path_xmkmfpath="$ac_dir/$ac_word"
2761 break
2762 fi
2763 done
2764 IFS="$ac_save_ifs"
2765 ;;
2766esac
2767fi
2768xmkmfpath="$ac_cv_path_xmkmfpath"
2769if test -n "$xmkmfpath"; then
2770 echo "$ac_t""$xmkmfpath" 1>&6
2771else
2772 echo "$ac_t""no" 1>&6
2773fi
2774
2775
2776 # If we find X, set shell vars x_includes and x_libraries to the
2777# paths, otherwise set no_x=yes.
2778# Uses ac_ vars as temps to allow command line to override cache and checks.
2779# --without-x overrides everything else, but does not touch the cache.
2780echo $ac_n "checking for X""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002781echo "configure:2782: checking for X" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00002782
2783# Check whether --with-x or --without-x was given.
2784if test "${with_x+set}" = set; then
2785 withval="$with_x"
2786 :
2787fi
2788
2789# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
2790if test "x$with_x" = xno; then
2791 # The user explicitly disabled X.
2792 have_x=disabled
2793else
2794 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
2795 # Both variables are already set.
2796 have_x=yes
2797 else
2798if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
2799 echo $ac_n "(cached) $ac_c" 1>&6
2800else
2801 # One or both of the vars are not set, and there is no cached value.
2802ac_x_includes=NO ac_x_libraries=NO
2803rm -fr conftestdir
2804if mkdir conftestdir; then
2805 cd conftestdir
2806 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
2807 cat > Imakefile <<'EOF'
2808acfindx:
2809 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
2810EOF
2811 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
2812 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2813 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
2814 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
2815 for ac_extension in a so sl; do
2816 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
2817 test -f $ac_im_libdir/libX11.$ac_extension; then
2818 ac_im_usrlibdir=$ac_im_libdir; break
2819 fi
2820 done
2821 # Screen out bogus values from the imake configuration. They are
2822 # bogus both because they are the default anyway, and because
2823 # using them would break gcc on systems where it needs fixed includes.
2824 case "$ac_im_incroot" in
2825 /usr/include) ;;
2826 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
2827 esac
2828 case "$ac_im_usrlibdir" in
2829 /usr/lib | /lib) ;;
2830 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
2831 esac
2832 fi
2833 cd ..
2834 rm -fr conftestdir
2835fi
2836
2837if test "$ac_x_includes" = NO; then
2838 # Guess where to find include files, by looking for this one X11 .h file.
2839 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
2840
2841 # First, try using that file with no special directory specified.
2842cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002843#line 2844 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002844#include "confdefs.h"
2845#include <$x_direct_test_include>
2846EOF
2847ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002848{ (eval echo configure:2849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00002849ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2850if test -z "$ac_err"; then
2851 rm -rf conftest*
2852 # We can compile using X headers with no special include directory.
2853ac_x_includes=
2854else
2855 echo "$ac_err" >&5
2856 echo "configure: failed program was:" >&5
2857 cat conftest.$ac_ext >&5
2858 rm -rf conftest*
2859 # Look for the header file in a standard set of common directories.
2860# Check X11 before X11Rn because it is often a symlink to the current release.
2861 for ac_dir in \
2862 /usr/X11/include \
2863 /usr/X11R6/include \
2864 /usr/X11R5/include \
2865 /usr/X11R4/include \
2866 \
2867 /usr/include/X11 \
2868 /usr/include/X11R6 \
2869 /usr/include/X11R5 \
2870 /usr/include/X11R4 \
2871 \
2872 /usr/local/X11/include \
2873 /usr/local/X11R6/include \
2874 /usr/local/X11R5/include \
2875 /usr/local/X11R4/include \
2876 \
2877 /usr/local/include/X11 \
2878 /usr/local/include/X11R6 \
2879 /usr/local/include/X11R5 \
2880 /usr/local/include/X11R4 \
2881 \
2882 /usr/X386/include \
2883 /usr/x386/include \
2884 /usr/XFree86/include/X11 \
2885 \
2886 /usr/include \
2887 /usr/local/include \
2888 /usr/unsupported/include \
2889 /usr/athena/include \
2890 /usr/local/x11r5/include \
2891 /usr/lpp/Xamples/include \
2892 \
2893 /usr/openwin/include \
2894 /usr/openwin/share/include \
2895 ; \
2896 do
2897 if test -r "$ac_dir/$x_direct_test_include"; then
2898 ac_x_includes=$ac_dir
2899 break
2900 fi
2901 done
2902fi
2903rm -f conftest*
2904fi # $ac_x_includes = NO
2905
2906if test "$ac_x_libraries" = NO; then
2907 # Check for the libraries.
2908
2909 test -z "$x_direct_test_library" && x_direct_test_library=Xt
2910 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
2911
2912 # See if we find them without any special options.
2913 # Don't add to $LIBS permanently.
2914 ac_save_LIBS="$LIBS"
2915 LIBS="-l$x_direct_test_library $LIBS"
2916cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002917#line 2918 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002918#include "confdefs.h"
2919
2920int main() {
2921${x_direct_test_function}()
2922; return 0; }
2923EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00002924if { (eval echo configure:2925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00002925 rm -rf conftest*
2926 LIBS="$ac_save_LIBS"
2927# We can link X programs with no special library path.
2928ac_x_libraries=
2929else
2930 echo "configure: failed program was:" >&5
2931 cat conftest.$ac_ext >&5
2932 rm -rf conftest*
2933 LIBS="$ac_save_LIBS"
2934# First see if replacing the include by lib works.
2935# Check X11 before X11Rn because it is often a symlink to the current release.
2936for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
2937 /usr/X11/lib \
2938 /usr/X11R6/lib \
2939 /usr/X11R5/lib \
2940 /usr/X11R4/lib \
2941 \
2942 /usr/lib/X11 \
2943 /usr/lib/X11R6 \
2944 /usr/lib/X11R5 \
2945 /usr/lib/X11R4 \
2946 \
2947 /usr/local/X11/lib \
2948 /usr/local/X11R6/lib \
2949 /usr/local/X11R5/lib \
2950 /usr/local/X11R4/lib \
2951 \
2952 /usr/local/lib/X11 \
2953 /usr/local/lib/X11R6 \
2954 /usr/local/lib/X11R5 \
2955 /usr/local/lib/X11R4 \
2956 \
2957 /usr/X386/lib \
2958 /usr/x386/lib \
2959 /usr/XFree86/lib/X11 \
2960 \
2961 /usr/lib \
2962 /usr/local/lib \
2963 /usr/unsupported/lib \
2964 /usr/athena/lib \
2965 /usr/local/x11r5/lib \
2966 /usr/lpp/Xamples/lib \
2967 /lib/usr/lib/X11 \
2968 \
2969 /usr/openwin/lib \
2970 /usr/openwin/share/lib \
2971 ; \
2972do
2973 for ac_extension in a so sl; do
2974 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
2975 ac_x_libraries=$ac_dir
2976 break 2
2977 fi
2978 done
2979done
2980fi
2981rm -f conftest*
2982fi # $ac_x_libraries = NO
2983
2984if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
2985 # Didn't find X anywhere. Cache the known absence of X.
2986 ac_cv_have_x="have_x=no"
2987else
2988 # Record where we found X for the cache.
2989 ac_cv_have_x="have_x=yes \
2990 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
2991fi
2992fi
2993 fi
2994 eval "$ac_cv_have_x"
2995fi # $with_x != no
2996
2997if test "$have_x" != yes; then
2998 echo "$ac_t""$have_x" 1>&6
2999 no_x=yes
3000else
3001 # If each of the values was on the command line, it overrides each guess.
3002 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3003 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3004 # Update the cache value to reflect the command line values.
3005 ac_cv_have_x="have_x=yes \
3006 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3007 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3008fi
3009
3010if test "$no_x" = yes; then
3011 # Not all programs may use this symbol, but it does not hurt to define it.
3012 cat >> confdefs.h <<\EOF
3013#define X_DISPLAY_MISSING 1
3014EOF
3015
3016 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
3017else
3018 if test -n "$x_includes"; then
3019 X_CFLAGS="$X_CFLAGS -I$x_includes"
3020 fi
3021
3022 # It would also be nice to do this for all -L options, not just this one.
3023 if test -n "$x_libraries"; then
3024 X_LIBS="$X_LIBS -L$x_libraries"
3025 # For Solaris; some versions of Sun CC require a space after -R and
3026 # others require no space. Words are not sufficient . . . .
3027 case "`(uname -sr) 2>/dev/null`" in
3028 "SunOS 5"*)
3029 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003030echo "configure:3031: checking whether -R must be followed by a space" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003031 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
3032 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003033#line 3034 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003034#include "confdefs.h"
3035
3036int main() {
3037
3038; return 0; }
3039EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003040if { (eval echo configure:3041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003041 rm -rf conftest*
3042 ac_R_nospace=yes
3043else
3044 echo "configure: failed program was:" >&5
3045 cat conftest.$ac_ext >&5
3046 rm -rf conftest*
3047 ac_R_nospace=no
3048fi
3049rm -f conftest*
3050 if test $ac_R_nospace = yes; then
3051 echo "$ac_t""no" 1>&6
3052 X_LIBS="$X_LIBS -R$x_libraries"
3053 else
3054 LIBS="$ac_xsave_LIBS -R $x_libraries"
3055 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003056#line 3057 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003057#include "confdefs.h"
3058
3059int main() {
3060
3061; return 0; }
3062EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003063if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003064 rm -rf conftest*
3065 ac_R_space=yes
3066else
3067 echo "configure: failed program was:" >&5
3068 cat conftest.$ac_ext >&5
3069 rm -rf conftest*
3070 ac_R_space=no
3071fi
3072rm -f conftest*
3073 if test $ac_R_space = yes; then
3074 echo "$ac_t""yes" 1>&6
3075 X_LIBS="$X_LIBS -R $x_libraries"
3076 else
3077 echo "$ac_t""neither works" 1>&6
3078 fi
3079 fi
3080 LIBS="$ac_xsave_LIBS"
3081 esac
3082 fi
3083
3084 # Check for system-dependent libraries X programs must link with.
3085 # Do this before checking for the system-independent R6 libraries
3086 # (-lICE), since we may need -lsocket or whatever for X linking.
3087
3088 if test "$ISC" = yes; then
3089 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
3090 else
3091 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
3092 # libraries were built with DECnet support. And karl@cs.umb.edu says
3093 # the Alpha needs dnet_stub (dnet does not exist).
3094 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003095echo "configure:3096: checking for dnet_ntoa in -ldnet" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003096ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3097if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3098 echo $ac_n "(cached) $ac_c" 1>&6
3099else
3100 ac_save_LIBS="$LIBS"
3101LIBS="-ldnet $LIBS"
3102cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003103#line 3104 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003104#include "confdefs.h"
3105/* Override any gcc2 internal prototype to avoid an error. */
3106/* We use char because int might match the return type of a gcc2
3107 builtin and then its argument prototype would still apply. */
3108char dnet_ntoa();
3109
3110int main() {
3111dnet_ntoa()
3112; return 0; }
3113EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003114if { (eval echo configure:3115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003115 rm -rf conftest*
3116 eval "ac_cv_lib_$ac_lib_var=yes"
3117else
3118 echo "configure: failed program was:" >&5
3119 cat conftest.$ac_ext >&5
3120 rm -rf conftest*
3121 eval "ac_cv_lib_$ac_lib_var=no"
3122fi
3123rm -f conftest*
3124LIBS="$ac_save_LIBS"
3125
3126fi
3127if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3128 echo "$ac_t""yes" 1>&6
3129 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
3130else
3131 echo "$ac_t""no" 1>&6
3132fi
3133
3134 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
3135 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003136echo "configure:3137: checking for dnet_ntoa in -ldnet_stub" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003137ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3138if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3139 echo $ac_n "(cached) $ac_c" 1>&6
3140else
3141 ac_save_LIBS="$LIBS"
3142LIBS="-ldnet_stub $LIBS"
3143cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003144#line 3145 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003145#include "confdefs.h"
3146/* Override any gcc2 internal prototype to avoid an error. */
3147/* We use char because int might match the return type of a gcc2
3148 builtin and then its argument prototype would still apply. */
3149char dnet_ntoa();
3150
3151int main() {
3152dnet_ntoa()
3153; return 0; }
3154EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003155if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003156 rm -rf conftest*
3157 eval "ac_cv_lib_$ac_lib_var=yes"
3158else
3159 echo "configure: failed program was:" >&5
3160 cat conftest.$ac_ext >&5
3161 rm -rf conftest*
3162 eval "ac_cv_lib_$ac_lib_var=no"
3163fi
3164rm -f conftest*
3165LIBS="$ac_save_LIBS"
3166
3167fi
3168if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3169 echo "$ac_t""yes" 1>&6
3170 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
3171else
3172 echo "$ac_t""no" 1>&6
3173fi
3174
3175 fi
3176
3177 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
3178 # to get the SysV transport functions.
3179 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
3180 # needs -lnsl.
3181 # The nsl library prevents programs from opening the X display
3182 # on Irix 5.2, according to dickey@clark.net.
3183 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003184echo "configure:3185: checking for gethostbyname" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003185if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3186 echo $ac_n "(cached) $ac_c" 1>&6
3187else
3188 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003189#line 3190 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003190#include "confdefs.h"
3191/* System header to define __stub macros and hopefully few prototypes,
3192 which can conflict with char gethostbyname(); below. */
3193#include <assert.h>
3194/* Override any gcc2 internal prototype to avoid an error. */
3195/* We use char because int might match the return type of a gcc2
3196 builtin and then its argument prototype would still apply. */
3197char gethostbyname();
3198
3199int main() {
3200
3201/* The GNU C library defines this for functions which it implements
3202 to always fail with ENOSYS. Some functions are actually named
3203 something starting with __ and the normal name is an alias. */
3204#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3205choke me
3206#else
3207gethostbyname();
3208#endif
3209
3210; return 0; }
3211EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003212if { (eval echo configure:3213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003213 rm -rf conftest*
3214 eval "ac_cv_func_gethostbyname=yes"
3215else
3216 echo "configure: failed program was:" >&5
3217 cat conftest.$ac_ext >&5
3218 rm -rf conftest*
3219 eval "ac_cv_func_gethostbyname=no"
3220fi
3221rm -f conftest*
3222fi
3223
3224if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3225 echo "$ac_t""yes" 1>&6
3226 :
3227else
3228 echo "$ac_t""no" 1>&6
3229fi
3230
3231 if test $ac_cv_func_gethostbyname = no; then
3232 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003233echo "configure:3234: checking for gethostbyname in -lnsl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003234ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3235if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3236 echo $ac_n "(cached) $ac_c" 1>&6
3237else
3238 ac_save_LIBS="$LIBS"
3239LIBS="-lnsl $LIBS"
3240cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003241#line 3242 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003242#include "confdefs.h"
3243/* Override any gcc2 internal prototype to avoid an error. */
3244/* We use char because int might match the return type of a gcc2
3245 builtin and then its argument prototype would still apply. */
3246char gethostbyname();
3247
3248int main() {
3249gethostbyname()
3250; return 0; }
3251EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003252if { (eval echo configure:3253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003253 rm -rf conftest*
3254 eval "ac_cv_lib_$ac_lib_var=yes"
3255else
3256 echo "configure: failed program was:" >&5
3257 cat conftest.$ac_ext >&5
3258 rm -rf conftest*
3259 eval "ac_cv_lib_$ac_lib_var=no"
3260fi
3261rm -f conftest*
3262LIBS="$ac_save_LIBS"
3263
3264fi
3265if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3266 echo "$ac_t""yes" 1>&6
3267 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
3268else
3269 echo "$ac_t""no" 1>&6
3270fi
3271
3272 fi
3273
3274 # lieder@skyler.mavd.honeywell.com says without -lsocket,
3275 # socket/setsockopt and other routines are undefined under SCO ODT
3276 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
3277 # on later versions), says simon@lia.di.epfl.ch: it contains
3278 # gethostby* variants that don't use the nameserver (or something).
3279 # -lsocket must be given before -lnsl if both are needed.
3280 # We assume that if connect needs -lnsl, so does gethostbyname.
3281 echo $ac_n "checking for connect""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003282echo "configure:3283: checking for connect" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003283if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3284 echo $ac_n "(cached) $ac_c" 1>&6
3285else
3286 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003287#line 3288 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003288#include "confdefs.h"
3289/* System header to define __stub macros and hopefully few prototypes,
3290 which can conflict with char connect(); below. */
3291#include <assert.h>
3292/* Override any gcc2 internal prototype to avoid an error. */
3293/* We use char because int might match the return type of a gcc2
3294 builtin and then its argument prototype would still apply. */
3295char connect();
3296
3297int main() {
3298
3299/* The GNU C library defines this for functions which it implements
3300 to always fail with ENOSYS. Some functions are actually named
3301 something starting with __ and the normal name is an alias. */
3302#if defined (__stub_connect) || defined (__stub___connect)
3303choke me
3304#else
3305connect();
3306#endif
3307
3308; return 0; }
3309EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003310if { (eval echo configure:3311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003311 rm -rf conftest*
3312 eval "ac_cv_func_connect=yes"
3313else
3314 echo "configure: failed program was:" >&5
3315 cat conftest.$ac_ext >&5
3316 rm -rf conftest*
3317 eval "ac_cv_func_connect=no"
3318fi
3319rm -f conftest*
3320fi
3321
3322if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3323 echo "$ac_t""yes" 1>&6
3324 :
3325else
3326 echo "$ac_t""no" 1>&6
3327fi
3328
3329 if test $ac_cv_func_connect = no; then
3330 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003331echo "configure:3332: checking for connect in -lsocket" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003332ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3333if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3334 echo $ac_n "(cached) $ac_c" 1>&6
3335else
3336 ac_save_LIBS="$LIBS"
3337LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
3338cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003339#line 3340 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003340#include "confdefs.h"
3341/* Override any gcc2 internal prototype to avoid an error. */
3342/* We use char because int might match the return type of a gcc2
3343 builtin and then its argument prototype would still apply. */
3344char connect();
3345
3346int main() {
3347connect()
3348; return 0; }
3349EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003350if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003351 rm -rf conftest*
3352 eval "ac_cv_lib_$ac_lib_var=yes"
3353else
3354 echo "configure: failed program was:" >&5
3355 cat conftest.$ac_ext >&5
3356 rm -rf conftest*
3357 eval "ac_cv_lib_$ac_lib_var=no"
3358fi
3359rm -f conftest*
3360LIBS="$ac_save_LIBS"
3361
3362fi
3363if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3364 echo "$ac_t""yes" 1>&6
3365 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3366else
3367 echo "$ac_t""no" 1>&6
3368fi
3369
3370 fi
3371
3372 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3373 echo $ac_n "checking for remove""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003374echo "configure:3375: checking for remove" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003375if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3376 echo $ac_n "(cached) $ac_c" 1>&6
3377else
3378 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003379#line 3380 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003380#include "confdefs.h"
3381/* System header to define __stub macros and hopefully few prototypes,
3382 which can conflict with char remove(); below. */
3383#include <assert.h>
3384/* Override any gcc2 internal prototype to avoid an error. */
3385/* We use char because int might match the return type of a gcc2
3386 builtin and then its argument prototype would still apply. */
3387char remove();
3388
3389int main() {
3390
3391/* The GNU C library defines this for functions which it implements
3392 to always fail with ENOSYS. Some functions are actually named
3393 something starting with __ and the normal name is an alias. */
3394#if defined (__stub_remove) || defined (__stub___remove)
3395choke me
3396#else
3397remove();
3398#endif
3399
3400; return 0; }
3401EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003402if { (eval echo configure:3403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003403 rm -rf conftest*
3404 eval "ac_cv_func_remove=yes"
3405else
3406 echo "configure: failed program was:" >&5
3407 cat conftest.$ac_ext >&5
3408 rm -rf conftest*
3409 eval "ac_cv_func_remove=no"
3410fi
3411rm -f conftest*
3412fi
3413
3414if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3415 echo "$ac_t""yes" 1>&6
3416 :
3417else
3418 echo "$ac_t""no" 1>&6
3419fi
3420
3421 if test $ac_cv_func_remove = no; then
3422 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003423echo "configure:3424: checking for remove in -lposix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003424ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3425if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3426 echo $ac_n "(cached) $ac_c" 1>&6
3427else
3428 ac_save_LIBS="$LIBS"
3429LIBS="-lposix $LIBS"
3430cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003431#line 3432 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003432#include "confdefs.h"
3433/* Override any gcc2 internal prototype to avoid an error. */
3434/* We use char because int might match the return type of a gcc2
3435 builtin and then its argument prototype would still apply. */
3436char remove();
3437
3438int main() {
3439remove()
3440; return 0; }
3441EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003442if { (eval echo configure:3443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003443 rm -rf conftest*
3444 eval "ac_cv_lib_$ac_lib_var=yes"
3445else
3446 echo "configure: failed program was:" >&5
3447 cat conftest.$ac_ext >&5
3448 rm -rf conftest*
3449 eval "ac_cv_lib_$ac_lib_var=no"
3450fi
3451rm -f conftest*
3452LIBS="$ac_save_LIBS"
3453
3454fi
3455if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3456 echo "$ac_t""yes" 1>&6
3457 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3458else
3459 echo "$ac_t""no" 1>&6
3460fi
3461
3462 fi
3463
3464 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3465 echo $ac_n "checking for shmat""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003466echo "configure:3467: checking for shmat" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003467if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3468 echo $ac_n "(cached) $ac_c" 1>&6
3469else
3470 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003471#line 3472 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003472#include "confdefs.h"
3473/* System header to define __stub macros and hopefully few prototypes,
3474 which can conflict with char shmat(); below. */
3475#include <assert.h>
3476/* Override any gcc2 internal prototype to avoid an error. */
3477/* We use char because int might match the return type of a gcc2
3478 builtin and then its argument prototype would still apply. */
3479char shmat();
3480
3481int main() {
3482
3483/* The GNU C library defines this for functions which it implements
3484 to always fail with ENOSYS. Some functions are actually named
3485 something starting with __ and the normal name is an alias. */
3486#if defined (__stub_shmat) || defined (__stub___shmat)
3487choke me
3488#else
3489shmat();
3490#endif
3491
3492; return 0; }
3493EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003494if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003495 rm -rf conftest*
3496 eval "ac_cv_func_shmat=yes"
3497else
3498 echo "configure: failed program was:" >&5
3499 cat conftest.$ac_ext >&5
3500 rm -rf conftest*
3501 eval "ac_cv_func_shmat=no"
3502fi
3503rm -f conftest*
3504fi
3505
3506if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3507 echo "$ac_t""yes" 1>&6
3508 :
3509else
3510 echo "$ac_t""no" 1>&6
3511fi
3512
3513 if test $ac_cv_func_shmat = no; then
3514 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003515echo "configure:3516: checking for shmat in -lipc" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003516ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3517if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3518 echo $ac_n "(cached) $ac_c" 1>&6
3519else
3520 ac_save_LIBS="$LIBS"
3521LIBS="-lipc $LIBS"
3522cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003523#line 3524 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003524#include "confdefs.h"
3525/* Override any gcc2 internal prototype to avoid an error. */
3526/* We use char because int might match the return type of a gcc2
3527 builtin and then its argument prototype would still apply. */
3528char shmat();
3529
3530int main() {
3531shmat()
3532; return 0; }
3533EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003534if { (eval echo configure:3535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003535 rm -rf conftest*
3536 eval "ac_cv_lib_$ac_lib_var=yes"
3537else
3538 echo "configure: failed program was:" >&5
3539 cat conftest.$ac_ext >&5
3540 rm -rf conftest*
3541 eval "ac_cv_lib_$ac_lib_var=no"
3542fi
3543rm -f conftest*
3544LIBS="$ac_save_LIBS"
3545
3546fi
3547if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3548 echo "$ac_t""yes" 1>&6
3549 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
3550else
3551 echo "$ac_t""no" 1>&6
3552fi
3553
3554 fi
3555 fi
3556
3557 # Check for libraries that X11R6 Xt/Xaw programs need.
3558 ac_save_LDFLAGS="$LDFLAGS"
3559 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
3560 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
3561 # check for ICE first), but we must link in the order -lSM -lICE or
3562 # we get undefined symbols. So assume we have SM if we have ICE.
3563 # These have to be linked with before -lX11, unlike the other
3564 # libraries we check for below, so use a different variable.
3565 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
3566 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003567echo "configure:3568: checking for IceConnectionNumber in -lICE" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003568ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
3569if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3570 echo $ac_n "(cached) $ac_c" 1>&6
3571else
3572 ac_save_LIBS="$LIBS"
3573LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3574cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003575#line 3576 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003576#include "confdefs.h"
3577/* Override any gcc2 internal prototype to avoid an error. */
3578/* We use char because int might match the return type of a gcc2
3579 builtin and then its argument prototype would still apply. */
3580char IceConnectionNumber();
3581
3582int main() {
3583IceConnectionNumber()
3584; return 0; }
3585EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003586if { (eval echo configure:3587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003587 rm -rf conftest*
3588 eval "ac_cv_lib_$ac_lib_var=yes"
3589else
3590 echo "configure: failed program was:" >&5
3591 cat conftest.$ac_ext >&5
3592 rm -rf conftest*
3593 eval "ac_cv_lib_$ac_lib_var=no"
3594fi
3595rm -f conftest*
3596LIBS="$ac_save_LIBS"
3597
3598fi
3599if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3600 echo "$ac_t""yes" 1>&6
3601 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
3602else
3603 echo "$ac_t""no" 1>&6
3604fi
3605
3606 LDFLAGS="$ac_save_LDFLAGS"
3607
3608fi
3609
3610
3611 if test "$OS390Unix" = "yes"; then
3612 CFLAGS="$CFLAGS -W c,dll"
3613 LDFLAGS="$LDFLAGS -W l,dll"
3614 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
3615 fi
3616
3617
3618 if test -d "$x_includes" && test ! -d "$x_libraries"; then
3619 x_libraries=`echo "$x_includes" | sed s/include/lib/`
3620 echo "$ac_t""Corrected X libraries to $x_libraries" 1>&6
3621 X_LIBS="$X_LIBS -L$x_libraries"
3622 if test "`(uname) 2>/dev/null`" = SunOS &&
3623 uname -r | grep '^5' >/dev/null; then
3624 X_LIBS="$X_LIBS -R $x_libraries"
3625 fi
3626 fi
3627
3628 if test -d "$x_libraries" && test ! -d "$x_includes"; then
3629 x_includes=`echo "$x_libraries" | sed s/lib/include/`
3630 echo "$ac_t""Corrected X includes to $x_includes" 1>&6
3631 X_CFLAGS="$X_CFLAGS -I$x_includes"
3632 fi
3633
3634 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`"
3635 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`"
3636 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
3637
3638
3639 echo $ac_n "checking if X11 header files can be found""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003640echo "configure:3641: checking if X11 header files can be found" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003641 cflags_save=$CFLAGS
3642 CFLAGS="$CFLAGS $X_CFLAGS"
3643 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003644#line 3645 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003645#include "confdefs.h"
3646#include <X11/Xlib.h>
3647int main() {
3648
3649; return 0; }
3650EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003651if { (eval echo configure:3652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003652 rm -rf conftest*
3653 echo "$ac_t""yes" 1>&6
3654else
3655 echo "configure: failed program was:" >&5
3656 cat conftest.$ac_ext >&5
3657 rm -rf conftest*
3658 echo "$ac_t""no" 1>&6; no_x=yes
3659fi
3660rm -f conftest*
3661 CFLAGS=$cflags_save
3662
3663 if test "${no_x-no}" = yes; then
3664 with_x=no
3665 else
3666 cat >> confdefs.h <<\EOF
3667#define HAVE_X11 1
3668EOF
3669
3670 X_LIB="-lXt -lX11";
3671
3672
3673 ac_save_LDFLAGS="$LDFLAGS"
3674 LDFLAGS="-L$x_libraries $LDFLAGS"
3675
3676 echo $ac_n "checking for _XdmcpAuthDoIt in -lXdmcp""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003677echo "configure:3678: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003678ac_lib_var=`echo Xdmcp'_'_XdmcpAuthDoIt | sed 'y%./+-%__p_%'`
3679if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3680 echo $ac_n "(cached) $ac_c" 1>&6
3681else
3682 ac_save_LIBS="$LIBS"
3683LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
3684cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003685#line 3686 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003686#include "confdefs.h"
3687/* Override any gcc2 internal prototype to avoid an error. */
3688/* We use char because int might match the return type of a gcc2
3689 builtin and then its argument prototype would still apply. */
3690char _XdmcpAuthDoIt();
3691
3692int main() {
3693_XdmcpAuthDoIt()
3694; return 0; }
3695EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003696if { (eval echo configure:3697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003697 rm -rf conftest*
3698 eval "ac_cv_lib_$ac_lib_var=yes"
3699else
3700 echo "configure: failed program was:" >&5
3701 cat conftest.$ac_ext >&5
3702 rm -rf conftest*
3703 eval "ac_cv_lib_$ac_lib_var=no"
3704fi
3705rm -f conftest*
3706LIBS="$ac_save_LIBS"
3707
3708fi
3709if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3710 echo "$ac_t""yes" 1>&6
3711 X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
3712else
3713 echo "$ac_t""no" 1>&6
3714fi
3715
3716
3717 echo $ac_n "checking for IceOpenConnection in -lICE""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003718echo "configure:3719: checking for IceOpenConnection in -lICE" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003719ac_lib_var=`echo ICE'_'IceOpenConnection | sed 'y%./+-%__p_%'`
3720if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3721 echo $ac_n "(cached) $ac_c" 1>&6
3722else
3723 ac_save_LIBS="$LIBS"
3724LIBS="-lICE $X_EXTRA_LIBS $LIBS"
3725cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003726#line 3727 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003727#include "confdefs.h"
3728/* Override any gcc2 internal prototype to avoid an error. */
3729/* We use char because int might match the return type of a gcc2
3730 builtin and then its argument prototype would still apply. */
3731char IceOpenConnection();
3732
3733int main() {
3734IceOpenConnection()
3735; return 0; }
3736EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003737if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003738 rm -rf conftest*
3739 eval "ac_cv_lib_$ac_lib_var=yes"
3740else
3741 echo "configure: failed program was:" >&5
3742 cat conftest.$ac_ext >&5
3743 rm -rf conftest*
3744 eval "ac_cv_lib_$ac_lib_var=no"
3745fi
3746rm -f conftest*
3747LIBS="$ac_save_LIBS"
3748
3749fi
3750if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3751 echo "$ac_t""yes" 1>&6
3752 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
3753else
3754 echo "$ac_t""no" 1>&6
3755fi
3756
3757
3758 LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
3759 echo $ac_n "checking for XpmCreatePixmapFromData in -lXpm""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003760echo "configure:3761: checking for XpmCreatePixmapFromData in -lXpm" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003761ac_lib_var=`echo Xpm'_'XpmCreatePixmapFromData | sed 'y%./+-%__p_%'`
3762if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3763 echo $ac_n "(cached) $ac_c" 1>&6
3764else
3765 ac_save_LIBS="$LIBS"
3766LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
3767cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003768#line 3769 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003769#include "confdefs.h"
3770/* Override any gcc2 internal prototype to avoid an error. */
3771/* We use char because int might match the return type of a gcc2
3772 builtin and then its argument prototype would still apply. */
3773char XpmCreatePixmapFromData();
3774
3775int main() {
3776XpmCreatePixmapFromData()
3777; return 0; }
3778EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003779if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003780 rm -rf conftest*
3781 eval "ac_cv_lib_$ac_lib_var=yes"
3782else
3783 echo "configure: failed program was:" >&5
3784 cat conftest.$ac_ext >&5
3785 rm -rf conftest*
3786 eval "ac_cv_lib_$ac_lib_var=no"
3787fi
3788rm -f conftest*
3789LIBS="$ac_save_LIBS"
3790
3791fi
3792if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3793 echo "$ac_t""yes" 1>&6
3794 X_PRE_LIBS="$X_PRE_LIBS -lXpm"
3795else
3796 echo "$ac_t""no" 1>&6
3797fi
3798
3799
3800 echo $ac_n "checking if X11 header files implicitly declare return values""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003801echo "configure:3802: checking if X11 header files implicitly declare return values" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003802 cflags_save=$CFLAGS
3803 CFLAGS="$CFLAGS $X_CFLAGS -Werror"
3804 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003805#line 3806 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003806#include "confdefs.h"
3807#include <X11/Xlib.h>
3808int main() {
3809
3810; return 0; }
3811EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003812if { (eval echo configure:3813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003813 rm -rf conftest*
3814 echo "$ac_t""no" 1>&6
3815else
3816 echo "configure: failed program was:" >&5
3817 cat conftest.$ac_ext >&5
3818 rm -rf conftest*
3819 CFLAGS="$CFLAGS -Wno-implicit-int"
3820 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003821#line 3822 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00003822#include "confdefs.h"
3823#include <X11/Xlib.h>
3824int main() {
3825
3826; return 0; }
3827EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003828if { (eval echo configure:3829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00003829 rm -rf conftest*
3830 echo "$ac_t""yes" 1>&6; cflags_save="$cflags_save -Wno-implicit-int"
3831else
3832 echo "configure: failed program was:" >&5
3833 cat conftest.$ac_ext >&5
3834 rm -rf conftest*
3835 echo "$ac_t""test failed" 1>&6
3836
3837fi
3838rm -f conftest*
3839
3840fi
3841rm -f conftest*
3842 CFLAGS=$cflags_save
3843
3844 LDFLAGS="$ac_save_LDFLAGS"
3845
3846 fi
3847fi
3848
3849test "x$with_x" = xno -a "x$BEOS" != "xyes" -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
3850
3851echo $ac_n "checking --enable-gui argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003852echo "configure:3853: checking --enable-gui argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003853# Check whether --enable-gui or --disable-gui was given.
3854if test "${enable_gui+set}" = set; then
3855 enableval="$enable_gui"
3856 :
3857else
3858 enable_gui="auto"
3859fi
3860
3861
3862enable_gui_canon=`echo "_$enable_gui" | \
3863 sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
3864
3865SKIP_GTK=YES
3866SKIP_GTK2=YES
3867SKIP_GNOME=YES
Bram Moolenaar592e0a22004-07-03 16:05:59 +00003868SKIP_KDE=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00003869SKIP_MOTIF=YES
3870SKIP_ATHENA=YES
3871SKIP_NEXTAW=YES
3872SKIP_PHOTON=YES
3873SKIP_BEOS=YES
3874SKIP_CARBON=YES
3875GUITYPE=NONE
3876
3877if test "x$BEOS" = "xyes"; then
3878 SKIP_BEOS=
3879 case "$enable_gui_canon" in
3880 no) echo "$ac_t""no GUI support" 1>&6
3881 SKIP_BEOS=YES ;;
3882 yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
3883 auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
3884 beos) echo "$ac_t""BeOS GUI support" 1>&6 ;;
3885 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
3886 SKIP_BEOS=YES ;;
3887 esac
3888
3889elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
3890 SKIP_PHOTON=
3891 case "$enable_gui_canon" in
3892 no) echo "$ac_t""no GUI support" 1>&6
3893 SKIP_PHOTON=YES ;;
3894 yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
3895 auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
3896 photon) echo "$ac_t""Photon GUI support" 1>&6 ;;
3897 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
3898 SKIP_PHOTON=YES ;;
3899 esac
3900
3901elif test "x$MACOSX" = "xyes" -a "x$with_x" = "xno" ; then
3902 SKIP_CARBON=
3903 case "$enable_gui_canon" in
3904 no) echo "$ac_t""no GUI support" 1>&6
3905 SKIP_CARBON=YES ;;
3906 yes|"") echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
3907 auto) echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
3908 carbon) echo "$ac_t""Carbon GUI support" 1>&6 ;;
3909 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
3910 SKIP_CARBON=YES ;;
3911 esac
3912
3913else
3914
Bram Moolenaar071d4272004-06-13 20:20:40 +00003915 case "$enable_gui_canon" in
3916 no|none) echo "$ac_t""no GUI support" 1>&6 ;;
3917 yes|""|auto) echo "$ac_t""yes/auto - automatic GUI support" 1>&6
3918 SKIP_GTK=
3919 SKIP_GTK2=
3920 SKIP_GNOME=
3921 SKIP_MOTIF=
3922 SKIP_ATHENA=
3923 SKIP_NEXTAW=
3924 SKIP_CARBON=;;
Bram Moolenaar843ee412004-06-30 16:16:41 +00003925 kde|Kde|KDE) echo "$ac_t""KDE 2.x or 3.x GUI support" 1>&6
3926 SKIP_KDE=;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00003927 gtk) echo "$ac_t""GTK+ 1.x GUI support" 1>&6
3928 SKIP_GTK=;;
3929 gtk2) echo "$ac_t""GTK+ 2.x GUI support" 1>&6
3930 SKIP_GTK=
3931 SKIP_GTK2=;;
3932 gnome) echo "$ac_t""GNOME 1.x GUI support" 1>&6
3933 SKIP_GNOME=
3934 SKIP_GTK=;;
3935 gnome2) echo "$ac_t""GNOME 2.x GUI support" 1>&6
3936 SKIP_GNOME=
3937 SKIP_GTK=
3938 SKIP_GTK2=;;
3939 motif) echo "$ac_t""Motif GUI support" 1>&6
3940 SKIP_MOTIF=;;
3941 athena) echo "$ac_t""Athena GUI support" 1>&6
3942 SKIP_ATHENA=;;
3943 nextaw) echo "$ac_t""neXtaw GUI support" 1>&6
3944 SKIP_NEXTAW=;;
3945 *) echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;;
3946 esac
3947
3948fi
3949
Bram Moolenaar843ee412004-06-30 16:16:41 +00003950if test "x$SKIP_KDE" != "xYES" -a "$enable_gui_canon" != "kde"; then
3951 echo $ac_n "checking whether or not to look for KDE""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003952echo "configure:3953: checking whether or not to look for KDE" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00003953 # Check whether --enable-kde-check or --disable-kde-check was given.
3954if test "${enable_kde_check+set}" = set; then
3955 enableval="$enable_kde_check"
3956 :
3957else
3958 enable_kde_check="no"
3959fi
3960
3961 echo "$ac_t""$enable_kde_check" 1>&6;
3962 if test "x$enable_kde_check" = "xno"; then
3963 SKIP_KDE=YES
3964 fi
3965fi
3966
Bram Moolenaar071d4272004-06-13 20:20:40 +00003967if test "x$SKIP_GTK" != "xYES" -a "$enable_gui_canon" != "gtk" -a "$enable_gui_canon" != "gtk2"; then
3968 echo $ac_n "checking whether or not to look for GTK""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003969echo "configure:3970: checking whether or not to look for GTK" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003970 # Check whether --enable-gtk-check or --disable-gtk-check was given.
3971if test "${enable_gtk_check+set}" = set; then
3972 enableval="$enable_gtk_check"
3973 :
3974else
3975 enable_gtk_check="yes"
3976fi
3977
3978 echo "$ac_t""$enable_gtk_check" 1>&6
3979 if test "x$enable_gtk_check" = "xno"; then
3980 SKIP_GTK=YES
3981 SKIP_GNOME=YES
3982 fi
3983fi
3984
3985if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
3986 -a "$enable_gui_canon" != "gnome2"; then
3987 echo $ac_n "checking whether or not to look for GTK+ 2""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00003988echo "configure:3989: checking whether or not to look for GTK+ 2" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00003989 # Check whether --enable-gtk2-check or --disable-gtk2-check was given.
3990if test "${enable_gtk2_check+set}" = set; then
3991 enableval="$enable_gtk2_check"
3992 :
3993else
3994 enable_gtk2_check="yes"
3995fi
3996
3997 echo "$ac_t""$enable_gtk2_check" 1>&6
3998 if test "x$enable_gtk2_check" = "xno"; then
3999 SKIP_GTK2=YES
4000 fi
4001fi
4002
4003if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome" \
4004 -a "$enable_gui_canon" != "gnome2"; then
4005 echo $ac_n "checking whether or not to look for GNOME""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004006echo "configure:4007: checking whether or not to look for GNOME" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004007 # Check whether --enable-gnome-check or --disable-gnome-check was given.
4008if test "${enable_gnome_check+set}" = set; then
4009 enableval="$enable_gnome_check"
4010 :
4011else
4012 enable_gnome_check="no"
4013fi
4014
4015 echo "$ac_t""$enable_gnome_check" 1>&6
4016 if test "x$enable_gnome_check" = "xno"; then
4017 SKIP_GNOME=YES
4018 fi
4019fi
4020
4021if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
4022 echo $ac_n "checking whether or not to look for Motif""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004023echo "configure:4024: checking whether or not to look for Motif" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004024 # Check whether --enable-motif-check or --disable-motif-check was given.
4025if test "${enable_motif_check+set}" = set; then
4026 enableval="$enable_motif_check"
4027 :
4028else
4029 enable_motif_check="yes"
4030fi
4031
4032 echo "$ac_t""$enable_motif_check" 1>&6
4033 if test "x$enable_motif_check" = "xno"; then
4034 SKIP_MOTIF=YES
4035 fi
4036fi
4037
4038if test "x$SKIP_ATHENA" != "xYES" -a "$enable_gui_canon" != "athena"; then
4039 echo $ac_n "checking whether or not to look for Athena""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004040echo "configure:4041: checking whether or not to look for Athena" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004041 # Check whether --enable-athena-check or --disable-athena-check was given.
4042if test "${enable_athena_check+set}" = set; then
4043 enableval="$enable_athena_check"
4044 :
4045else
4046 enable_athena_check="yes"
4047fi
4048
4049 echo "$ac_t""$enable_athena_check" 1>&6
4050 if test "x$enable_athena_check" = "xno"; then
4051 SKIP_ATHENA=YES
4052 fi
4053fi
4054
4055if test "x$SKIP_NEXTAW" != "xYES" -a "$enable_gui_canon" != "nextaw"; then
4056 echo $ac_n "checking whether or not to look for neXtaw""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004057echo "configure:4058: checking whether or not to look for neXtaw" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004058 # Check whether --enable-nextaw-check or --disable-nextaw-check was given.
4059if test "${enable_nextaw_check+set}" = set; then
4060 enableval="$enable_nextaw_check"
4061 :
4062else
4063 enable_nextaw_check="yes"
4064fi
4065
4066 echo "$ac_t""$enable_nextaw_check" 1>&6;
4067 if test "x$enable_nextaw_check" = "xno"; then
4068 SKIP_NEXTAW=YES
4069 fi
4070fi
4071
4072if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
4073 echo $ac_n "checking whether or not to look for Carbon""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004074echo "configure:4075: checking whether or not to look for Carbon" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004075 # Check whether --enable-carbon-check or --disable-carbon-check was given.
4076if test "${enable_carbon_check+set}" = set; then
4077 enableval="$enable_carbon_check"
4078 :
4079else
4080 enable_carbon_check="yes"
4081fi
4082
4083 echo "$ac_t""$enable_carbon_check" 1>&6;
4084 if test "x$enable_carbon_check" = "xno"; then
4085 SKIP_CARBON=YES
4086 fi
4087fi
4088
Bram Moolenaar843ee412004-06-30 16:16:41 +00004089
4090if test -z "$SKIP_KDE"; then
4091# Check whether --with-qt-dir or --without-qt-dir was given.
4092if test "${with_qt_dir+set}" = set; then
4093 withval="$with_qt_dir"
4094
4095 ROOTQT="$withval"
4096 MOC="$withval"/bin/moc
4097 QT_INCLUDES="$withval"/include
4098 QT_LIBS="$withval"/lib
4099
4100fi
4101
4102
4103if test "x$ROOTQT" = "x"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004104 if test -z "$QTDIR"; then
4105 # Extract the first word of "moc", so it can be a program name with args.
Bram Moolenaar843ee412004-06-30 16:16:41 +00004106set dummy moc; ac_word=$2
4107echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004108echo "configure:4109: checking for $ac_word" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004109if eval "test \"`echo '$''{'ac_cv_path_MOC'+set}'`\" = set"; then
4110 echo $ac_n "(cached) $ac_c" 1>&6
4111else
4112 case "$MOC" in
4113 /*)
4114 ac_cv_path_MOC="$MOC" # Let the user override the test with a path.
4115 ;;
4116 ?:/*)
4117 ac_cv_path_MOC="$MOC" # Let the user override the test with a dos path.
4118 ;;
4119 *)
4120 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4121 ac_dummy="$PATH"
4122 for ac_dir in $ac_dummy; do
4123 test -z "$ac_dir" && ac_dir=.
4124 if test -f $ac_dir/$ac_word; then
4125 ac_cv_path_MOC="$ac_dir/$ac_word"
4126 break
4127 fi
4128 done
4129 IFS="$ac_save_ifs"
4130 test -z "$ac_cv_path_MOC" && ac_cv_path_MOC="no"
4131 ;;
4132esac
4133fi
4134MOC="$ac_cv_path_MOC"
4135if test -n "$MOC"; then
4136 echo "$ac_t""$MOC" 1>&6
4137else
4138 echo "$ac_t""no" 1>&6
4139fi
4140
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004141 if test "x$MOC" = "xno"; then
4142 { echo "configure: error: could not find Qt directory" 1>&2; exit 1; }
4143 else
4144 ROOTQT=`echo $MOC | sed 's+/bin/moc++'`
4145 fi
4146 else
4147 ROOTQT="$QTDIR"
4148 fi
Bram Moolenaar843ee412004-06-30 16:16:41 +00004149fi
4150MOC="$ROOTQT"/bin/moc
4151QT_INCLUDES="$ROOTQT"/include
4152QT_LIBS="$ROOTQT"/lib
4153
4154# Check whether --with-qt-includes or --without-qt-includes was given.
4155if test "${with_qt_includes+set}" = set; then
4156 withval="$with_qt_includes"
4157 QT_INCLUDES="$withval"
4158
4159fi
4160
4161
4162# Check whether --with-qt-libraries or --without-qt-libraries was given.
4163if test "${with_qt_libraries+set}" = set; then
4164 withval="$with_qt_libraries"
4165 QT_LIBS="$withval"
4166
4167fi
4168
4169
4170if test "x$QT_LIBS" = "x" ; then
4171 QT_LIBS="$ROOTQT"/lib
4172fi
4173if test "x$QT_INCLUDES" = "x" ; then
4174 QT_INCLUDES="$ROOTQT"/include
4175fi
4176
4177echo $ac_n "checking whether or not to use a KDE Toolbar in KVim""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004178echo "configure:4179: checking whether or not to use a KDE Toolbar in KVim" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004179# Check whether --enable-kde-toolbar or --disable-kde-toolbar was given.
4180if test "${enable_kde_toolbar+set}" = set; then
4181 enableval="$enable_kde_toolbar"
4182 :
4183else
4184 enable_kde_toolbar="no"
4185fi
4186
4187if test "x$enable_kde_toolbar" != "xno"; then
4188 cat >> confdefs.h <<\EOF
4189#define FEAT_KDETOOLBAR 1
4190EOF
4191
4192fi
4193echo "$ac_t""$enable_kde_toolbar" 1>&6;
4194fi
4195
4196
4197if test -z "$SKIP_KDE"; then
4198
4199
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004200
4201
Bram Moolenaar843ee412004-06-30 16:16:41 +00004202echo $ac_n "checking --disable-rpath argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004203echo "configure:4204: checking --disable-rpath argument" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004204# Check whether --enable-rpath or --disable-rpath was given.
4205if test "${enable_rpath+set}" = set; then
4206 enableval="$enable_rpath"
4207 :
4208else
4209 enable_rpath="yes"
4210fi
4211
4212if test "$enable_rpath" = "yes"; then
4213 echo "$ac_t""no" 1>&6
4214else
4215 echo "$ac_t""yes" 1>&6
4216fi
4217
4218echo $ac_n "checking --with-kde-prefix argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004219echo "configure:4220: checking --with-kde-prefix argument" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004220# Check whether --with-kde-prefix or --without-kde-prefix was given.
4221if test "${with_kde_prefix+set}" = set; then
4222 withval="$with_kde_prefix"
4223 kde_config_prefix="$withval";
4224echo "$ac_t""$kde_config_prefix" 1>&6
4225else
4226 kde_config_prefix="";echo "$ac_t""no" 1>&6
4227fi
4228
4229
4230# Check whether --with-kde-includes or --without-kde-includes was given.
4231if test "${with_kde_includes+set}" = set; then
4232 withval="$with_kde_includes"
4233 KDE_INCLUDES="$withval"
4234
4235fi
4236
4237
4238# Check whether --with-kde-libraries or --without-kde-libraries was given.
4239if test "${with_kde_libraries+set}" = set; then
4240 withval="$with_kde_libraries"
4241 KDE_LIBS="$withval"
4242
4243fi
4244
4245
4246echo $ac_n "checking --disable-kdetest argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004247echo "configure:4248: checking --disable-kdetest argument" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004248# Check whether --enable-kdetest or --disable-kdetest was given.
4249if test "${enable_kdetest+set}" = set; then
4250 enableval="$enable_kdetest"
4251 enable_kdetest=yes
4252fi
4253
4254
4255if test "x$enable_kdetest" = "xyes" ; then
4256 echo "$ac_t""kde test enabled" 1>&6
4257else
4258 echo "$ac_t""kde test disabled" 1>&6
4259fi
4260
4261if test "x$kde_config_prefix" != "x" ; then
Bram Moolenaar843ee412004-06-30 16:16:41 +00004262 KDE_CONFIG=$kde_config_prefix/bin/kde-config
4263fi
4264
4265if test "X$KDE_CONFIG" = "X"; then
4266 # Extract the first word of "kde-config", so it can be a program name with args.
4267set dummy kde-config; ac_word=$2
4268echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004269echo "configure:4270: checking for $ac_word" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004270if eval "test \"`echo '$''{'ac_cv_path_KDE_CONFIG'+set}'`\" = set"; then
4271 echo $ac_n "(cached) $ac_c" 1>&6
4272else
4273 case "$KDE_CONFIG" in
4274 /*)
4275 ac_cv_path_KDE_CONFIG="$KDE_CONFIG" # Let the user override the test with a path.
4276 ;;
4277 ?:/*)
4278 ac_cv_path_KDE_CONFIG="$KDE_CONFIG" # Let the user override the test with a dos path.
4279 ;;
4280 *)
4281 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4282 ac_dummy="$PATH"
4283 for ac_dir in $ac_dummy; do
4284 test -z "$ac_dir" && ac_dir=.
4285 if test -f $ac_dir/$ac_word; then
4286 ac_cv_path_KDE_CONFIG="$ac_dir/$ac_word"
4287 break
4288 fi
4289 done
4290 IFS="$ac_save_ifs"
4291 test -z "$ac_cv_path_KDE_CONFIG" && ac_cv_path_KDE_CONFIG="no"
4292 ;;
4293esac
4294fi
4295KDE_CONFIG="$ac_cv_path_KDE_CONFIG"
4296if test -n "$KDE_CONFIG"; then
4297 echo "$ac_t""$KDE_CONFIG" 1>&6
4298else
4299 echo "$ac_t""no" 1>&6
4300fi
4301
4302else
4303 echo "$ac_t""Using KDE configuration program $KDE_CONFIG" 1>&6
4304fi
4305
4306if test "X$KDE_CONFIG" != "X" ; then
4307
4308 if test "X$KDE_CONFIG" != "X"; then
4309 min_kde_version=2.0.0
4310 echo $ac_n "checking for KDE version >= $min_kde_version""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004311echo "configure:4312: checking for KDE version >= $min_kde_version" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004312 no_kde=""
4313 if test "$KDE_CONFIG" = "no" ; then
4314 no_kde=yes
4315 else
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004316 KDE_PREFIX=`$KDE_CONFIG --prefix`
Bram Moolenaar843ee412004-06-30 16:16:41 +00004317 if test "x$KDE_LIBS" = "x"; then
4318 KDE_LIBS="$KDE_PREFIX/lib"
4319 fi
4320 if test "x$KDE_INCLUDES" = "x"; then
Bram Moolenaar592e0a22004-07-03 16:05:59 +00004321 KDE_INCLUDES="$KDE_PREFIX/include"
4322 if test -d "$KDE_INCLUDES/kde"; then
4323 KDE_INCLUDES="$KDE_INCLUDES/kde"
4324 fi
Bram Moolenaar843ee412004-06-30 16:16:41 +00004325 fi
4326 kde_major_version=`$KDE_CONFIG --version | grep KDE | \
4327sed 's/KDE:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\1/'`
4328 kde_minor_version=`$KDE_CONFIG --version | grep KDE | \
4329sed 's/KDE:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\2/'`
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004330
Bram Moolenaar843ee412004-06-30 16:16:41 +00004331 qt_major_version=`$KDE_CONFIG --version | grep Qt | sed -e \
4332's/Qt:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\1/'`
4333 qt_minor_version=`$KDE_CONFIG --version | grep Qt | sed -e \
4334's/Qt:\ //' | sed 's/\([0-9]*\).\([0-9]*.*\)/\2/'`
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004335
Bram Moolenaar843ee412004-06-30 16:16:41 +00004336 if test "x$enable-kdetest" = "xyes" ; then
4337 ac_save_LIBS="$LIBS"
4338 LIBS="$LIBS $KDE_LIBS"
4339
4340 if test "$cross_compiling" = yes; then
4341 echo $ac_n "cross compiling KDE ? ? how can i remove that ? :)"
4342else
4343 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004344#line 4345 "configure"
Bram Moolenaar843ee412004-06-30 16:16:41 +00004345#include "confdefs.h"
4346
4347#include <stdio.h>
4348int
4349main()
4350{ return 0; }
4351
4352EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004353if { (eval echo configure:4354: \"$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 +00004354then
4355 :
4356else
4357 echo "configure: failed program was:" >&5
4358 cat conftest.$ac_ext >&5
4359 rm -fr conftest*
4360 no_kde=yes
4361fi
4362rm -fr conftest*
4363fi
4364
4365 LIBS="$ac_save_LIBS"
4366 fi
4367 fi
4368 if test "x$no_kde" = x ; then
4369 echo "$ac_t""found KDE $kde_major_version.$kde_minor_version" 1>&6
4370 GUI_LIB_LOC="-L$KDE_LIBS -lkdeui -lkdecore -lDCOP"
4371 GUI_INC_LOC="-I$KDE_INCLUDES"
4372 KDEDIR="$KDE_PREFIX"
4373 else
4374 echo "$ac_t""no" 1>&6
4375 KDE_LIBS=""
4376 :
4377 fi
4378else
4379 echo "$ac_t""no" 1>&6
4380 KDE_LIBS=""
4381 :
4382fi
4383
4384
4385
4386
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004387
Bram Moolenaar843ee412004-06-30 16:16:41 +00004388 if test "x$KDE_PREFIX" != "x"; then
4389 echo $ac_n "checking for QT version $qt_major_version.x""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004390echo "configure:4391: checking for QT version $qt_major_version.x" >&5
Bram Moolenaar843ee412004-06-30 16:16:41 +00004391 if test "x$ROOTQT" != "x" ; then
4392 GUI_INC_LOC="-I$QT_INCLUDES $GUI_INC_LOC"
4393 if test $qt_major_version -lt 2; then
4394 { 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; }
4395 fi
4396 if test "`(uname) 2>/dev/null`" = "FreeBSD"; then
4397 CFLAGS="$CFLAGS -D_THREAD_SAFE"
4398 CXXFLAGS="$CXXFLAGS -D_THREAD_SAFE"
4399 GUI_LIB_LOC="$GUI_LIB_LOC -pthread"
4400 LIBS="$LIBS -pthread"
4401 fi
4402
4403 if test "x$enable_rpath" = "xyes"; then
4404 if test $qt_major_version = 2; then
4405 GUI_LIB_LOC="-L$KDE_LIBS -lkfile -L$QT_LIBS -lqt $GUI_LIB_LOC \
4406-Wl,--rpath -Wl,$KDE_LIBS -Wl,--rpath -Wl,$QT_LIBS"
4407 else
4408 GUI_LIB_LOC="-L$KDE_LIBS -lkio -L$QT_LIBS -lqt-mt $GUI_LIB_LOC \
4409-Wl,--rpath -Wl,$KDE_LIBS -Wl,--rpath -Wl,$QT_LIBS"
4410 fi
4411 else
4412 if test $qt_major_version = 2; then
4413 GUI_LIB_LOC="-L$KDE_LIBS -lkfile -L$QT_LIBS -lqt $GUI_LIB_LOC"
4414 else
4415 GUI_LIB_LOC="-L$KDE_LIBS -lkio -L$QT_LIBS -lqt-mt $GUI_LIB_LOC"
4416 fi
4417 fi
4418
4419 GUI_INC_LOC="`echo $GUI_INC_LOC\ | sed 's%-I/usr/include %%'`"
4420
4421 echo "$ac_t""found $qt_major_version.$qt_minor_version in $ROOTQT" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004422
4423
4424 qt_incdir=NO
4425 for i in $QT_INCLUDES;
4426 do
4427 for j in qstyle.h;
4428 do
4429 echo "configure: 4430: $i/$j" >&5
4430 if test -r "$i/$j"; then
4431 echo "taking that" >&5
4432 qt_incdir=$i
4433 break 2
4434 fi
4435 done
4436 done
4437
4438 if test "x$qt_incdir" = "xNO"; then
4439 { echo "configure: error: Could not find Qt headers in $QT_INCLUDES" 1>&2; exit 1; }
4440 fi
4441
4442 kde_incdir=NO
4443 for i in $KDE_INCLUDES;
4444 do
4445 for j in kapplication.h;
4446 do
4447 echo "configure: 4448: $i/$j" >&5
4448 if test -r "$i/$j"; then
4449 echo "taking that" >&5
4450 kde_incdir=$i
4451 break 2
4452 fi
4453 done
4454 done
4455
4456 if test "x$kde_incdir" = "xNO"; then
4457 { echo "configure: error: Could not find KDE headers in $KDE_INCLUDES" 1>&2; exit 1; }
4458 fi
4459
4460
4461 ac_ext=C
4462# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4463ac_cpp='$CXXCPP $CPPFLAGS'
4464ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4465ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4466cross_compiling=$ac_cv_prog_cxx_cross
4467
4468 ac_save_LIBS="$LIBS"
4469 LIBS="$GUI_LIB_LOC"
4470 ac_save_CXXFLAGS="$CXXFLAGS"
4471 CXXFLAGS="$CXXFLAGS $GUI_INC_LOC"
4472 echo $ac_n "checking whether Qt libraries are usable""... $ac_c" 1>&6
4473echo "configure:4474: checking whether Qt libraries are usable" >&5
4474 cat > conftest.$ac_ext <<EOF
4475#line 4476 "configure"
4476#include "confdefs.h"
4477#include <qapplication.h>
4478int main() {
4479
4480 int argc;
4481 char** argv;
4482 QApplication app(argc, argv);
4483
4484; return 0; }
4485EOF
4486if { (eval echo configure:4487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4487 rm -rf conftest*
4488 echo "$ac_t""yes" 1>&6
4489else
4490 echo "configure: failed program was:" >&5
4491 cat conftest.$ac_ext >&5
4492 rm -rf conftest*
4493 echo "$ac_t""no" 1>&6;{ echo "configure: error: Qt fails to link a simple application" 1>&2; exit 1; }
4494fi
4495rm -f conftest*
4496
4497 echo $ac_n "checking whether KDE libraries are usable""... $ac_c" 1>&6
4498echo "configure:4499: checking whether KDE libraries are usable" >&5
4499 cat > conftest.$ac_ext <<EOF
4500#line 4501 "configure"
4501#include "confdefs.h"
4502#include <kapplication.h>
4503int main() {
4504
4505 int argc;
4506 char** argv;
4507 KApplication app(argc, argv);
4508
4509; return 0; }
4510EOF
4511if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4512 rm -rf conftest*
4513 echo "$ac_t""yes" 1>&6
4514else
4515 echo "configure: failed program was:" >&5
4516 cat conftest.$ac_ext >&5
4517 rm -rf conftest*
4518 echo "$ac_t""no" 1>&6;{ echo "configure: error: KDE fails to link a simple application" 1>&2; exit 1; }
4519fi
4520rm -f conftest*
4521
4522 LIBS="$ac_save_LIBS"
4523 CXXFLAGS="$ac_save_CXXFLAGS"
4524 ac_ext=c
4525# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4526ac_cpp='$CPP $CPPFLAGS'
4527ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4528ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4529cross_compiling=$ac_cv_prog_cc_cross
4530
4531
4532
Bram Moolenaar843ee412004-06-30 16:16:41 +00004533 SKIP_GTK=YES
4534 SKIP_ATHENA=YES
4535 SKIP_MOTIF=YES
4536 GUITYPE=KDE
4537
4538
4539
4540
4541
4542 cat >> confdefs.h <<\EOF
4543#define FEAT_GUI_KDE 1
4544EOF
4545
4546 else
4547 { echo "configure: error: Detected QT version mismatched" 1>&2; exit 1; }
4548 fi
4549 else
4550 { echo "configure: error: Could not find KDE installation prefix" 1>&2; exit 1; }
4551 fi
4552fi
4553fi
4554
Bram Moolenaar071d4272004-06-13 20:20:40 +00004555if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
4556 echo $ac_n "checking for Carbon GUI""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004557echo "configure:4558: checking for Carbon GUI" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004558 echo "$ac_t""yes" 1>&6;
4559 GUITYPE=CARBONGUI
4560 SKIP_GTK=YES;
4561 SKIP_GTK2=YES;
4562 SKIP_GNOME=YES;
4563 SKIP_MOTIF=YES;
4564 SKIP_ATHENA=YES;
4565 SKIP_NEXTAW=YES;
4566 SKIP_PHOTON=YES;
4567 SKIP_BEOS=YES;
4568 SKIP_CARBON=YES
4569fi
4570
4571
4572
4573
4574
4575
4576
4577
4578
Bram Moolenaar071d4272004-06-13 20:20:40 +00004579if test -z "$SKIP_GTK"; then
4580
4581 echo $ac_n "checking --with-gtk-prefix argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004582echo "configure:4583: checking --with-gtk-prefix argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004583 # Check whether --with-gtk-prefix or --without-gtk-prefix was given.
4584if test "${with_gtk_prefix+set}" = set; then
4585 withval="$with_gtk_prefix"
4586 gtk_config_prefix="$withval"; echo "$ac_t""$gtk_config_prefix" 1>&6
4587else
4588 gtk_config_prefix=""; echo "$ac_t""no" 1>&6
4589fi
4590
4591
4592 echo $ac_n "checking --with-gtk-exec-prefix argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004593echo "configure:4594: checking --with-gtk-exec-prefix argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004594 # Check whether --with-gtk-exec-prefix or --without-gtk-exec-prefix was given.
4595if test "${with_gtk_exec_prefix+set}" = set; then
4596 withval="$with_gtk_exec_prefix"
4597 gtk_config_exec_prefix="$withval"; echo "$ac_t""$gtk_config_prefix" 1>&6
4598else
4599 gtk_config_exec_prefix=""; echo "$ac_t""no" 1>&6
4600fi
4601
4602
4603 echo $ac_n "checking --disable-gtktest argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004604echo "configure:4605: checking --disable-gtktest argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004605 # Check whether --enable-gtktest or --disable-gtktest was given.
4606if test "${enable_gtktest+set}" = set; then
4607 enableval="$enable_gtktest"
4608 :
4609else
4610 enable_gtktest=yes
4611fi
4612
4613 if test "x$enable_gtktest" = "xyes" ; then
4614 echo "$ac_t""gtk test enabled" 1>&6
4615 else
4616 echo "$ac_t""gtk test disabled" 1>&6
4617 fi
4618
4619 if test "x$gtk_config_prefix" != "x" ; then
4620 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
4621 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
4622 fi
4623 if test "x$gtk_config_exec_prefix" != "x" ; then
4624 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
4625 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
4626 fi
4627 if test "X$GTK_CONFIG" = "X"; then
4628 # Extract the first word of "gtk-config", so it can be a program name with args.
4629set dummy gtk-config; ac_word=$2
4630echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004631echo "configure:4632: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004632if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
4633 echo $ac_n "(cached) $ac_c" 1>&6
4634else
4635 case "$GTK_CONFIG" in
4636 /*)
4637 ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
4638 ;;
4639 ?:/*)
4640 ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
4641 ;;
4642 *)
4643 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4644 ac_dummy="$PATH"
4645 for ac_dir in $ac_dummy; do
4646 test -z "$ac_dir" && ac_dir=.
4647 if test -f $ac_dir/$ac_word; then
4648 ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
4649 break
4650 fi
4651 done
4652 IFS="$ac_save_ifs"
4653 test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
4654 ;;
4655esac
4656fi
4657GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
4658if test -n "$GTK_CONFIG"; then
4659 echo "$ac_t""$GTK_CONFIG" 1>&6
4660else
4661 echo "$ac_t""no" 1>&6
4662fi
4663
4664 if test "X$GTK_CONFIG" = "Xno"; then
4665 # Extract the first word of "gtk12-config", so it can be a program name with args.
4666set dummy gtk12-config; ac_word=$2
4667echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004668echo "configure:4669: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004669if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
4670 echo $ac_n "(cached) $ac_c" 1>&6
4671else
4672 case "$GTK12_CONFIG" in
4673 /*)
4674 ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a path.
4675 ;;
4676 ?:/*)
4677 ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a dos path.
4678 ;;
4679 *)
4680 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4681 ac_dummy="$PATH"
4682 for ac_dir in $ac_dummy; do
4683 test -z "$ac_dir" && ac_dir=.
4684 if test -f $ac_dir/$ac_word; then
4685 ac_cv_path_GTK12_CONFIG="$ac_dir/$ac_word"
4686 break
4687 fi
4688 done
4689 IFS="$ac_save_ifs"
4690 test -z "$ac_cv_path_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
4691 ;;
4692esac
4693fi
4694GTK12_CONFIG="$ac_cv_path_GTK12_CONFIG"
4695if test -n "$GTK12_CONFIG"; then
4696 echo "$ac_t""$GTK12_CONFIG" 1>&6
4697else
4698 echo "$ac_t""no" 1>&6
4699fi
4700
4701 GTK_CONFIG="$GTK12_CONFIG"
4702 fi
4703 else
4704 echo "$ac_t""Using GTK configuration program $GTK_CONFIG" 1>&6
4705 fi
4706 if test "X$PKG_CONFIG" = "X"; then
4707 # Extract the first word of "pkg-config", so it can be a program name with args.
4708set dummy pkg-config; ac_word=$2
4709echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004710echo "configure:4711: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004711if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
4712 echo $ac_n "(cached) $ac_c" 1>&6
4713else
4714 case "$PKG_CONFIG" in
4715 /*)
4716 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4717 ;;
4718 ?:/*)
4719 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
4720 ;;
4721 *)
4722 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4723 ac_dummy="$PATH"
4724 for ac_dir in $ac_dummy; do
4725 test -z "$ac_dir" && ac_dir=.
4726 if test -f $ac_dir/$ac_word; then
4727 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4728 break
4729 fi
4730 done
4731 IFS="$ac_save_ifs"
4732 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
4733 ;;
4734esac
4735fi
4736PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4737if test -n "$PKG_CONFIG"; then
4738 echo "$ac_t""$PKG_CONFIG" 1>&6
4739else
4740 echo "$ac_t""no" 1>&6
4741fi
4742
4743 fi
4744
4745 if test "x$GTK_CONFIG:$PKG_CONFIG" != "xno:no"; then
4746 if test "X$SKIP_GTK2" != "XYES"; then
4747
4748 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
4749 {
4750 min_gtk_version=2.2.0
4751 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004752echo "configure:4753: checking for GTK - version >= $min_gtk_version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004753 no_gtk=""
4754 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
4755 && $PKG_CONFIG --exists gtk+-2.0; then
4756 {
4757 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
4758 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
4759 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4760 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4761 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4762 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4763 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4764 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4765 }
4766 elif test "X$GTK_CONFIG" != "Xno"; then
4767 {
4768 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
4769 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
4770 gtk_major_version=`$GTK_CONFIG $gtk_config_args --version | \
4771 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4772 gtk_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
4773 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4774 gtk_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
4775 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4776 }
4777 else
4778 no_gtk=yes
4779 fi
4780
4781 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
4782 {
4783 ac_save_CFLAGS="$CFLAGS"
4784 ac_save_LIBS="$LIBS"
4785 CFLAGS="$CFLAGS $GTK_CFLAGS"
4786 LIBS="$LIBS $GTK_LIBS"
4787
4788 rm -f conf.gtktest
4789 if test "$cross_compiling" = yes; then
4790 echo $ac_n "cross compiling; assumed OK... $ac_c"
4791else
4792 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004793#line 4794 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00004794#include "confdefs.h"
4795
4796#include <gtk/gtk.h>
4797#include <stdio.h>
4798
4799int
4800main ()
4801{
4802int major, minor, micro;
4803char *tmp_version;
4804
4805system ("touch conf.gtktest");
4806
4807/* HP/UX 9 (%@#!) writes to sscanf strings */
4808tmp_version = g_strdup("$min_gtk_version");
4809if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
4810 printf("%s, bad version string\n", "$min_gtk_version");
4811 exit(1);
4812 }
4813
4814if ((gtk_major_version > major) ||
4815 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
4816 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
4817 (gtk_micro_version >= micro)))
4818{
4819 return 0;
4820}
4821return 1;
4822}
4823
4824EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004825if { (eval echo configure:4826: \"$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 +00004826then
4827 :
4828else
4829 echo "configure: failed program was:" >&5
4830 cat conftest.$ac_ext >&5
4831 rm -fr conftest*
4832 no_gtk=yes
4833fi
4834rm -fr conftest*
4835fi
4836
4837 CFLAGS="$ac_save_CFLAGS"
4838 LIBS="$ac_save_LIBS"
4839 }
4840 fi
4841 if test "x$no_gtk" = x ; then
4842 if test "x$enable_gtktest" = "xyes"; then
4843 echo "$ac_t""yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4844 else
4845 echo "$ac_t""found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4846 fi
4847 GTK_LIBNAME="$GTK_LIBS"
4848 GUI_INC_LOC="$GTK_CFLAGS"
4849 else
4850 {
4851 echo "$ac_t""no" 1>&6
4852 GTK_CFLAGS=""
4853 GTK_LIBS=""
4854 :
4855 }
4856 fi
4857 }
4858 else
4859 GTK_CFLAGS=""
4860 GTK_LIBS=""
4861 :
4862 fi
4863
4864
4865 rm -f conf.gtktest
4866
4867 if test "x$GTK_CFLAGS" != "x"; then
4868 SKIP_ATHENA=YES
4869 SKIP_NEXTAW=YES
4870 SKIP_MOTIF=YES
4871 GUITYPE=GTK
4872
4873 fi
4874 fi
4875
4876 if test "x$GUITYPE" != "xGTK"; then
4877 SKIP_GTK2=YES
4878
4879 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
4880 {
4881 min_gtk_version=1.1.16
4882 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004883echo "configure:4884: checking for GTK - version >= $min_gtk_version" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00004884 no_gtk=""
4885 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
4886 && $PKG_CONFIG --exists gtk+-2.0; then
4887 {
4888 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
4889 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
4890 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4891 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4892 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4893 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4894 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
4895 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4896 }
4897 elif test "X$GTK_CONFIG" != "Xno"; then
4898 {
4899 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
4900 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
4901 gtk_major_version=`$GTK_CONFIG $gtk_config_args --version | \
4902 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
4903 gtk_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
4904 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
4905 gtk_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
4906 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
4907 }
4908 else
4909 no_gtk=yes
4910 fi
4911
4912 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
4913 {
4914 ac_save_CFLAGS="$CFLAGS"
4915 ac_save_LIBS="$LIBS"
4916 CFLAGS="$CFLAGS $GTK_CFLAGS"
4917 LIBS="$LIBS $GTK_LIBS"
4918
4919 rm -f conf.gtktest
4920 if test "$cross_compiling" = yes; then
4921 echo $ac_n "cross compiling; assumed OK... $ac_c"
4922else
4923 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004924#line 4925 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00004925#include "confdefs.h"
4926
4927#include <gtk/gtk.h>
4928#include <stdio.h>
4929
4930int
4931main ()
4932{
4933int major, minor, micro;
4934char *tmp_version;
4935
4936system ("touch conf.gtktest");
4937
4938/* HP/UX 9 (%@#!) writes to sscanf strings */
4939tmp_version = g_strdup("$min_gtk_version");
4940if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
4941 printf("%s, bad version string\n", "$min_gtk_version");
4942 exit(1);
4943 }
4944
4945if ((gtk_major_version > major) ||
4946 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
4947 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
4948 (gtk_micro_version >= micro)))
4949{
4950 return 0;
4951}
4952return 1;
4953}
4954
4955EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00004956if { (eval echo configure:4957: \"$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 +00004957then
4958 :
4959else
4960 echo "configure: failed program was:" >&5
4961 cat conftest.$ac_ext >&5
4962 rm -fr conftest*
4963 no_gtk=yes
4964fi
4965rm -fr conftest*
4966fi
4967
4968 CFLAGS="$ac_save_CFLAGS"
4969 LIBS="$ac_save_LIBS"
4970 }
4971 fi
4972 if test "x$no_gtk" = x ; then
4973 if test "x$enable_gtktest" = "xyes"; then
4974 echo "$ac_t""yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4975 else
4976 echo "$ac_t""found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" 1>&6
4977 fi
4978 GTK_LIBNAME="$GTK_LIBS"
4979 GUI_INC_LOC="$GTK_CFLAGS"
4980 else
4981 {
4982 echo "$ac_t""no" 1>&6
4983 GTK_CFLAGS=""
4984 GTK_LIBS=""
4985 :
4986 }
4987 fi
4988 }
4989 else
4990 GTK_CFLAGS=""
4991 GTK_LIBS=""
4992 :
4993 fi
4994
4995
4996 rm -f conf.gtktest
4997
4998 if test "x$GTK_CFLAGS" != "x"; then
4999 SKIP_ATHENA=YES
5000 SKIP_NEXTAW=YES
5001 SKIP_MOTIF=YES
5002 GUITYPE=GTK
5003
5004 fi
5005 fi
5006 fi
5007 if test "x$GUITYPE" = "xGTK"; then
5008 if test "$gtk_major_version" = 1 -a "0$gtk_minor_version" -lt 2 \
5009 -o "$gtk_major_version" = 1 -a "$gtk_minor_version" = 2 -a "0$gtk_micro_version" -lt 3; then
5010 echo "$ac_t""this GTK version is old; version 1.2.3 or later is recommended" 1>&6
5011 else
5012 {
5013 if test "0$gtk_major_version" -ge 2; then
5014 cat >> confdefs.h <<\EOF
5015#define HAVE_GTK2 1
5016EOF
5017
5018 if test "$gtk_minor_version" = 1 -a "0$gtk_micro_version" -ge 1 \
5019 || test "0$gtk_minor_version" -ge 2 \
5020 || test "0$gtk_major_version" -gt 2; then
5021 cat >> confdefs.h <<\EOF
5022#define HAVE_GTK_MULTIHEAD 1
5023EOF
5024
5025 fi
5026 fi
5027 if test -z "$SKIP_GNOME"; then
5028 {
5029
5030
5031
5032
5033
5034 # Check whether --with-gnome-includes or --without-gnome-includes was given.
5035if test "${with_gnome_includes+set}" = set; then
5036 withval="$with_gnome_includes"
5037 CFLAGS="$CFLAGS -I$withval"
5038
5039fi
5040
5041
5042 # Check whether --with-gnome-libs or --without-gnome-libs was given.
5043if test "${with_gnome_libs+set}" = set; then
5044 withval="$with_gnome_libs"
5045 LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
5046
5047fi
5048
5049
5050 # Check whether --with-gnome or --without-gnome was given.
5051if test "${with_gnome+set}" = set; then
5052 withval="$with_gnome"
5053 if test x$withval = xyes; then
5054 want_gnome=yes
5055 have_gnome=yes
5056 else
5057 if test "x$withval" = xno; then
5058 want_gnome=no
5059 else
5060 want_gnome=yes
5061 LDFLAGS="$LDFLAGS -L$withval/lib"
5062 CFLAGS="$CFLAGS -I$withval/include"
5063 gnome_prefix=$withval/lib
5064 fi
5065 fi
5066else
5067 want_gnome=yes
5068fi
5069
5070
5071 if test "x$want_gnome" = xyes -a "0$gtk_major_version" -ge 2; then
5072 {
5073 echo $ac_n "checking for libgnomeui-2.0""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005074echo "configure:5075: checking for libgnomeui-2.0" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005075 if $PKG_CONFIG --exists libgnomeui-2.0; then
5076 echo "$ac_t""yes" 1>&6
5077 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
5078 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
5079 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
5080 have_gnome=yes
5081 else
5082 echo "$ac_t""not found" 1>&6
5083 if test "x" = xfail; then
5084 { echo "configure: error: Could not find libgnomeui-2.0 via pkg-config" 1>&2; exit 1; }
5085 fi
5086 fi
5087 }
5088 elif test "x$want_gnome" = xyes; then
5089 {
5090 # Extract the first word of "gnome-config", so it can be a program name with args.
5091set dummy gnome-config; ac_word=$2
5092echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005093echo "configure:5094: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005094if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
5095 echo $ac_n "(cached) $ac_c" 1>&6
5096else
5097 case "$GNOME_CONFIG" in
5098 /*)
5099 ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
5100 ;;
5101 ?:/*)
5102 ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
5103 ;;
5104 *)
5105 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5106 ac_dummy="$PATH"
5107 for ac_dir in $ac_dummy; do
5108 test -z "$ac_dir" && ac_dir=.
5109 if test -f $ac_dir/$ac_word; then
5110 ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
5111 break
5112 fi
5113 done
5114 IFS="$ac_save_ifs"
5115 test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
5116 ;;
5117esac
5118fi
5119GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
5120if test -n "$GNOME_CONFIG"; then
5121 echo "$ac_t""$GNOME_CONFIG" 1>&6
5122else
5123 echo "$ac_t""no" 1>&6
5124fi
5125
5126 if test "$GNOME_CONFIG" = "no"; then
5127 no_gnome_config="yes"
5128 else
5129 echo $ac_n "checking if $GNOME_CONFIG works""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005130echo "configure:5131: checking if $GNOME_CONFIG works" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005131 if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
5132 echo "$ac_t""yes" 1>&6
5133 GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome gnomeui`"
5134 GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
5135 GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
5136 have_gnome=yes
5137 else
5138 echo "$ac_t""no" 1>&6
5139 no_gnome_config="yes"
5140 fi
5141 fi
5142
5143 if test x$exec_prefix = xNONE; then
5144 if test x$prefix = xNONE; then
5145 gnome_prefix=$ac_default_prefix/lib
5146 else
5147 gnome_prefix=$prefix/lib
5148 fi
5149 else
5150 gnome_prefix=`eval echo \`echo $libdir\``
5151 fi
5152
5153 if test "$no_gnome_config" = "yes"; then
5154 echo $ac_n "checking for gnomeConf.sh file in $gnome_prefix""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005155echo "configure:5156: checking for gnomeConf.sh file in $gnome_prefix" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005156 if test -f $gnome_prefix/gnomeConf.sh; then
5157 echo "$ac_t""found" 1>&6
5158 echo "loading gnome configuration from" \
5159 "$gnome_prefix/gnomeConf.sh"
5160 . $gnome_prefix/gnomeConf.sh
5161 have_gnome=yes
5162 else
5163 echo "$ac_t""not found" 1>&6
5164 if test x = xfail; then
5165 { echo "configure: error: Could not find the gnomeConf.sh file that is generated by gnome-libs install" 1>&2; exit 1; }
5166 fi
5167 fi
5168 fi
5169 }
5170 fi
5171
5172 if test x$have_gnome = xyes ; then
5173 cat >> confdefs.h <<\EOF
5174#define FEAT_GUI_GNOME 1
5175EOF
5176
5177 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
5178 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
5179 fi
5180 }
5181 fi
5182 }
5183 fi
5184 fi
5185fi
5186
5187
5188if test -z "$SKIP_MOTIF"; then
5189 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"
5190 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
5191
5192 echo $ac_n "checking for location of Motif GUI includes""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005193echo "configure:5194: checking for location of Motif GUI includes" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005194 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
5195 GUI_INC_LOC=
5196 for try in $gui_includes; do
5197 if test -f "$try/Xm/Xm.h"; then
5198 GUI_INC_LOC=$try
5199 fi
5200 done
5201 if test -n "$GUI_INC_LOC"; then
5202 if test "$GUI_INC_LOC" = /usr/include; then
5203 GUI_INC_LOC=
5204 echo "$ac_t""in default path" 1>&6
5205 else
5206 echo "$ac_t""$GUI_INC_LOC" 1>&6
5207 fi
5208 else
5209 echo "$ac_t""<not found>" 1>&6
5210 SKIP_MOTIF=YES
5211 fi
5212fi
5213
5214
5215if test -z "$SKIP_MOTIF"; then
5216 echo $ac_n "checking --with-motif-lib argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005217echo "configure:5218: checking --with-motif-lib argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005218 # Check whether --with-motif-lib or --without-motif-lib was given.
5219if test "${with_motif_lib+set}" = set; then
5220 withval="$with_motif_lib"
5221 MOTIF_LIBNAME="${withval}"
5222fi
5223
5224
5225 if test -n "$MOTIF_LIBNAME"; then
5226 echo "$ac_t""$MOTIF_LIBNAME" 1>&6
5227 GUI_LIB_LOC=
5228 else
5229 echo "$ac_t""no" 1>&6
5230
5231 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
5232
5233 echo $ac_n "checking for location of Motif GUI libs""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005234echo "configure:5235: checking for location of Motif GUI libs" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005235 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"
5236 GUI_LIB_LOC=
5237 for try in $gui_libs; do
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005238 for libtry in "$try"/libXm.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
Bram Moolenaar071d4272004-06-13 20:20:40 +00005239 if test -f "$libtry"; then
5240 GUI_LIB_LOC=$try
5241 fi
5242 done
5243 done
5244 if test -n "$GUI_LIB_LOC"; then
5245 if test "$GUI_LIB_LOC" = /usr/lib; then
5246 GUI_LIB_LOC=
5247 echo "$ac_t""in default path" 1>&6
5248 else
5249 if test -n "$GUI_LIB_LOC"; then
5250 echo "$ac_t""$GUI_LIB_LOC" 1>&6
5251 if test "`(uname) 2>/dev/null`" = SunOS &&
5252 uname -r | grep '^5' >/dev/null; then
5253 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
5254 fi
5255 fi
5256 fi
5257 MOTIF_LIBNAME=-lXm
5258 else
5259 echo "$ac_t""<not found>" 1>&6
5260 SKIP_MOTIF=YES
5261 fi
5262 fi
5263fi
5264
5265if test -z "$SKIP_MOTIF"; then
5266 SKIP_ATHENA=YES
5267 SKIP_NEXTAW=YES
5268 GUITYPE=MOTIF
5269
5270fi
5271
5272
5273GUI_X_LIBS=
5274
5275if test -z "$SKIP_ATHENA"; then
5276 echo $ac_n "checking if Athena header files can be found""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005277echo "configure:5278: checking if Athena header files can be found" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005278 cflags_save=$CFLAGS
5279 CFLAGS="$CFLAGS $X_CFLAGS"
5280 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005281#line 5282 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005282#include "confdefs.h"
5283
5284#include <X11/Intrinsic.h>
5285#include <X11/Xaw/Paned.h>
5286int main() {
5287
5288; return 0; }
5289EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005290if { (eval echo configure:5291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005291 rm -rf conftest*
5292 echo "$ac_t""yes" 1>&6
5293else
5294 echo "configure: failed program was:" >&5
5295 cat conftest.$ac_ext >&5
5296 rm -rf conftest*
5297 echo "$ac_t""no" 1>&6; SKIP_ATHENA=YES
5298fi
5299rm -f conftest*
5300 CFLAGS=$cflags_save
5301fi
5302
5303if test -z "$SKIP_ATHENA"; then
5304 GUITYPE=ATHENA
5305fi
5306
5307if test -z "$SKIP_NEXTAW"; then
5308 echo $ac_n "checking if neXtaw header files can be found""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005309echo "configure:5310: checking if neXtaw header files can be found" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005310 cflags_save=$CFLAGS
5311 CFLAGS="$CFLAGS $X_CFLAGS"
5312 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005313#line 5314 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005314#include "confdefs.h"
5315
5316#include <X11/Intrinsic.h>
5317#include <X11/neXtaw/Paned.h>
5318int main() {
5319
5320; return 0; }
5321EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005322if { (eval echo configure:5323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005323 rm -rf conftest*
5324 echo "$ac_t""yes" 1>&6
5325else
5326 echo "configure: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
5328 rm -rf conftest*
5329 echo "$ac_t""no" 1>&6; SKIP_NEXTAW=YES
5330fi
5331rm -f conftest*
5332 CFLAGS=$cflags_save
5333fi
5334
5335if test -z "$SKIP_NEXTAW"; then
5336 GUITYPE=NEXTAW
5337fi
5338
5339if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
5340 if test -n "$GUI_INC_LOC"; then
5341 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
5342 fi
5343 if test -n "$GUI_LIB_LOC"; then
5344 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
5345 fi
5346
5347 ldflags_save=$LDFLAGS
5348 LDFLAGS="$X_LIBS $LDFLAGS"
5349 echo $ac_n "checking for XShapeQueryExtension in -lXext""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005350echo "configure:5351: checking for XShapeQueryExtension in -lXext" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005351ac_lib_var=`echo Xext'_'XShapeQueryExtension | sed 'y%./+-%__p_%'`
5352if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5353 echo $ac_n "(cached) $ac_c" 1>&6
5354else
5355 ac_save_LIBS="$LIBS"
5356LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5357cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005358#line 5359 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005359#include "confdefs.h"
5360/* Override any gcc2 internal prototype to avoid an error. */
5361/* We use char because int might match the return type of a gcc2
5362 builtin and then its argument prototype would still apply. */
5363char XShapeQueryExtension();
5364
5365int main() {
5366XShapeQueryExtension()
5367; return 0; }
5368EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005369if { (eval echo configure:5370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005370 rm -rf conftest*
5371 eval "ac_cv_lib_$ac_lib_var=yes"
5372else
5373 echo "configure: failed program was:" >&5
5374 cat conftest.$ac_ext >&5
5375 rm -rf conftest*
5376 eval "ac_cv_lib_$ac_lib_var=no"
5377fi
5378rm -f conftest*
5379LIBS="$ac_save_LIBS"
5380
5381fi
5382if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5383 echo "$ac_t""yes" 1>&6
5384 GUI_X_LIBS="-lXext"
5385else
5386 echo "$ac_t""no" 1>&6
5387fi
5388
5389 echo $ac_n "checking for wslen in -lw""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005390echo "configure:5391: checking for wslen in -lw" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005391ac_lib_var=`echo w'_'wslen | sed 'y%./+-%__p_%'`
5392if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5393 echo $ac_n "(cached) $ac_c" 1>&6
5394else
5395 ac_save_LIBS="$LIBS"
5396LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5397cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005398#line 5399 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005399#include "confdefs.h"
5400/* Override any gcc2 internal prototype to avoid an error. */
5401/* We use char because int might match the return type of a gcc2
5402 builtin and then its argument prototype would still apply. */
5403char wslen();
5404
5405int main() {
5406wslen()
5407; return 0; }
5408EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005409if { (eval echo configure:5410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005410 rm -rf conftest*
5411 eval "ac_cv_lib_$ac_lib_var=yes"
5412else
5413 echo "configure: failed program was:" >&5
5414 cat conftest.$ac_ext >&5
5415 rm -rf conftest*
5416 eval "ac_cv_lib_$ac_lib_var=no"
5417fi
5418rm -f conftest*
5419LIBS="$ac_save_LIBS"
5420
5421fi
5422if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5423 echo "$ac_t""yes" 1>&6
5424 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
5425else
5426 echo "$ac_t""no" 1>&6
5427fi
5428
5429 echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005430echo "configure:5431: checking for dlsym in -ldl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005431ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
5432if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5433 echo $ac_n "(cached) $ac_c" 1>&6
5434else
5435 ac_save_LIBS="$LIBS"
5436LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5437cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005438#line 5439 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005439#include "confdefs.h"
5440/* Override any gcc2 internal prototype to avoid an error. */
5441/* We use char because int might match the return type of a gcc2
5442 builtin and then its argument prototype would still apply. */
5443char dlsym();
5444
5445int main() {
5446dlsym()
5447; return 0; }
5448EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005449if { (eval echo configure:5450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005450 rm -rf conftest*
5451 eval "ac_cv_lib_$ac_lib_var=yes"
5452else
5453 echo "configure: failed program was:" >&5
5454 cat conftest.$ac_ext >&5
5455 rm -rf conftest*
5456 eval "ac_cv_lib_$ac_lib_var=no"
5457fi
5458rm -f conftest*
5459LIBS="$ac_save_LIBS"
5460
5461fi
5462if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5463 echo "$ac_t""yes" 1>&6
5464 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
5465else
5466 echo "$ac_t""no" 1>&6
5467fi
5468
5469 echo $ac_n "checking for XmuCreateStippledPixmap in -lXmu""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005470echo "configure:5471: checking for XmuCreateStippledPixmap in -lXmu" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005471ac_lib_var=`echo Xmu'_'XmuCreateStippledPixmap | sed 'y%./+-%__p_%'`
5472if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5473 echo $ac_n "(cached) $ac_c" 1>&6
5474else
5475 ac_save_LIBS="$LIBS"
5476LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5477cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005478#line 5479 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005479#include "confdefs.h"
5480/* Override any gcc2 internal prototype to avoid an error. */
5481/* We use char because int might match the return type of a gcc2
5482 builtin and then its argument prototype would still apply. */
5483char XmuCreateStippledPixmap();
5484
5485int main() {
5486XmuCreateStippledPixmap()
5487; return 0; }
5488EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005489if { (eval echo configure:5490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005490 rm -rf conftest*
5491 eval "ac_cv_lib_$ac_lib_var=yes"
5492else
5493 echo "configure: failed program was:" >&5
5494 cat conftest.$ac_ext >&5
5495 rm -rf conftest*
5496 eval "ac_cv_lib_$ac_lib_var=no"
5497fi
5498rm -f conftest*
5499LIBS="$ac_save_LIBS"
5500
5501fi
5502if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5503 echo "$ac_t""yes" 1>&6
5504 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
5505else
5506 echo "$ac_t""no" 1>&6
5507fi
5508
5509 if test -z "$SKIP_MOTIF"; then
5510 echo $ac_n "checking for XpEndJob in -lXp""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005511echo "configure:5512: checking for XpEndJob in -lXp" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005512ac_lib_var=`echo Xp'_'XpEndJob | sed 'y%./+-%__p_%'`
5513if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5514 echo $ac_n "(cached) $ac_c" 1>&6
5515else
5516 ac_save_LIBS="$LIBS"
5517LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
5518cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005519#line 5520 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005520#include "confdefs.h"
5521/* Override any gcc2 internal prototype to avoid an error. */
5522/* We use char because int might match the return type of a gcc2
5523 builtin and then its argument prototype would still apply. */
5524char XpEndJob();
5525
5526int main() {
5527XpEndJob()
5528; return 0; }
5529EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005530if { (eval echo configure:5531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005531 rm -rf conftest*
5532 eval "ac_cv_lib_$ac_lib_var=yes"
5533else
5534 echo "configure: failed program was:" >&5
5535 cat conftest.$ac_ext >&5
5536 rm -rf conftest*
5537 eval "ac_cv_lib_$ac_lib_var=no"
5538fi
5539rm -f conftest*
5540LIBS="$ac_save_LIBS"
5541
5542fi
5543if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5544 echo "$ac_t""yes" 1>&6
5545 GUI_X_LIBS="-lXp $GUI_X_LIBS"
5546else
5547 echo "$ac_t""no" 1>&6
5548fi
5549
5550 fi
5551 LDFLAGS=$ldflags_save
5552
5553 echo $ac_n "checking for extra X11 defines""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005554echo "configure:5555: checking for extra X11 defines" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005555 NARROW_PROTO=
5556 rm -fr conftestdir
5557 if mkdir conftestdir; then
5558 cd conftestdir
5559 cat > Imakefile <<'EOF'
5560acfindx:
5561 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
5562EOF
5563 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5564 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5565 fi
5566 cd ..
5567 rm -fr conftestdir
5568 fi
5569 if test -z "$NARROW_PROTO"; then
5570 echo "$ac_t""no" 1>&6
5571 else
5572 echo "$ac_t""$NARROW_PROTO" 1>&6
5573 fi
5574
5575fi
5576
5577if test "$enable_xsmp" = "yes"; then
5578 cppflags_save=$CPPFLAGS
5579 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5580 for ac_hdr in X11/SM/SMlib.h
5581do
5582ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5583echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005584echo "configure:5585: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005585if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5586 echo $ac_n "(cached) $ac_c" 1>&6
5587else
5588 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005589#line 5590 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005590#include "confdefs.h"
5591#include <$ac_hdr>
5592EOF
5593ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005594{ (eval echo configure:5595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005595ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5596if test -z "$ac_err"; then
5597 rm -rf conftest*
5598 eval "ac_cv_header_$ac_safe=yes"
5599else
5600 echo "$ac_err" >&5
5601 echo "configure: failed program was:" >&5
5602 cat conftest.$ac_ext >&5
5603 rm -rf conftest*
5604 eval "ac_cv_header_$ac_safe=no"
5605fi
5606rm -f conftest*
5607fi
5608if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5609 echo "$ac_t""yes" 1>&6
5610 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5611 cat >> confdefs.h <<EOF
5612#define $ac_tr_hdr 1
5613EOF
5614
5615else
5616 echo "$ac_t""no" 1>&6
5617fi
5618done
5619
5620 CPPFLAGS=$cppflags_save
5621fi
5622
5623
5624if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF" -o -z "$SKIP_GTK"; then
5625 cppflags_save=$CPPFLAGS
5626 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5627 for ac_hdr in X11/xpm.h X11/Sunkeysym.h
5628do
5629ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5630echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005631echo "configure:5632: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005632if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5633 echo $ac_n "(cached) $ac_c" 1>&6
5634else
5635 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005636#line 5637 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005637#include "confdefs.h"
5638#include <$ac_hdr>
5639EOF
5640ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005641{ (eval echo configure:5642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005642ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5643if test -z "$ac_err"; then
5644 rm -rf conftest*
5645 eval "ac_cv_header_$ac_safe=yes"
5646else
5647 echo "$ac_err" >&5
5648 echo "configure: failed program was:" >&5
5649 cat conftest.$ac_ext >&5
5650 rm -rf conftest*
5651 eval "ac_cv_header_$ac_safe=no"
5652fi
5653rm -f conftest*
5654fi
5655if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5656 echo "$ac_t""yes" 1>&6
5657 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5658 cat >> confdefs.h <<EOF
5659#define $ac_tr_hdr 1
5660EOF
5661
5662else
5663 echo "$ac_t""no" 1>&6
5664fi
5665done
5666
5667
5668 if test ! "$enable_xim" = "no"; then
5669 echo $ac_n "checking for XIMText in X11/Xlib.h""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005670echo "configure:5671: checking for XIMText in X11/Xlib.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005671 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005672#line 5673 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005673#include "confdefs.h"
5674#include <X11/Xlib.h>
5675EOF
5676if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5677 egrep "XIMText" >/dev/null 2>&1; then
5678 rm -rf conftest*
5679 echo "$ac_t""yes" 1>&6
5680else
5681 rm -rf conftest*
5682 echo "$ac_t""no; xim has been disabled" 1>&6; enable_xim = "no"
5683fi
5684rm -f conftest*
5685
5686 fi
5687 CPPFLAGS=$cppflags_save
5688
5689 if test "$enable_xim" = "auto" -a "$enable_hangulinput" != "yes" \
5690 -a "x$GUITYPE" != "xNONE" ; then
5691 echo "$ac_t""X GUI selected; xim has been enabled" 1>&6
5692 enable_xim="yes"
5693 fi
5694fi
5695
5696if test -z "$SKIP_ATHENA" -o -z "$SKIP_NEXTAW" -o -z "$SKIP_MOTIF"; then
5697 cppflags_save=$CPPFLAGS
5698 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5699 for ac_hdr in X11/Xmu/Editres.h
5700do
5701ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5702echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005703echo "configure:5704: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005704if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5705 echo $ac_n "(cached) $ac_c" 1>&6
5706else
5707 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005708#line 5709 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005709#include "confdefs.h"
5710#include <$ac_hdr>
5711EOF
5712ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005713{ (eval echo configure:5714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005714ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5715if test -z "$ac_err"; then
5716 rm -rf conftest*
5717 eval "ac_cv_header_$ac_safe=yes"
5718else
5719 echo "$ac_err" >&5
5720 echo "configure: failed program was:" >&5
5721 cat conftest.$ac_ext >&5
5722 rm -rf conftest*
5723 eval "ac_cv_header_$ac_safe=no"
5724fi
5725rm -f conftest*
5726fi
5727if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5728 echo "$ac_t""yes" 1>&6
5729 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5730 cat >> confdefs.h <<EOF
5731#define $ac_tr_hdr 1
5732EOF
5733
5734else
5735 echo "$ac_t""no" 1>&6
5736fi
5737done
5738
5739 CPPFLAGS=$cppflags_save
5740fi
5741
5742if test -z "$SKIP_MOTIF"; then
5743 cppflags_save=$CPPFLAGS
5744 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
5745 for ac_hdr in Xm/Xm.h Xm/XpmP.h
5746do
5747ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5748echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005749echo "configure:5750: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005750if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5751 echo $ac_n "(cached) $ac_c" 1>&6
5752else
5753 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005754#line 5755 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005755#include "confdefs.h"
5756#include <$ac_hdr>
5757EOF
5758ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005759{ (eval echo configure:5760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005760ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5761if test -z "$ac_err"; then
5762 rm -rf conftest*
5763 eval "ac_cv_header_$ac_safe=yes"
5764else
5765 echo "$ac_err" >&5
5766 echo "configure: failed program was:" >&5
5767 cat conftest.$ac_ext >&5
5768 rm -rf conftest*
5769 eval "ac_cv_header_$ac_safe=no"
5770fi
5771rm -f conftest*
5772fi
5773if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5774 echo "$ac_t""yes" 1>&6
5775 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5776 cat >> confdefs.h <<EOF
5777#define $ac_tr_hdr 1
5778EOF
5779
5780else
5781 echo "$ac_t""no" 1>&6
5782fi
5783done
5784
5785 CPPFLAGS=$cppflags_save
5786fi
5787
5788if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
5789 echo "$ac_t""no GUI selected; xim has been disabled" 1>&6
5790 enable_xim="no"
5791fi
5792if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
5793 echo "$ac_t""no GUI selected; fontset has been disabled" 1>&6
5794 enable_fontset="no"
5795fi
5796if test "x$GUITYPE:$enable_fontset" = "xGTK:yes" -a "0$gtk_major_version" -ge 2; then
5797 echo "$ac_t""GTK+ 2 GUI selected; fontset has been disabled" 1>&6
5798 enable_fontset="no"
5799fi
5800
5801if test -z "$SKIP_BEOS"; then
5802 GUITYPE=BEOSGUI
5803fi
5804
5805if test -z "$SKIP_PHOTON"; then
5806 GUITYPE=PHOTONGUI
5807fi
5808
5809
5810
5811
5812
5813
5814if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
5815 { echo "configure: error: cannot use workshop without Motif" 1>&2; exit 1; }
5816fi
5817
5818if test "$enable_xim" = "yes"; then
5819 cat >> confdefs.h <<\EOF
5820#define FEAT_XIM 1
5821EOF
5822
5823fi
5824if test "$enable_fontset" = "yes"; then
5825 cat >> confdefs.h <<\EOF
5826#define FEAT_XFONTSET 1
5827EOF
5828
5829fi
5830
5831
5832
5833
5834if test "$enable_hangulinput" = "yes"; then
5835 if test "x$GUITYPE" = "xNONE"; then
5836 echo "$ac_t""no GUI selected; hangul input has been disabled" 1>&6
5837 enable_hangulinput=no
5838 else
5839 cat >> confdefs.h <<\EOF
5840#define FEAT_HANGULIN 1
5841EOF
5842
5843 HANGULIN_SRC=hangulin.c
5844
5845 HANGULIN_OBJ=objects/hangulin.o
5846
5847 fi
5848fi
5849
5850
5851echo $ac_n "checking quality of toupper""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005852echo "configure:5853: checking quality of toupper" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005853if test "$cross_compiling" = yes; then
5854 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
5855else
5856 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005857#line 5858 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005858#include "confdefs.h"
5859#include <ctype.h>
5860main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
5861EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005862if { (eval echo configure:5863: \"$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 +00005863then
5864 cat >> confdefs.h <<\EOF
5865#define BROKEN_TOUPPER 1
5866EOF
5867 echo "$ac_t""bad" 1>&6
5868else
5869 echo "configure: failed program was:" >&5
5870 cat conftest.$ac_ext >&5
5871 rm -fr conftest*
5872 echo "$ac_t""good" 1>&6
5873fi
5874rm -fr conftest*
5875fi
5876
5877
5878echo $ac_n "checking whether __DATE__ and __TIME__ work""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005879echo "configure:5880: checking whether __DATE__ and __TIME__ work" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005880cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005881#line 5882 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005882#include "confdefs.h"
5883
5884int main() {
5885printf("(" __DATE__ " " __TIME__ ")");
5886; return 0; }
5887EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005888if { (eval echo configure:5889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005889 rm -rf conftest*
5890 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
5891#define HAVE_DATE_TIME 1
5892EOF
5893
5894else
5895 echo "configure: failed program was:" >&5
5896 cat conftest.$ac_ext >&5
5897 rm -rf conftest*
5898 echo "$ac_t""no" 1>&6
5899fi
5900rm -f conftest*
5901
5902ac_safe=`echo "elf.h" | sed 'y%./+-%__p_%'`
5903echo $ac_n "checking for elf.h""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005904echo "configure:5905: checking for elf.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005905if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5906 echo $ac_n "(cached) $ac_c" 1>&6
5907else
5908 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005909#line 5910 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005910#include "confdefs.h"
5911#include <elf.h>
5912EOF
5913ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005914{ (eval echo configure:5915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005915ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5916if test -z "$ac_err"; then
5917 rm -rf conftest*
5918 eval "ac_cv_header_$ac_safe=yes"
5919else
5920 echo "$ac_err" >&5
5921 echo "configure: failed program was:" >&5
5922 cat conftest.$ac_ext >&5
5923 rm -rf conftest*
5924 eval "ac_cv_header_$ac_safe=no"
5925fi
5926rm -f conftest*
5927fi
5928if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5929 echo "$ac_t""yes" 1>&6
5930 HAS_ELF=1
5931else
5932 echo "$ac_t""no" 1>&6
5933fi
5934
5935if test "$HAS_ELF" = 1; then
5936 echo $ac_n "checking for main in -lelf""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005937echo "configure:5938: checking for main in -lelf" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005938ac_lib_var=`echo elf'_'main | sed 'y%./+-%__p_%'`
5939if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5940 echo $ac_n "(cached) $ac_c" 1>&6
5941else
5942 ac_save_LIBS="$LIBS"
5943LIBS="-lelf $LIBS"
5944cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005945#line 5946 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005946#include "confdefs.h"
5947
5948int main() {
5949main()
5950; return 0; }
5951EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005952if { (eval echo configure:5953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00005953 rm -rf conftest*
5954 eval "ac_cv_lib_$ac_lib_var=yes"
5955else
5956 echo "configure: failed program was:" >&5
5957 cat conftest.$ac_ext >&5
5958 rm -rf conftest*
5959 eval "ac_cv_lib_$ac_lib_var=no"
5960fi
5961rm -f conftest*
5962LIBS="$ac_save_LIBS"
5963
5964fi
5965if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5966 echo "$ac_t""yes" 1>&6
5967 ac_tr_lib=HAVE_LIB`echo elf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5968 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5969 cat >> confdefs.h <<EOF
5970#define $ac_tr_lib 1
5971EOF
5972
5973 LIBS="-lelf $LIBS"
5974
5975else
5976 echo "$ac_t""no" 1>&6
5977fi
5978
5979fi
5980
5981ac_header_dirent=no
5982for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
5983do
5984ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5985echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005986echo "configure:5987: checking for $ac_hdr that defines DIR" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00005987if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
5988 echo $ac_n "(cached) $ac_c" 1>&6
5989else
5990 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005991#line 5992 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005992#include "confdefs.h"
5993#include <sys/types.h>
5994#include <$ac_hdr>
5995int main() {
5996DIR *dirp = 0;
5997; return 0; }
5998EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005999if { (eval echo configure:6000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006000 rm -rf conftest*
6001 eval "ac_cv_header_dirent_$ac_safe=yes"
6002else
6003 echo "configure: failed program was:" >&5
6004 cat conftest.$ac_ext >&5
6005 rm -rf conftest*
6006 eval "ac_cv_header_dirent_$ac_safe=no"
6007fi
6008rm -f conftest*
6009fi
6010if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
6011 echo "$ac_t""yes" 1>&6
6012 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6013 cat >> confdefs.h <<EOF
6014#define $ac_tr_hdr 1
6015EOF
6016 ac_header_dirent=$ac_hdr; break
6017else
6018 echo "$ac_t""no" 1>&6
6019fi
6020done
6021# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6022if test $ac_header_dirent = dirent.h; then
6023echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006024echo "configure:6025: checking for opendir in -ldir" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006025ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
6026if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6027 echo $ac_n "(cached) $ac_c" 1>&6
6028else
6029 ac_save_LIBS="$LIBS"
6030LIBS="-ldir $LIBS"
6031cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006032#line 6033 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006033#include "confdefs.h"
6034/* Override any gcc2 internal prototype to avoid an error. */
6035/* We use char because int might match the return type of a gcc2
6036 builtin and then its argument prototype would still apply. */
6037char opendir();
6038
6039int main() {
6040opendir()
6041; return 0; }
6042EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006043if { (eval echo configure:6044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006044 rm -rf conftest*
6045 eval "ac_cv_lib_$ac_lib_var=yes"
6046else
6047 echo "configure: failed program was:" >&5
6048 cat conftest.$ac_ext >&5
6049 rm -rf conftest*
6050 eval "ac_cv_lib_$ac_lib_var=no"
6051fi
6052rm -f conftest*
6053LIBS="$ac_save_LIBS"
6054
6055fi
6056if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6057 echo "$ac_t""yes" 1>&6
6058 LIBS="$LIBS -ldir"
6059else
6060 echo "$ac_t""no" 1>&6
6061fi
6062
6063else
6064echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006065echo "configure:6066: checking for opendir in -lx" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006066ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
6067if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6068 echo $ac_n "(cached) $ac_c" 1>&6
6069else
6070 ac_save_LIBS="$LIBS"
6071LIBS="-lx $LIBS"
6072cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006073#line 6074 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006074#include "confdefs.h"
6075/* Override any gcc2 internal prototype to avoid an error. */
6076/* We use char because int might match the return type of a gcc2
6077 builtin and then its argument prototype would still apply. */
6078char opendir();
6079
6080int main() {
6081opendir()
6082; return 0; }
6083EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006084if { (eval echo configure:6085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006085 rm -rf conftest*
6086 eval "ac_cv_lib_$ac_lib_var=yes"
6087else
6088 echo "configure: failed program was:" >&5
6089 cat conftest.$ac_ext >&5
6090 rm -rf conftest*
6091 eval "ac_cv_lib_$ac_lib_var=no"
6092fi
6093rm -f conftest*
6094LIBS="$ac_save_LIBS"
6095
6096fi
6097if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6098 echo "$ac_t""yes" 1>&6
6099 LIBS="$LIBS -lx"
6100else
6101 echo "$ac_t""no" 1>&6
6102fi
6103
6104fi
6105
6106
6107echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006108echo "configure:6109: checking for ANSI C header files" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006109if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
6110 echo $ac_n "(cached) $ac_c" 1>&6
6111else
6112 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006113#line 6114 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006114#include "confdefs.h"
6115#include <stdlib.h>
6116#include <stdarg.h>
6117#include <string.h>
6118#include <float.h>
6119EOF
6120ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006121{ (eval echo configure:6122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006122ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6123if test -z "$ac_err"; then
6124 rm -rf conftest*
6125 ac_cv_header_stdc=yes
6126else
6127 echo "$ac_err" >&5
6128 echo "configure: failed program was:" >&5
6129 cat conftest.$ac_ext >&5
6130 rm -rf conftest*
6131 ac_cv_header_stdc=no
6132fi
6133rm -f conftest*
6134
6135if test $ac_cv_header_stdc = yes; then
6136 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6137cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006138#line 6139 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006139#include "confdefs.h"
6140#include <string.h>
6141EOF
6142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6143 egrep "memchr" >/dev/null 2>&1; then
6144 :
6145else
6146 rm -rf conftest*
6147 ac_cv_header_stdc=no
6148fi
6149rm -f conftest*
6150
6151fi
6152
6153if test $ac_cv_header_stdc = yes; then
6154 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6155cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006156#line 6157 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006157#include "confdefs.h"
6158#include <stdlib.h>
6159EOF
6160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6161 egrep "free" >/dev/null 2>&1; then
6162 :
6163else
6164 rm -rf conftest*
6165 ac_cv_header_stdc=no
6166fi
6167rm -f conftest*
6168
6169fi
6170
6171if test $ac_cv_header_stdc = yes; then
6172 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6173if test "$cross_compiling" = yes; then
6174 :
6175else
6176 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006177#line 6178 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006178#include "confdefs.h"
6179#include <ctype.h>
6180#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6181#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6182#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6183int main () { int i; for (i = 0; i < 256; i++)
6184if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
6185exit (0); }
6186
6187EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006188if { (eval echo configure:6189: \"$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 +00006189then
6190 :
6191else
6192 echo "configure: failed program was:" >&5
6193 cat conftest.$ac_ext >&5
6194 rm -fr conftest*
6195 ac_cv_header_stdc=no
6196fi
6197rm -fr conftest*
6198fi
6199
6200fi
6201fi
6202
6203echo "$ac_t""$ac_cv_header_stdc" 1>&6
6204if test $ac_cv_header_stdc = yes; then
6205 cat >> confdefs.h <<\EOF
6206#define STDC_HEADERS 1
6207EOF
6208
6209fi
6210
6211echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006212echo "configure:6213: checking for sys/wait.h that is POSIX.1 compatible" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006213if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
6214 echo $ac_n "(cached) $ac_c" 1>&6
6215else
6216 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006217#line 6218 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006218#include "confdefs.h"
6219#include <sys/types.h>
6220#include <sys/wait.h>
6221#ifndef WEXITSTATUS
6222#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
6223#endif
6224#ifndef WIFEXITED
6225#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6226#endif
6227int main() {
6228int s;
6229wait (&s);
6230s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6231; return 0; }
6232EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006233if { (eval echo configure:6234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006234 rm -rf conftest*
6235 ac_cv_header_sys_wait_h=yes
6236else
6237 echo "configure: failed program was:" >&5
6238 cat conftest.$ac_ext >&5
6239 rm -rf conftest*
6240 ac_cv_header_sys_wait_h=no
6241fi
6242rm -f conftest*
6243fi
6244
6245echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
6246if test $ac_cv_header_sys_wait_h = yes; then
6247 cat >> confdefs.h <<\EOF
6248#define HAVE_SYS_WAIT_H 1
6249EOF
6250
6251fi
6252
6253
6254if test $ac_cv_header_sys_wait_h = no; then
6255 echo $ac_n "checking for sys/wait.h that defines union wait""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006256echo "configure:6257: checking for sys/wait.h that defines union wait" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006257 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006258#line 6259 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006259#include "confdefs.h"
6260#include <sys/wait.h>
6261int main() {
6262union wait xx, yy; xx = yy
6263; return 0; }
6264EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006265if { (eval echo configure:6266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006266 rm -rf conftest*
6267 echo "$ac_t""yes" 1>&6
6268 cat >> confdefs.h <<\EOF
6269#define HAVE_SYS_WAIT_H 1
6270EOF
6271
6272 cat >> confdefs.h <<\EOF
6273#define HAVE_UNION_WAIT 1
6274EOF
6275
6276else
6277 echo "configure: failed program was:" >&5
6278 cat conftest.$ac_ext >&5
6279 rm -rf conftest*
6280 echo "$ac_t""no" 1>&6
6281fi
6282rm -f conftest*
6283fi
6284
6285for ac_hdr in stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \
6286 termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \
6287 iconv.h langinfo.h unistd.h stropts.h errno.h \
6288 sys/resource.h sys/systeminfo.h locale.h \
6289 sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \
6290 poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \
6291 libgen.h util/debug.h util/msg18n.h frame.h pthread_np.h \
6292 sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h wchar.h
6293do
6294ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6295echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006296echo "configure:6297: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006297if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6298 echo $ac_n "(cached) $ac_c" 1>&6
6299else
6300 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006301#line 6302 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006302#include "confdefs.h"
6303#include <$ac_hdr>
6304EOF
6305ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006306{ (eval echo configure:6307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006307ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6308if test -z "$ac_err"; then
6309 rm -rf conftest*
6310 eval "ac_cv_header_$ac_safe=yes"
6311else
6312 echo "$ac_err" >&5
6313 echo "configure: failed program was:" >&5
6314 cat conftest.$ac_ext >&5
6315 rm -rf conftest*
6316 eval "ac_cv_header_$ac_safe=no"
6317fi
6318rm -f conftest*
6319fi
6320if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6321 echo "$ac_t""yes" 1>&6
6322 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6323 cat >> confdefs.h <<EOF
6324#define $ac_tr_hdr 1
6325EOF
6326
6327else
6328 echo "$ac_t""no" 1>&6
6329fi
6330done
6331
6332
6333if test "x$MACOSX" != "xyes"; then
6334 for ac_hdr in strings.h
6335do
6336ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6337echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006338echo "configure:6339: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006339if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6340 echo $ac_n "(cached) $ac_c" 1>&6
6341else
6342 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006343#line 6344 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006344#include "confdefs.h"
6345#include <$ac_hdr>
6346EOF
6347ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006348{ (eval echo configure:6349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006349ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6350if test -z "$ac_err"; then
6351 rm -rf conftest*
6352 eval "ac_cv_header_$ac_safe=yes"
6353else
6354 echo "$ac_err" >&5
6355 echo "configure: failed program was:" >&5
6356 cat conftest.$ac_ext >&5
6357 rm -rf conftest*
6358 eval "ac_cv_header_$ac_safe=no"
6359fi
6360rm -f conftest*
6361fi
6362if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6363 echo "$ac_t""yes" 1>&6
6364 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6365 cat >> confdefs.h <<EOF
6366#define $ac_tr_hdr 1
6367EOF
6368
6369else
6370 echo "$ac_t""no" 1>&6
6371fi
6372done
6373
6374fi
6375
6376echo $ac_n "checking if strings.h can be included after string.h""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006377echo "configure:6378: checking if strings.h can be included after string.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006378cppflags_save=$CPPFLAGS
6379CPPFLAGS="$CPPFLAGS $X_CFLAGS"
6380cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006381#line 6382 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006382#include "confdefs.h"
6383
6384#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
6385# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
6386 /* but don't do it on AIX 5.1 (Uribarri) */
6387#endif
6388#ifdef HAVE_XM_XM_H
6389# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
6390#endif
6391#ifdef HAVE_STRING_H
6392# include <string.h>
6393#endif
6394#if defined(HAVE_STRINGS_H)
6395# include <strings.h>
6396#endif
6397
6398int main() {
6399int i; i = 0;
6400; return 0; }
6401EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006402if { (eval echo configure:6403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006403 rm -rf conftest*
6404 echo "$ac_t""yes" 1>&6
6405else
6406 echo "configure: failed program was:" >&5
6407 cat conftest.$ac_ext >&5
6408 rm -rf conftest*
6409 cat >> confdefs.h <<\EOF
6410#define NO_STRINGS_WITH_STRING_H 1
6411EOF
6412
6413 echo "$ac_t""no" 1>&6
6414fi
6415rm -f conftest*
6416CPPFLAGS=$cppflags_save
6417
6418if test $ac_cv_prog_gcc = yes; then
6419 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006420echo "configure:6421: checking whether ${CC-cc} needs -traditional" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006421if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
6422 echo $ac_n "(cached) $ac_c" 1>&6
6423else
6424 ac_pattern="Autoconf.*'x'"
6425 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006426#line 6427 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006427#include "confdefs.h"
6428#include <sgtty.h>
6429Autoconf TIOCGETP
6430EOF
6431if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6432 egrep "$ac_pattern" >/dev/null 2>&1; then
6433 rm -rf conftest*
6434 ac_cv_prog_gcc_traditional=yes
6435else
6436 rm -rf conftest*
6437 ac_cv_prog_gcc_traditional=no
6438fi
6439rm -f conftest*
6440
6441
6442 if test $ac_cv_prog_gcc_traditional = no; then
6443 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006444#line 6445 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006445#include "confdefs.h"
6446#include <termio.h>
6447Autoconf TCGETA
6448EOF
6449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6450 egrep "$ac_pattern" >/dev/null 2>&1; then
6451 rm -rf conftest*
6452 ac_cv_prog_gcc_traditional=yes
6453fi
6454rm -f conftest*
6455
6456 fi
6457fi
6458
6459echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
6460 if test $ac_cv_prog_gcc_traditional = yes; then
6461 CC="$CC -traditional"
6462 fi
6463fi
6464
6465echo $ac_n "checking for working const""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006466echo "configure:6467: checking for working const" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006467if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6468 echo $ac_n "(cached) $ac_c" 1>&6
6469else
6470 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006471#line 6472 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006472#include "confdefs.h"
6473
6474int main() {
6475
6476/* Ultrix mips cc rejects this. */
6477typedef int charset[2]; const charset x;
6478/* SunOS 4.1.1 cc rejects this. */
6479char const *const *ccp;
6480char **p;
6481/* NEC SVR4.0.2 mips cc rejects this. */
6482struct point {int x, y;};
6483static struct point const zero = {0,0};
6484/* AIX XL C 1.02.0.0 rejects this.
6485 It does not let you subtract one const X* pointer from another in an arm
6486 of an if-expression whose if-part is not a constant expression */
6487const char *g = "string";
6488ccp = &g + (g ? g-g : 0);
6489/* HPUX 7.0 cc rejects these. */
6490++ccp;
6491p = (char**) ccp;
6492ccp = (char const *const *) p;
6493{ /* SCO 3.2v4 cc rejects this. */
6494 char *t;
6495 char const *s = 0 ? (char *) 0 : (char const *) 0;
6496
6497 *t++ = 0;
6498}
6499{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6500 int x[] = {25, 17};
6501 const int *foo = &x[0];
6502 ++foo;
6503}
6504{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6505 typedef const int *iptr;
6506 iptr p = 0;
6507 ++p;
6508}
6509{ /* AIX XL C 1.02.0.0 rejects this saying
6510 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6511 struct s { int j; const int *ap[3]; };
6512 struct s *b; b->j = 5;
6513}
6514{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6515 const int foo = 10;
6516}
6517
6518; return 0; }
6519EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006520if { (eval echo configure:6521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006521 rm -rf conftest*
6522 ac_cv_c_const=yes
6523else
6524 echo "configure: failed program was:" >&5
6525 cat conftest.$ac_ext >&5
6526 rm -rf conftest*
6527 ac_cv_c_const=no
6528fi
6529rm -f conftest*
6530fi
6531
6532echo "$ac_t""$ac_cv_c_const" 1>&6
6533if test $ac_cv_c_const = no; then
6534 cat >> confdefs.h <<\EOF
6535#define const
6536EOF
6537
6538fi
6539
6540echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006541echo "configure:6542: checking for mode_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006542if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
6543 echo $ac_n "(cached) $ac_c" 1>&6
6544else
6545 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006546#line 6547 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006547#include "confdefs.h"
6548#include <sys/types.h>
6549#if STDC_HEADERS
6550#include <stdlib.h>
6551#include <stddef.h>
6552#endif
6553EOF
6554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6555 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6556 rm -rf conftest*
6557 ac_cv_type_mode_t=yes
6558else
6559 rm -rf conftest*
6560 ac_cv_type_mode_t=no
6561fi
6562rm -f conftest*
6563
6564fi
6565echo "$ac_t""$ac_cv_type_mode_t" 1>&6
6566if test $ac_cv_type_mode_t = no; then
6567 cat >> confdefs.h <<\EOF
6568#define mode_t int
6569EOF
6570
6571fi
6572
6573echo $ac_n "checking for off_t""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006574echo "configure:6575: checking for off_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006575if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
6576 echo $ac_n "(cached) $ac_c" 1>&6
6577else
6578 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006579#line 6580 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006580#include "confdefs.h"
6581#include <sys/types.h>
6582#if STDC_HEADERS
6583#include <stdlib.h>
6584#include <stddef.h>
6585#endif
6586EOF
6587if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6588 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6589 rm -rf conftest*
6590 ac_cv_type_off_t=yes
6591else
6592 rm -rf conftest*
6593 ac_cv_type_off_t=no
6594fi
6595rm -f conftest*
6596
6597fi
6598echo "$ac_t""$ac_cv_type_off_t" 1>&6
6599if test $ac_cv_type_off_t = no; then
6600 cat >> confdefs.h <<\EOF
6601#define off_t long
6602EOF
6603
6604fi
6605
6606echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006607echo "configure:6608: checking for pid_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006608if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6609 echo $ac_n "(cached) $ac_c" 1>&6
6610else
6611 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006612#line 6613 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006613#include "confdefs.h"
6614#include <sys/types.h>
6615#if STDC_HEADERS
6616#include <stdlib.h>
6617#include <stddef.h>
6618#endif
6619EOF
6620if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6621 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6622 rm -rf conftest*
6623 ac_cv_type_pid_t=yes
6624else
6625 rm -rf conftest*
6626 ac_cv_type_pid_t=no
6627fi
6628rm -f conftest*
6629
6630fi
6631echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6632if test $ac_cv_type_pid_t = no; then
6633 cat >> confdefs.h <<\EOF
6634#define pid_t int
6635EOF
6636
6637fi
6638
6639echo $ac_n "checking for size_t""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006640echo "configure:6641: checking for size_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006641if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
6642 echo $ac_n "(cached) $ac_c" 1>&6
6643else
6644 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006645#line 6646 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006646#include "confdefs.h"
6647#include <sys/types.h>
6648#if STDC_HEADERS
6649#include <stdlib.h>
6650#include <stddef.h>
6651#endif
6652EOF
6653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6654 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6655 rm -rf conftest*
6656 ac_cv_type_size_t=yes
6657else
6658 rm -rf conftest*
6659 ac_cv_type_size_t=no
6660fi
6661rm -f conftest*
6662
6663fi
6664echo "$ac_t""$ac_cv_type_size_t" 1>&6
6665if test $ac_cv_type_size_t = no; then
6666 cat >> confdefs.h <<\EOF
6667#define size_t unsigned
6668EOF
6669
6670fi
6671
6672echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006673echo "configure:6674: checking for uid_t in sys/types.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006674if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
6675 echo $ac_n "(cached) $ac_c" 1>&6
6676else
6677 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006678#line 6679 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006679#include "confdefs.h"
6680#include <sys/types.h>
6681EOF
6682if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6683 egrep "uid_t" >/dev/null 2>&1; then
6684 rm -rf conftest*
6685 ac_cv_type_uid_t=yes
6686else
6687 rm -rf conftest*
6688 ac_cv_type_uid_t=no
6689fi
6690rm -f conftest*
6691
6692fi
6693
6694echo "$ac_t""$ac_cv_type_uid_t" 1>&6
6695if test $ac_cv_type_uid_t = no; then
6696 cat >> confdefs.h <<\EOF
6697#define uid_t int
6698EOF
6699
6700 cat >> confdefs.h <<\EOF
6701#define gid_t int
6702EOF
6703
6704fi
6705
6706echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006707echo "configure:6708: checking whether time.h and sys/time.h may both be included" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006708if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
6709 echo $ac_n "(cached) $ac_c" 1>&6
6710else
6711 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006712#line 6713 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006713#include "confdefs.h"
6714#include <sys/types.h>
6715#include <sys/time.h>
6716#include <time.h>
6717int main() {
6718struct tm *tp;
6719; return 0; }
6720EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006721if { (eval echo configure:6722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006722 rm -rf conftest*
6723 ac_cv_header_time=yes
6724else
6725 echo "configure: failed program was:" >&5
6726 cat conftest.$ac_ext >&5
6727 rm -rf conftest*
6728 ac_cv_header_time=no
6729fi
6730rm -f conftest*
6731fi
6732
6733echo "$ac_t""$ac_cv_header_time" 1>&6
6734if test $ac_cv_header_time = yes; then
6735 cat >> confdefs.h <<\EOF
6736#define TIME_WITH_SYS_TIME 1
6737EOF
6738
6739fi
6740
6741echo $ac_n "checking for ino_t""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006742echo "configure:6743: checking for ino_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006743if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
6744 echo $ac_n "(cached) $ac_c" 1>&6
6745else
6746 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006747#line 6748 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006748#include "confdefs.h"
6749#include <sys/types.h>
6750#if STDC_HEADERS
6751#include <stdlib.h>
6752#include <stddef.h>
6753#endif
6754EOF
6755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6756 egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6757 rm -rf conftest*
6758 ac_cv_type_ino_t=yes
6759else
6760 rm -rf conftest*
6761 ac_cv_type_ino_t=no
6762fi
6763rm -f conftest*
6764
6765fi
6766echo "$ac_t""$ac_cv_type_ino_t" 1>&6
6767if test $ac_cv_type_ino_t = no; then
6768 cat >> confdefs.h <<\EOF
6769#define ino_t long
6770EOF
6771
6772fi
6773
6774echo $ac_n "checking for dev_t""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006775echo "configure:6776: checking for dev_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006776if eval "test \"`echo '$''{'ac_cv_type_dev_t'+set}'`\" = set"; then
6777 echo $ac_n "(cached) $ac_c" 1>&6
6778else
6779 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006780#line 6781 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006781#include "confdefs.h"
6782#include <sys/types.h>
6783#if STDC_HEADERS
6784#include <stdlib.h>
6785#include <stddef.h>
6786#endif
6787EOF
6788if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6789 egrep "(^|[^a-zA-Z_0-9])dev_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6790 rm -rf conftest*
6791 ac_cv_type_dev_t=yes
6792else
6793 rm -rf conftest*
6794 ac_cv_type_dev_t=no
6795fi
6796rm -f conftest*
6797
6798fi
6799echo "$ac_t""$ac_cv_type_dev_t" 1>&6
6800if test $ac_cv_type_dev_t = no; then
6801 cat >> confdefs.h <<\EOF
6802#define dev_t unsigned
6803EOF
6804
6805fi
6806
6807
6808echo $ac_n "checking for rlim_t""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006809echo "configure:6810: checking for rlim_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006810if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
6811 echo "$ac_t""(cached) $ac_cv_type_rlim_t" 1>&6
6812else
6813 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006814#line 6815 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006815#include "confdefs.h"
6816
6817#include <sys/types.h>
6818#if STDC_HEADERS
6819#include <stdlib.h>
6820#include <stddef.h>
6821#endif
6822#ifdef HAVE_SYS_RESOURCE_H
6823#include <sys/resource.h>
6824#endif
6825
6826EOF
6827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6828 egrep "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6829 rm -rf conftest*
6830 ac_cv_type_rlim_t=yes
6831else
6832 rm -rf conftest*
6833 ac_cv_type_rlim_t=no
6834fi
6835rm -f conftest*
6836
6837 echo "$ac_t""$ac_cv_type_rlim_t" 1>&6
6838fi
6839if test $ac_cv_type_rlim_t = no; then
6840 cat >> confdefs.h <<\EOF
6841#define rlim_t unsigned long
6842EOF
6843fi
6844
6845echo $ac_n "checking for stack_t""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006846echo "configure:6847: checking for stack_t" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006847if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
6848 echo "$ac_t""(cached) $ac_cv_type_stack_t" 1>&6
6849else
6850 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006851#line 6852 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006852#include "confdefs.h"
6853
6854#include <sys/types.h>
6855#if STDC_HEADERS
6856#include <stdlib.h>
6857#include <stddef.h>
6858#endif
6859#include <signal.h>
6860
6861EOF
6862if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6863 egrep "stack_t" >/dev/null 2>&1; then
6864 rm -rf conftest*
6865 ac_cv_type_stack_t=yes
6866else
6867 rm -rf conftest*
6868 ac_cv_type_stack_t=no
6869fi
6870rm -f conftest*
6871
6872 echo "$ac_t""$ac_cv_type_stack_t" 1>&6
6873fi
6874if test $ac_cv_type_stack_t = no; then
6875 cat >> confdefs.h <<\EOF
6876#define stack_t struct sigaltstack
6877EOF
6878fi
6879
6880echo $ac_n "checking whether stack_t has an ss_base field""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006881echo "configure:6882: checking whether stack_t has an ss_base field" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006882cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006883#line 6884 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006884#include "confdefs.h"
6885
6886#include <sys/types.h>
6887#if STDC_HEADERS
6888#include <stdlib.h>
6889#include <stddef.h>
6890#endif
6891#include <signal.h>
6892#include "confdefs.h"
6893
6894int main() {
6895stack_t sigstk; sigstk.ss_base = 0;
6896; return 0; }
6897EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006898if { (eval echo configure:6899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006899 rm -rf conftest*
6900 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
6901#define HAVE_SS_BASE 1
6902EOF
6903
6904else
6905 echo "configure: failed program was:" >&5
6906 cat conftest.$ac_ext >&5
6907 rm -rf conftest*
6908 echo "$ac_t""no" 1>&6
6909fi
6910rm -f conftest*
6911
6912olibs="$LIBS"
6913echo $ac_n "checking --with-tlib argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006914echo "configure:6915: checking --with-tlib argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006915# Check whether --with-tlib or --without-tlib was given.
6916if test "${with_tlib+set}" = set; then
6917 withval="$with_tlib"
6918 :
6919fi
6920
6921if test -n "$with_tlib"; then
6922 echo "$ac_t""$with_tlib" 1>&6
6923 LIBS="$LIBS -l$with_tlib"
6924else
6925 echo "$ac_t""automatic terminal library selection" 1>&6
6926 case "`uname -s 2>/dev/null`" in
6927 OSF1) tlibs="ncurses curses termlib termcap";;
6928 *) tlibs="ncurses termlib termcap curses";;
6929 esac
6930 for libname in $tlibs; do
6931 echo $ac_n "checking for tgetent in -l${libname}""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006932echo "configure:6933: checking for tgetent in -l${libname}" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00006933ac_lib_var=`echo ${libname}'_'tgetent | sed 'y%./+-%__p_%'`
6934if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6935 echo $ac_n "(cached) $ac_c" 1>&6
6936else
6937 ac_save_LIBS="$LIBS"
6938LIBS="-l${libname} $LIBS"
6939cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006940#line 6941 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006941#include "confdefs.h"
6942/* Override any gcc2 internal prototype to avoid an error. */
6943/* We use char because int might match the return type of a gcc2
6944 builtin and then its argument prototype would still apply. */
6945char tgetent();
6946
6947int main() {
6948tgetent()
6949; return 0; }
6950EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006951if { (eval echo configure:6952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006952 rm -rf conftest*
6953 eval "ac_cv_lib_$ac_lib_var=yes"
6954else
6955 echo "configure: failed program was:" >&5
6956 cat conftest.$ac_ext >&5
6957 rm -rf conftest*
6958 eval "ac_cv_lib_$ac_lib_var=no"
6959fi
6960rm -f conftest*
6961LIBS="$ac_save_LIBS"
6962
6963fi
6964if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6965 echo "$ac_t""yes" 1>&6
6966 ac_tr_lib=HAVE_LIB`echo ${libname} | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6967 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6968 cat >> confdefs.h <<EOF
6969#define $ac_tr_lib 1
6970EOF
6971
6972 LIBS="-l${libname} $LIBS"
6973
6974else
6975 echo "$ac_t""no" 1>&6
6976fi
6977
6978 if test "x$olibs" != "x$LIBS"; then
6979 if test "$cross_compiling" = yes; then
6980 res="FAIL"
6981else
6982 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006983#line 6984 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006984#include "confdefs.h"
6985
6986#ifdef HAVE_TERMCAP_H
6987# include <termcap.h>
6988#endif
6989main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
6990EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006991if { (eval echo configure:6992: \"$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 +00006992then
6993 res="OK"
6994else
6995 echo "configure: failed program was:" >&5
6996 cat conftest.$ac_ext >&5
6997 rm -fr conftest*
6998 res="FAIL"
6999fi
7000rm -fr conftest*
7001fi
7002
7003 if test "$res" = "OK"; then
7004 break
7005 fi
7006 echo "$ac_t""$libname library is not usable" 1>&6
7007 LIBS="$olibs"
7008 fi
7009 done
7010fi
7011if test "x$olibs" != "x$LIBS"; then
7012 echo $ac_n "checking whether we talk terminfo""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007013echo "configure:7014: checking whether we talk terminfo" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007014 if test "$cross_compiling" = yes; then
7015 { echo "configure: error: failed to compile test program." 1>&2; exit 1; }
7016else
7017 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007018#line 7019 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007019#include "confdefs.h"
7020
7021#ifdef HAVE_TERMCAP_H
7022# include <termcap.h>
7023#endif
7024main()
7025{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
7026EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007027if { (eval echo configure:7028: \"$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 +00007028then
7029 echo "$ac_t""no -- we are in termcap land" 1>&6
7030else
7031 echo "configure: failed program was:" >&5
7032 cat conftest.$ac_ext >&5
7033 rm -fr conftest*
7034 echo "$ac_t""yes -- terminfo spoken here" 1>&6; cat >> confdefs.h <<\EOF
7035#define TERMINFO 1
7036EOF
7037
7038fi
7039rm -fr conftest*
7040fi
7041
7042else
7043 echo "$ac_t""none found" 1>&6
7044fi
7045
7046if test "x$olibs" != "x$LIBS"; then
7047 echo $ac_n "checking what tgetent() returns for an unknown terminal""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007048echo "configure:7049: checking what tgetent() returns for an unknown terminal" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007049 if test "$cross_compiling" = yes; then
7050 { echo "configure: error: failed to compile test program." 1>&2; exit 1; }
7051else
7052 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007053#line 7054 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007054#include "confdefs.h"
7055
7056#ifdef HAVE_TERMCAP_H
7057# include <termcap.h>
7058#endif
7059main()
7060{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
7061EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007062if { (eval echo configure:7063: \"$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 +00007063then
7064 echo "$ac_t""zero" 1>&6; cat >> confdefs.h <<\EOF
7065#define TGETENT_ZERO_ERR 0
7066EOF
7067
7068else
7069 echo "configure: failed program was:" >&5
7070 cat conftest.$ac_ext >&5
7071 rm -fr conftest*
7072 echo "$ac_t""non-zero" 1>&6
7073fi
7074rm -fr conftest*
7075fi
7076
7077fi
7078
7079echo $ac_n "checking whether termcap.h contains ospeed""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007080echo "configure:7081: checking whether termcap.h contains ospeed" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007081cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007082#line 7083 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007083#include "confdefs.h"
7084
7085#ifdef HAVE_TERMCAP_H
7086# include <termcap.h>
7087#endif
7088
7089int main() {
7090ospeed = 20000
7091; return 0; }
7092EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007093if { (eval echo configure:7094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007094 rm -rf conftest*
7095 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7096#define HAVE_OSPEED 1
7097EOF
7098
7099else
7100 echo "configure: failed program was:" >&5
7101 cat conftest.$ac_ext >&5
7102 rm -rf conftest*
7103 echo "$ac_t""no" 1>&6
7104 echo $ac_n "checking whether ospeed can be extern""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007105echo "configure:7106: checking whether ospeed can be extern" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007106 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007107#line 7108 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007108#include "confdefs.h"
7109
7110#ifdef HAVE_TERMCAP_H
7111# include <termcap.h>
7112#endif
7113extern short ospeed;
7114
7115int main() {
7116ospeed = 20000
7117; return 0; }
7118EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007119if { (eval echo configure:7120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007120 rm -rf conftest*
7121 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7122#define OSPEED_EXTERN 1
7123EOF
7124
7125else
7126 echo "configure: failed program was:" >&5
7127 cat conftest.$ac_ext >&5
7128 rm -rf conftest*
7129 echo "$ac_t""no" 1>&6
7130fi
7131rm -f conftest*
7132
7133fi
7134rm -f conftest*
7135
7136echo $ac_n "checking whether termcap.h contains UP, BC and PC""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007137echo "configure:7138: checking whether termcap.h contains UP, BC and PC" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007138cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +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() {
7147if (UP == 0 && BC == 0) PC = 1
7148; return 0; }
7149EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +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_UP_BC_PC 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 UP, BC and PC can be extern""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007162echo "configure:7163: checking whether UP, BC and PC can be extern" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007163 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +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 char *UP, *BC, PC;
7171
7172int main() {
7173if (UP == 0 && BC == 0) PC = 1
7174; return 0; }
7175EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +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 UP_BC_PC_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 tputs() uses outfuntype""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007194echo "configure:7195: checking whether tputs() uses outfuntype" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007195cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +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() {
7204extern int xx(); tputs("test", 1, (outfuntype)xx)
7205; return 0; }
7206EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007207if { (eval echo configure:7208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; 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_OUTFUNTYPE 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
7218fi
7219rm -f conftest*
7220
7221echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007222echo "configure:7223: checking whether sys/select.h and sys/time.h may both be included" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007223cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007224#line 7225 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007225#include "confdefs.h"
7226
7227#include <sys/types.h>
7228#include <sys/time.h>
7229#include <sys/select.h>
7230int main() {
7231
7232; return 0; }
7233EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007234if { (eval echo configure:7235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007235 rm -rf conftest*
7236 echo "$ac_t""yes" 1>&6
7237 cat >> confdefs.h <<\EOF
7238#define SYS_SELECT_WITH_SYS_TIME 1
7239EOF
7240
7241else
7242 echo "configure: failed program was:" >&5
7243 cat conftest.$ac_ext >&5
7244 rm -rf conftest*
7245 echo "$ac_t""no" 1>&6
7246fi
7247rm -f conftest*
7248
7249
7250echo $ac_n "checking for /dev/ptc""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007251echo "configure:7252: checking for /dev/ptc" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007252if test -r /dev/ptc; then
7253 cat >> confdefs.h <<\EOF
7254#define HAVE_DEV_PTC 1
7255EOF
7256
7257 echo "$ac_t""yes" 1>&6
7258else
7259 echo "$ac_t""no" 1>&6
7260fi
7261
7262echo $ac_n "checking for SVR4 ptys""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007263echo "configure:7264: checking for SVR4 ptys" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007264if test -c /dev/ptmx ; then
7265 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007266#line 7267 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007267#include "confdefs.h"
7268
7269int main() {
7270ptsname(0);grantpt(0);unlockpt(0);
7271; return 0; }
7272EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007273if { (eval echo configure:7274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007274 rm -rf conftest*
7275 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7276#define HAVE_SVR4_PTYS 1
7277EOF
7278
7279else
7280 echo "configure: failed program was:" >&5
7281 cat conftest.$ac_ext >&5
7282 rm -rf conftest*
7283 echo "$ac_t""no" 1>&6
7284fi
7285rm -f conftest*
7286else
7287 echo "$ac_t""no" 1>&6
7288fi
7289
7290echo $ac_n "checking for ptyranges""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007291echo "configure:7292: checking for ptyranges" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007292if test -d /dev/ptym ; then
7293 pdir='/dev/ptym'
7294else
7295 pdir='/dev'
7296fi
7297cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007298#line 7299 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007299#include "confdefs.h"
7300#ifdef M_UNIX
7301 yes;
7302#endif
7303
7304EOF
7305if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7306 egrep "yes" >/dev/null 2>&1; then
7307 rm -rf conftest*
7308 ptys=`echo /dev/ptyp??`
7309else
7310 rm -rf conftest*
7311 ptys=`echo $pdir/pty??`
7312fi
7313rm -f conftest*
7314
7315if test "$ptys" != "$pdir/pty??" ; then
7316 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
7317 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
7318 cat >> confdefs.h <<EOF
7319#define PTYRANGE0 "$p0"
7320EOF
7321
7322 cat >> confdefs.h <<EOF
7323#define PTYRANGE1 "$p1"
7324EOF
7325
7326 echo "$ac_t""$p0 / $p1" 1>&6
7327else
7328 echo "$ac_t""don't know" 1>&6
7329fi
7330
7331echo $ac_n "checking default tty permissions/group""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007332echo "configure:7333: checking default tty permissions/group" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007333rm -f conftest_grp
7334if test "$cross_compiling" = yes; then
7335 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7336else
7337 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007338#line 7339 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007339#include "confdefs.h"
7340
7341#include <sys/types.h>
7342#include <sys/stat.h>
7343#include <stdio.h>
7344main()
7345{
7346 struct stat sb;
7347 char *x,*ttyname();
7348 int om, m;
7349 FILE *fp;
7350
7351 if (!(x = ttyname(0))) exit(1);
7352 if (stat(x, &sb)) exit(1);
7353 om = sb.st_mode;
7354 if (om & 002) exit(0);
7355 m = system("mesg y");
7356 if (m == -1 || m == 127) exit(1);
7357 if (stat(x, &sb)) exit(1);
7358 m = sb.st_mode;
7359 if (chmod(x, om)) exit(1);
7360 if (m & 002) exit(0);
7361 if (sb.st_gid == getgid()) exit(1);
7362 if (!(fp=fopen("conftest_grp", "w")))
7363 exit(1);
7364 fprintf(fp, "%d\n", sb.st_gid);
7365 fclose(fp);
7366 exit(0);
7367}
7368
7369EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007370if { (eval echo configure:7371: \"$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 +00007371then
7372
7373 if test -f conftest_grp; then
7374 ptygrp=`cat conftest_grp`
7375 echo "$ac_t""pty mode: 0620, group: $ptygrp" 1>&6
7376 cat >> confdefs.h <<\EOF
7377#define PTYMODE 0620
7378EOF
7379
7380 cat >> confdefs.h <<EOF
7381#define PTYGROUP $ptygrp
7382EOF
7383
7384 else
7385 echo "$ac_t""ptys are world accessable" 1>&6
7386 fi
7387
7388else
7389 echo "configure: failed program was:" >&5
7390 cat conftest.$ac_ext >&5
7391 rm -fr conftest*
7392 echo "$ac_t""can't determine - assume ptys are world accessable" 1>&6
7393fi
7394rm -fr conftest*
7395fi
7396
7397rm -f conftest_grp
7398
7399
7400echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007401echo "configure:7402: checking return type of signal handlers" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007402if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
7403 echo $ac_n "(cached) $ac_c" 1>&6
7404else
7405 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007406#line 7407 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007407#include "confdefs.h"
7408#include <sys/types.h>
7409#include <signal.h>
7410#ifdef signal
7411#undef signal
7412#endif
7413#ifdef __cplusplus
7414extern "C" void (*signal (int, void (*)(int)))(int);
7415#else
7416void (*signal ()) ();
7417#endif
7418
7419int main() {
7420int i;
7421; return 0; }
7422EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007423if { (eval echo configure:7424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007424 rm -rf conftest*
7425 ac_cv_type_signal=void
7426else
7427 echo "configure: failed program was:" >&5
7428 cat conftest.$ac_ext >&5
7429 rm -rf conftest*
7430 ac_cv_type_signal=int
7431fi
7432rm -f conftest*
7433fi
7434
7435echo "$ac_t""$ac_cv_type_signal" 1>&6
7436cat >> confdefs.h <<EOF
7437#define RETSIGTYPE $ac_cv_type_signal
7438EOF
7439
7440
7441
7442if test $ac_cv_type_signal = void; then
7443 cat >> confdefs.h <<\EOF
7444#define SIGRETURN return
7445EOF
7446
7447else
7448 cat >> confdefs.h <<\EOF
7449#define SIGRETURN return 0
7450EOF
7451
7452fi
7453
7454echo $ac_n "checking for struct sigcontext""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007455echo "configure:7456: checking for struct sigcontext" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007456cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007457#line 7458 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007458#include "confdefs.h"
7459
7460#include <signal.h>
7461test_sig()
7462{
7463 struct sigcontext *scont;
7464 scont = (struct sigcontext *)0;
7465 return 1;
7466}
7467int main() {
7468
7469; return 0; }
7470EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007471if { (eval echo configure:7472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007472 rm -rf conftest*
7473 echo "$ac_t""yes" 1>&6
7474 cat >> confdefs.h <<\EOF
7475#define HAVE_SIGCONTEXT 1
7476EOF
7477
7478else
7479 echo "configure: failed program was:" >&5
7480 cat conftest.$ac_ext >&5
7481 rm -rf conftest*
7482 echo "$ac_t""no" 1>&6
7483fi
7484rm -f conftest*
7485
7486echo $ac_n "checking getcwd implementation""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007487echo "configure:7488: checking getcwd implementation" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007488if test "$cross_compiling" = yes; then
7489 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7490else
7491 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007492#line 7493 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007493#include "confdefs.h"
7494
7495char *dagger[] = { "IFS=pwd", 0 };
7496main()
7497{
7498 char buffer[500];
7499 extern char **environ;
7500 environ = dagger;
7501 return getcwd(buffer, 500) ? 0 : 1;
7502}
7503EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007504if { (eval echo configure:7505: \"$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 +00007505then
7506 echo "$ac_t""it is usable" 1>&6
7507else
7508 echo "configure: failed program was:" >&5
7509 cat conftest.$ac_ext >&5
7510 rm -fr conftest*
7511 echo "$ac_t""it stinks" 1>&6
7512 cat >> confdefs.h <<\EOF
7513#define BAD_GETCWD 1
7514EOF
7515
7516fi
7517rm -fr conftest*
7518fi
7519
7520
7521for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \
7522 getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
7523 memset nanosleep opendir putenv qsort readlink select setenv \
7524 setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
7525 sigvec snprintf strcasecmp strerror strftime stricmp strncasecmp \
7526 strnicmp strpbrk strtol tgetent towlower towupper usleep utime utimes
7527do
7528echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007529echo "configure:7530: checking for $ac_func" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007530if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7531 echo $ac_n "(cached) $ac_c" 1>&6
7532else
7533 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007534#line 7535 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007535#include "confdefs.h"
7536/* System header to define __stub macros and hopefully few prototypes,
7537 which can conflict with char $ac_func(); below. */
7538#include <assert.h>
7539/* Override any gcc2 internal prototype to avoid an error. */
7540/* We use char because int might match the return type of a gcc2
7541 builtin and then its argument prototype would still apply. */
7542char $ac_func();
7543
7544int main() {
7545
7546/* The GNU C library defines this for functions which it implements
7547 to always fail with ENOSYS. Some functions are actually named
7548 something starting with __ and the normal name is an alias. */
7549#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7550choke me
7551#else
7552$ac_func();
7553#endif
7554
7555; return 0; }
7556EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007557if { (eval echo configure:7558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007558 rm -rf conftest*
7559 eval "ac_cv_func_$ac_func=yes"
7560else
7561 echo "configure: failed program was:" >&5
7562 cat conftest.$ac_ext >&5
7563 rm -rf conftest*
7564 eval "ac_cv_func_$ac_func=no"
7565fi
7566rm -f conftest*
7567fi
7568
7569if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7570 echo "$ac_t""yes" 1>&6
7571 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7572 cat >> confdefs.h <<EOF
7573#define $ac_tr_func 1
7574EOF
7575
7576else
7577 echo "$ac_t""no" 1>&6
7578fi
7579done
7580
7581
7582echo $ac_n "checking for st_blksize""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007583echo "configure:7584: checking for st_blksize" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007584cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007585#line 7586 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007586#include "confdefs.h"
7587#include <sys/types.h>
7588#include <sys/stat.h>
7589int main() {
7590 struct stat st;
7591 int n;
7592
7593 stat("/", &st);
7594 n = (int)st.st_blksize;
7595; return 0; }
7596EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007597if { (eval echo configure:7598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007598 rm -rf conftest*
7599 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7600#define HAVE_ST_BLKSIZE 1
7601EOF
7602
7603else
7604 echo "configure: failed program was:" >&5
7605 cat conftest.$ac_ext >&5
7606 rm -rf conftest*
7607 echo "$ac_t""no" 1>&6
7608fi
7609rm -f conftest*
7610
7611echo $ac_n "checking whether stat() ignores a trailing slash""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007612echo "configure:7613: checking whether stat() ignores a trailing slash" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007613if test "$cross_compiling" = yes; then
7614 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
7615else
7616 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007617#line 7618 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007618#include "confdefs.h"
7619#include <sys/types.h>
7620#include <sys/stat.h>
7621main() {struct stat st; exit(stat("configure/", &st) != 0); }
7622EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007623if { (eval echo configure:7624: \"$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 +00007624then
7625 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7626#define STAT_IGNORES_SLASH 1
7627EOF
7628
7629else
7630 echo "configure: failed program was:" >&5
7631 cat conftest.$ac_ext >&5
7632 rm -fr conftest*
7633 echo "$ac_t""no" 1>&6
7634fi
7635rm -fr conftest*
7636fi
7637
7638
7639echo $ac_n "checking for iconv_open()""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007640echo "configure:7641: checking for iconv_open()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007641save_LIBS="$LIBS"
7642LIBS="$LIBS -liconv"
7643cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007644#line 7645 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007645#include "confdefs.h"
7646
7647#ifdef HAVE_ICONV_H
7648# include <iconv.h>
7649#endif
7650
7651int main() {
7652iconv_open("fr", "to");
7653; return 0; }
7654EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007655if { (eval echo configure:7656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007656 rm -rf conftest*
7657 echo "$ac_t""yes; with -liconv" 1>&6; cat >> confdefs.h <<\EOF
7658#define HAVE_ICONV 1
7659EOF
7660
7661else
7662 echo "configure: failed program was:" >&5
7663 cat conftest.$ac_ext >&5
7664 rm -rf conftest*
7665 LIBS="$save_LIBS"
7666 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007667#line 7668 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007668#include "confdefs.h"
7669
7670#ifdef HAVE_ICONV_H
7671# include <iconv.h>
7672#endif
7673
7674int main() {
7675iconv_open("fr", "to");
7676; return 0; }
7677EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007678if { (eval echo configure:7679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007679 rm -rf conftest*
7680 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7681#define HAVE_ICONV 1
7682EOF
7683
7684else
7685 echo "configure: failed program was:" >&5
7686 cat conftest.$ac_ext >&5
7687 rm -rf conftest*
7688 echo "$ac_t""no" 1>&6
7689fi
7690rm -f conftest*
7691fi
7692rm -f conftest*
7693
7694
7695echo $ac_n "checking for nl_langinfo(CODESET)""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007696echo "configure:7697: checking for nl_langinfo(CODESET)" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007697cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007698#line 7699 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007699#include "confdefs.h"
7700
7701#ifdef HAVE_LANGINFO_H
7702# include <langinfo.h>
7703#endif
7704
7705int main() {
7706char *cs = nl_langinfo(CODESET);
7707; return 0; }
7708EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007709if { (eval echo configure:7710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007710 rm -rf conftest*
7711 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7712#define HAVE_NL_LANGINFO_CODESET 1
7713EOF
7714
7715else
7716 echo "configure: failed program was:" >&5
7717 cat conftest.$ac_ext >&5
7718 rm -rf conftest*
7719 echo "$ac_t""no" 1>&6
7720fi
7721rm -f conftest*
7722
7723echo $ac_n "checking --disable-acl argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007724echo "configure:7725: checking --disable-acl argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007725# Check whether --enable-acl or --disable-acl was given.
7726if test "${enable_acl+set}" = set; then
7727 enableval="$enable_acl"
7728 :
7729else
7730 enable_acl="yes"
7731fi
7732
7733if test "$enable_acl" = "yes"; then
7734echo "$ac_t""no" 1>&6
7735echo $ac_n "checking for acl_get_file in -lposix1e""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007736echo "configure:7737: checking for acl_get_file in -lposix1e" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007737ac_lib_var=`echo posix1e'_'acl_get_file | sed 'y%./+-%__p_%'`
7738if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7739 echo $ac_n "(cached) $ac_c" 1>&6
7740else
7741 ac_save_LIBS="$LIBS"
7742LIBS="-lposix1e $LIBS"
7743cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007744#line 7745 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007745#include "confdefs.h"
7746/* Override any gcc2 internal prototype to avoid an error. */
7747/* We use char because int might match the return type of a gcc2
7748 builtin and then its argument prototype would still apply. */
7749char acl_get_file();
7750
7751int main() {
7752acl_get_file()
7753; return 0; }
7754EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007755if { (eval echo configure:7756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007756 rm -rf conftest*
7757 eval "ac_cv_lib_$ac_lib_var=yes"
7758else
7759 echo "configure: failed program was:" >&5
7760 cat conftest.$ac_ext >&5
7761 rm -rf conftest*
7762 eval "ac_cv_lib_$ac_lib_var=no"
7763fi
7764rm -f conftest*
7765LIBS="$ac_save_LIBS"
7766
7767fi
7768if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7769 echo "$ac_t""yes" 1>&6
7770 LIBS="$LIBS -lposix1e"
7771else
7772 echo "$ac_t""no" 1>&6
7773echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007774echo "configure:7775: checking for acl_get_file in -lacl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007775ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
7776if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7777 echo $ac_n "(cached) $ac_c" 1>&6
7778else
7779 ac_save_LIBS="$LIBS"
7780LIBS="-lacl $LIBS"
7781cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007782#line 7783 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007783#include "confdefs.h"
7784/* Override any gcc2 internal prototype to avoid an error. */
7785/* We use char because int might match the return type of a gcc2
7786 builtin and then its argument prototype would still apply. */
7787char acl_get_file();
7788
7789int main() {
7790acl_get_file()
7791; return 0; }
7792EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007793if { (eval echo configure:7794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007794 rm -rf conftest*
7795 eval "ac_cv_lib_$ac_lib_var=yes"
7796else
7797 echo "configure: failed program was:" >&5
7798 cat conftest.$ac_ext >&5
7799 rm -rf conftest*
7800 eval "ac_cv_lib_$ac_lib_var=no"
7801fi
7802rm -f conftest*
7803LIBS="$ac_save_LIBS"
7804
7805fi
7806if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7807 echo "$ac_t""yes" 1>&6
7808 LIBS="$LIBS -lacl"
7809 echo $ac_n "checking for fgetxattr in -lattr""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007810echo "configure:7811: checking for fgetxattr in -lattr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007811ac_lib_var=`echo attr'_'fgetxattr | sed 'y%./+-%__p_%'`
7812if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7813 echo $ac_n "(cached) $ac_c" 1>&6
7814else
7815 ac_save_LIBS="$LIBS"
7816LIBS="-lattr $LIBS"
7817cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007818#line 7819 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007819#include "confdefs.h"
7820/* Override any gcc2 internal prototype to avoid an error. */
7821/* We use char because int might match the return type of a gcc2
7822 builtin and then its argument prototype would still apply. */
7823char fgetxattr();
7824
7825int main() {
7826fgetxattr()
7827; return 0; }
7828EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007829if { (eval echo configure:7830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007830 rm -rf conftest*
7831 eval "ac_cv_lib_$ac_lib_var=yes"
7832else
7833 echo "configure: failed program was:" >&5
7834 cat conftest.$ac_ext >&5
7835 rm -rf conftest*
7836 eval "ac_cv_lib_$ac_lib_var=no"
7837fi
7838rm -f conftest*
7839LIBS="$ac_save_LIBS"
7840
7841fi
7842if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7843 echo "$ac_t""yes" 1>&6
7844 LIBS="$LIBS -lattr"
7845else
7846 echo "$ac_t""no" 1>&6
7847fi
7848
7849else
7850 echo "$ac_t""no" 1>&6
7851fi
7852
7853fi
7854
7855
7856echo $ac_n "checking for POSIX ACL support""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007857echo "configure:7858: checking for POSIX ACL support" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007858cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007859#line 7860 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007860#include "confdefs.h"
7861
7862#include <sys/types.h>
7863#ifdef HAVE_SYS_ACL_H
7864# include <sys/acl.h>
7865#endif
7866acl_t acl;
7867int main() {
7868acl = acl_get_file("foo", ACL_TYPE_ACCESS);
7869 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
7870 acl_free(acl);
7871; return 0; }
7872EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007873if { (eval echo configure:7874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007874 rm -rf conftest*
7875 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7876#define HAVE_POSIX_ACL 1
7877EOF
7878
7879else
7880 echo "configure: failed program was:" >&5
7881 cat conftest.$ac_ext >&5
7882 rm -rf conftest*
7883 echo "$ac_t""no" 1>&6
7884fi
7885rm -f conftest*
7886
7887echo $ac_n "checking for Solaris ACL support""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007888echo "configure:7889: checking for Solaris ACL support" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007889cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007890#line 7891 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007891#include "confdefs.h"
7892
7893#ifdef HAVE_SYS_ACL_H
7894# include <sys/acl.h>
7895#endif
7896int main() {
7897acl("foo", GETACLCNT, 0, NULL);
7898
7899; return 0; }
7900EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007901if { (eval echo configure:7902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007902 rm -rf conftest*
7903 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7904#define HAVE_SOLARIS_ACL 1
7905EOF
7906
7907else
7908 echo "configure: failed program was:" >&5
7909 cat conftest.$ac_ext >&5
7910 rm -rf conftest*
7911 echo "$ac_t""no" 1>&6
7912fi
7913rm -f conftest*
7914
7915echo $ac_n "checking for AIX ACL support""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007916echo "configure:7917: checking for AIX ACL support" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007917cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007918#line 7919 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007919#include "confdefs.h"
7920
7921#ifdef HAVE_SYS_ACL_H
7922# include <sys/acl.h>
7923#endif
7924#ifdef HAVE_SYS_ACCESS_H
7925# include <sys/access.h>
7926#endif
7927#define _ALL_SOURCE
7928
7929#include <sys/stat.h>
7930
7931int aclsize;
7932struct acl *aclent;
7933int main() {
7934aclsize = sizeof(struct acl);
7935 aclent = (void *)malloc(aclsize);
7936 statacl("foo", STX_NORMAL, aclent, aclsize);
7937
7938; return 0; }
7939EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007940if { (eval echo configure:7941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007941 rm -rf conftest*
7942 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
7943#define HAVE_AIX_ACL 1
7944EOF
7945
7946else
7947 echo "configure: failed program was:" >&5
7948 cat conftest.$ac_ext >&5
7949 rm -rf conftest*
7950 echo "$ac_t""no" 1>&6
7951fi
7952rm -f conftest*
7953else
7954 echo "$ac_t""yes" 1>&6
7955fi
7956
7957echo $ac_n "checking --disable-gpm argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007958echo "configure:7959: checking --disable-gpm argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007959# Check whether --enable-gpm or --disable-gpm was given.
7960if test "${enable_gpm+set}" = set; then
7961 enableval="$enable_gpm"
7962 :
7963else
7964 enable_gpm="yes"
7965fi
7966
7967
7968if test "$enable_gpm" = "yes"; then
7969 echo "$ac_t""no" 1>&6
7970 echo $ac_n "checking for gpm""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007971echo "configure:7972: checking for gpm" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00007972if eval "test \"`echo '$''{'vi_cv_have_gpm'+set}'`\" = set"; then
7973 echo $ac_n "(cached) $ac_c" 1>&6
7974else
7975 olibs="$LIBS" ; LIBS="-lgpm"
7976 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007977#line 7978 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007978#include "confdefs.h"
7979#include <gpm.h>
7980 #include <linux/keyboard.h>
7981int main() {
7982Gpm_GetLibVersion(NULL);
7983; return 0; }
7984EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00007985if { (eval echo configure:7986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007986 rm -rf conftest*
7987 vi_cv_have_gpm=yes
7988else
7989 echo "configure: failed program was:" >&5
7990 cat conftest.$ac_ext >&5
7991 rm -rf conftest*
7992 vi_cv_have_gpm=no
7993fi
7994rm -f conftest*
7995 LIBS="$olibs"
7996
7997fi
7998
7999echo "$ac_t""$vi_cv_have_gpm" 1>&6
8000 if test $vi_cv_have_gpm = yes; then
8001 LIBS="$LIBS -lgpm"
8002 cat >> confdefs.h <<\EOF
8003#define HAVE_GPM 1
8004EOF
8005
8006 fi
8007else
8008 echo "$ac_t""yes" 1>&6
8009fi
8010
8011echo $ac_n "checking for vsnprintf()""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008012echo "configure:8013: checking for vsnprintf()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008013if test "$cross_compiling" = yes; then
8014 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8015else
8016 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008017#line 8018 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008018#include "confdefs.h"
8019
8020#include <stdio.h>
8021#include <stdarg.h>
8022 /* Check use of vsnprintf() */
8023 void warn(char *fmt, ...);
8024 void warn(char *fmt, ...)
8025 {
8026 va_list ap; char buf[20];
8027 va_start(ap, fmt);
8028 vsnprintf(buf, 20, fmt, ap);
8029 va_end(ap);
8030 }
8031 main()
8032 {
8033 warn("testing %s\n", "a very long string that won't fit");
8034 exit(0);
8035 }
8036
8037EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008038if { (eval echo configure:8039: \"$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 +00008039then
8040 cat >> confdefs.h <<\EOF
8041#define HAVE_VSNPRINTF 1
8042EOF
8043 echo "$ac_t""yes" 1>&6
8044else
8045 echo "configure: failed program was:" >&5
8046 cat conftest.$ac_ext >&5
8047 rm -fr conftest*
8048 echo "$ac_t""no" 1>&6
8049fi
8050rm -fr conftest*
8051fi
8052
8053
8054
8055echo $ac_n "checking for rename""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008056echo "configure:8057: checking for rename" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008057cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008058#line 8059 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008059#include "confdefs.h"
8060#include <stdio.h>
8061int main() {
8062rename("this", "that")
8063; return 0; }
8064EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008065if { (eval echo configure:8066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008066 rm -rf conftest*
8067 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8068#define HAVE_RENAME 1
8069EOF
8070
8071else
8072 echo "configure: failed program was:" >&5
8073 cat conftest.$ac_ext >&5
8074 rm -rf conftest*
8075 echo "$ac_t""no" 1>&6
8076fi
8077rm -f conftest*
8078
8079echo $ac_n "checking for sysctl""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008080echo "configure:8081: checking for sysctl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008081cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008082#line 8083 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008083#include "confdefs.h"
8084#include <sys/types.h>
8085#include <sys/sysctl.h>
8086int main() {
8087 int mib[2], r;
8088 size_t len;
8089
8090 mib[0] = CTL_HW;
8091 mib[1] = HW_USERMEM;
8092 len = sizeof(r);
8093 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
8094
8095; return 0; }
8096EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008097if { (eval echo configure:8098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008098 rm -rf conftest*
8099 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8100#define HAVE_SYSCTL 1
8101EOF
8102
8103else
8104 echo "configure: failed program was:" >&5
8105 cat conftest.$ac_ext >&5
8106 rm -rf conftest*
8107 echo "$ac_t""not usable" 1>&6
8108fi
8109rm -f conftest*
8110
8111echo $ac_n "checking for sysinfo""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008112echo "configure:8113: checking for sysinfo" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008113cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008114#line 8115 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008115#include "confdefs.h"
8116#include <sys/types.h>
8117#include <sys/sysinfo.h>
8118int main() {
8119 struct sysinfo sinfo;
8120 int t;
8121
8122 (void)sysinfo(&sinfo);
8123 t = sinfo.totalram;
8124
8125; return 0; }
8126EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008127if { (eval echo configure:8128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008128 rm -rf conftest*
8129 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8130#define HAVE_SYSINFO 1
8131EOF
8132
8133else
8134 echo "configure: failed program was:" >&5
8135 cat conftest.$ac_ext >&5
8136 rm -rf conftest*
8137 echo "$ac_t""not usable" 1>&6
8138fi
8139rm -f conftest*
8140
8141echo $ac_n "checking for sysconf""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008142echo "configure:8143: checking for sysconf" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008143cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008144#line 8145 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008145#include "confdefs.h"
8146#include <unistd.h>
8147int main() {
8148 (void)sysconf(_SC_PAGESIZE);
8149 (void)sysconf(_SC_PHYS_PAGES);
8150
8151; return 0; }
8152EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008153if { (eval echo configure:8154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008154 rm -rf conftest*
8155 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8156#define HAVE_SYSCONF 1
8157EOF
8158
8159else
8160 echo "configure: failed program was:" >&5
8161 cat conftest.$ac_ext >&5
8162 rm -rf conftest*
8163 echo "$ac_t""not usable" 1>&6
8164fi
8165rm -f conftest*
8166
8167
8168echo $ac_n "checking size of int""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008169echo "configure:8170: checking size of int" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008170if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
8171 echo $ac_n "(cached) $ac_c" 1>&6
8172else
8173 if test "$cross_compiling" = yes; then
8174 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8175else
8176 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008177#line 8178 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008178#include "confdefs.h"
8179#include <stdio.h>
8180 main()
8181 {
8182 FILE *f=fopen("conftestval", "w");
8183 if (!f) exit(1);
8184 fprintf(f, "%d\n", (int)sizeof(int));
8185 exit(0);
8186 }
8187EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008188if { (eval echo configure:8189: \"$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 +00008189then
8190 ac_cv_sizeof_int=`cat conftestval`
8191else
8192 echo "configure: failed program was:" >&5
8193 cat conftest.$ac_ext >&5
8194 rm -fr conftest*
8195 ac_cv_sizeof_int=0
8196fi
8197rm -fr conftest*
8198fi
8199
8200fi
8201
8202echo "$ac_t""$ac_cv_sizeof_int" 1>&6
8203cat >> confdefs.h <<EOF
8204#define SIZEOF_INT $ac_cv_sizeof_int
8205EOF
8206
8207
8208echo $ac_n "checking whether memmove/bcopy/memcpy handle overlaps""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008209echo "configure:8210: checking whether memmove/bcopy/memcpy handle overlaps" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008210bcopy_test_prog='
8211main() {
8212 char buf[10];
8213 strcpy(buf, "abcdefghi");
8214 mch_memmove(buf, buf + 2, 3);
8215 if (strncmp(buf, "ababcf", 6))
8216 exit(1);
8217 strcpy(buf, "abcdefghi");
8218 mch_memmove(buf + 2, buf, 3);
8219 if (strncmp(buf, "cdedef", 6))
8220 exit(1);
8221 exit(0); /* libc version works properly. */
8222}'
8223
8224
8225if test "$cross_compiling" = yes; then
8226 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8227else
8228 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008229#line 8230 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008230#include "confdefs.h"
8231#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
8232EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008233if { (eval echo configure:8234: \"$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 +00008234then
8235 cat >> confdefs.h <<\EOF
8236#define USEMEMMOVE 1
8237EOF
8238 echo "$ac_t""memmove does" 1>&6
8239else
8240 echo "configure: failed program was:" >&5
8241 cat conftest.$ac_ext >&5
8242 rm -fr conftest*
8243 if test "$cross_compiling" = yes; then
8244 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8245else
8246 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008247#line 8248 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008248#include "confdefs.h"
8249#define mch_memmove(s,d,l) bcopy(d,s,l) $bcopy_test_prog
8250EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008251if { (eval echo configure:8252: \"$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 +00008252then
8253 cat >> confdefs.h <<\EOF
8254#define USEBCOPY 1
8255EOF
8256 echo "$ac_t""bcopy does" 1>&6
8257else
8258 echo "configure: failed program was:" >&5
8259 cat conftest.$ac_ext >&5
8260 rm -fr conftest*
8261 if test "$cross_compiling" = yes; then
8262 { echo "configure: error: failed to compile test program" 1>&2; exit 1; }
8263else
8264 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008265#line 8266 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008266#include "confdefs.h"
8267#define mch_memmove(s,d,l) memcpy(d,s,l) $bcopy_test_prog
8268EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008269if { (eval echo configure:8270: \"$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 +00008270then
8271 cat >> confdefs.h <<\EOF
8272#define USEMEMCPY 1
8273EOF
8274 echo "$ac_t""memcpy does" 1>&6
8275else
8276 echo "configure: failed program was:" >&5
8277 cat conftest.$ac_ext >&5
8278 rm -fr conftest*
8279 echo "$ac_t""no" 1>&6
8280fi
8281rm -fr conftest*
8282fi
8283
8284fi
8285rm -fr conftest*
8286fi
8287
8288fi
8289rm -fr conftest*
8290fi
8291
8292
8293
8294if test "$enable_multibyte" = "yes"; then
8295 cflags_save=$CFLAGS
8296 ldflags_save=$LDFLAGS
8297 if test -n "$x_includes" ; then
8298 CFLAGS="$CFLAGS -I$x_includes"
8299 LDFLAGS="$X_LIBS $LDFLAGS -lX11"
8300 echo $ac_n "checking whether X_LOCALE needed""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008301echo "configure:8302: checking whether X_LOCALE needed" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008302 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008303#line 8304 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008304#include "confdefs.h"
8305#include <X11/Xlocale.h>
8306int main() {
8307
8308; return 0; }
8309EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008310if { (eval echo configure:8311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008311 rm -rf conftest*
8312 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008313#line 8314 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008314#include "confdefs.h"
8315/* Override any gcc2 internal prototype to avoid an error. */
8316/* We use char because int might match the return type of a gcc2
8317 builtin and then its argument prototype would still apply. */
8318char _Xsetlocale();
8319
8320int main() {
8321_Xsetlocale()
8322; return 0; }
8323EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008324if { (eval echo configure:8325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008325 rm -rf conftest*
8326 echo "$ac_t""yes" 1>&6
8327 cat >> confdefs.h <<\EOF
8328#define X_LOCALE 1
8329EOF
8330
8331else
8332 echo "configure: failed program was:" >&5
8333 cat conftest.$ac_ext >&5
8334 rm -rf conftest*
8335 echo "$ac_t""no" 1>&6
8336fi
8337rm -f conftest*
8338else
8339 echo "configure: failed program was:" >&5
8340 cat conftest.$ac_ext >&5
8341 rm -rf conftest*
8342 echo "$ac_t""no" 1>&6
8343fi
8344rm -f conftest*
8345 fi
8346 CFLAGS=$cflags_save
8347 LDFLAGS=$ldflags_save
8348fi
8349
8350echo $ac_n "checking for _xpg4_setrunelocale in -lxpg4""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008351echo "configure:8352: checking for _xpg4_setrunelocale in -lxpg4" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008352ac_lib_var=`echo xpg4'_'_xpg4_setrunelocale | sed 'y%./+-%__p_%'`
8353if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8354 echo $ac_n "(cached) $ac_c" 1>&6
8355else
8356 ac_save_LIBS="$LIBS"
8357LIBS="-lxpg4 $LIBS"
8358cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008359#line 8360 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008360#include "confdefs.h"
8361/* Override any gcc2 internal prototype to avoid an error. */
8362/* We use char because int might match the return type of a gcc2
8363 builtin and then its argument prototype would still apply. */
8364char _xpg4_setrunelocale();
8365
8366int main() {
8367_xpg4_setrunelocale()
8368; return 0; }
8369EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008370if { (eval echo configure:8371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008371 rm -rf conftest*
8372 eval "ac_cv_lib_$ac_lib_var=yes"
8373else
8374 echo "configure: failed program was:" >&5
8375 cat conftest.$ac_ext >&5
8376 rm -rf conftest*
8377 eval "ac_cv_lib_$ac_lib_var=no"
8378fi
8379rm -f conftest*
8380LIBS="$ac_save_LIBS"
8381
8382fi
8383if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8384 echo "$ac_t""yes" 1>&6
8385 LIBS="$LIBS -lxpg4"
8386else
8387 echo "$ac_t""no" 1>&6
8388fi
8389
8390
8391echo $ac_n "checking how to create tags""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008392echo "configure:8393: checking how to create tags" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008393test -f tags && mv tags tags.save
8394if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
8395 TAGPRG="ctags"
8396else
8397 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
8398 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
8399 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
8400 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
8401 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
8402 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
8403 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
8404fi
8405test -f tags.save && mv tags.save tags
8406echo "$ac_t""$TAGPRG" 1>&6
8407
8408echo $ac_n "checking how to run man with a section nr""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008409echo "configure:8410: checking how to run man with a section nr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008410MANDEF="man"
8411(eval man -s 2 read) < /dev/null > /dev/null 2>&5 && MANDEF="man -s"
8412echo "$ac_t""$MANDEF" 1>&6
8413if test "$MANDEF" = "man -s"; then
8414 cat >> confdefs.h <<\EOF
8415#define USEMAN_S 1
8416EOF
8417
8418fi
8419
8420echo $ac_n "checking --disable-nls argument""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008421echo "configure:8422: checking --disable-nls argument" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008422# Check whether --enable-nls or --disable-nls was given.
8423if test "${enable_nls+set}" = set; then
8424 enableval="$enable_nls"
8425 :
8426else
8427 enable_nls="yes"
8428fi
8429
8430
8431if test "$enable_nls" = "yes"; then
8432 echo "$ac_t""no" 1>&6
8433 # Extract the first word of "msgfmt", so it can be a program name with args.
8434set dummy msgfmt; ac_word=$2
8435echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008436echo "configure:8437: checking for $ac_word" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008437if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
8438 echo $ac_n "(cached) $ac_c" 1>&6
8439else
8440 if test -n "$MSGFMT"; then
8441 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
8442else
8443 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8444 ac_dummy="$PATH"
8445 for ac_dir in $ac_dummy; do
8446 test -z "$ac_dir" && ac_dir=.
8447 if test -f $ac_dir/$ac_word; then
8448 ac_cv_prog_MSGFMT="msgfmt"
8449 break
8450 fi
8451 done
8452 IFS="$ac_save_ifs"
8453fi
8454fi
8455MSGFMT="$ac_cv_prog_MSGFMT"
8456if test -n "$MSGFMT"; then
8457 echo "$ac_t""$MSGFMT" 1>&6
8458else
8459 echo "$ac_t""no" 1>&6
8460fi
8461
8462 echo $ac_n "checking for NLS""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008463echo "configure:8464: checking for NLS" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008464 if test -f po/Makefile; then
8465 have_gettext="no"
8466 if test -n "$MSGFMT"; then
8467 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008468#line 8469 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008469#include "confdefs.h"
8470#include <libintl.h>
8471int main() {
8472gettext("Test");
8473; return 0; }
8474EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008475if { (eval echo configure:8476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008476 rm -rf conftest*
8477 echo "$ac_t""gettext() works" 1>&6; have_gettext="yes"
8478else
8479 echo "configure: failed program was:" >&5
8480 cat conftest.$ac_ext >&5
8481 rm -rf conftest*
8482 olibs=$LIBS
8483 LIBS="$LIBS -lintl"
8484 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008485#line 8486 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008486#include "confdefs.h"
8487#include <libintl.h>
8488int main() {
8489gettext("Test");
8490; return 0; }
8491EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008492if { (eval echo configure:8493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008493 rm -rf conftest*
8494 echo "$ac_t""gettext() works with -lintl" 1>&6; have_gettext="yes"
8495else
8496 echo "configure: failed program was:" >&5
8497 cat conftest.$ac_ext >&5
8498 rm -rf conftest*
8499 echo "$ac_t""gettext() doesn't work" 1>&6;
8500 LIBS=$olibs
8501fi
8502rm -f conftest*
8503fi
8504rm -f conftest*
8505 else
8506 echo "$ac_t""msgfmt not found - disabled" 1>&6;
8507 fi
8508 if test $have_gettext = "yes"; then
8509 cat >> confdefs.h <<\EOF
8510#define HAVE_GETTEXT 1
8511EOF
8512
8513 MAKEMO=yes
8514
8515 for ac_func in bind_textdomain_codeset
8516do
8517echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008518echo "configure:8519: checking for $ac_func" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008519if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8520 echo $ac_n "(cached) $ac_c" 1>&6
8521else
8522 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008523#line 8524 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008524#include "confdefs.h"
8525/* System header to define __stub macros and hopefully few prototypes,
8526 which can conflict with char $ac_func(); below. */
8527#include <assert.h>
8528/* Override any gcc2 internal prototype to avoid an error. */
8529/* We use char because int might match the return type of a gcc2
8530 builtin and then its argument prototype would still apply. */
8531char $ac_func();
8532
8533int main() {
8534
8535/* The GNU C library defines this for functions which it implements
8536 to always fail with ENOSYS. Some functions are actually named
8537 something starting with __ and the normal name is an alias. */
8538#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8539choke me
8540#else
8541$ac_func();
8542#endif
8543
8544; return 0; }
8545EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008546if { (eval echo configure:8547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008547 rm -rf conftest*
8548 eval "ac_cv_func_$ac_func=yes"
8549else
8550 echo "configure: failed program was:" >&5
8551 cat conftest.$ac_ext >&5
8552 rm -rf conftest*
8553 eval "ac_cv_func_$ac_func=no"
8554fi
8555rm -f conftest*
8556fi
8557
8558if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8559 echo "$ac_t""yes" 1>&6
8560 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8561 cat >> confdefs.h <<EOF
8562#define $ac_tr_func 1
8563EOF
8564
8565else
8566 echo "$ac_t""no" 1>&6
8567fi
8568done
8569
8570 echo $ac_n "checking for _nl_msg_cat_cntr""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008571echo "configure:8572: checking for _nl_msg_cat_cntr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008572 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008573#line 8574 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008574#include "confdefs.h"
8575#include <libintl.h>
8576 extern int _nl_msg_cat_cntr;
8577int main() {
8578++_nl_msg_cat_cntr;
8579; return 0; }
8580EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008581if { (eval echo configure:8582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008582 rm -rf conftest*
8583 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
8584#define HAVE_NL_MSG_CAT_CNTR 1
8585EOF
8586
8587else
8588 echo "configure: failed program was:" >&5
8589 cat conftest.$ac_ext >&5
8590 rm -rf conftest*
8591 echo "$ac_t""no" 1>&6
8592fi
8593rm -f conftest*
8594 fi
8595 else
8596 echo "$ac_t""no "po/Makefile" - disabled" 1>&6;
8597 fi
8598else
8599 echo "$ac_t""yes" 1>&6
8600fi
8601
8602ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
8603echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008604echo "configure:8605: checking for dlfcn.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008605if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8606 echo $ac_n "(cached) $ac_c" 1>&6
8607else
8608 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008609#line 8610 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008610#include "confdefs.h"
8611#include <dlfcn.h>
8612EOF
8613ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008614{ (eval echo configure:8615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008615ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8616if test -z "$ac_err"; then
8617 rm -rf conftest*
8618 eval "ac_cv_header_$ac_safe=yes"
8619else
8620 echo "$ac_err" >&5
8621 echo "configure: failed program was:" >&5
8622 cat conftest.$ac_ext >&5
8623 rm -rf conftest*
8624 eval "ac_cv_header_$ac_safe=no"
8625fi
8626rm -f conftest*
8627fi
8628if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8629 echo "$ac_t""yes" 1>&6
8630 DLL=dlfcn.h
8631else
8632 echo "$ac_t""no" 1>&6
8633ac_safe=`echo "dl.h" | sed 'y%./+-%__p_%'`
8634echo $ac_n "checking for dl.h""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008635echo "configure:8636: checking for dl.h" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008636if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8637 echo $ac_n "(cached) $ac_c" 1>&6
8638else
8639 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008640#line 8641 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008641#include "confdefs.h"
8642#include <dl.h>
8643EOF
8644ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008645{ (eval echo configure:8646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008646ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8647if test -z "$ac_err"; then
8648 rm -rf conftest*
8649 eval "ac_cv_header_$ac_safe=yes"
8650else
8651 echo "$ac_err" >&5
8652 echo "configure: failed program was:" >&5
8653 cat conftest.$ac_ext >&5
8654 rm -rf conftest*
8655 eval "ac_cv_header_$ac_safe=no"
8656fi
8657rm -f conftest*
8658fi
8659if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8660 echo "$ac_t""yes" 1>&6
8661 DLL=dl.h
8662else
8663 echo "$ac_t""no" 1>&6
8664fi
8665
8666fi
8667
8668if test x${DLL} = xdlfcn.h; then
8669 cat >> confdefs.h <<\EOF
8670#define HAVE_DLFCN_H 1
8671EOF
8672
8673 echo $ac_n "checking for dlopen()""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008674echo "configure:8675: checking for dlopen()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008675 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008676#line 8677 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008677#include "confdefs.h"
8678
8679int main() {
8680
8681 extern void* dlopen();
8682 dlopen();
8683
8684; return 0; }
8685EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008686if { (eval echo configure:8687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008687 rm -rf conftest*
8688 echo "$ac_t""yes" 1>&6;
8689 cat >> confdefs.h <<\EOF
8690#define HAVE_DLOPEN 1
8691EOF
8692
8693else
8694 echo "configure: failed program was:" >&5
8695 cat conftest.$ac_ext >&5
8696 rm -rf conftest*
8697 echo "$ac_t""no" 1>&6;
8698 echo $ac_n "checking for dlopen() in -ldl""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008699echo "configure:8700: checking for dlopen() in -ldl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008700 olibs=$LIBS
8701 LIBS="$LIBS -ldl"
8702 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008703#line 8704 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008704#include "confdefs.h"
8705
8706int main() {
8707
8708 extern void* dlopen();
8709 dlopen();
8710
8711; return 0; }
8712EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008713if { (eval echo configure:8714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008714 rm -rf conftest*
8715 echo "$ac_t""yes" 1>&6;
8716 cat >> confdefs.h <<\EOF
8717#define HAVE_DLOPEN 1
8718EOF
8719
8720else
8721 echo "configure: failed program was:" >&5
8722 cat conftest.$ac_ext >&5
8723 rm -rf conftest*
8724 echo "$ac_t""no" 1>&6;
8725 LIBS=$olibs
8726fi
8727rm -f conftest*
8728fi
8729rm -f conftest*
8730 echo $ac_n "checking for dlsym()""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008731echo "configure:8732: checking for dlsym()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008732 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008733#line 8734 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008734#include "confdefs.h"
8735
8736int main() {
8737
8738 extern void* dlsym();
8739 dlsym();
8740
8741; return 0; }
8742EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +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_DLSYM 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 dlsym() in -ldl""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008756echo "configure:8757: checking for dlsym() in -ldl" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008757 olibs=$LIBS
8758 LIBS="$LIBS -ldl"
8759 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008760#line 8761 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008761#include "confdefs.h"
8762
8763int main() {
8764
8765 extern void* dlsym();
8766 dlsym();
8767
8768; return 0; }
8769EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +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_DLSYM 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*
8787elif test x${DLL} = xdl.h; then
8788 cat >> confdefs.h <<\EOF
8789#define HAVE_DL_H 1
8790EOF
8791
8792 echo $ac_n "checking for shl_load()""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008793echo "configure:8794: checking for shl_load()" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008794 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008795#line 8796 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008796#include "confdefs.h"
8797
8798int main() {
8799
8800 extern void* shl_load();
8801 shl_load();
8802
8803; return 0; }
8804EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008805if { (eval echo configure:8806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008806 rm -rf conftest*
8807 echo "$ac_t""yes" 1>&6;
8808 cat >> confdefs.h <<\EOF
8809#define HAVE_SHL_LOAD 1
8810EOF
8811
8812else
8813 echo "configure: failed program was:" >&5
8814 cat conftest.$ac_ext >&5
8815 rm -rf conftest*
8816 echo "$ac_t""no" 1>&6;
8817 echo $ac_n "checking for shl_load() in -ldld""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008818echo "configure:8819: checking for shl_load() in -ldld" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008819 olibs=$LIBS
8820 LIBS="$LIBS -ldld"
8821 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008822#line 8823 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008823#include "confdefs.h"
8824
8825int main() {
8826
8827 extern void* shl_load();
8828 shl_load();
8829
8830; return 0; }
8831EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008832if { (eval echo configure:8833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008833 rm -rf conftest*
8834 echo "$ac_t""yes" 1>&6;
8835 cat >> confdefs.h <<\EOF
8836#define HAVE_SHL_LOAD 1
8837EOF
8838
8839else
8840 echo "configure: failed program was:" >&5
8841 cat conftest.$ac_ext >&5
8842 rm -rf conftest*
8843 echo "$ac_t""no" 1>&6;
8844 LIBS=$olibs
8845fi
8846rm -f conftest*
8847fi
8848rm -f conftest*
8849fi
8850for ac_hdr in setjmp.h
8851do
8852ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8853echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008854echo "configure:8855: checking for $ac_hdr" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008855if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8856 echo $ac_n "(cached) $ac_c" 1>&6
8857else
8858 cat > conftest.$ac_ext <<EOF
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008859#line 8860 "configure"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008860#include "confdefs.h"
8861#include <$ac_hdr>
8862EOF
8863ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008864{ (eval echo configure:8865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008865ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8866if test -z "$ac_err"; then
8867 rm -rf conftest*
8868 eval "ac_cv_header_$ac_safe=yes"
8869else
8870 echo "$ac_err" >&5
8871 echo "configure: failed program was:" >&5
8872 cat conftest.$ac_ext >&5
8873 rm -rf conftest*
8874 eval "ac_cv_header_$ac_safe=no"
8875fi
8876rm -f conftest*
8877fi
8878if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8879 echo "$ac_t""yes" 1>&6
8880 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8881 cat >> confdefs.h <<EOF
8882#define $ac_tr_hdr 1
8883EOF
8884
8885else
8886 echo "$ac_t""no" 1>&6
8887fi
8888done
8889
8890
8891if test "x$MACOSX" = "xyes" -a -n "$PERL"; then
8892 if echo $LIBS | grep -e '-ldl' >/dev/null; then
8893 LIBS=`echo $LIBS | sed s/-ldl//`
8894 PERL_LIBS="$PERL_LIBS -ldl"
8895 fi
8896fi
8897
8898if test "x$MACOSX" = "xyes" && test "x$CARBON" = "xyes" \
8899 && test "x$GUITYPE" != "xCARBONGUI"; then
8900 echo $ac_n "checking whether we need -framework Carbon""... $ac_c" 1>&6
Bram Moolenaar325b7a22004-07-05 15:58:32 +00008901echo "configure:8902: checking whether we need -framework Carbon" >&5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008902 if test "x$enable_multibyte" = "xyes" || test "x$features" == "xbig" \
8903 || test "x$features" = "xhuge"; then
8904 LIBS="$LIBS -framework Carbon"
8905 echo "$ac_t""yes" 1>&6
8906 else
8907 echo "$ac_t""no" 1>&6
8908 fi
8909fi
8910
8911
8912trap '' 1 2 15
8913cat > confcache <<\EOF
8914# This file is a shell script that caches the results of configure
8915# tests run on this system so they can be shared between configure
8916# scripts and configure runs. It is not useful on other systems.
8917# If it contains results you don't want to keep, you may remove or edit it.
8918#
8919# By default, configure uses ./config.cache as the cache file,
8920# creating it if it does not exist already. You can give configure
8921# the --cache-file=FILE option to use a different cache file; that is
8922# what configure does when it calls configure scripts in
8923# subdirectories, so they share the cache.
8924# Giving --cache-file=/dev/null disables caching, for debugging configure.
8925# config.status only pays attention to the cache file if you give it the
8926# --recheck option to rerun configure.
8927#
8928EOF
8929# The following way of writing the cache mishandles newlines in values,
8930# but we know of no workaround that is simple, portable, and efficient.
8931# So, don't put newlines in cache variables' values.
8932# Ultrix sh set writes to stderr and can't be redirected directly,
8933# and sets the high bit in the cache file unless we assign to the vars.
8934(set) 2>&1 |
8935 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8936 *ac_space=\ *)
8937 # `set' does not quote correctly, so add quotes (double-quote substitution
8938 # turns \\\\ into \\, and sed turns \\ into \).
8939 sed -n \
8940 -e "s/'/'\\\\''/g" \
8941 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8942 ;;
8943 *)
8944 # `set' quotes correctly as required by POSIX, so do not add quotes.
8945 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8946 ;;
8947 esac >> confcache
8948if cmp -s $cache_file confcache; then
8949 :
8950else
8951 if test -w $cache_file; then
8952 echo "updating cache $cache_file"
8953 cat confcache > $cache_file
8954 else
8955 echo "not updating unwritable cache $cache_file"
8956 fi
8957fi
8958rm -f confcache
8959
8960trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8961
8962test "x$prefix" = xNONE && prefix=$ac_default_prefix
8963# Let make expand exec_prefix.
8964test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8965
8966# Any assignment to VPATH causes Sun make to only execute
8967# the first set of double-colon rules, so remove it if not needed.
8968# If there is a colon in the path, we need to keep it.
8969if test "x$srcdir" = x.; then
8970 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8971fi
8972
8973trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8974
8975DEFS=-DHAVE_CONFIG_H
8976
8977# Without the "./", some shells look in PATH for config.status.
8978: ${CONFIG_STATUS=./config.status}
8979
8980echo creating $CONFIG_STATUS
8981rm -f $CONFIG_STATUS
8982cat > $CONFIG_STATUS <<EOF
8983#! /bin/sh
8984# Generated automatically by configure.
8985# Run this file to recreate the current configuration.
8986# This directory was configured as follows,
8987# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8988#
8989# $0 $ac_configure_args
8990#
8991# Compiler output produced by configure, useful for debugging
8992# configure, is in auto/config.log if it exists.
8993
8994ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8995for ac_option
8996do
8997 case "\$ac_option" in
8998 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8999 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9000 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9001 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9002 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9003 exit 0 ;;
9004 -help | --help | --hel | --he | --h)
9005 echo "\$ac_cs_usage"; exit 0 ;;
9006 *) echo "\$ac_cs_usage"; exit 1 ;;
9007 esac
9008done
9009
9010ac_given_srcdir=$srcdir
9011
9012trap 'rm -fr `echo "auto/config.mk:config.mk.in auto/config.h:config.h.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9013EOF
9014cat >> $CONFIG_STATUS <<EOF
9015
9016# Protect against being on the right side of a sed subst in config.status.
9017sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9018 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9019$ac_vpsub
9020$extrasub
9021s%@SHELL@%$SHELL%g
9022s%@CFLAGS@%$CFLAGS%g
9023s%@CPPFLAGS@%$CPPFLAGS%g
9024s%@CXXFLAGS@%$CXXFLAGS%g
9025s%@FFLAGS@%$FFLAGS%g
9026s%@DEFS@%$DEFS%g
9027s%@LDFLAGS@%$LDFLAGS%g
9028s%@LIBS@%$LIBS%g
9029s%@exec_prefix@%$exec_prefix%g
9030s%@prefix@%$prefix%g
9031s%@program_transform_name@%$program_transform_name%g
9032s%@bindir@%$bindir%g
9033s%@sbindir@%$sbindir%g
9034s%@libexecdir@%$libexecdir%g
9035s%@datadir@%$datadir%g
9036s%@sysconfdir@%$sysconfdir%g
9037s%@sharedstatedir@%$sharedstatedir%g
9038s%@localstatedir@%$localstatedir%g
9039s%@libdir@%$libdir%g
9040s%@includedir@%$includedir%g
9041s%@oldincludedir@%$oldincludedir%g
9042s%@infodir@%$infodir%g
9043s%@mandir@%$mandir%g
9044s%@SET_MAKE@%$SET_MAKE%g
9045s%@CC@%$CC%g
9046s%@CPP@%$CPP%g
9047s%@AWK@%$AWK%g
9048s%@STRIP@%$STRIP%g
9049s%@EXEEXT@%$EXEEXT%g
9050s%@CPP_MM@%$CPP_MM%g
9051s%@OS_EXTRA_SRC@%$OS_EXTRA_SRC%g
9052s%@OS_EXTRA_OBJ@%$OS_EXTRA_OBJ%g
9053s%@VIMNAME@%$VIMNAME%g
9054s%@EXNAME@%$EXNAME%g
9055s%@VIEWNAME@%$VIEWNAME%g
9056s%@line_break@%$line_break%g
9057s%@dovimdiff@%$dovimdiff%g
9058s%@dogvimdiff@%$dogvimdiff%g
9059s%@compiledby@%$compiledby%g
Bram Moolenaar325b7a22004-07-05 15:58:32 +00009060s%@vi_cv_path_mzscheme@%$vi_cv_path_mzscheme%g
9061s%@MZSCHEME_SRC@%$MZSCHEME_SRC%g
9062s%@MZSCHEME_OBJ@%$MZSCHEME_OBJ%g
9063s%@MZSCHEME_PRO@%$MZSCHEME_PRO%g
9064s%@MZSCHEME_LIBS@%$MZSCHEME_LIBS%g
9065s%@MZSCHEME_CFLAGS@%$MZSCHEME_CFLAGS%g
Bram Moolenaar071d4272004-06-13 20:20:40 +00009066s%@vi_cv_path_perl@%$vi_cv_path_perl%g
9067s%@vi_cv_perllib@%$vi_cv_perllib%g
9068s%@shrpenv@%$shrpenv%g
9069s%@PERL_SRC@%$PERL_SRC%g
9070s%@PERL_OBJ@%$PERL_OBJ%g
9071s%@PERL_PRO@%$PERL_PRO%g
9072s%@PERL_CFLAGS@%$PERL_CFLAGS%g
9073s%@PERL_LIBS@%$PERL_LIBS%g
9074s%@vi_cv_path_python@%$vi_cv_path_python%g
9075s%@PYTHON_CONFDIR@%$PYTHON_CONFDIR%g
9076s%@PYTHON_LIBS@%$PYTHON_LIBS%g
9077s%@PYTHON_GETPATH_CFLAGS@%$PYTHON_GETPATH_CFLAGS%g
9078s%@PYTHON_CFLAGS@%$PYTHON_CFLAGS%g
9079s%@PYTHON_SRC@%$PYTHON_SRC%g
9080s%@PYTHON_OBJ@%$PYTHON_OBJ%g
9081s%@vi_cv_path_tcl@%$vi_cv_path_tcl%g
9082s%@TCL_SRC@%$TCL_SRC%g
9083s%@TCL_OBJ@%$TCL_OBJ%g
9084s%@TCL_PRO@%$TCL_PRO%g
9085s%@TCL_CFLAGS@%$TCL_CFLAGS%g
9086s%@TCL_LIBS@%$TCL_LIBS%g
9087s%@vi_cv_path_ruby@%$vi_cv_path_ruby%g
9088s%@RUBY_SRC@%$RUBY_SRC%g
9089s%@RUBY_OBJ@%$RUBY_OBJ%g
9090s%@RUBY_PRO@%$RUBY_PRO%g
9091s%@RUBY_CFLAGS@%$RUBY_CFLAGS%g
9092s%@RUBY_LIBS@%$RUBY_LIBS%g
9093s%@WORKSHOP_SRC@%$WORKSHOP_SRC%g
9094s%@WORKSHOP_OBJ@%$WORKSHOP_OBJ%g
9095s%@NETBEANS_SRC@%$NETBEANS_SRC%g
9096s%@NETBEANS_OBJ@%$NETBEANS_OBJ%g
9097s%@SNIFF_SRC@%$SNIFF_SRC%g
9098s%@SNIFF_OBJ@%$SNIFF_OBJ%g
9099s%@xmkmfpath@%$xmkmfpath%g
9100s%@X_CFLAGS@%$X_CFLAGS%g
9101s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9102s%@X_LIBS@%$X_LIBS%g
9103s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9104s%@X_LIB@%$X_LIB%g
Bram Moolenaar843ee412004-06-30 16:16:41 +00009105s%@MOC@%$MOC%g
9106s%@KDE_CONFIG@%$KDE_CONFIG%g
9107s%@KDE_LIBS@%$KDE_LIBS%g
9108s%@KDE_INCLUDES@%$KDE_INCLUDES%g
9109s%@KDE_PREFIX@%$KDE_PREFIX%g
9110s%@QT_LIBS@%$QT_LIBS%g
9111s%@QT_INCLUDES@%$QT_INCLUDES%g
9112s%@ROOTQT@%$ROOTQT%g
Bram Moolenaar071d4272004-06-13 20:20:40 +00009113s%@GTK_CONFIG@%$GTK_CONFIG%g
9114s%@GTK12_CONFIG@%$GTK12_CONFIG%g
9115s%@PKG_CONFIG@%$PKG_CONFIG%g
9116s%@GTK_CFLAGS@%$GTK_CFLAGS%g
9117s%@GTK_LIBS@%$GTK_LIBS%g
9118s%@GTK_LIBNAME@%$GTK_LIBNAME%g
9119s%@GNOME_LIBS@%$GNOME_LIBS%g
9120s%@GNOME_LIBDIR@%$GNOME_LIBDIR%g
9121s%@GNOME_INCLUDEDIR@%$GNOME_INCLUDEDIR%g
9122s%@GNOME_CONFIG@%$GNOME_CONFIG%g
9123s%@MOTIF_LIBNAME@%$MOTIF_LIBNAME%g
9124s%@NARROW_PROTO@%$NARROW_PROTO%g
9125s%@GUI_INC_LOC@%$GUI_INC_LOC%g
9126s%@GUI_LIB_LOC@%$GUI_LIB_LOC%g
9127s%@GUITYPE@%$GUITYPE%g
9128s%@GUI_X_LIBS@%$GUI_X_LIBS%g
9129s%@HANGULIN_SRC@%$HANGULIN_SRC%g
9130s%@HANGULIN_OBJ@%$HANGULIN_OBJ%g
9131s%@TAGPRG@%$TAGPRG%g
9132s%@MSGFMT@%$MSGFMT%g
9133s%@MAKEMO@%$MAKEMO%g
9134
9135CEOF
9136EOF
9137
9138cat >> $CONFIG_STATUS <<\EOF
9139
9140# Split the substitutions into bite-sized pieces for seds with
9141# small command number limits, like on Digital OSF/1 and HP-UX.
9142ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9143ac_file=1 # Number of current file.
9144ac_beg=1 # First line for current file.
9145ac_end=$ac_max_sed_cmds # Line after last line for current file.
9146ac_more_lines=:
9147ac_sed_cmds=""
9148while $ac_more_lines; do
9149 if test $ac_beg -gt 1; then
9150 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9151 else
9152 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9153 fi
9154 if test ! -s conftest.s$ac_file; then
9155 ac_more_lines=false
9156 rm -f conftest.s$ac_file
9157 else
9158 if test -z "$ac_sed_cmds"; then
9159 ac_sed_cmds="sed -f conftest.s$ac_file"
9160 else
9161 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9162 fi
9163 ac_file=`expr $ac_file + 1`
9164 ac_beg=$ac_end
9165 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9166 fi
9167done
9168if test -z "$ac_sed_cmds"; then
9169 ac_sed_cmds=cat
9170fi
9171EOF
9172
9173cat >> $CONFIG_STATUS <<EOF
9174
9175CONFIG_FILES=\${CONFIG_FILES-"auto/config.mk:config.mk.in"}
9176EOF
9177cat >> $CONFIG_STATUS <<\EOF
9178for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9179 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9180 case "$ac_file" in
9181 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9182 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9183 *) ac_file_in="${ac_file}.in" ;;
9184 esac
9185
9186 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9187
9188 # Remove last slash and all that follows it. Not all systems have dirname.
9189 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9190 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9191 # The file is in a subdirectory.
9192 test ! -d "$ac_dir" && mkdir "$ac_dir"
9193 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9194 # A "../" for each directory in $ac_dir_suffix.
9195 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9196 else
9197 ac_dir_suffix= ac_dots=
9198 fi
9199
9200 case "$ac_given_srcdir" in
9201 .) srcdir=.
9202 if test -z "$ac_dots"; then top_srcdir=.
9203 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9204 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9205 *) # Relative path.
9206 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9207 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9208 esac
9209
9210
9211 echo creating "$ac_file"
9212 rm -f "$ac_file"
9213 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9214 case "$ac_file" in
9215 *Makefile*) ac_comsub="1i\\
9216# $configure_input" ;;
9217 *) ac_comsub= ;;
9218 esac
9219
9220 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9221 sed -e "$ac_comsub
9222s%@configure_input@%$configure_input%g
9223s%@srcdir@%$srcdir%g
9224s%@top_srcdir@%$top_srcdir%g
9225" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9226fi; done
9227rm -f conftest.s*
9228
9229# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9230# NAME is the cpp macro being defined and VALUE is the value it is being given.
9231#
9232# ac_d sets the value in "#define NAME VALUE" lines.
9233ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9234ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9235ac_dC='\3'
9236ac_dD='%g'
9237# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9238ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9239ac_uB='\([ ]\)%\1#\2define\3'
9240ac_uC=' '
9241ac_uD='\4%g'
9242# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9243ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9244ac_eB='$%\1#\2define\3'
9245ac_eC=' '
9246ac_eD='%g'
9247
9248if test "${CONFIG_HEADERS+set}" != set; then
9249EOF
9250cat >> $CONFIG_STATUS <<EOF
9251 CONFIG_HEADERS="auto/config.h:config.h.in"
9252EOF
9253cat >> $CONFIG_STATUS <<\EOF
9254fi
9255for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9256 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9257 case "$ac_file" in
9258 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9259 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9260 *) ac_file_in="${ac_file}.in" ;;
9261 esac
9262
9263 echo creating $ac_file
9264
9265 rm -f conftest.frag conftest.in conftest.out
9266 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9267 cat $ac_file_inputs > conftest.in
9268
9269EOF
9270
9271# Transform confdefs.h into a sed script conftest.vals that substitutes
9272# the proper values into config.h.in to produce config.h. And first:
9273# Protect against being on the right side of a sed subst in config.status.
9274# Protect against being in an unquoted here document in config.status.
9275rm -f conftest.vals
9276cat > conftest.hdr <<\EOF
9277s/[\\&%]/\\&/g
9278s%[\\$`]%\\&%g
9279s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9280s%ac_d%ac_u%gp
9281s%ac_u%ac_e%gp
9282EOF
9283sed -n -f conftest.hdr confdefs.h > conftest.vals
9284rm -f conftest.hdr
9285
9286# This sed command replaces #undef with comments. This is necessary, for
9287# example, in the case of _POSIX_SOURCE, which is predefined and required
9288# on some systems where configure will not decide to define it.
9289cat >> conftest.vals <<\EOF
9290s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9291EOF
9292
9293# Break up conftest.vals because some shells have a limit on
9294# the size of here documents, and old seds have small limits too.
9295
9296rm -f conftest.tail
9297while :
9298do
9299 ac_lines=`grep -c . conftest.vals`
9300 # grep -c gives empty output for an empty file on some AIX systems.
9301 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9302 # Write a limited-size here document to conftest.frag.
9303 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9304 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9305 echo 'CEOF
9306 sed -f conftest.frag conftest.in > conftest.out
9307 rm -f conftest.in
9308 mv conftest.out conftest.in
9309' >> $CONFIG_STATUS
9310 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9311 rm -f conftest.vals
9312 mv conftest.tail conftest.vals
9313done
9314rm -f conftest.vals
9315
9316cat >> $CONFIG_STATUS <<\EOF
9317 rm -f conftest.frag conftest.h
9318 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9319 cat conftest.in >> conftest.h
9320 rm -f conftest.in
9321 if cmp -s $ac_file conftest.h 2>/dev/null; then
9322 echo "$ac_file is unchanged"
9323 rm -f conftest.h
9324 else
9325 # Remove last slash and all that follows it. Not all systems have dirname.
9326 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9327 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9328 # The file is in a subdirectory.
9329 test ! -d "$ac_dir" && mkdir "$ac_dir"
9330 fi
9331 rm -f $ac_file
9332 mv conftest.h $ac_file
9333 fi
9334fi; done
9335
9336EOF
9337cat >> $CONFIG_STATUS <<EOF
9338
9339EOF
9340cat >> $CONFIG_STATUS <<\EOF
9341
9342exit 0
9343EOF
9344chmod +x $CONFIG_STATUS
9345rm -fr confdefs* $ac_clean_files
9346test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9347
9348