blob: 70ebb33c4dc1557f904401148a6726ae323cf9e2 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001#! /bin/sh
Bram Moolenaar071d4272004-06-13 20:20:40 +00002# Guess values for system-dependent variables and create Makefiles.
Illia Bobyra96d5442023-08-30 16:30:15 +02003# Generated by GNU Autoconf 2.71.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004#
Bram Moolenaar071d4272004-06-13 20:20:40 +00005#
Illia Bobyra96d5442023-08-30 16:30:15 +02006# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
7# Inc.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008#
9#
Bram Moolenaar071d4272004-06-13 20:20:40 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012## -------------------- ##
13## M4sh Initialization. ##
14## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000015
Bram Moolenaar446cb832008-06-24 21:56:24 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020018as_nop=:
19if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
20then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000021 emulate sh
22 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000026 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +020027else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000033esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000034fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000035
36
Illia Bobyra96d5442023-08-30 16:30:15 +020037
38# Reset variables that may have inherited troublesome values from
39# the environment.
40
41# IFS needs to be set, to space, tab, and newline, in precisely that order.
42# (If _AS_PATH_WALK were called with IFS unset, it would have the
43# side effect of setting IFS to empty, thus disabling word splitting.)
44# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000045as_nl='
46'
47export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020048IFS=" "" $as_nl"
49
50PS1='$ '
51PS2='> '
52PS4='+ '
53
54# Ensure predictable behavior from utilities with locale-dependent output.
55LC_ALL=C
56export LC_ALL
57LANGUAGE=C
58export LANGUAGE
59
60# We cannot yet rely on "unset" to work, but we need these variables
61# to be unset--not just set to an empty or harmless value--now, to
62# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
63# also avoids known problems related to "unset" and subshell syntax
64# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
65for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
66do eval test \${$as_var+y} \
67 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
68done
69
70# Ensure that fds 0, 1, and 2 are open.
71if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
72if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
73if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000074
75# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020076if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
82fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000083
Bram Moolenaar495de9c2005-01-25 22:03:25 +000084
Bram Moolenaar446cb832008-06-24 21:56:24 +000085# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010086as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020087case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000088 *[\\/]* ) as_myself=$0 ;;
89 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
90for as_dir in $PATH
91do
92 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020093 case $as_dir in #(((
94 '') as_dir=./ ;;
95 */) ;;
96 *) as_dir=$as_dir/ ;;
97 esac
98 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020099 done
Bram Moolenaar446cb832008-06-24 21:56:24 +0000100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +0200110 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200111 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +0000112fi
113
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200114
Bram Moolenaar7db77842014-03-27 17:40:59 +0100115# Use a proper internal environment variable to ensure we don't fall
116 # into an infinite loop, continuously re-executing ourselves.
117 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
118 _as_can_reexec=no; export _as_can_reexec;
119 # We cannot yet assume a decent shell, so we have to provide a
120# neutralization value for shells without unset; and this also
121# works around shells that cannot unset nonexistent variables.
122# Preserve -v and -x to the replacement shell.
123BASH_ENV=/dev/null
124ENV=/dev/null
125(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
126case $- in # ((((
127 *v*x* | *x*v* ) as_opts=-vx ;;
128 *v* ) as_opts=-v ;;
129 *x* ) as_opts=-x ;;
130 * ) as_opts= ;;
131esac
132exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
133# Admittedly, this is quite paranoid, since all the known shells bail
134# out after a failed `exec'.
Illia Bobyra96d5442023-08-30 16:30:15 +0200135printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
136exit 255
Bram Moolenaar7db77842014-03-27 17:40:59 +0100137 fi
138 # We don't want this to propagate to other subprocesses.
139 { _as_can_reexec=; unset _as_can_reexec;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200140if test "x$CONFIG_SHELL" = x; then
Illia Bobyra96d5442023-08-30 16:30:15 +0200141 as_bourne_compatible="as_nop=:
142if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
143then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200144 emulate sh
145 NULLCMD=:
146 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
147 # is contrary to our usage. Disable this feature.
148 alias -g '\${1+\"\$@\"}'='\"\$@\"'
149 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +0200150else \$as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200151 case \`(set -o) 2>/dev/null\` in #(
152 *posix*) :
153 set -o posix ;; #(
154 *) :
155 ;;
156esac
157fi
158"
159 as_required="as_fn_return () { (exit \$1); }
160as_fn_success () { as_fn_return 0; }
161as_fn_failure () { as_fn_return 1; }
162as_fn_ret_success () { return 0; }
163as_fn_ret_failure () { return 1; }
164
165exitcode=0
166as_fn_success || { exitcode=1; echo as_fn_success failed.; }
167as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
168as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
169as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
Illia Bobyra96d5442023-08-30 16:30:15 +0200170if ( set x; as_fn_ret_success y && test x = \"\$1\" )
171then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200172
Illia Bobyra96d5442023-08-30 16:30:15 +0200173else \$as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200174 exitcode=1; echo positional parameters were not saved.
175fi
Bram Moolenaar7db77842014-03-27 17:40:59 +0100176test x\$exitcode = x0 || exit 1
Illia Bobyra96d5442023-08-30 16:30:15 +0200177blah=\$(echo \$(echo blah))
178test x\"\$blah\" = xblah || exit 1
Bram Moolenaar7db77842014-03-27 17:40:59 +0100179test -x / || exit 1"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200180 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
181 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
182 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
183 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
184test \$(( 1 + 1 )) = 2 || exit 1"
Illia Bobyra96d5442023-08-30 16:30:15 +0200185 if (eval "$as_required") 2>/dev/null
186then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200187 as_have_required=yes
Illia Bobyra96d5442023-08-30 16:30:15 +0200188else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200189 as_have_required=no
190fi
Illia Bobyra96d5442023-08-30 16:30:15 +0200191 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
192then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200193
Illia Bobyra96d5442023-08-30 16:30:15 +0200194else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
196as_found=false
197for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
198do
199 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +0200200 case $as_dir in #(((
201 '') as_dir=./ ;;
202 */) ;;
203 *) as_dir=$as_dir/ ;;
204 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200205 as_found=:
206 case $as_dir in #(
207 /*)
208 for as_base in sh bash ksh sh5; do
209 # Try only shells that exist, to save several forks.
Illia Bobyra96d5442023-08-30 16:30:15 +0200210 as_shell=$as_dir$as_base
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200211 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
Illia Bobyra96d5442023-08-30 16:30:15 +0200212 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
213then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200214 CONFIG_SHELL=$as_shell as_have_required=yes
Illia Bobyra96d5442023-08-30 16:30:15 +0200215 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
216then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200217 break 2
218fi
219fi
220 done;;
221 esac
222 as_found=false
223done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200224IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +0200225if $as_found
226then :
227
228else $as_nop
229 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
230 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
231then :
232 CONFIG_SHELL=$SHELL as_have_required=yes
233fi
234fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200235
236
Illia Bobyra96d5442023-08-30 16:30:15 +0200237 if test "x$CONFIG_SHELL" != x
238then :
Bram Moolenaar7db77842014-03-27 17:40:59 +0100239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
Illia Bobyra96d5442023-08-30 16:30:15 +0200256printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
Bram Moolenaar7db77842014-03-27 17:40:59 +0100257exit 255
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200258fi
259
Illia Bobyra96d5442023-08-30 16:30:15 +0200260 if test x$as_have_required = xno
261then :
262 printf "%s\n" "$0: This script requires a shell more modern than all"
263 printf "%s\n" "$0: the shells that I found on your system."
264 if test ${ZSH_VERSION+y} ; then
265 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
266 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200267 else
Illia Bobyra96d5442023-08-30 16:30:15 +0200268 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200269$0: including any error possibly output before this
270$0: message. Then install a modern shell, or manually run
271$0: the script under such a shell if you do have one."
272 fi
273 exit 1
274fi
275fi
276fi
277SHELL=${CONFIG_SHELL-/bin/sh}
278export SHELL
279# Unset more variables known to interfere with behavior of common tools.
280CLICOLOR_FORCE= GREP_OPTIONS=
281unset CLICOLOR_FORCE GREP_OPTIONS
282
283## --------------------- ##
284## M4sh Shell Functions. ##
285## --------------------- ##
286# as_fn_unset VAR
287# ---------------
288# Portably unset VAR.
289as_fn_unset ()
290{
291 { eval $1=; unset $1;}
292}
293as_unset=as_fn_unset
294
Illia Bobyra96d5442023-08-30 16:30:15 +0200295
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200296# as_fn_set_status STATUS
297# -----------------------
298# Set $? to STATUS, without forking.
299as_fn_set_status ()
300{
301 return $1
302} # as_fn_set_status
303
304# as_fn_exit STATUS
305# -----------------
306# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
307as_fn_exit ()
308{
309 set +e
310 as_fn_set_status $1
311 exit $1
312} # as_fn_exit
Illia Bobyra96d5442023-08-30 16:30:15 +0200313# as_fn_nop
314# ---------
315# Do nothing but, unlike ":", preserve the value of $?.
316as_fn_nop ()
317{
318 return $?
319}
320as_nop=as_fn_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200321
322# as_fn_mkdir_p
323# -------------
324# Create "$as_dir" as a directory, including parents if necessary.
325as_fn_mkdir_p ()
326{
327
328 case $as_dir in #(
329 -*) as_dir=./$as_dir;;
330 esac
331 test -d "$as_dir" || eval $as_mkdir_p || {
332 as_dirs=
333 while :; do
334 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +0200335 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200336 *) as_qdir=$as_dir;;
337 esac
338 as_dirs="'$as_qdir' $as_dirs"
339 as_dir=`$as_dirname -- "$as_dir" ||
340$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
341 X"$as_dir" : 'X\(//\)[^/]' \| \
342 X"$as_dir" : 'X\(//\)$' \| \
343 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200344printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
346 s//\1/
347 q
348 }
349 /^X\(\/\/\)[^/].*/{
350 s//\1/
351 q
352 }
353 /^X\(\/\/\)$/{
354 s//\1/
355 q
356 }
357 /^X\(\/\).*/{
358 s//\1/
359 q
360 }
361 s/.*/./; q'`
362 test -d "$as_dir" && break
363 done
364 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +0100365 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200366
367
368} # as_fn_mkdir_p
Bram Moolenaar7db77842014-03-27 17:40:59 +0100369
370# as_fn_executable_p FILE
371# -----------------------
372# Test if FILE is an executable regular file.
373as_fn_executable_p ()
374{
375 test -f "$1" && test -x "$1"
376} # as_fn_executable_p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200377# as_fn_append VAR VALUE
378# ----------------------
379# Append the text in VALUE to the end of the definition contained in VAR. Take
380# advantage of any shell optimizations that allow amortized linear growth over
381# repeated appends, instead of the typical quadratic growth present in naive
382# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +0200383if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
384then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200385 eval 'as_fn_append ()
386 {
387 eval $1+=\$2
388 }'
Illia Bobyra96d5442023-08-30 16:30:15 +0200389else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200390 as_fn_append ()
391 {
392 eval $1=\$$1\$2
393 }
394fi # as_fn_append
395
396# as_fn_arith ARG...
397# ------------------
398# Perform arithmetic evaluation on the ARGs, and store the result in the
399# global $as_val. Take advantage of shells that can avoid forks. The arguments
400# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +0200401if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
402then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200403 eval 'as_fn_arith ()
404 {
405 as_val=$(( $* ))
406 }'
Illia Bobyra96d5442023-08-30 16:30:15 +0200407else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200408 as_fn_arith ()
409 {
410 as_val=`expr "$@" || test $? -eq 1`
411 }
412fi # as_fn_arith
413
Illia Bobyra96d5442023-08-30 16:30:15 +0200414# as_fn_nop
415# ---------
416# Do nothing but, unlike ":", preserve the value of $?.
417as_fn_nop ()
418{
419 return $?
420}
421as_nop=as_fn_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200422
Bram Moolenaar7db77842014-03-27 17:40:59 +0100423# as_fn_error STATUS ERROR [LINENO LOG_FD]
424# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200425# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
426# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +0100427# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200428as_fn_error ()
429{
Bram Moolenaar7db77842014-03-27 17:40:59 +0100430 as_status=$1; test $as_status -eq 0 && as_status=1
431 if test "$4"; then
432 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +0200433 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200434 fi
Illia Bobyra96d5442023-08-30 16:30:15 +0200435 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200436 as_fn_exit $as_status
437} # as_fn_error
438
Bram Moolenaar446cb832008-06-24 21:56:24 +0000439if expr a : '\(a\)' >/dev/null 2>&1 &&
440 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000441 as_expr=expr
442else
443 as_expr=false
444fi
445
Bram Moolenaar446cb832008-06-24 21:56:24 +0000446if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000447 as_basename=basename
448else
449 as_basename=false
450fi
451
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200452if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
453 as_dirname=dirname
454else
455 as_dirname=false
456fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000457
Bram Moolenaar446cb832008-06-24 21:56:24 +0000458as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000459$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
460 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +0000461 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200462printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +0000463 sed '/^.*\/\([^/][^/]*\)\/*$/{
464 s//\1/
465 q
466 }
467 /^X\/\(\/\/\)$/{
468 s//\1/
469 q
470 }
471 /^X\/\(\/\).*/{
472 s//\1/
473 q
474 }
475 s/.*/./; q'`
476
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200477# Avoid depending upon Character Ranges.
478as_cr_letters='abcdefghijklmnopqrstuvwxyz'
479as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
480as_cr_Letters=$as_cr_letters$as_cr_LETTERS
481as_cr_digits='0123456789'
482as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000483
484
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200485 as_lineno_1=$LINENO as_lineno_1a=$LINENO
486 as_lineno_2=$LINENO as_lineno_2a=$LINENO
487 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
488 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
489 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Bram Moolenaar446cb832008-06-24 21:56:24 +0000490 sed -n '
491 p
492 /[$]LINENO/=
493 ' <$as_myself |
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000494 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +0000495 s/[$]LINENO.*/&-/
496 t lineno
497 b
498 :lineno
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000499 N
Bram Moolenaar446cb832008-06-24 21:56:24 +0000500 :loop
501 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000502 t loop
Bram Moolenaar446cb832008-06-24 21:56:24 +0000503 s/-\n.*//
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000504 ' >$as_me.lineno &&
Bram Moolenaar446cb832008-06-24 21:56:24 +0000505 chmod +x "$as_me.lineno" ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200506 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000507
Bram Moolenaar7db77842014-03-27 17:40:59 +0100508 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
509 # already done that, so ensure we don't try to do so again and fall
510 # in an infinite loop. This has already happened in practice.
511 _as_can_reexec=no; export _as_can_reexec
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000512 # Don't try to exec as it changes $[0], causing all sort of problems
513 # (the dirname of $[0] is not the place where we might find the
Bram Moolenaar446cb832008-06-24 21:56:24 +0000514 # original and so on. Autoconf is especially sensitive to this).
515 . "./$as_me.lineno"
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000516 # Exit status is that of the last command.
517 exit
518}
519
Illia Bobyra96d5442023-08-30 16:30:15 +0200520
521# Determine whether it's possible to make 'echo' print without a newline.
522# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
523# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000524ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200525case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +0000526-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200527 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +0000528 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200529 xy) ECHO_C='\c';;
530 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
531 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000532 esac;;
533*)
534 ECHO_N='-n';;
535esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000536
Illia Bobyra96d5442023-08-30 16:30:15 +0200537# For backward compatibility with old third-party macros, we provide
538# the shell variables $as_echo and $as_echo_n. New code should use
539# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
540as_echo='printf %s\n'
541as_echo_n='printf %s'
542
543
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000544rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +0000545if test -d conf$$.dir; then
546 rm -f conf$$.dir/conf$$.file
547else
548 rm -f conf$$.dir
549 mkdir conf$$.dir 2>/dev/null
550fi
551if (echo >conf$$.file) 2>/dev/null; then
552 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000553 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000554 # ... but there are two gotchas:
555 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
556 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Bram Moolenaar7db77842014-03-27 17:40:59 +0100557 # In both cases, we have to default to `cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000558 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +0100559 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000560 elif ln conf$$.file conf$$ 2>/dev/null; then
561 as_ln_s=ln
562 else
Bram Moolenaar7db77842014-03-27 17:40:59 +0100563 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000564 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000565else
Bram Moolenaar7db77842014-03-27 17:40:59 +0100566 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000567fi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000568rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
569rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000570
571if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200572 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000573else
574 test -d ./-p && rmdir ./-p
575 as_mkdir_p=false
576fi
577
Bram Moolenaar7db77842014-03-27 17:40:59 +0100578as_test_x='test -x'
579as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000580
581# Sed expression to map a string onto a valid CPP name.
582as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
583
584# Sed expression to map a string onto a valid variable name.
585as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
586
587
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200588test -n "$DJDIR" || exec 7<&0 </dev/null
589exec 6>&1
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000590
591# Name of the host.
Bram Moolenaar7db77842014-03-27 17:40:59 +0100592# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000593# so uname gets run too.
594ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
595
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000596#
597# Initializations.
598#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000599ac_default_prefix=/usr/local
Bram Moolenaar446cb832008-06-24 21:56:24 +0000600ac_clean_files=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000601ac_config_libobj_dir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000602LIBOBJS=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000603cross_compiling=no
604subdirs=
605MFLAGS=
606MAKEFLAGS=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000607
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000608# Identity of this package.
Illia Bobyra96d5442023-08-30 16:30:15 +0200609PACKAGE_NAME=''
610PACKAGE_TARNAME=''
611PACKAGE_VERSION=''
612PACKAGE_STRING=''
613PACKAGE_BUGREPORT=''
614PACKAGE_URL=''
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000615
616ac_unique_file="vim.h"
617# Factoring default headers for most tests.
618ac_includes_default="\
Illia Bobyra96d5442023-08-30 16:30:15 +0200619#include <stddef.h>
620#ifdef HAVE_STDIO_H
621# include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000622#endif
Illia Bobyra96d5442023-08-30 16:30:15 +0200623#ifdef HAVE_STDLIB_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000624# include <stdlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000625#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000626#ifdef HAVE_STRING_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000627# include <string.h>
628#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000629#ifdef HAVE_INTTYPES_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000630# include <inttypes.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000631#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000632#ifdef HAVE_STDINT_H
633# include <stdint.h>
634#endif
Illia Bobyra96d5442023-08-30 16:30:15 +0200635#ifdef HAVE_STRINGS_H
636# include <strings.h>
637#endif
638#ifdef HAVE_SYS_TYPES_H
639# include <sys/types.h>
640#endif
641#ifdef HAVE_SYS_STAT_H
642# include <sys/stat.h>
643#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000644#ifdef HAVE_UNISTD_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000645# include <unistd.h>
646#endif"
647
Illia Bobyra96d5442023-08-30 16:30:15 +0200648ac_header_c_list=
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000649ac_subst_vars='LTLIBOBJS
Bram Moolenaar446cb832008-06-24 21:56:24 +0000650LIBOBJS
Bram Moolenaar22e193d2010-11-03 22:32:24 +0100651LINK_AS_NEEDED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000652DEPEND_CFLAGS_FILTER
Bram Moolenaar26096cc2019-04-11 15:25:40 +0200653MSGFMT_DESKTOP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000654MAKEMO
655MSGFMT
656INSTALL_TOOL_LANGS
657INSTALL_LANGS
658TAGPRG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000659GUI_X_LIBS
660GUITYPE
661GUI_LIB_LOC
662GUI_INC_LOC
663NARROW_PROTO
664MOTIF_LIBNAME
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100665GRESOURCE_OBJ
666GRESOURCE_SRC
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200667UPDATE_DESKTOP_DATABASE
668GTK_UPDATE_ICON_CACHE
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100669GLIB_COMPILE_RESOURCES
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000670GNOME_INCLUDEDIR
671GNOME_LIBDIR
672GNOME_LIBS
673GTK_LIBNAME
674GTK_LIBS
675GTK_CFLAGS
676PKG_CONFIG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000677X_LIB
678X_EXTRA_LIBS
679X_LIBS
680X_PRE_LIBS
681X_CFLAGS
682XMKMF
683xmkmfpath
Bram Moolenaar823edd12019-10-23 22:35:36 +0200684TERM_TEST
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200685TERM_OBJ
686TERM_SRC
Bram Moolenaare0874f82016-01-24 20:36:41 +0100687CHANNEL_OBJ
688CHANNEL_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000689NETBEANS_OBJ
690NETBEANS_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000691RUBY_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000692RUBY_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000693RUBY_CFLAGS
694RUBY_PRO
695RUBY_OBJ
696RUBY_SRC
697vi_cv_path_ruby
698TCL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000699TCL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000700TCL_CFLAGS
701TCL_PRO
702TCL_OBJ
703TCL_SRC
704vi_cv_path_tcl
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200705PYTHON3_OBJ
706PYTHON3_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000707PYTHON3_CFLAGS_EXTRA
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200708PYTHON3_CFLAGS
709PYTHON3_LIBS
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200710vi_cv_var_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200711vi_cv_path_python3
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000712PYTHON_OBJ
713PYTHON_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000714PYTHON_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000715PYTHON_CFLAGS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000716PYTHON_LIBS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000717vi_cv_path_python
718PERL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000719PERL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000720PERL_CFLAGS
721PERL_PRO
722PERL_OBJ
723PERL_SRC
724shrpenv
Bram Moolenaard5f62b12014-08-17 17:05:44 +0200725vi_cv_perl_xsubpp
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000726vi_cv_perllib
727vi_cv_path_perl
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000728MZSCHEME_MZC
729MZSCHEME_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000730MZSCHEME_CFLAGS
731MZSCHEME_LIBS
732MZSCHEME_PRO
733MZSCHEME_OBJ
734MZSCHEME_SRC
735vi_cv_path_mzscheme
ichizok8bb3fe42021-12-28 15:51:45 +0000736LUA_CFLAGS_EXTRA
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200737LUA_CFLAGS
738LUA_LIBS
739LUA_PRO
740LUA_OBJ
741LUA_SRC
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200742vi_cv_path_plain_lua
743vi_cv_path_luajit
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200744vi_cv_path_lua
Bram Moolenaar67ffb412022-01-08 13:36:57 +0000745XDIFF_OBJS_USED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000746compiledby
747dogvimdiff
748dovimdiff
Bram Moolenaar2c704a72010-06-03 21:17:25 +0200749QUOTESED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000750line_break
751VIEWNAME
752EXNAME
753VIMNAME
754OS_EXTRA_OBJ
755OS_EXTRA_SRC
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100756XCODE_SELECT
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000757CPP_MM
Bram Moolenaar839e9542016-04-14 16:46:02 +0200758CROSS_COMPILING
Bram Moolenaar8f1dde52020-06-05 23:16:29 +0200759BUILD_DATE_MSG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000760STRIP
761AWK
Bram Moolenaar2bcaec32014-03-27 18:51:11 +0100762FGREP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000763EGREP
764GREP
765CPP
766OBJEXT
767EXEEXT
768ac_ct_CC
769CPPFLAGS
770LDFLAGS
771CFLAGS
772CC
773SET_MAKE
774target_alias
775host_alias
776build_alias
777LIBS
778ECHO_T
779ECHO_N
780ECHO_C
781DEFS
782mandir
783localedir
784libdir
785psdir
786pdfdir
787dvidir
788htmldir
789infodir
790docdir
791oldincludedir
792includedir
Illia Bobyrf39842f2023-08-27 18:21:23 +0200793runstatedir
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000794localstatedir
795sharedstatedir
796sysconfdir
797datadir
798datarootdir
799libexecdir
800sbindir
801bindir
802program_transform_name
803prefix
804exec_prefix
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200805PACKAGE_URL
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000806PACKAGE_BUGREPORT
807PACKAGE_STRING
808PACKAGE_VERSION
809PACKAGE_TARNAME
810PACKAGE_NAME
811PATH_SEPARATOR
812SHELL'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000813ac_subst_files=''
Bram Moolenaar446cb832008-06-24 21:56:24 +0000814ac_user_opts='
815enable_option_checking
Bram Moolenaarf788a062011-12-14 20:51:25 +0100816enable_fail_if_missing
Bram Moolenaar446cb832008-06-24 21:56:24 +0000817enable_darwin
818with_mac_arch
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100819with_developer_dir
Bram Moolenaarc236c162008-07-13 17:41:49 +0000820with_local_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000821with_vim_name
822with_ex_name
823with_view_name
824with_global_runtime
825with_modified_by
Bram Moolenaar5bd32f42014-04-02 14:05:38 +0200826enable_smack
Bram Moolenaar446cb832008-06-24 21:56:24 +0000827enable_selinux
Christian Brabandte085dfd2023-09-30 12:49:18 +0200828enable_xattr
Bram Moolenaar446cb832008-06-24 21:56:24 +0000829with_features
830with_compiledby
831enable_xsmp
832enable_xsmp_interact
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200833enable_luainterp
834with_lua_prefix
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200835with_luajit
Bram Moolenaar446cb832008-06-24 21:56:24 +0000836enable_mzschemeinterp
837with_plthome
838enable_perlinterp
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +0100839with_xsubpp
Bram Moolenaar446cb832008-06-24 21:56:24 +0000840enable_pythoninterp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200841with_python_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000842with_python_config_dir
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200843enable_python3interp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200844with_python3_command
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200845with_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200846with_python3_config_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000847enable_tclinterp
848with_tclsh
849enable_rubyinterp
Bram Moolenaar165641d2010-02-17 16:23:09 +0100850with_ruby_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000851enable_cscope
Bram Moolenaar446cb832008-06-24 21:56:24 +0000852enable_netbeans
Bram Moolenaare0874f82016-01-24 20:36:41 +0100853enable_channel
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200854enable_terminal
Bram Moolenaare42a6d22017-11-12 19:21:51 +0100855enable_autoservername
Bram Moolenaar446cb832008-06-24 21:56:24 +0000856enable_multibyte
Bram Moolenaar5c5697f2018-12-12 20:34:09 +0100857enable_rightleft
858enable_arabic
859enable_farsi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000860enable_xim
861enable_fontset
862with_x
863enable_gui
Bram Moolenaar446cb832008-06-24 21:56:24 +0000864enable_gtk2_check
865enable_gnome_check
Bram Moolenaar98921892016-02-23 17:14:37 +0100866enable_gtk3_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000867enable_motif_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000868enable_gtktest
869with_gnome_includes
870with_gnome_libs
871with_gnome
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200872enable_icon_cache_update
873enable_desktop_database_update
Bram Moolenaar446cb832008-06-24 21:56:24 +0000874with_motif_lib
875with_tlib
Bram Moolenaar317fd3a2010-05-07 16:05:55 +0200876enable_largefile
Bram Moolenaar21606672019-06-14 20:40:58 +0200877enable_canberra
Christian Brabandtf573c6e2021-06-20 14:02:16 +0200878enable_libsodium
Bram Moolenaar446cb832008-06-24 21:56:24 +0000879enable_acl
880enable_gpm
881enable_sysmouse
882enable_nls
883'
884 ac_precious_vars='build_alias
885host_alias
886target_alias
887CC
888CFLAGS
889LDFLAGS
890LIBS
891CPPFLAGS
892CPP
893XMKMF'
894
Bram Moolenaar071d4272004-06-13 20:20:40 +0000895
896# Initialize some variables set by options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000897ac_init_help=
898ac_init_version=false
Bram Moolenaar446cb832008-06-24 21:56:24 +0000899ac_unrecognized_opts=
900ac_unrecognized_sep=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000901# The variables have the same names as the options, with
902# dashes changed to underlines.
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000903cache_file=/dev/null
Bram Moolenaar071d4272004-06-13 20:20:40 +0000904exec_prefix=NONE
Bram Moolenaar071d4272004-06-13 20:20:40 +0000905no_create=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000906no_recursion=
907prefix=NONE
908program_prefix=NONE
909program_suffix=NONE
910program_transform_name=s,x,x,
911silent=
912site=
913srcdir=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000914verbose=
915x_includes=NONE
916x_libraries=NONE
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000917
918# Installation directory options.
919# These are left unexpanded so users can "make install exec_prefix=/foo"
920# and all the variables that are supposed to be based on exec_prefix
921# by default will actually change.
922# Use braces instead of parens because sh, perl, etc. also accept them.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000923# (The list follows the same order as the GNU Coding Standards.)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000924bindir='${exec_prefix}/bin'
925sbindir='${exec_prefix}/sbin'
926libexecdir='${exec_prefix}/libexec'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000927datarootdir='${prefix}/share'
928datadir='${datarootdir}'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000929sysconfdir='${prefix}/etc'
930sharedstatedir='${prefix}/com'
931localstatedir='${prefix}/var'
Illia Bobyrf39842f2023-08-27 18:21:23 +0200932runstatedir='${localstatedir}/run'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000933includedir='${prefix}/include'
934oldincludedir='/usr/include'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000935docdir='${datarootdir}/doc/${PACKAGE}'
936infodir='${datarootdir}/info'
937htmldir='${docdir}'
938dvidir='${docdir}'
939pdfdir='${docdir}'
940psdir='${docdir}'
941libdir='${exec_prefix}/lib'
942localedir='${datarootdir}/locale'
943mandir='${datarootdir}/man'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000944
Bram Moolenaar071d4272004-06-13 20:20:40 +0000945ac_prev=
Bram Moolenaar446cb832008-06-24 21:56:24 +0000946ac_dashdash=
Bram Moolenaar071d4272004-06-13 20:20:40 +0000947for ac_option
948do
Bram Moolenaar071d4272004-06-13 20:20:40 +0000949 # If the previous option needs an argument, assign it.
950 if test -n "$ac_prev"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +0000951 eval $ac_prev=\$ac_option
Bram Moolenaar071d4272004-06-13 20:20:40 +0000952 ac_prev=
953 continue
954 fi
955
Bram Moolenaar446cb832008-06-24 21:56:24 +0000956 case $ac_option in
Bram Moolenaar7db77842014-03-27 17:40:59 +0100957 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
958 *=) ac_optarg= ;;
959 *) ac_optarg=yes ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000960 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +0000961
Bram Moolenaar446cb832008-06-24 21:56:24 +0000962 case $ac_dashdash$ac_option in
963 --)
964 ac_dashdash=yes ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000965
966 -bindir | --bindir | --bindi | --bind | --bin | --bi)
967 ac_prev=bindir ;;
968 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000969 bindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000970
971 -build | --build | --buil | --bui | --bu)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000972 ac_prev=build_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000973 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000974 build_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000975
976 -cache-file | --cache-file | --cache-fil | --cache-fi \
977 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
978 ac_prev=cache_file ;;
979 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
980 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000981 cache_file=$ac_optarg ;;
982
983 --config-cache | -C)
984 cache_file=config.cache ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000985
Bram Moolenaar446cb832008-06-24 21:56:24 +0000986 -datadir | --datadir | --datadi | --datad)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000987 ac_prev=datadir ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000988 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000989 datadir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +0000990
Bram Moolenaar446cb832008-06-24 21:56:24 +0000991 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
992 | --dataroo | --dataro | --datar)
993 ac_prev=datarootdir ;;
994 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
995 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
996 datarootdir=$ac_optarg ;;
997
Bram Moolenaar071d4272004-06-13 20:20:40 +0000998 -disable-* | --disable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +0000999 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001000 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001001 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001002 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001003 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001004 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001005 case $ac_user_opts in
1006 *"
1007"enable_$ac_useropt"
1008"*) ;;
1009 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1010 ac_unrecognized_sep=', ';;
1011 esac
1012 eval enable_$ac_useropt=no ;;
1013
1014 -docdir | --docdir | --docdi | --doc | --do)
1015 ac_prev=docdir ;;
1016 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1017 docdir=$ac_optarg ;;
1018
1019 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1020 ac_prev=dvidir ;;
1021 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1022 dvidir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001023
1024 -enable-* | --enable-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001025 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001026 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001027 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001028 as_fn_error $? "invalid feature name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001029 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001030 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001031 case $ac_user_opts in
1032 *"
1033"enable_$ac_useropt"
1034"*) ;;
1035 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1036 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001037 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001038 eval enable_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001039
1040 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1041 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1042 | --exec | --exe | --ex)
1043 ac_prev=exec_prefix ;;
1044 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1045 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1046 | --exec=* | --exe=* | --ex=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001047 exec_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001048
1049 -gas | --gas | --ga | --g)
1050 # Obsolete; use --with-gas.
1051 with_gas=yes ;;
1052
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001053 -help | --help | --hel | --he | -h)
1054 ac_init_help=long ;;
1055 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1056 ac_init_help=recursive ;;
1057 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1058 ac_init_help=short ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001059
1060 -host | --host | --hos | --ho)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001061 ac_prev=host_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001062 -host=* | --host=* | --hos=* | --ho=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001063 host_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001064
Bram Moolenaar446cb832008-06-24 21:56:24 +00001065 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1066 ac_prev=htmldir ;;
1067 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1068 | --ht=*)
1069 htmldir=$ac_optarg ;;
1070
Bram Moolenaar071d4272004-06-13 20:20:40 +00001071 -includedir | --includedir | --includedi | --included | --include \
1072 | --includ | --inclu | --incl | --inc)
1073 ac_prev=includedir ;;
1074 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1075 | --includ=* | --inclu=* | --incl=* | --inc=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001076 includedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001077
1078 -infodir | --infodir | --infodi | --infod | --info | --inf)
1079 ac_prev=infodir ;;
1080 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001081 infodir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001082
1083 -libdir | --libdir | --libdi | --libd)
1084 ac_prev=libdir ;;
1085 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001086 libdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001087
1088 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1089 | --libexe | --libex | --libe)
1090 ac_prev=libexecdir ;;
1091 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1092 | --libexe=* | --libex=* | --libe=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001093 libexecdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001094
Bram Moolenaar446cb832008-06-24 21:56:24 +00001095 -localedir | --localedir | --localedi | --localed | --locale)
1096 ac_prev=localedir ;;
1097 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1098 localedir=$ac_optarg ;;
1099
Bram Moolenaar071d4272004-06-13 20:20:40 +00001100 -localstatedir | --localstatedir | --localstatedi | --localstated \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001101 | --localstate | --localstat | --localsta | --localst | --locals)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001102 ac_prev=localstatedir ;;
1103 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Bram Moolenaar446cb832008-06-24 21:56:24 +00001104 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001105 localstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001106
1107 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1108 ac_prev=mandir ;;
1109 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001110 mandir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001111
1112 -nfp | --nfp | --nf)
1113 # Obsolete; use --without-fp.
1114 with_fp=no ;;
1115
1116 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001117 | --no-cr | --no-c | -n)
Bram Moolenaar071d4272004-06-13 20:20:40 +00001118 no_create=yes ;;
1119
1120 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1121 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1122 no_recursion=yes ;;
1123
1124 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1125 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1126 | --oldin | --oldi | --old | --ol | --o)
1127 ac_prev=oldincludedir ;;
1128 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1129 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1130 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001131 oldincludedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001132
1133 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1134 ac_prev=prefix ;;
1135 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001136 prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001137
1138 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1139 | --program-pre | --program-pr | --program-p)
1140 ac_prev=program_prefix ;;
1141 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1142 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001143 program_prefix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001144
1145 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1146 | --program-suf | --program-su | --program-s)
1147 ac_prev=program_suffix ;;
1148 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1149 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001150 program_suffix=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001151
1152 -program-transform-name | --program-transform-name \
1153 | --program-transform-nam | --program-transform-na \
1154 | --program-transform-n | --program-transform- \
1155 | --program-transform | --program-transfor \
1156 | --program-transfo | --program-transf \
1157 | --program-trans | --program-tran \
1158 | --progr-tra | --program-tr | --program-t)
1159 ac_prev=program_transform_name ;;
1160 -program-transform-name=* | --program-transform-name=* \
1161 | --program-transform-nam=* | --program-transform-na=* \
1162 | --program-transform-n=* | --program-transform-=* \
1163 | --program-transform=* | --program-transfor=* \
1164 | --program-transfo=* | --program-transf=* \
1165 | --program-trans=* | --program-tran=* \
1166 | --progr-tra=* | --program-tr=* | --program-t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001167 program_transform_name=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001168
Bram Moolenaar446cb832008-06-24 21:56:24 +00001169 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1170 ac_prev=pdfdir ;;
1171 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1172 pdfdir=$ac_optarg ;;
1173
1174 -psdir | --psdir | --psdi | --psd | --ps)
1175 ac_prev=psdir ;;
1176 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1177 psdir=$ac_optarg ;;
1178
Bram Moolenaar071d4272004-06-13 20:20:40 +00001179 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1180 | -silent | --silent | --silen | --sile | --sil)
1181 silent=yes ;;
1182
Illia Bobyrf39842f2023-08-27 18:21:23 +02001183 -runstatedir | --runstatedir | --runstatedi | --runstated \
1184 | --runstate | --runstat | --runsta | --runst | --runs \
1185 | --run | --ru | --r)
1186 ac_prev=runstatedir ;;
1187 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1188 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1189 | --run=* | --ru=* | --r=*)
1190 runstatedir=$ac_optarg ;;
1191
Bram Moolenaar071d4272004-06-13 20:20:40 +00001192 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1193 ac_prev=sbindir ;;
1194 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1195 | --sbi=* | --sb=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001196 sbindir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001197
1198 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1199 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1200 | --sharedst | --shareds | --shared | --share | --shar \
1201 | --sha | --sh)
1202 ac_prev=sharedstatedir ;;
1203 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1204 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1205 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1206 | --sha=* | --sh=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001207 sharedstatedir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001208
1209 -site | --site | --sit)
1210 ac_prev=site ;;
1211 -site=* | --site=* | --sit=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001212 site=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001213
1214 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1215 ac_prev=srcdir ;;
1216 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001217 srcdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001218
1219 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1220 | --syscon | --sysco | --sysc | --sys | --sy)
1221 ac_prev=sysconfdir ;;
1222 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1223 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001224 sysconfdir=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001225
1226 -target | --target | --targe | --targ | --tar | --ta | --t)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001227 ac_prev=target_alias ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001228 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001229 target_alias=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001230
1231 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1232 verbose=yes ;;
1233
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001234 -version | --version | --versio | --versi | --vers | -V)
1235 ac_init_version=: ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001236
1237 -with-* | --with-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001238 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001239 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001240 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001241 as_fn_error $? "invalid package name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001242 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001243 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001244 case $ac_user_opts in
1245 *"
1246"with_$ac_useropt"
1247"*) ;;
1248 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1249 ac_unrecognized_sep=', ';;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001250 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001251 eval with_$ac_useropt=\$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001252
1253 -without-* | --without-*)
Bram Moolenaar446cb832008-06-24 21:56:24 +00001254 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001255 # Reject names that are not valid shell variable names.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001256 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001257 as_fn_error $? "invalid package name: \`$ac_useropt'"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001258 ac_useropt_orig=$ac_useropt
Illia Bobyra96d5442023-08-30 16:30:15 +02001259 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001260 case $ac_user_opts in
1261 *"
1262"with_$ac_useropt"
1263"*) ;;
1264 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1265 ac_unrecognized_sep=', ';;
1266 esac
1267 eval with_$ac_useropt=no ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001268
1269 --x)
1270 # Obsolete; use --with-x.
1271 with_x=yes ;;
1272
1273 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1274 | --x-incl | --x-inc | --x-in | --x-i)
1275 ac_prev=x_includes ;;
1276 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1277 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001278 x_includes=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001279
1280 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1281 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1282 ac_prev=x_libraries ;;
1283 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1284 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001285 x_libraries=$ac_optarg ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001286
Bram Moolenaar7db77842014-03-27 17:40:59 +01001287 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1288Try \`$0 --help' for more information"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001289 ;;
1290
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001291 *=*)
1292 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1293 # Reject names that are not valid shell variable names.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001294 case $ac_envvar in #(
1295 '' | [0-9]* | *[!_$as_cr_alnum]* )
Bram Moolenaar7db77842014-03-27 17:40:59 +01001296 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001297 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001298 eval $ac_envvar=\$ac_optarg
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001299 export $ac_envvar ;;
1300
Bram Moolenaar071d4272004-06-13 20:20:40 +00001301 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001302 # FIXME: should be removed in autoconf 3.0.
Illia Bobyra96d5442023-08-30 16:30:15 +02001303 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001304 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Illia Bobyra96d5442023-08-30 16:30:15 +02001305 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
Bram Moolenaar7db77842014-03-27 17:40:59 +01001306 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001307 ;;
1308
1309 esac
1310done
1311
1312if test -n "$ac_prev"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001313 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Bram Moolenaar7db77842014-03-27 17:40:59 +01001314 as_fn_error $? "missing argument to $ac_option"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001315fi
1316
Bram Moolenaar446cb832008-06-24 21:56:24 +00001317if test -n "$ac_unrecognized_opts"; then
1318 case $enable_option_checking in
1319 no) ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01001320 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02001321 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00001322 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001323fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00001324
Bram Moolenaar446cb832008-06-24 21:56:24 +00001325# Check all directory arguments for consistency.
1326for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1327 datadir sysconfdir sharedstatedir localstatedir includedir \
1328 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Illia Bobyrf39842f2023-08-27 18:21:23 +02001329 libdir localedir mandir runstatedir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001330do
Bram Moolenaar446cb832008-06-24 21:56:24 +00001331 eval ac_val=\$$ac_var
1332 # Remove trailing slashes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001333 case $ac_val in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001334 */ )
1335 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1336 eval $ac_var=\$ac_val;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001337 esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001338 # Be sure to have absolute directory names.
1339 case $ac_val in
1340 [\\/$]* | ?:[\\/]* ) continue;;
1341 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1342 esac
Bram Moolenaar7db77842014-03-27 17:40:59 +01001343 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001344done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001345
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001346# There might be people who depend on the old broken behavior: `$host'
1347# used to hold the argument of --host etc.
1348# FIXME: To remove some day.
1349build=$build_alias
1350host=$host_alias
1351target=$target_alias
Bram Moolenaar071d4272004-06-13 20:20:40 +00001352
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001353# FIXME: To remove some day.
1354if test "x$host_alias" != x; then
1355 if test "x$build_alias" = x; then
1356 cross_compiling=maybe
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001357 elif test "x$build_alias" != "x$host_alias"; then
1358 cross_compiling=yes
1359 fi
1360fi
1361
1362ac_tool_prefix=
1363test -n "$host_alias" && ac_tool_prefix=$host_alias-
1364
1365test "$silent" = yes && exec 6>/dev/null
1366
Bram Moolenaar071d4272004-06-13 20:20:40 +00001367
Bram Moolenaar446cb832008-06-24 21:56:24 +00001368ac_pwd=`pwd` && test -n "$ac_pwd" &&
1369ac_ls_di=`ls -di .` &&
1370ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001371 as_fn_error $? "working directory cannot be determined"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001372test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001373 as_fn_error $? "pwd does not report name of working directory"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001374
1375
Bram Moolenaar071d4272004-06-13 20:20:40 +00001376# Find the source files, if location was not specified.
1377if test -z "$srcdir"; then
1378 ac_srcdir_defaulted=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +00001379 # Try the directory containing this script, then the parent directory.
1380 ac_confdir=`$as_dirname -- "$as_myself" ||
1381$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1382 X"$as_myself" : 'X\(//\)[^/]' \| \
1383 X"$as_myself" : 'X\(//\)$' \| \
1384 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +02001385printf "%s\n" X"$as_myself" |
Bram Moolenaar446cb832008-06-24 21:56:24 +00001386 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1387 s//\1/
1388 q
1389 }
1390 /^X\(\/\/\)[^/].*/{
1391 s//\1/
1392 q
1393 }
1394 /^X\(\/\/\)$/{
1395 s//\1/
1396 q
1397 }
1398 /^X\(\/\).*/{
1399 s//\1/
1400 q
1401 }
1402 s/.*/./; q'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00001403 srcdir=$ac_confdir
Bram Moolenaar446cb832008-06-24 21:56:24 +00001404 if test ! -r "$srcdir/$ac_unique_file"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00001405 srcdir=..
1406 fi
1407else
1408 ac_srcdir_defaulted=no
1409fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001410if test ! -r "$srcdir/$ac_unique_file"; then
1411 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Bram Moolenaar7db77842014-03-27 17:40:59 +01001412 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001413fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00001414ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1415ac_abs_confdir=`(
Bram Moolenaar7db77842014-03-27 17:40:59 +01001416 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001417 pwd)`
1418# When building in place, set srcdir=.
1419if test "$ac_abs_confdir" = "$ac_pwd"; then
1420 srcdir=.
1421fi
1422# Remove unnecessary trailing slashes from srcdir.
1423# Double slashes in file names in object file debugging info
1424# mess up M-x gdb in Emacs.
1425case $srcdir in
1426*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1427esac
1428for ac_var in $ac_precious_vars; do
1429 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1430 eval ac_env_${ac_var}_value=\$${ac_var}
1431 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1432 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1433done
Bram Moolenaar071d4272004-06-13 20:20:40 +00001434
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001435#
1436# Report the --help message.
1437#
1438if test "$ac_init_help" = "long"; then
1439 # Omit some internal or obsolete options to make the list less imposing.
1440 # This message is too long to be a string in the A/UX 3.1 sh.
1441 cat <<_ACEOF
1442\`configure' configures this package to adapt to many kinds of systems.
1443
1444Usage: $0 [OPTION]... [VAR=VALUE]...
1445
1446To assign environment variables (e.g., CC, CFLAGS...), specify them as
1447VAR=VALUE. See below for descriptions of some of the useful variables.
1448
1449Defaults for the options are specified in brackets.
1450
1451Configuration:
1452 -h, --help display this help and exit
1453 --help=short display options specific to this package
1454 --help=recursive display the short help of all the included packages
1455 -V, --version display version information and exit
Bram Moolenaar7db77842014-03-27 17:40:59 +01001456 -q, --quiet, --silent do not print \`checking ...' messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001457 --cache-file=FILE cache test results in FILE [disabled]
1458 -C, --config-cache alias for \`--cache-file=config.cache'
1459 -n, --no-create do not create output files
1460 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1461
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001462Installation directories:
1463 --prefix=PREFIX install architecture-independent files in PREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001464 [$ac_default_prefix]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001465 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Bram Moolenaar446cb832008-06-24 21:56:24 +00001466 [PREFIX]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001467
1468By default, \`make install' will install all the files in
1469\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1470an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1471for instance \`--prefix=\$HOME'.
1472
1473For better control, use the options below.
1474
1475Fine tuning of the installation directories:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001476 --bindir=DIR user executables [EPREFIX/bin]
1477 --sbindir=DIR system admin executables [EPREFIX/sbin]
1478 --libexecdir=DIR program executables [EPREFIX/libexec]
1479 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1480 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1481 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Illia Bobyrf39842f2023-08-27 18:21:23 +02001482 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Bram Moolenaar446cb832008-06-24 21:56:24 +00001483 --libdir=DIR object code libraries [EPREFIX/lib]
1484 --includedir=DIR C header files [PREFIX/include]
1485 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1486 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1487 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1488 --infodir=DIR info documentation [DATAROOTDIR/info]
1489 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1490 --mandir=DIR man documentation [DATAROOTDIR/man]
1491 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1492 --htmldir=DIR html documentation [DOCDIR]
1493 --dvidir=DIR dvi documentation [DOCDIR]
1494 --pdfdir=DIR pdf documentation [DOCDIR]
1495 --psdir=DIR ps documentation [DOCDIR]
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001496_ACEOF
1497
1498 cat <<\_ACEOF
1499
1500X features:
1501 --x-includes=DIR X include files are in DIR
1502 --x-libraries=DIR X library files are in DIR
1503_ACEOF
1504fi
1505
1506if test -n "$ac_init_help"; then
1507
1508 cat <<\_ACEOF
1509
1510Optional Features:
Bram Moolenaar446cb832008-06-24 21:56:24 +00001511 --disable-option-checking ignore unrecognized --enable/--with options
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001512 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1513 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Bram Moolenaarf788a062011-12-14 20:51:25 +01001514 --enable-fail-if-missing Fail if dependencies on additional features
1515 specified on the command line are missing.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001516 --disable-darwin Disable Darwin (Mac OS X) support.
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02001517 --disable-smack Do not check for Smack support.
1518 --disable-selinux Do not check for SELinux support.
Christian Brabandte085dfd2023-09-30 12:49:18 +02001519 --disable-xattr Do not check for XATTR support.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001520 --disable-xsmp Disable XSMP session management
1521 --disable-xsmp-interact Disable XSMP interaction
Bram Moolenaar8008b632017-07-18 21:33:20 +02001522 --enable-luainterp=OPTS Include Lua interpreter. default=no OPTS=no/yes/dynamic
1523 --enable-mzschemeinterp Include MzScheme interpreter.
Bram Moolenaare06c1882010-07-21 22:05:20 +02001524 --enable-perlinterp=OPTS Include Perl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02001525 --enable-pythoninterp=OPTS Include Python interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001526 --enable-python3interp=OPTS Include Python3 interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01001527 --enable-tclinterp=OPTS Include Tcl interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02001528 --enable-rubyinterp=OPTS Include Ruby interpreter. default=no OPTS=no/yes/dynamic
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001529 --enable-cscope Include cscope interface.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001530 --disable-netbeans Disable NetBeans integration support.
Bram Moolenaar8008b632017-07-18 21:33:20 +02001531 --disable-channel Disable process communication support.
1532 --enable-terminal Enable terminal emulation support.
Bram Moolenaare42a6d22017-11-12 19:21:51 +01001533 --enable-autoservername Automatically define servername at vim startup.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001534 --enable-multibyte Include multibyte editing support.
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01001535 --disable-rightleft Do not include Right-to-Left language support.
1536 --disable-arabic Do not include Arabic language support.
Bram Moolenaar14184a32019-02-16 15:10:30 +01001537 --disable-farsi Deprecated.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001538 --enable-xim Include XIM input support.
1539 --enable-fontset Include X fontset output support.
Bram Moolenaarf52fac22022-03-11 16:01:26 +00001540 --enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/haiku/photon/carbon
Bram Moolenaar182c5be2010-06-25 05:37:59 +02001541 --enable-gtk2-check If auto-select GUI, check for GTK+ 2 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001542 --enable-gnome-check If GTK GUI, check for GNOME default=no
Bram Moolenaar98921892016-02-23 17:14:37 +01001543 --enable-gtk3-check If auto-select GUI, check for GTK+ 3 default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001544 --enable-motif-check If auto-select GUI, check for Motif default=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001545 --disable-gtktest Do not try to compile and run a test GTK program
Bram Moolenaar4adfaab2016-04-21 18:20:11 +02001546 --disable-icon-cache-update update disabled
1547 --disable-desktop-database-update update disabled
Bram Moolenaar317fd3a2010-05-07 16:05:55 +02001548 --disable-largefile omit support for large files
Bram Moolenaar21606672019-06-14 20:40:58 +02001549 --disable-canberra Do not use libcanberra.
Christian Brabandtf573c6e2021-06-20 14:02:16 +02001550 --disable-libsodium Do not use libsodium.
Bram Moolenaard6d30422018-01-28 22:48:55 +01001551 --disable-acl No check for ACL support.
Bram Moolenaar0b40d082022-03-08 13:32:37 +00001552 --enable-gpm=OPTS Use gpm (Linux mouse daemon). default=yes OPTS=yes/no/dynamic
Bram Moolenaar8008b632017-07-18 21:33:20 +02001553 --disable-sysmouse Don't use sysmouse (mouse in *BSD console).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001554 --disable-nls Don't support NLS (gettext()).
1555
1556Optional Packages:
1557 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1558 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Bram Moolenaar899dddf2006-03-26 21:06:50 +00001559 --with-mac-arch=ARCH current, intel, ppc or both
Bram Moolenaar595a7be2010-03-10 16:28:12 +01001560 --with-developer-dir=PATH use PATH as location for Xcode developer tools
Bram Moolenaarc236c162008-07-13 17:41:49 +00001561 --with-local-dir=PATH search PATH instead of /usr/local for local libraries.
1562 --without-local-dir do not search /usr/local for local libraries.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001563 --with-vim-name=NAME what to call the Vim executable
1564 --with-ex-name=NAME what to call the Ex executable
1565 --with-view-name=NAME what to call the View executable
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01001566 --with-global-runtime=DIR global runtime directory in 'runtimepath', comma-separated for multiple directories
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001567 --with-modified-by=NAME name of who modified a release version
Martin Tournoij25f3a142022-10-08 19:26:41 +01001568 --with-features=TYPE tiny, normal or huge (default: huge)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001569 --with-compiledby=NAME name to show in :version message
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001570 --with-lua-prefix=PFX Prefix where Lua is installed.
Bram Moolenaare855ccf2013-07-28 13:32:15 +02001571 --with-luajit Link with LuaJIT instead of Lua.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001572 --with-plthome=PLTHOME Use PLTHOME.
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +01001573 --with-xsubpp=PATH path to the xsubpp command
Bram Moolenaare1a32312018-04-15 16:03:25 +02001574 --with-python-command=NAME name of the Python 2 command (default: python2 or python)
1575 --with-python-config-dir=PATH Python's config directory (deprecated)
1576 --with-python3-command=NAME name of the Python 3 command (default: python3 or python)
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02001577 --with-python3-stable-abi=VERSION stable ABI version to target (e.g. 3.8)
Bram Moolenaare1a32312018-04-15 16:03:25 +02001578 --with-python3-config-dir=PATH Python's config directory (deprecated)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001579 --with-tclsh=PATH which tclsh to use (default: tclsh8.0)
Bram Moolenaar165641d2010-02-17 16:23:09 +01001580 --with-ruby-command=RUBY name of the Ruby command (default: ruby)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001581 --with-x use the X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001582 --with-gnome-includes=DIR Specify location of GNOME headers
1583 --with-gnome-libs=DIR Specify location of GNOME libs
1584 --with-gnome Specify prefix for GNOME files
Bram Moolenaar8008b632017-07-18 21:33:20 +02001585 --with-motif-lib=STRING Library for Motif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001586 --with-tlib=library terminal library to be used
1587
1588Some influential environment variables:
1589 CC C compiler command
1590 CFLAGS C compiler flags
1591 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1592 nonstandard directory <lib dir>
Bram Moolenaar446cb832008-06-24 21:56:24 +00001593 LIBS libraries to pass to the linker, e.g. -l<library>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001594 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Bram Moolenaar446cb832008-06-24 21:56:24 +00001595 you have headers in a nonstandard directory <include dir>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001596 CPP C preprocessor
Bram Moolenaar446cb832008-06-24 21:56:24 +00001597 XMKMF Path to xmkmf, Makefile generator for X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001598
1599Use these variables to override the choices made by `configure' or to help
1600it to find libraries and programs with nonstandard names/locations.
1601
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001602Report bugs to the package provider.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001603_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001604ac_status=$?
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001605fi
1606
1607if test "$ac_init_help" = "recursive"; then
1608 # If there are subdirs, report their specific --help.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001609 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00001610 test -d "$ac_dir" ||
1611 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1612 continue
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001613 ac_builddir=.
1614
Bram Moolenaar446cb832008-06-24 21:56:24 +00001615case "$ac_dir" in
1616.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1617*)
Illia Bobyra96d5442023-08-30 16:30:15 +02001618 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001619 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +02001620 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001621 case $ac_top_builddir_sub in
1622 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1623 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1624 esac ;;
1625esac
1626ac_abs_top_builddir=$ac_pwd
1627ac_abs_builddir=$ac_pwd$ac_dir_suffix
1628# for backward compatibility:
1629ac_top_builddir=$ac_top_build_prefix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001630
1631case $srcdir in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001632 .) # We are building in place.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001633 ac_srcdir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001634 ac_top_srcdir=$ac_top_builddir_sub
1635 ac_abs_top_srcdir=$ac_pwd ;;
1636 [\\/]* | ?:[\\/]* ) # Absolute name.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001637 ac_srcdir=$srcdir$ac_dir_suffix;
Bram Moolenaar446cb832008-06-24 21:56:24 +00001638 ac_top_srcdir=$srcdir
1639 ac_abs_top_srcdir=$srcdir ;;
1640 *) # Relative name.
1641 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1642 ac_top_srcdir=$ac_top_build_prefix$srcdir
1643 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001644esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001645ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001646
Bram Moolenaar446cb832008-06-24 21:56:24 +00001647 cd "$ac_dir" || { ac_status=$?; continue; }
Illia Bobyra96d5442023-08-30 16:30:15 +02001648 # Check for configure.gnu first; this name is used for a wrapper for
1649 # Metaconfig's "Configure" on case-insensitive file systems.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001650 if test -f "$ac_srcdir/configure.gnu"; then
1651 echo &&
1652 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1653 elif test -f "$ac_srcdir/configure"; then
1654 echo &&
1655 $SHELL "$ac_srcdir/configure" --help=recursive
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001656 else
Illia Bobyra96d5442023-08-30 16:30:15 +02001657 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Bram Moolenaar446cb832008-06-24 21:56:24 +00001658 fi || ac_status=$?
1659 cd "$ac_pwd" || { ac_status=$?; break; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001660 done
1661fi
1662
Bram Moolenaar446cb832008-06-24 21:56:24 +00001663test -n "$ac_init_help" && exit $ac_status
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001664if $ac_init_version; then
1665 cat <<\_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001666configure
Illia Bobyra96d5442023-08-30 16:30:15 +02001667generated by GNU Autoconf 2.71
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001668
Illia Bobyra96d5442023-08-30 16:30:15 +02001669Copyright (C) 2021 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001670This configure script is free software; the Free Software Foundation
1671gives unlimited permission to copy, distribute and modify it.
1672_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001673 exit
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001674fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001675
1676## ------------------------ ##
1677## Autoconf initialization. ##
1678## ------------------------ ##
1679
1680# ac_fn_c_try_compile LINENO
1681# --------------------------
1682# Try to compile conftest.$ac_ext, and return whether this succeeded.
1683ac_fn_c_try_compile ()
1684{
1685 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001686 rm -f conftest.$ac_objext conftest.beam
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001687 if { { ac_try="$ac_compile"
1688case "(($ac_try" in
1689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1690 *) ac_try_echo=$ac_try;;
1691esac
1692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001693printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001694 (eval "$ac_compile") 2>conftest.err
1695 ac_status=$?
1696 if test -s conftest.err; then
1697 grep -v '^ *+' conftest.err >conftest.er1
1698 cat conftest.er1 >&5
1699 mv -f conftest.er1 conftest.err
1700 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001701 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001702 test $ac_status = 0; } && {
1703 test -z "$ac_c_werror_flag" ||
1704 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001705 } && test -s conftest.$ac_objext
1706then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001707 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001708else $as_nop
1709 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001710sed 's/^/| /' conftest.$ac_ext >&5
1711
1712 ac_retval=1
1713fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001714 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001715 as_fn_set_status $ac_retval
1716
1717} # ac_fn_c_try_compile
1718
1719# ac_fn_c_try_cpp LINENO
1720# ----------------------
1721# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1722ac_fn_c_try_cpp ()
1723{
1724 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1725 if { { ac_try="$ac_cpp conftest.$ac_ext"
1726case "(($ac_try" in
1727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1728 *) ac_try_echo=$ac_try;;
1729esac
1730eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001731printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001732 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1733 ac_status=$?
1734 if test -s conftest.err; then
1735 grep -v '^ *+' conftest.err >conftest.er1
1736 cat conftest.er1 >&5
1737 mv -f conftest.er1 conftest.err
1738 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001739 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01001740 test $ac_status = 0; } > conftest.i && {
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001741 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1742 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001743 }
1744then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001745 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001746else $as_nop
1747 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001748sed 's/^/| /' conftest.$ac_ext >&5
1749
1750 ac_retval=1
1751fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001752 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001753 as_fn_set_status $ac_retval
1754
1755} # ac_fn_c_try_cpp
1756
1757# ac_fn_c_try_link LINENO
1758# -----------------------
1759# Try to link conftest.$ac_ext, and return whether this succeeded.
1760ac_fn_c_try_link ()
1761{
1762 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001763 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001764 if { { ac_try="$ac_link"
1765case "(($ac_try" in
1766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1767 *) ac_try_echo=$ac_try;;
1768esac
1769eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001770printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001771 (eval "$ac_link") 2>conftest.err
1772 ac_status=$?
1773 if test -s conftest.err; then
1774 grep -v '^ *+' conftest.err >conftest.er1
1775 cat conftest.er1 >&5
1776 mv -f conftest.er1 conftest.err
1777 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001778 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001779 test $ac_status = 0; } && {
1780 test -z "$ac_c_werror_flag" ||
1781 test ! -s conftest.err
1782 } && test -s conftest$ac_exeext && {
1783 test "$cross_compiling" = yes ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001784 test -x conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +02001785 }
1786then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001787 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001788else $as_nop
1789 printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001790sed 's/^/| /' conftest.$ac_ext >&5
1791
1792 ac_retval=1
1793fi
1794 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1795 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1796 # interfere with the next link command; also delete a directory that is
1797 # left behind by Apple's compiler. We do this before executing the actions.
1798 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Bram Moolenaar7db77842014-03-27 17:40:59 +01001799 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001800 as_fn_set_status $ac_retval
1801
1802} # ac_fn_c_try_link
1803
Illia Bobyr0e82b592023-08-29 21:16:29 +02001804# ac_fn_c_try_run LINENO
1805# ----------------------
Illia Bobyra96d5442023-08-30 16:30:15 +02001806# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1807# executables *can* be run.
Illia Bobyr0e82b592023-08-29 21:16:29 +02001808ac_fn_c_try_run ()
1809{
1810 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1811 if { { ac_try="$ac_link"
1812case "(($ac_try" in
1813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1814 *) ac_try_echo=$ac_try;;
1815esac
1816eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001817printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001818 (eval "$ac_link") 2>&5
1819 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001820 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001821 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1822 { { case "(($ac_try" in
1823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1824 *) ac_try_echo=$ac_try;;
1825esac
1826eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001827printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001828 (eval "$ac_try") 2>&5
1829 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001830 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1831 test $ac_status = 0; }; }
1832then :
Illia Bobyr0e82b592023-08-29 21:16:29 +02001833 ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02001834else $as_nop
1835 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1836 printf "%s\n" "$as_me: failed program was:" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001837sed 's/^/| /' conftest.$ac_ext >&5
1838
1839 ac_retval=$ac_status
1840fi
1841 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1842 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1843 as_fn_set_status $ac_retval
1844
1845} # ac_fn_c_try_run
1846
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001847# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1848# -------------------------------------------------------
1849# Tests whether HEADER exists and can be compiled using the include files in
1850# INCLUDES, setting the cache variable VAR accordingly.
1851ac_fn_c_check_header_compile ()
1852{
1853 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1855printf %s "checking for $2... " >&6; }
1856if eval test \${$3+y}
1857then :
1858 printf %s "(cached) " >&6
1859else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1861/* end confdefs.h. */
1862$4
1863#include <$2>
1864_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001865if ac_fn_c_try_compile "$LINENO"
1866then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001867 eval "$3=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02001868else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001869 eval "$3=no"
1870fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001871rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001872fi
1873eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1875printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001876 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001877
1878} # ac_fn_c_check_header_compile
1879
1880# ac_fn_c_check_func LINENO FUNC VAR
1881# ----------------------------------
1882# Tests whether FUNC exists, setting the cache variable VAR accordingly
1883ac_fn_c_check_func ()
1884{
1885 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1887printf %s "checking for $2... " >&6; }
1888if eval test \${$3+y}
1889then :
1890 printf %s "(cached) " >&6
1891else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1895 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1896#define $2 innocuous_$2
1897
1898/* System header to define __stub macros and hopefully few prototypes,
Illia Bobyra96d5442023-08-30 16:30:15 +02001899 which can conflict with char $2 (); below. */
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001900
Illia Bobyra96d5442023-08-30 16:30:15 +02001901#include <limits.h>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001902#undef $2
1903
1904/* Override any GCC internal prototype to avoid an error.
1905 Use char because int might match the return type of a GCC
1906 builtin and then its argument prototype would still apply. */
1907#ifdef __cplusplus
1908extern "C"
1909#endif
1910char $2 ();
1911/* The GNU C library defines this for functions which it implements
1912 to always fail with ENOSYS. Some functions are actually named
1913 something starting with __ and the normal name is an alias. */
1914#if defined __stub_$2 || defined __stub___$2
1915choke me
1916#endif
1917
1918int
Illia Bobyra96d5442023-08-30 16:30:15 +02001919main (void)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001920{
1921return $2 ();
1922 ;
1923 return 0;
1924}
1925_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001926if ac_fn_c_try_link "$LINENO"
1927then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001928 eval "$3=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02001929else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001930 eval "$3=no"
1931fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001932rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001933 conftest$ac_exeext conftest.$ac_ext
1934fi
1935eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1937printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001938 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001939
1940} # ac_fn_c_check_func
1941
Bram Moolenaar914703b2010-05-31 21:59:46 +02001942# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1943# --------------------------------------------
1944# Tries to find the compile-time value of EXPR in a program that includes
1945# INCLUDES, setting VAR accordingly. Returns whether the value could be
1946# computed
1947ac_fn_c_compute_int ()
1948{
1949 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1950 if test "$cross_compiling" = yes; then
1951 # Depending upon the size, compute the lo and hi bounds.
1952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953/* end confdefs.h. */
1954$4
1955int
Illia Bobyra96d5442023-08-30 16:30:15 +02001956main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001957{
1958static int test_array [1 - 2 * !(($2) >= 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001959test_array [0] = 0;
1960return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001961
1962 ;
1963 return 0;
1964}
1965_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001966if ac_fn_c_try_compile "$LINENO"
1967then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001968 ac_lo=0 ac_mid=0
1969 while :; do
1970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1971/* end confdefs.h. */
1972$4
1973int
Illia Bobyra96d5442023-08-30 16:30:15 +02001974main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001975{
1976static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001977test_array [0] = 0;
1978return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001979
1980 ;
1981 return 0;
1982}
1983_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001984if ac_fn_c_try_compile "$LINENO"
1985then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001986 ac_hi=$ac_mid; break
Illia Bobyra96d5442023-08-30 16:30:15 +02001987else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02001988 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1989 if test $ac_lo -le $ac_mid; then
1990 ac_lo= ac_hi=
1991 break
1992 fi
1993 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1994fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001995rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02001996 done
Illia Bobyra96d5442023-08-30 16:30:15 +02001997else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02001998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
Illia Bobyra96d5442023-08-30 16:30:15 +02002002main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002003{
2004static int test_array [1 - 2 * !(($2) < 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002005test_array [0] = 0;
2006return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002007
2008 ;
2009 return 0;
2010}
2011_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002012if ac_fn_c_try_compile "$LINENO"
2013then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002014 ac_hi=-1 ac_mid=-1
2015 while :; do
2016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017/* end confdefs.h. */
2018$4
2019int
Illia Bobyra96d5442023-08-30 16:30:15 +02002020main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002021{
2022static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002023test_array [0] = 0;
2024return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002025
2026 ;
2027 return 0;
2028}
2029_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002030if ac_fn_c_try_compile "$LINENO"
2031then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002032 ac_lo=$ac_mid; break
Illia Bobyra96d5442023-08-30 16:30:15 +02002033else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002034 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2035 if test $ac_mid -le $ac_hi; then
2036 ac_lo= ac_hi=
2037 break
2038 fi
2039 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2040fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002041rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002042 done
Illia Bobyra96d5442023-08-30 16:30:15 +02002043else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002044 ac_lo= ac_hi=
2045fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002046rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002047fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002048rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002049# Binary search between lo and hi bounds.
2050while test "x$ac_lo" != "x$ac_hi"; do
2051 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2053/* end confdefs.h. */
2054$4
2055int
Illia Bobyra96d5442023-08-30 16:30:15 +02002056main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002057{
2058static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002059test_array [0] = 0;
2060return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002061
2062 ;
2063 return 0;
2064}
2065_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002066if ac_fn_c_try_compile "$LINENO"
2067then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002068 ac_hi=$ac_mid
Illia Bobyra96d5442023-08-30 16:30:15 +02002069else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002070 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2071fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002072rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002073done
2074case $ac_lo in #((
2075?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2076'') ac_retval=1 ;;
2077esac
2078 else
2079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2080/* end confdefs.h. */
2081$4
Illia Bobyra96d5442023-08-30 16:30:15 +02002082static long int longval (void) { return $2; }
2083static unsigned long int ulongval (void) { return $2; }
Bram Moolenaar914703b2010-05-31 21:59:46 +02002084#include <stdio.h>
2085#include <stdlib.h>
2086int
Illia Bobyra96d5442023-08-30 16:30:15 +02002087main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002088{
2089
2090 FILE *f = fopen ("conftest.val", "w");
2091 if (! f)
2092 return 1;
2093 if (($2) < 0)
2094 {
2095 long int i = longval ();
2096 if (i != ($2))
2097 return 1;
2098 fprintf (f, "%ld", i);
2099 }
2100 else
2101 {
2102 unsigned long int i = ulongval ();
2103 if (i != ($2))
2104 return 1;
2105 fprintf (f, "%lu", i);
2106 }
2107 /* Do not output a trailing newline, as this causes \r\n confusion
2108 on some platforms. */
2109 return ferror (f) || fclose (f) != 0;
2110
2111 ;
2112 return 0;
2113}
2114_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002115if ac_fn_c_try_run "$LINENO"
2116then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002117 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Illia Bobyra96d5442023-08-30 16:30:15 +02002118else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +02002119 ac_retval=1
2120fi
2121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2122 conftest.$ac_objext conftest.beam conftest.$ac_ext
2123rm -f conftest.val
2124
2125 fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01002126 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaar914703b2010-05-31 21:59:46 +02002127 as_fn_set_status $ac_retval
2128
2129} # ac_fn_c_compute_int
Mike Gilberta055b442023-08-20 19:01:41 +02002130
2131# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2132# -------------------------------------------
2133# Tests whether TYPE exists after having included INCLUDES, setting cache
2134# variable VAR accordingly.
2135ac_fn_c_check_type ()
2136{
2137 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2139printf %s "checking for $2... " >&6; }
2140if eval test \${$3+y}
2141then :
2142 printf %s "(cached) " >&6
2143else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002144 eval "$3=no"
2145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146/* end confdefs.h. */
2147$4
2148int
Illia Bobyra96d5442023-08-30 16:30:15 +02002149main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002150{
2151if (sizeof ($2))
2152 return 0;
2153 ;
2154 return 0;
2155}
2156_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002157if ac_fn_c_try_compile "$LINENO"
2158then :
Mike Gilberta055b442023-08-20 19:01:41 +02002159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2160/* end confdefs.h. */
2161$4
2162int
Illia Bobyra96d5442023-08-30 16:30:15 +02002163main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002164{
2165if (sizeof (($2)))
2166 return 0;
2167 ;
2168 return 0;
2169}
2170_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002171if ac_fn_c_try_compile "$LINENO"
2172then :
Mike Gilberta055b442023-08-20 19:01:41 +02002173
Illia Bobyra96d5442023-08-30 16:30:15 +02002174else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002175 eval "$3=yes"
2176fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002177rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002178fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002179rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002180fi
2181eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2183printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002184 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2185
2186} # ac_fn_c_check_type
2187
2188# ac_fn_c_find_uintX_t LINENO BITS VAR
2189# ------------------------------------
2190# Finds an unsigned integer type with width BITS, setting cache variable VAR
2191# accordingly.
2192ac_fn_c_find_uintX_t ()
2193{
2194 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2196printf %s "checking for uint$2_t... " >&6; }
2197if eval test \${$3+y}
2198then :
2199 printf %s "(cached) " >&6
2200else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002201 eval "$3=no"
2202 # Order is important - never check a type that is potentially smaller
2203 # than half of the expected target width.
2204 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2205 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2207/* end confdefs.h. */
2208$ac_includes_default
2209int
Illia Bobyra96d5442023-08-30 16:30:15 +02002210main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002211{
2212static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
2213test_array [0] = 0;
2214return test_array [0];
2215
2216 ;
2217 return 0;
2218}
2219_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002220if ac_fn_c_try_compile "$LINENO"
2221then :
Mike Gilberta055b442023-08-20 19:01:41 +02002222 case $ac_type in #(
2223 uint$2_t) :
2224 eval "$3=yes" ;; #(
2225 *) :
2226 eval "$3=\$ac_type" ;;
2227esac
2228fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002229rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2230 if eval test \"x\$"$3"\" = x"no"
2231then :
Mike Gilberta055b442023-08-20 19:01:41 +02002232
Illia Bobyra96d5442023-08-30 16:30:15 +02002233else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02002234 break
2235fi
2236 done
2237fi
2238eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2240printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002241 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2242
2243} # ac_fn_c_find_uintX_t
Illia Bobyra96d5442023-08-30 16:30:15 +02002244ac_configure_args_raw=
2245for ac_arg
2246do
2247 case $ac_arg in
2248 *\'*)
2249 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2250 esac
2251 as_fn_append ac_configure_args_raw " '$ac_arg'"
2252done
2253
2254case $ac_configure_args_raw in
2255 *$as_nl*)
2256 ac_safe_unquote= ;;
2257 *)
2258 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2259 ac_unsafe_a="$ac_unsafe_z#~"
2260 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2261 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2262esac
2263
Bram Moolenaar446cb832008-06-24 21:56:24 +00002264cat >auto/config.log <<_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002265This file contains any messages produced by compilers while
2266running configure, to aid debugging if configure makes a mistake.
2267
2268It was created by $as_me, which was
Illia Bobyra96d5442023-08-30 16:30:15 +02002269generated by GNU Autoconf 2.71. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002270
Illia Bobyra96d5442023-08-30 16:30:15 +02002271 $ $0$ac_configure_args_raw
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002272
2273_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00002274exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002275{
2276cat <<_ASUNAME
2277## --------- ##
2278## Platform. ##
2279## --------- ##
2280
2281hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2282uname -m = `(uname -m) 2>/dev/null || echo unknown`
2283uname -r = `(uname -r) 2>/dev/null || echo unknown`
2284uname -s = `(uname -s) 2>/dev/null || echo unknown`
2285uname -v = `(uname -v) 2>/dev/null || echo unknown`
2286
2287/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2288/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2289
2290/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2291/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2292/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Bram Moolenaar446cb832008-06-24 21:56:24 +00002293/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002294/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2295/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2296/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2297
2298_ASUNAME
2299
2300as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2301for as_dir in $PATH
2302do
2303 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02002304 case $as_dir in #(((
2305 '') as_dir=./ ;;
2306 */) ;;
2307 *) as_dir=$as_dir/ ;;
2308 esac
2309 printf "%s\n" "PATH: $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002310 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00002311IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002312
2313} >&5
2314
2315cat >&5 <<_ACEOF
2316
2317
2318## ----------- ##
2319## Core tests. ##
2320## ----------- ##
2321
2322_ACEOF
2323
2324
2325# Keep a trace of the command line.
2326# Strip out --no-create and --no-recursion so they do not pile up.
2327# Strip out --silent because we don't want to record it for future runs.
2328# Also quote any args containing shell meta-characters.
2329# Make two passes to allow for proper duplicate-argument suppression.
2330ac_configure_args=
2331ac_configure_args0=
2332ac_configure_args1=
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002333ac_must_keep_next=false
2334for ac_pass in 1 2
2335do
2336 for ac_arg
2337 do
2338 case $ac_arg in
2339 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2340 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2341 | -silent | --silent | --silen | --sile | --sil)
2342 continue ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002343 *\'*)
Illia Bobyra96d5442023-08-30 16:30:15 +02002344 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002345 esac
2346 case $ac_pass in
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002347 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002348 2)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002349 as_fn_append ac_configure_args1 " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002350 if test $ac_must_keep_next = true; then
2351 ac_must_keep_next=false # Got value, back to normal.
2352 else
2353 case $ac_arg in
2354 *=* | --config-cache | -C | -disable-* | --disable-* \
2355 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2356 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2357 | -with-* | --with-* | -without-* | --without-* | --x)
2358 case "$ac_configure_args0 " in
2359 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2360 esac
2361 ;;
2362 -* ) ac_must_keep_next=true ;;
2363 esac
2364 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002365 as_fn_append ac_configure_args " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002366 ;;
2367 esac
2368 done
2369done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002370{ ac_configure_args0=; unset ac_configure_args0;}
2371{ ac_configure_args1=; unset ac_configure_args1;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002372
2373# When interrupted or exit'd, cleanup temporary files, and complete
2374# config.log. We remove comments because anyway the quotes in there
2375# would cause problems or look ugly.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002376# WARNING: Use '\'' to represent an apostrophe within the trap.
2377# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002378trap 'exit_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02002379 # Sanitize IFS.
2380 IFS=" "" $as_nl"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002381 # Save into config.log some information that might help in debugging.
2382 {
2383 echo
2384
Illia Bobyra96d5442023-08-30 16:30:15 +02002385 printf "%s\n" "## ---------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002386## Cache variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002387## ---------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002388 echo
2389 # The following way of writing the cache mishandles newlines in values,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002390(
2391 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2392 eval ac_val=\$$ac_var
2393 case $ac_val in #(
2394 *${as_nl}*)
2395 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02002396 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2397printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002398 esac
2399 case $ac_var in #(
2400 _ | IFS | as_nl) ;; #(
2401 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002402 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002403 esac ;;
2404 esac
2405 done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002406 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +00002407 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2408 *${as_nl}ac_space=\ *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002409 sed -n \
Bram Moolenaar446cb832008-06-24 21:56:24 +00002410 "s/'\''/'\''\\\\'\'''\''/g;
2411 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2412 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002413 *)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002414 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002415 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002416 esac |
2417 sort
2418)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002419 echo
2420
Illia Bobyra96d5442023-08-30 16:30:15 +02002421 printf "%s\n" "## ----------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002422## Output variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002423## ----------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002424 echo
2425 for ac_var in $ac_subst_vars
2426 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002427 eval ac_val=\$$ac_var
2428 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002429 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002430 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002431 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002432 done | sort
2433 echo
2434
2435 if test -n "$ac_subst_files"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002436 printf "%s\n" "## ------------------- ##
Bram Moolenaar446cb832008-06-24 21:56:24 +00002437## File substitutions. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002438## ------------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002439 echo
2440 for ac_var in $ac_subst_files
2441 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002442 eval ac_val=\$$ac_var
2443 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002444 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002445 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002446 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002447 done | sort
2448 echo
2449 fi
2450
2451 if test -s confdefs.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002452 printf "%s\n" "## ----------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002453## confdefs.h. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002454## ----------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002455 echo
Bram Moolenaar446cb832008-06-24 21:56:24 +00002456 cat confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002457 echo
2458 fi
2459 test "$ac_signal" != 0 &&
Illia Bobyra96d5442023-08-30 16:30:15 +02002460 printf "%s\n" "$as_me: caught signal $ac_signal"
2461 printf "%s\n" "$as_me: exit $exit_status"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002462 } >&5
Bram Moolenaar446cb832008-06-24 21:56:24 +00002463 rm -f core *.core core.conftest.* &&
2464 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002465 exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +00002466' 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002467for ac_signal in 1 2 13 15; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002468 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002469done
2470ac_signal=0
2471
2472# confdefs.h avoids OS command line length limits that DEFS can exceed.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002473rm -f -r conftest* confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002474
Illia Bobyra96d5442023-08-30 16:30:15 +02002475printf "%s\n" "/* confdefs.h */" > confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002476
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002477# Predefined preprocessor variables.
2478
Illia Bobyra96d5442023-08-30 16:30:15 +02002479printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002480
Illia Bobyra96d5442023-08-30 16:30:15 +02002481printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002482
Illia Bobyra96d5442023-08-30 16:30:15 +02002483printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002484
Illia Bobyra96d5442023-08-30 16:30:15 +02002485printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002486
Illia Bobyra96d5442023-08-30 16:30:15 +02002487printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002488
Illia Bobyra96d5442023-08-30 16:30:15 +02002489printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002490
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002491
2492# Let the site file select an alternate cache file if it wants to.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002493# Prefer an explicitly selected file to automatically selected ones.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002494if test -n "$CONFIG_SITE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002495 ac_site_files="$CONFIG_SITE"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002496elif test "x$prefix" != xNONE; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002497 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002498else
Illia Bobyra96d5442023-08-30 16:30:15 +02002499 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002500fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002501
2502for ac_site_file in $ac_site_files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002503do
Illia Bobyra96d5442023-08-30 16:30:15 +02002504 case $ac_site_file in #(
2505 */*) :
2506 ;; #(
2507 *) :
2508 ac_site_file=./$ac_site_file ;;
2509esac
2510 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2512printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002513 sed 's/^/| /' "$ac_site_file" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01002514 . "$ac_site_file" \
Illia Bobyra96d5442023-08-30 16:30:15 +02002515 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2516printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01002517as_fn_error $? "failed to load site script $ac_site_file
2518See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00002519 fi
2520done
2521
2522if test -r "$cache_file"; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002523 # Some versions of bash will fail to source /dev/null (special files
2524 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2525 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2527printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002528 case $cache_file in
Bram Moolenaar446cb832008-06-24 21:56:24 +00002529 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2530 *) . "./$cache_file";;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002531 esac
2532 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00002533else
Illia Bobyra96d5442023-08-30 16:30:15 +02002534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2535printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002536 >$cache_file
2537fi
2538
Illia Bobyra96d5442023-08-30 16:30:15 +02002539# Test code for whether the C compiler supports C89 (global declarations)
2540ac_c_conftest_c89_globals='
2541/* Does the compiler advertise C89 conformance?
2542 Do not test the value of __STDC__, because some compilers set it to 0
2543 while being otherwise adequately conformant. */
2544#if !defined __STDC__
2545# error "Compiler does not advertise C89 conformance"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002546#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00002547
Illia Bobyra96d5442023-08-30 16:30:15 +02002548#include <stddef.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002549#include <stdarg.h>
Bram Moolenaar7db77842014-03-27 17:40:59 +01002550struct stat;
Illia Bobyra96d5442023-08-30 16:30:15 +02002551/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002552struct buf { int x; };
Illia Bobyra96d5442023-08-30 16:30:15 +02002553struct buf * (*rcsopen) (struct buf *, struct stat *, int);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002554static char *e (p, i)
2555 char **p;
2556 int i;
2557{
2558 return p[i];
2559}
2560static char *f (char * (*g) (char **, int), char **p, ...)
2561{
2562 char *s;
2563 va_list v;
2564 va_start (v,p);
2565 s = g (p, va_arg (v,int));
2566 va_end (v);
2567 return s;
2568}
2569
2570/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
Illia Bobyra96d5442023-08-30 16:30:15 +02002571 function prototypes and stuff, but not \xHH hex character constants.
2572 These do not provoke an error unfortunately, instead are silently treated
2573 as an "x". The following induces an error, until -std is added to get
2574 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2575 array size at least. It is necessary to write \x00 == 0 to get something
2576 that is true only with -std. */
2577int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002578
Bram Moolenaar446cb832008-06-24 21:56:24 +00002579/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2580 inside strings and character constants. */
Illia Bobyra96d5442023-08-30 16:30:15 +02002581#define FOO(x) '\''x'\''
2582int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
Bram Moolenaar446cb832008-06-24 21:56:24 +00002583
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002584int test (int i, double x);
2585struct s1 {int (*f) (int a);};
2586struct s2 {int (*f) (double a);};
Illia Bobyra96d5442023-08-30 16:30:15 +02002587int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2588 int, int);'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002589
Illia Bobyra96d5442023-08-30 16:30:15 +02002590# Test code for whether the C compiler supports C89 (body of main).
2591ac_c_conftest_c89_main='
2592ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2593'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002594
Illia Bobyra96d5442023-08-30 16:30:15 +02002595# Test code for whether the C compiler supports C99 (global declarations)
2596ac_c_conftest_c99_globals='
2597// Does the compiler advertise C99 conformance?
2598#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2599# error "Compiler does not advertise C99 conformance"
2600#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002601
Bram Moolenaar22640082018-04-19 20:39:41 +02002602#include <stdbool.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02002603extern int puts (const char *);
2604extern int printf (const char *, ...);
2605extern int dprintf (int, const char *, ...);
2606extern void *malloc (size_t);
Bram Moolenaar22640082018-04-19 20:39:41 +02002607
2608// Check varargs macros. These examples are taken from C99 6.10.3.5.
Illia Bobyra96d5442023-08-30 16:30:15 +02002609// dprintf is used instead of fprintf to avoid needing to declare
2610// FILE and stderr.
2611#define debug(...) dprintf (2, __VA_ARGS__)
Bram Moolenaar22640082018-04-19 20:39:41 +02002612#define showlist(...) puts (#__VA_ARGS__)
2613#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2614static void
2615test_varargs_macros (void)
Bram Moolenaar2e324952018-04-14 14:37:07 +02002616{
Bram Moolenaar22640082018-04-19 20:39:41 +02002617 int x = 1234;
2618 int y = 5678;
2619 debug ("Flag");
2620 debug ("X = %d\n", x);
2621 showlist (The first, second, and third items.);
2622 report (x>y, "x is %d but y is %d", x, y);
Bram Moolenaar2e324952018-04-14 14:37:07 +02002623}
2624
Bram Moolenaar22640082018-04-19 20:39:41 +02002625// Check long long types.
2626#define BIG64 18446744073709551615ull
2627#define BIG32 4294967295ul
2628#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2629#if !BIG_OK
Illia Bobyra96d5442023-08-30 16:30:15 +02002630 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002631#endif
2632#if BIG_OK
2633#else
Illia Bobyra96d5442023-08-30 16:30:15 +02002634 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002635#endif
2636static long long int bignum = -9223372036854775807LL;
2637static unsigned long long int ubignum = BIG64;
Bram Moolenaar2e324952018-04-14 14:37:07 +02002638
Bram Moolenaar22640082018-04-19 20:39:41 +02002639struct incomplete_array
2640{
2641 int datasize;
2642 double data[];
2643};
Bram Moolenaar2e324952018-04-14 14:37:07 +02002644
Bram Moolenaar22640082018-04-19 20:39:41 +02002645struct named_init {
2646 int number;
2647 const wchar_t *name;
2648 double average;
2649};
2650
2651typedef const char *ccp;
2652
2653static inline int
2654test_restrict (ccp restrict text)
2655{
2656 // See if C++-style comments work.
2657 // Iterate through items via the restricted pointer.
2658 // Also check for declarations in for loops.
Illia Bobyra96d5442023-08-30 16:30:15 +02002659 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
Bram Moolenaar22640082018-04-19 20:39:41 +02002660 continue;
2661 return 0;
2662}
2663
2664// Check varargs and va_copy.
Illia Bobyra96d5442023-08-30 16:30:15 +02002665static bool
Bram Moolenaar22640082018-04-19 20:39:41 +02002666test_varargs (const char *format, ...)
2667{
2668 va_list args;
2669 va_start (args, format);
2670 va_list args_copy;
2671 va_copy (args_copy, args);
2672
Illia Bobyra96d5442023-08-30 16:30:15 +02002673 const char *str = "";
2674 int number = 0;
2675 float fnumber = 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02002676
2677 while (*format)
2678 {
2679 switch (*format++)
2680 {
Illia Bobyra96d5442023-08-30 16:30:15 +02002681 case '\''s'\'': // string
Bram Moolenaar22640082018-04-19 20:39:41 +02002682 str = va_arg (args_copy, const char *);
2683 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002684 case '\''d'\'': // int
Bram Moolenaar22640082018-04-19 20:39:41 +02002685 number = va_arg (args_copy, int);
2686 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002687 case '\''f'\'': // float
Bram Moolenaar22640082018-04-19 20:39:41 +02002688 fnumber = va_arg (args_copy, double);
2689 break;
2690 default:
2691 break;
2692 }
2693 }
2694 va_end (args_copy);
2695 va_end (args);
Illia Bobyra96d5442023-08-30 16:30:15 +02002696
2697 return *str && number && fnumber;
Bram Moolenaar22640082018-04-19 20:39:41 +02002698}
Illia Bobyra96d5442023-08-30 16:30:15 +02002699'
Bram Moolenaar22640082018-04-19 20:39:41 +02002700
Illia Bobyra96d5442023-08-30 16:30:15 +02002701# Test code for whether the C compiler supports C99 (body of main).
2702ac_c_conftest_c99_main='
Bram Moolenaar22640082018-04-19 20:39:41 +02002703 // Check bool.
2704 _Bool success = false;
Illia Bobyra96d5442023-08-30 16:30:15 +02002705 success |= (argc != 0);
Bram Moolenaar22640082018-04-19 20:39:41 +02002706
2707 // Check restrict.
2708 if (test_restrict ("String literal") == 0)
2709 success = true;
2710 char *restrict newvar = "Another string";
2711
2712 // Check varargs.
Illia Bobyra96d5442023-08-30 16:30:15 +02002713 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
Bram Moolenaar22640082018-04-19 20:39:41 +02002714 test_varargs_macros ();
2715
2716 // Check flexible array members.
2717 struct incomplete_array *ia =
2718 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2719 ia->datasize = 10;
2720 for (int i = 0; i < ia->datasize; ++i)
2721 ia->data[i] = i * 1.234;
2722
2723 // Check named initializers.
2724 struct named_init ni = {
2725 .number = 34,
2726 .name = L"Test wide string",
2727 .average = 543.34343,
2728 };
2729
2730 ni.number = 58;
2731
2732 int dynamic_array[ni.number];
Illia Bobyra96d5442023-08-30 16:30:15 +02002733 dynamic_array[0] = argv[0][0];
Bram Moolenaar22640082018-04-19 20:39:41 +02002734 dynamic_array[ni.number - 1] = 543;
2735
2736 // work around unused variable warnings
Illia Bobyra96d5442023-08-30 16:30:15 +02002737 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2738 || dynamic_array[ni.number - 1] != 543);
2739'
2740
2741# Test code for whether the C compiler supports C11 (global declarations)
2742ac_c_conftest_c11_globals='
2743// Does the compiler advertise C11 conformance?
2744#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2745# error "Compiler does not advertise C11 conformance"
2746#endif
2747
2748// Check _Alignas.
2749char _Alignas (double) aligned_as_double;
2750char _Alignas (0) no_special_alignment;
2751extern char aligned_as_int;
2752char _Alignas (0) _Alignas (int) aligned_as_int;
2753
2754// Check _Alignof.
2755enum
2756{
2757 int_alignment = _Alignof (int),
2758 int_array_alignment = _Alignof (int[100]),
2759 char_alignment = _Alignof (char)
2760};
2761_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2762
2763// Check _Noreturn.
2764int _Noreturn does_not_return (void) { for (;;) continue; }
2765
2766// Check _Static_assert.
2767struct test_static_assert
2768{
2769 int x;
2770 _Static_assert (sizeof (int) <= sizeof (long int),
2771 "_Static_assert does not work in struct");
2772 long int y;
2773};
2774
2775// Check UTF-8 literals.
2776#define u8 syntax error!
2777char const utf8_literal[] = u8"happens to be ASCII" "another string";
2778
2779// Check duplicate typedefs.
2780typedef long *long_ptr;
2781typedef long int *long_ptr;
2782typedef long_ptr long_ptr;
2783
2784// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2785struct anonymous
2786{
2787 union {
2788 struct { int i; int j; };
2789 struct { int k; long int l; } w;
2790 };
2791 int m;
2792} v1;
2793'
2794
2795# Test code for whether the C compiler supports C11 (body of main).
2796ac_c_conftest_c11_main='
2797 _Static_assert ((offsetof (struct anonymous, i)
2798 == offsetof (struct anonymous, w.k)),
2799 "Anonymous union alignment botch");
2800 v1.i = 2;
2801 v1.w.k = 5;
2802 ok |= v1.i != 5;
2803'
2804
2805# Test code for whether the C compiler supports C11 (complete).
2806ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2807${ac_c_conftest_c99_globals}
2808${ac_c_conftest_c11_globals}
2809
2810int
2811main (int argc, char **argv)
2812{
2813 int ok = 0;
2814 ${ac_c_conftest_c89_main}
2815 ${ac_c_conftest_c99_main}
2816 ${ac_c_conftest_c11_main}
2817 return ok;
2818}
2819"
2820
2821# Test code for whether the C compiler supports C99 (complete).
2822ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2823${ac_c_conftest_c99_globals}
2824
2825int
2826main (int argc, char **argv)
2827{
2828 int ok = 0;
2829 ${ac_c_conftest_c89_main}
2830 ${ac_c_conftest_c99_main}
2831 return ok;
2832}
2833"
2834
2835# Test code for whether the C compiler supports C89 (complete).
2836ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2837
2838int
2839main (int argc, char **argv)
2840{
2841 int ok = 0;
2842 ${ac_c_conftest_c89_main}
2843 return ok;
2844}
2845"
2846
2847as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2848as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2849as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2850as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2851as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2852as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2853as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2854as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2855as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2856as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
2857as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
2858as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
2859# Check that the precious variables saved in the cache have kept the same
2860# value.
2861ac_cache_corrupted=false
2862for ac_var in $ac_precious_vars; do
2863 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2864 eval ac_new_set=\$ac_env_${ac_var}_set
2865 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2866 eval ac_new_val=\$ac_env_${ac_var}_value
2867 case $ac_old_set,$ac_new_set in
2868 set,)
2869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2870printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2871 ac_cache_corrupted=: ;;
2872 ,set)
2873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2874printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2875 ac_cache_corrupted=: ;;
2876 ,);;
2877 *)
2878 if test "x$ac_old_val" != "x$ac_new_val"; then
2879 # differences in whitespace do not lead to failure.
2880 ac_old_val_w=`echo x $ac_old_val`
2881 ac_new_val_w=`echo x $ac_new_val`
2882 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2884printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2885 ac_cache_corrupted=:
2886 else
2887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2888printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2889 eval $ac_var=\$ac_old_val
2890 fi
2891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2892printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
2893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2894printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
2895 fi;;
2896 esac
2897 # Pass precious variables to config.status.
2898 if test "$ac_new_set" = set; then
2899 case $ac_new_val in
2900 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2901 *) ac_arg=$ac_var=$ac_new_val ;;
2902 esac
2903 case " $ac_configure_args " in
2904 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2905 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2906 esac
2907 fi
2908done
2909if $ac_cache_corrupted; then
2910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2911printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2913printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
2914 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
2915 and start over" "$LINENO" 5
2916fi
2917## -------------------- ##
2918## Main body of script. ##
2919## -------------------- ##
2920
2921ac_ext=c
2922ac_cpp='$CPP $CPPFLAGS'
2923ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2924ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2925ac_compiler_gnu=$ac_cv_c_compiler_gnu
2926
2927
2928
2929ac_config_headers="$ac_config_headers auto/config.h:config.h.in"
2930
2931
2932printf "%s\n" "#define UNIX 1" >>confdefs.h
2933
2934{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2935printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2936set x ${MAKE-make}
2937ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2938if eval test \${ac_cv_prog_make_${ac_make}_set+y}
2939then :
2940 printf %s "(cached) " >&6
2941else $as_nop
2942 cat >conftest.make <<\_ACEOF
2943SHELL = /bin/sh
2944all:
2945 @echo '@@@%%%=$(MAKE)=@@@%%%'
2946_ACEOF
2947# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2948case `${MAKE-make} -f conftest.make 2>/dev/null` in
2949 *@@@%%%=?*=@@@%%%*)
2950 eval ac_cv_prog_make_${ac_make}_set=yes;;
2951 *)
2952 eval ac_cv_prog_make_${ac_make}_set=no;;
2953esac
2954rm -f conftest.make
2955fi
2956if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2958printf "%s\n" "yes" >&6; }
2959 SET_MAKE=
2960else
2961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
2962printf "%s\n" "no" >&6; }
2963 SET_MAKE="MAKE=${MAKE-make}"
2964fi
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976ac_ext=c
2977ac_cpp='$CPP $CPPFLAGS'
2978ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2979ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2980ac_compiler_gnu=$ac_cv_c_compiler_gnu
2981if test -n "$ac_tool_prefix"; then
2982 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2983set dummy ${ac_tool_prefix}gcc; ac_word=$2
2984{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2985printf %s "checking for $ac_word... " >&6; }
2986if test ${ac_cv_prog_CC+y}
2987then :
2988 printf %s "(cached) " >&6
2989else $as_nop
2990 if test -n "$CC"; then
2991 ac_cv_prog_CC="$CC" # Let the user override the test.
2992else
2993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2994for as_dir in $PATH
2995do
2996 IFS=$as_save_IFS
2997 case $as_dir in #(((
2998 '') as_dir=./ ;;
2999 */) ;;
3000 *) as_dir=$as_dir/ ;;
3001 esac
3002 for ac_exec_ext in '' $ac_executable_extensions; do
3003 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3004 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3005 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3006 break 2
3007 fi
3008done
3009 done
3010IFS=$as_save_IFS
3011
3012fi
3013fi
3014CC=$ac_cv_prog_CC
3015if test -n "$CC"; then
3016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3017printf "%s\n" "$CC" >&6; }
3018else
3019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3020printf "%s\n" "no" >&6; }
3021fi
3022
3023
3024fi
3025if test -z "$ac_cv_prog_CC"; then
3026 ac_ct_CC=$CC
3027 # Extract the first word of "gcc", so it can be a program name with args.
3028set dummy gcc; ac_word=$2
3029{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3030printf %s "checking for $ac_word... " >&6; }
3031if test ${ac_cv_prog_ac_ct_CC+y}
3032then :
3033 printf %s "(cached) " >&6
3034else $as_nop
3035 if test -n "$ac_ct_CC"; then
3036 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3037else
3038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3039for as_dir in $PATH
3040do
3041 IFS=$as_save_IFS
3042 case $as_dir in #(((
3043 '') as_dir=./ ;;
3044 */) ;;
3045 *) as_dir=$as_dir/ ;;
3046 esac
3047 for ac_exec_ext in '' $ac_executable_extensions; do
3048 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3049 ac_cv_prog_ac_ct_CC="gcc"
3050 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3051 break 2
3052 fi
3053done
3054 done
3055IFS=$as_save_IFS
3056
3057fi
3058fi
3059ac_ct_CC=$ac_cv_prog_ac_ct_CC
3060if test -n "$ac_ct_CC"; then
3061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3062printf "%s\n" "$ac_ct_CC" >&6; }
3063else
3064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3065printf "%s\n" "no" >&6; }
3066fi
3067
3068 if test "x$ac_ct_CC" = x; then
3069 CC=""
3070 else
3071 case $cross_compiling:$ac_tool_warned in
3072yes:)
3073{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3074printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3075ac_tool_warned=yes ;;
3076esac
3077 CC=$ac_ct_CC
3078 fi
3079else
3080 CC="$ac_cv_prog_CC"
3081fi
3082
3083if test -z "$CC"; then
3084 if test -n "$ac_tool_prefix"; then
3085 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3086set dummy ${ac_tool_prefix}cc; ac_word=$2
3087{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3088printf %s "checking for $ac_word... " >&6; }
3089if test ${ac_cv_prog_CC+y}
3090then :
3091 printf %s "(cached) " >&6
3092else $as_nop
3093 if test -n "$CC"; then
3094 ac_cv_prog_CC="$CC" # Let the user override the test.
3095else
3096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3097for as_dir in $PATH
3098do
3099 IFS=$as_save_IFS
3100 case $as_dir in #(((
3101 '') as_dir=./ ;;
3102 */) ;;
3103 *) as_dir=$as_dir/ ;;
3104 esac
3105 for ac_exec_ext in '' $ac_executable_extensions; do
3106 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3107 ac_cv_prog_CC="${ac_tool_prefix}cc"
3108 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3109 break 2
3110 fi
3111done
3112 done
3113IFS=$as_save_IFS
3114
3115fi
3116fi
3117CC=$ac_cv_prog_CC
3118if test -n "$CC"; then
3119 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3120printf "%s\n" "$CC" >&6; }
3121else
3122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3123printf "%s\n" "no" >&6; }
3124fi
3125
3126
3127 fi
3128fi
3129if test -z "$CC"; then
3130 # Extract the first word of "cc", so it can be a program name with args.
3131set dummy cc; ac_word=$2
3132{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3133printf %s "checking for $ac_word... " >&6; }
3134if test ${ac_cv_prog_CC+y}
3135then :
3136 printf %s "(cached) " >&6
3137else $as_nop
3138 if test -n "$CC"; then
3139 ac_cv_prog_CC="$CC" # Let the user override the test.
3140else
3141 ac_prog_rejected=no
3142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3143for as_dir in $PATH
3144do
3145 IFS=$as_save_IFS
3146 case $as_dir in #(((
3147 '') as_dir=./ ;;
3148 */) ;;
3149 *) as_dir=$as_dir/ ;;
3150 esac
3151 for ac_exec_ext in '' $ac_executable_extensions; do
3152 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3153 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3154 ac_prog_rejected=yes
3155 continue
3156 fi
3157 ac_cv_prog_CC="cc"
3158 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3159 break 2
3160 fi
3161done
3162 done
3163IFS=$as_save_IFS
3164
3165if test $ac_prog_rejected = yes; then
3166 # We found a bogon in the path, so make sure we never use it.
3167 set dummy $ac_cv_prog_CC
3168 shift
3169 if test $# != 0; then
3170 # We chose a different compiler from the bogus one.
3171 # However, it has the same basename, so the bogon will be chosen
3172 # first if we set CC to just the basename; use the full file name.
3173 shift
3174 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3175 fi
3176fi
3177fi
3178fi
3179CC=$ac_cv_prog_CC
3180if test -n "$CC"; then
3181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3182printf "%s\n" "$CC" >&6; }
3183else
3184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185printf "%s\n" "no" >&6; }
3186fi
3187
3188
3189fi
3190if test -z "$CC"; then
3191 if test -n "$ac_tool_prefix"; then
3192 for ac_prog in cl.exe
3193 do
3194 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3195set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3197printf %s "checking for $ac_word... " >&6; }
3198if test ${ac_cv_prog_CC+y}
3199then :
3200 printf %s "(cached) " >&6
3201else $as_nop
3202 if test -n "$CC"; then
3203 ac_cv_prog_CC="$CC" # Let the user override the test.
3204else
3205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3206for as_dir in $PATH
3207do
3208 IFS=$as_save_IFS
3209 case $as_dir in #(((
3210 '') as_dir=./ ;;
3211 */) ;;
3212 *) as_dir=$as_dir/ ;;
3213 esac
3214 for ac_exec_ext in '' $ac_executable_extensions; do
3215 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3216 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3217 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3218 break 2
3219 fi
3220done
3221 done
3222IFS=$as_save_IFS
3223
3224fi
3225fi
3226CC=$ac_cv_prog_CC
3227if test -n "$CC"; then
3228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3229printf "%s\n" "$CC" >&6; }
3230else
3231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3232printf "%s\n" "no" >&6; }
3233fi
3234
3235
3236 test -n "$CC" && break
3237 done
3238fi
3239if test -z "$CC"; then
3240 ac_ct_CC=$CC
3241 for ac_prog in cl.exe
3242do
3243 # Extract the first word of "$ac_prog", so it can be a program name with args.
3244set dummy $ac_prog; ac_word=$2
3245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3246printf %s "checking for $ac_word... " >&6; }
3247if test ${ac_cv_prog_ac_ct_CC+y}
3248then :
3249 printf %s "(cached) " >&6
3250else $as_nop
3251 if test -n "$ac_ct_CC"; then
3252 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3253else
3254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3255for as_dir in $PATH
3256do
3257 IFS=$as_save_IFS
3258 case $as_dir in #(((
3259 '') as_dir=./ ;;
3260 */) ;;
3261 *) as_dir=$as_dir/ ;;
3262 esac
3263 for ac_exec_ext in '' $ac_executable_extensions; do
3264 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3265 ac_cv_prog_ac_ct_CC="$ac_prog"
3266 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3267 break 2
3268 fi
3269done
3270 done
3271IFS=$as_save_IFS
3272
3273fi
3274fi
3275ac_ct_CC=$ac_cv_prog_ac_ct_CC
3276if test -n "$ac_ct_CC"; then
3277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3278printf "%s\n" "$ac_ct_CC" >&6; }
3279else
3280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3281printf "%s\n" "no" >&6; }
3282fi
3283
3284
3285 test -n "$ac_ct_CC" && break
3286done
3287
3288 if test "x$ac_ct_CC" = x; then
3289 CC=""
3290 else
3291 case $cross_compiling:$ac_tool_warned in
3292yes:)
3293{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3294printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3295ac_tool_warned=yes ;;
3296esac
3297 CC=$ac_ct_CC
3298 fi
3299fi
3300
3301fi
3302if test -z "$CC"; then
3303 if test -n "$ac_tool_prefix"; then
3304 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3305set dummy ${ac_tool_prefix}clang; ac_word=$2
3306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3307printf %s "checking for $ac_word... " >&6; }
3308if test ${ac_cv_prog_CC+y}
3309then :
3310 printf %s "(cached) " >&6
3311else $as_nop
3312 if test -n "$CC"; then
3313 ac_cv_prog_CC="$CC" # Let the user override the test.
3314else
3315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3316for as_dir in $PATH
3317do
3318 IFS=$as_save_IFS
3319 case $as_dir in #(((
3320 '') as_dir=./ ;;
3321 */) ;;
3322 *) as_dir=$as_dir/ ;;
3323 esac
3324 for ac_exec_ext in '' $ac_executable_extensions; do
3325 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3326 ac_cv_prog_CC="${ac_tool_prefix}clang"
3327 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3328 break 2
3329 fi
3330done
3331 done
3332IFS=$as_save_IFS
3333
3334fi
3335fi
3336CC=$ac_cv_prog_CC
3337if test -n "$CC"; then
3338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3339printf "%s\n" "$CC" >&6; }
3340else
3341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3342printf "%s\n" "no" >&6; }
3343fi
3344
3345
3346fi
3347if test -z "$ac_cv_prog_CC"; then
3348 ac_ct_CC=$CC
3349 # Extract the first word of "clang", so it can be a program name with args.
3350set dummy clang; ac_word=$2
3351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3352printf %s "checking for $ac_word... " >&6; }
3353if test ${ac_cv_prog_ac_ct_CC+y}
3354then :
3355 printf %s "(cached) " >&6
3356else $as_nop
3357 if test -n "$ac_ct_CC"; then
3358 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3359else
3360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3361for as_dir in $PATH
3362do
3363 IFS=$as_save_IFS
3364 case $as_dir in #(((
3365 '') as_dir=./ ;;
3366 */) ;;
3367 *) as_dir=$as_dir/ ;;
3368 esac
3369 for ac_exec_ext in '' $ac_executable_extensions; do
3370 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3371 ac_cv_prog_ac_ct_CC="clang"
3372 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3373 break 2
3374 fi
3375done
3376 done
3377IFS=$as_save_IFS
3378
3379fi
3380fi
3381ac_ct_CC=$ac_cv_prog_ac_ct_CC
3382if test -n "$ac_ct_CC"; then
3383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3384printf "%s\n" "$ac_ct_CC" >&6; }
3385else
3386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3387printf "%s\n" "no" >&6; }
3388fi
3389
3390 if test "x$ac_ct_CC" = x; then
3391 CC=""
3392 else
3393 case $cross_compiling:$ac_tool_warned in
3394yes:)
3395{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3396printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3397ac_tool_warned=yes ;;
3398esac
3399 CC=$ac_ct_CC
3400 fi
3401else
3402 CC="$ac_cv_prog_CC"
3403fi
3404
3405fi
3406
3407
3408test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3409printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3410as_fn_error $? "no acceptable C compiler found in \$PATH
3411See \`config.log' for more details" "$LINENO" 5; }
3412
3413# Provide some information about the compiler.
3414printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3415set X $ac_compile
3416ac_compiler=$2
3417for ac_option in --version -v -V -qversion -version; do
3418 { { ac_try="$ac_compiler $ac_option >&5"
3419case "(($ac_try" in
3420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3421 *) ac_try_echo=$ac_try;;
3422esac
3423eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3424printf "%s\n" "$ac_try_echo"; } >&5
3425 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3426 ac_status=$?
3427 if test -s conftest.err; then
3428 sed '10a\
3429... rest of stderr output deleted ...
3430 10q' conftest.err >conftest.er1
3431 cat conftest.er1 >&5
3432 fi
3433 rm -f conftest.er1 conftest.err
3434 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3435 test $ac_status = 0; }
3436done
3437
3438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3439/* end confdefs.h. */
3440
3441int
3442main (void)
3443{
Bram Moolenaar22640082018-04-19 20:39:41 +02003444
Bram Moolenaar2e324952018-04-14 14:37:07 +02003445 ;
3446 return 0;
3447}
3448_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003449ac_clean_files_save=$ac_clean_files
3450ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3451# Try to create an executable without -o first, disregard a.out.
3452# It will help us diagnose broken compilers, and finding out an intuition
3453# of exeext.
3454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3455printf %s "checking whether the C compiler works... " >&6; }
3456ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3457
3458# The possible output files:
3459ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3460
3461ac_rmfiles=
3462for ac_file in $ac_files
3463do
3464 case $ac_file in
3465 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3466 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3467 esac
3468done
3469rm -f $ac_rmfiles
3470
3471if { { ac_try="$ac_link_default"
3472case "(($ac_try" in
3473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3474 *) ac_try_echo=$ac_try;;
3475esac
3476eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3477printf "%s\n" "$ac_try_echo"; } >&5
3478 (eval "$ac_link_default") 2>&5
3479 ac_status=$?
3480 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3481 test $ac_status = 0; }
3482then :
3483 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3484# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3485# in a Makefile. We should not override ac_cv_exeext if it was cached,
3486# so that the user can short-circuit this test for compilers unknown to
3487# Autoconf.
3488for ac_file in $ac_files ''
3489do
3490 test -f "$ac_file" || continue
3491 case $ac_file in
3492 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3493 ;;
3494 [ab].out )
3495 # We found the default executable, but exeext='' is most
3496 # certainly right.
3497 break;;
3498 *.* )
3499 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3500 then :; else
3501 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3502 fi
3503 # We set ac_cv_exeext here because the later test for it is not
3504 # safe: cross compilers may not add the suffix if given an `-o'
3505 # argument, so we may need to know it at that point already.
3506 # Even if this section looks crufty: it has the advantage of
3507 # actually working.
3508 break;;
3509 * )
3510 break;;
3511 esac
3512done
3513test "$ac_cv_exeext" = no && ac_cv_exeext=
3514
3515else $as_nop
3516 ac_file=''
3517fi
3518if test -z "$ac_file"
3519then :
3520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3521printf "%s\n" "no" >&6; }
3522printf "%s\n" "$as_me: failed program was:" >&5
3523sed 's/^/| /' conftest.$ac_ext >&5
3524
3525{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3526printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3527as_fn_error 77 "C compiler cannot create executables
3528See \`config.log' for more details" "$LINENO" 5; }
3529else $as_nop
3530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3531printf "%s\n" "yes" >&6; }
3532fi
3533{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3534printf %s "checking for C compiler default output file name... " >&6; }
3535{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3536printf "%s\n" "$ac_file" >&6; }
3537ac_exeext=$ac_cv_exeext
3538
3539rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3540ac_clean_files=$ac_clean_files_save
3541{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3542printf %s "checking for suffix of executables... " >&6; }
3543if { { ac_try="$ac_link"
3544case "(($ac_try" in
3545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3546 *) ac_try_echo=$ac_try;;
3547esac
3548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3549printf "%s\n" "$ac_try_echo"; } >&5
3550 (eval "$ac_link") 2>&5
3551 ac_status=$?
3552 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3553 test $ac_status = 0; }
3554then :
3555 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3556# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3557# work properly (i.e., refer to `conftest.exe'), while it won't with
3558# `rm'.
3559for ac_file in conftest.exe conftest conftest.*; do
3560 test -f "$ac_file" || continue
3561 case $ac_file in
3562 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3563 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3564 break;;
3565 * ) break;;
3566 esac
3567done
3568else $as_nop
3569 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3570printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3571as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3572See \`config.log' for more details" "$LINENO" 5; }
3573fi
3574rm -f conftest conftest$ac_cv_exeext
3575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3576printf "%s\n" "$ac_cv_exeext" >&6; }
3577
3578rm -f conftest.$ac_ext
3579EXEEXT=$ac_cv_exeext
3580ac_exeext=$EXEEXT
3581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3582/* end confdefs.h. */
3583#include <stdio.h>
3584int
3585main (void)
3586{
3587FILE *f = fopen ("conftest.out", "w");
3588 return ferror (f) || fclose (f) != 0;
3589
3590 ;
3591 return 0;
3592}
3593_ACEOF
3594ac_clean_files="$ac_clean_files conftest.out"
3595# Check that the compiler produces executables we can run. If not, either
3596# the compiler is broken, or we cross compile.
3597{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3598printf %s "checking whether we are cross compiling... " >&6; }
3599if test "$cross_compiling" != yes; then
3600 { { ac_try="$ac_link"
3601case "(($ac_try" in
3602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3603 *) ac_try_echo=$ac_try;;
3604esac
3605eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3606printf "%s\n" "$ac_try_echo"; } >&5
3607 (eval "$ac_link") 2>&5
3608 ac_status=$?
3609 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3610 test $ac_status = 0; }
3611 if { ac_try='./conftest$ac_cv_exeext'
3612 { { case "(($ac_try" in
3613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3614 *) ac_try_echo=$ac_try;;
3615esac
3616eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3617printf "%s\n" "$ac_try_echo"; } >&5
3618 (eval "$ac_try") 2>&5
3619 ac_status=$?
3620 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3621 test $ac_status = 0; }; }; then
3622 cross_compiling=no
3623 else
3624 if test "$cross_compiling" = maybe; then
3625 cross_compiling=yes
3626 else
3627 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3628printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3629as_fn_error 77 "cannot run C compiled programs.
3630If you meant to cross compile, use \`--host'.
3631See \`config.log' for more details" "$LINENO" 5; }
3632 fi
3633 fi
3634fi
3635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3636printf "%s\n" "$cross_compiling" >&6; }
3637
3638rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3639ac_clean_files=$ac_clean_files_save
3640{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3641printf %s "checking for suffix of object files... " >&6; }
3642if test ${ac_cv_objext+y}
3643then :
3644 printf %s "(cached) " >&6
3645else $as_nop
3646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3647/* end confdefs.h. */
3648
3649int
3650main (void)
3651{
3652
3653 ;
3654 return 0;
3655}
3656_ACEOF
3657rm -f conftest.o conftest.obj
3658if { { ac_try="$ac_compile"
3659case "(($ac_try" in
3660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3661 *) ac_try_echo=$ac_try;;
3662esac
3663eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3664printf "%s\n" "$ac_try_echo"; } >&5
3665 (eval "$ac_compile") 2>&5
3666 ac_status=$?
3667 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3668 test $ac_status = 0; }
3669then :
3670 for ac_file in conftest.o conftest.obj conftest.*; do
3671 test -f "$ac_file" || continue;
3672 case $ac_file in
3673 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3674 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3675 break;;
3676 esac
3677done
3678else $as_nop
3679 printf "%s\n" "$as_me: failed program was:" >&5
3680sed 's/^/| /' conftest.$ac_ext >&5
3681
3682{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3683printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3684as_fn_error $? "cannot compute suffix of object files: cannot compile
3685See \`config.log' for more details" "$LINENO" 5; }
3686fi
3687rm -f conftest.$ac_cv_objext conftest.$ac_ext
3688fi
3689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3690printf "%s\n" "$ac_cv_objext" >&6; }
3691OBJEXT=$ac_cv_objext
3692ac_objext=$OBJEXT
3693{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
3694printf %s "checking whether the compiler supports GNU C... " >&6; }
3695if test ${ac_cv_c_compiler_gnu+y}
3696then :
3697 printf %s "(cached) " >&6
3698else $as_nop
3699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3700/* end confdefs.h. */
3701
3702int
3703main (void)
3704{
3705#ifndef __GNUC__
3706 choke me
3707#endif
3708
3709 ;
3710 return 0;
3711}
3712_ACEOF
3713if ac_fn_c_try_compile "$LINENO"
3714then :
3715 ac_compiler_gnu=yes
3716else $as_nop
3717 ac_compiler_gnu=no
3718fi
3719rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3720ac_cv_c_compiler_gnu=$ac_compiler_gnu
3721
3722fi
3723{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3724printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
3725ac_compiler_gnu=$ac_cv_c_compiler_gnu
3726
3727if test $ac_compiler_gnu = yes; then
3728 GCC=yes
3729else
3730 GCC=
3731fi
3732ac_test_CFLAGS=${CFLAGS+y}
3733ac_save_CFLAGS=$CFLAGS
3734{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3735printf %s "checking whether $CC accepts -g... " >&6; }
3736if test ${ac_cv_prog_cc_g+y}
3737then :
3738 printf %s "(cached) " >&6
3739else $as_nop
3740 ac_save_c_werror_flag=$ac_c_werror_flag
3741 ac_c_werror_flag=yes
3742 ac_cv_prog_cc_g=no
3743 CFLAGS="-g"
3744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3745/* end confdefs.h. */
3746
3747int
3748main (void)
3749{
3750
3751 ;
3752 return 0;
3753}
3754_ACEOF
3755if ac_fn_c_try_compile "$LINENO"
3756then :
3757 ac_cv_prog_cc_g=yes
3758else $as_nop
3759 CFLAGS=""
3760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3761/* end confdefs.h. */
3762
3763int
3764main (void)
3765{
3766
3767 ;
3768 return 0;
3769}
3770_ACEOF
3771if ac_fn_c_try_compile "$LINENO"
3772then :
3773
3774else $as_nop
3775 ac_c_werror_flag=$ac_save_c_werror_flag
3776 CFLAGS="-g"
3777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3778/* end confdefs.h. */
3779
3780int
3781main (void)
3782{
3783
3784 ;
3785 return 0;
3786}
3787_ACEOF
3788if ac_fn_c_try_compile "$LINENO"
3789then :
3790 ac_cv_prog_cc_g=yes
3791fi
3792rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3793fi
3794rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3795fi
3796rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3797 ac_c_werror_flag=$ac_save_c_werror_flag
3798fi
3799{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3800printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
3801if test $ac_test_CFLAGS; then
3802 CFLAGS=$ac_save_CFLAGS
3803elif test $ac_cv_prog_cc_g = yes; then
3804 if test "$GCC" = yes; then
3805 CFLAGS="-g -O2"
3806 else
3807 CFLAGS="-g"
3808 fi
3809else
3810 if test "$GCC" = yes; then
3811 CFLAGS="-O2"
3812 else
3813 CFLAGS=
3814 fi
3815fi
3816ac_prog_cc_stdc=no
3817if test x$ac_prog_cc_stdc = xno
3818then :
3819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
3820printf %s "checking for $CC option to enable C11 features... " >&6; }
3821if test ${ac_cv_prog_cc_c11+y}
3822then :
3823 printf %s "(cached) " >&6
3824else $as_nop
3825 ac_cv_prog_cc_c11=no
3826ac_save_CC=$CC
3827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3828/* end confdefs.h. */
3829$ac_c_conftest_c11_program
3830_ACEOF
3831for ac_arg in '' -std=gnu11
Bram Moolenaar2e324952018-04-14 14:37:07 +02003832do
3833 CC="$ac_save_CC $ac_arg"
Illia Bobyra96d5442023-08-30 16:30:15 +02003834 if ac_fn_c_try_compile "$LINENO"
3835then :
3836 ac_cv_prog_cc_c11=$ac_arg
3837fi
3838rm -f core conftest.err conftest.$ac_objext conftest.beam
3839 test "x$ac_cv_prog_cc_c11" != "xno" && break
3840done
3841rm -f conftest.$ac_ext
3842CC=$ac_save_CC
3843fi
3844
3845if test "x$ac_cv_prog_cc_c11" = xno
3846then :
3847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3848printf "%s\n" "unsupported" >&6; }
3849else $as_nop
3850 if test "x$ac_cv_prog_cc_c11" = x
3851then :
3852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3853printf "%s\n" "none needed" >&6; }
3854else $as_nop
3855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
3856printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
3857 CC="$CC $ac_cv_prog_cc_c11"
3858fi
3859 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
3860 ac_prog_cc_stdc=c11
3861fi
3862fi
3863if test x$ac_prog_cc_stdc = xno
3864then :
3865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
3866printf %s "checking for $CC option to enable C99 features... " >&6; }
3867if test ${ac_cv_prog_cc_c99+y}
3868then :
3869 printf %s "(cached) " >&6
3870else $as_nop
3871 ac_cv_prog_cc_c99=no
3872ac_save_CC=$CC
3873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3874/* end confdefs.h. */
3875$ac_c_conftest_c99_program
3876_ACEOF
3877for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
3878do
3879 CC="$ac_save_CC $ac_arg"
3880 if ac_fn_c_try_compile "$LINENO"
3881then :
Bram Moolenaar22640082018-04-19 20:39:41 +02003882 ac_cv_prog_cc_c99=$ac_arg
Bram Moolenaar2e324952018-04-14 14:37:07 +02003883fi
Illia Bobyra96d5442023-08-30 16:30:15 +02003884rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar22640082018-04-19 20:39:41 +02003885 test "x$ac_cv_prog_cc_c99" != "xno" && break
Bram Moolenaar2e324952018-04-14 14:37:07 +02003886done
3887rm -f conftest.$ac_ext
3888CC=$ac_save_CC
Bram Moolenaar2e324952018-04-14 14:37:07 +02003889fi
3890
Illia Bobyra96d5442023-08-30 16:30:15 +02003891if test "x$ac_cv_prog_cc_c99" = xno
3892then :
3893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3894printf "%s\n" "unsupported" >&6; }
3895else $as_nop
3896 if test "x$ac_cv_prog_cc_c99" = x
3897then :
3898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3899printf "%s\n" "none needed" >&6; }
3900else $as_nop
3901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3902printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
3903 CC="$CC $ac_cv_prog_cc_c99"
3904fi
3905 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
3906 ac_prog_cc_stdc=c99
3907fi
3908fi
3909if test x$ac_prog_cc_stdc = xno
3910then :
3911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
3912printf %s "checking for $CC option to enable C89 features... " >&6; }
3913if test ${ac_cv_prog_cc_c89+y}
3914then :
3915 printf %s "(cached) " >&6
3916else $as_nop
3917 ac_cv_prog_cc_c89=no
3918ac_save_CC=$CC
3919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3920/* end confdefs.h. */
3921$ac_c_conftest_c89_program
3922_ACEOF
3923for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3924do
3925 CC="$ac_save_CC $ac_arg"
3926 if ac_fn_c_try_compile "$LINENO"
3927then :
3928 ac_cv_prog_cc_c89=$ac_arg
3929fi
3930rm -f core conftest.err conftest.$ac_objext conftest.beam
3931 test "x$ac_cv_prog_cc_c89" != "xno" && break
3932done
3933rm -f conftest.$ac_ext
3934CC=$ac_save_CC
3935fi
3936
3937if test "x$ac_cv_prog_cc_c89" = xno
3938then :
3939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3940printf "%s\n" "unsupported" >&6; }
3941else $as_nop
3942 if test "x$ac_cv_prog_cc_c89" = x
3943then :
3944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3945printf "%s\n" "none needed" >&6; }
3946else $as_nop
3947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3948printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
3949 CC="$CC $ac_cv_prog_cc_c89"
3950fi
3951 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
3952 ac_prog_cc_stdc=c89
3953fi
3954fi
3955
3956ac_ext=c
3957ac_cpp='$CPP $CPPFLAGS'
3958ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3959ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3960ac_compiler_gnu=$ac_cv_c_compiler_gnu
Bram Moolenaarc0394412017-04-20 20:20:23 +02003961 ac_ext=c
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003962ac_cpp='$CPP $CPPFLAGS'
3963ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3964ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3965ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02003966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3967printf %s "checking how to run the C preprocessor... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00003968# On Suns, sometimes $CPP names a directory.
3969if test -n "$CPP" && test -d "$CPP"; then
3970 CPP=
3971fi
3972if test -z "$CPP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003973 if test ${ac_cv_prog_CPP+y}
3974then :
3975 printf %s "(cached) " >&6
3976else $as_nop
3977 # Double quotes because $CC needs to be expanded
3978 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003979 do
3980 ac_preproc_ok=false
3981for ac_c_preproc_warn_flag in '' yes
3982do
3983 # Use a header file that comes with gcc, so configuring glibc
3984 # with a fresh cross-compiler works.
Bram Moolenaar071d4272004-06-13 20:20:40 +00003985 # On the NeXT, cc -E runs the code through the compiler's parser,
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003986 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02003987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003988/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02003989#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003990 Syntax error
3991_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003992if ac_fn_c_try_cpp "$LINENO"
3993then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003994
Illia Bobyra96d5442023-08-30 16:30:15 +02003995else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00003996 # Broken: fails on valid input.
3997continue
3998fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01003999rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004000
Bram Moolenaar446cb832008-06-24 21:56:24 +00004001 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004002 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004004/* end confdefs.h. */
4005#include <ac_nonexistent.h>
4006_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004007if ac_fn_c_try_cpp "$LINENO"
4008then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004009 # Broken: success on invalid input.
4010continue
Illia Bobyra96d5442023-08-30 16:30:15 +02004011else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004012 # Passes both tests.
4013ac_preproc_ok=:
4014break
4015fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004016rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004017
4018done
4019# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004020rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004021if $ac_preproc_ok
4022then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004023 break
4024fi
4025
4026 done
4027 ac_cv_prog_CPP=$CPP
4028
4029fi
4030 CPP=$ac_cv_prog_CPP
4031else
4032 ac_cv_prog_CPP=$CPP
4033fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004034{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4035printf "%s\n" "$CPP" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004036ac_preproc_ok=false
4037for ac_c_preproc_warn_flag in '' yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00004038do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004039 # Use a header file that comes with gcc, so configuring glibc
4040 # with a fresh cross-compiler works.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004041 # On the NeXT, cc -E runs the code through the compiler's parser,
4042 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004044/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02004045#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004046 Syntax error
4047_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004048if ac_fn_c_try_cpp "$LINENO"
4049then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004050
Illia Bobyra96d5442023-08-30 16:30:15 +02004051else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004052 # Broken: fails on valid input.
4053continue
4054fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004055rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004056
Bram Moolenaar446cb832008-06-24 21:56:24 +00004057 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004058 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004060/* end confdefs.h. */
4061#include <ac_nonexistent.h>
4062_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004063if ac_fn_c_try_cpp "$LINENO"
4064then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004065 # Broken: success on invalid input.
4066continue
Illia Bobyra96d5442023-08-30 16:30:15 +02004067else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004068 # Passes both tests.
4069ac_preproc_ok=:
4070break
4071fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004072rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004073
4074done
4075# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004076rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004077if $ac_preproc_ok
4078then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004079
Illia Bobyra96d5442023-08-30 16:30:15 +02004080else $as_nop
4081 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4082printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01004083as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4084See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004085fi
4086
4087ac_ext=c
4088ac_cpp='$CPP $CPPFLAGS'
4089ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4090ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4091ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02004092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4093printf %s "checking for grep that handles long lines and -e... " >&6; }
4094if test ${ac_cv_path_GREP+y}
4095then :
4096 printf %s "(cached) " >&6
4097else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004098 if test -z "$GREP"; then
4099 ac_path_GREP_found=false
4100 # Loop through the user's path and test for each of PROGNAME-LIST
4101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4102for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4103do
4104 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004105 case $as_dir in #(((
4106 '') as_dir=./ ;;
4107 */) ;;
4108 *) as_dir=$as_dir/ ;;
4109 esac
4110 for ac_prog in grep ggrep
4111 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004112 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004113 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004114 as_fn_executable_p "$ac_path_GREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004115# Check for GNU ac_path_GREP and select it if it is found.
4116 # Check for GNU $ac_path_GREP
4117case `"$ac_path_GREP" --version 2>&1` in
4118*GNU*)
4119 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4120*)
4121 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004122 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004123 while :
4124 do
4125 cat "conftest.in" "conftest.in" >"conftest.tmp"
4126 mv "conftest.tmp" "conftest.in"
4127 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004128 printf "%s\n" 'GREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004129 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4130 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004131 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004132 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4133 # Best one so far, save it but keep looking for a better one
4134 ac_cv_path_GREP="$ac_path_GREP"
4135 ac_path_GREP_max=$ac_count
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004136 fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004137 # 10*(2^10) chars as input seems more than enough
4138 test $ac_count -gt 10 && break
4139 done
4140 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4141esac
4142
4143 $ac_path_GREP_found && break 3
4144 done
4145 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004146 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004147IFS=$as_save_IFS
4148 if test -z "$ac_cv_path_GREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004149 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +00004150 fi
4151else
4152 ac_cv_path_GREP=$GREP
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004153fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004154
4155fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004156{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4157printf "%s\n" "$ac_cv_path_GREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004158 GREP="$ac_cv_path_GREP"
4159
4160
Illia Bobyra96d5442023-08-30 16:30:15 +02004161{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4162printf %s "checking for egrep... " >&6; }
4163if test ${ac_cv_path_EGREP+y}
4164then :
4165 printf %s "(cached) " >&6
4166else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004167 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4168 then ac_cv_path_EGREP="$GREP -E"
4169 else
4170 if test -z "$EGREP"; then
4171 ac_path_EGREP_found=false
4172 # Loop through the user's path and test for each of PROGNAME-LIST
4173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4174for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4175do
4176 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004177 case $as_dir in #(((
4178 '') as_dir=./ ;;
4179 */) ;;
4180 *) as_dir=$as_dir/ ;;
4181 esac
4182 for ac_prog in egrep
4183 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004184 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004185 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004186 as_fn_executable_p "$ac_path_EGREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004187# Check for GNU ac_path_EGREP and select it if it is found.
4188 # Check for GNU $ac_path_EGREP
4189case `"$ac_path_EGREP" --version 2>&1` in
4190*GNU*)
4191 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4192*)
4193 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004194 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004195 while :
4196 do
4197 cat "conftest.in" "conftest.in" >"conftest.tmp"
4198 mv "conftest.tmp" "conftest.in"
4199 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004200 printf "%s\n" 'EGREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004201 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4202 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004203 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004204 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4205 # Best one so far, save it but keep looking for a better one
4206 ac_cv_path_EGREP="$ac_path_EGREP"
4207 ac_path_EGREP_max=$ac_count
4208 fi
4209 # 10*(2^10) chars as input seems more than enough
4210 test $ac_count -gt 10 && break
4211 done
4212 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4213esac
4214
4215 $ac_path_EGREP_found && break 3
4216 done
4217 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004218 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004219IFS=$as_save_IFS
4220 if test -z "$ac_cv_path_EGREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004221 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +00004222 fi
4223else
4224 ac_cv_path_EGREP=$EGREP
4225fi
4226
4227 fi
4228fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004229{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4230printf "%s\n" "$ac_cv_path_EGREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004231 EGREP="$ac_cv_path_EGREP"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004232
Illia Bobyra96d5442023-08-30 16:30:15 +02004233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
4234printf %s "checking for fgrep... " >&6; }
4235if test ${ac_cv_path_FGREP+y}
4236then :
4237 printf %s "(cached) " >&6
4238else $as_nop
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004239 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
4240 then ac_cv_path_FGREP="$GREP -F"
4241 else
4242 if test -z "$FGREP"; then
4243 ac_path_FGREP_found=false
4244 # Loop through the user's path and test for each of PROGNAME-LIST
4245 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4246for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4247do
4248 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004249 case $as_dir in #(((
4250 '') as_dir=./ ;;
4251 */) ;;
4252 *) as_dir=$as_dir/ ;;
4253 esac
4254 for ac_prog in fgrep
4255 do
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004256 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004257 ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004258 as_fn_executable_p "$ac_path_FGREP" || continue
4259# Check for GNU ac_path_FGREP and select it if it is found.
4260 # Check for GNU $ac_path_FGREP
4261case `"$ac_path_FGREP" --version 2>&1` in
4262*GNU*)
4263 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
4264*)
4265 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004266 printf %s 0123456789 >"conftest.in"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004267 while :
4268 do
4269 cat "conftest.in" "conftest.in" >"conftest.tmp"
4270 mv "conftest.tmp" "conftest.in"
4271 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004272 printf "%s\n" 'FGREP' >> "conftest.nl"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004273 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
4274 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4275 as_fn_arith $ac_count + 1 && ac_count=$as_val
4276 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
4277 # Best one so far, save it but keep looking for a better one
4278 ac_cv_path_FGREP="$ac_path_FGREP"
4279 ac_path_FGREP_max=$ac_count
4280 fi
4281 # 10*(2^10) chars as input seems more than enough
4282 test $ac_count -gt 10 && break
4283 done
4284 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4285esac
4286
4287 $ac_path_FGREP_found && break 3
4288 done
4289 done
4290 done
4291IFS=$as_save_IFS
4292 if test -z "$ac_cv_path_FGREP"; then
4293 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4294 fi
4295else
4296 ac_cv_path_FGREP=$FGREP
4297fi
4298
4299 fi
4300fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004301{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
4302printf "%s\n" "$ac_cv_path_FGREP" >&6; }
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004303 FGREP="$ac_cv_path_FGREP"
4304
Bram Moolenaarc0394412017-04-20 20:20:23 +02004305 for ac_prog in gawk mawk nawk awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004306do
4307 # Extract the first word of "$ac_prog", so it can be a program name with args.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004308set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004309{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4310printf %s "checking for $ac_word... " >&6; }
4311if test ${ac_cv_prog_AWK+y}
4312then :
4313 printf %s "(cached) " >&6
4314else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00004315 if test -n "$AWK"; then
4316 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4317else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4319for as_dir in $PATH
4320do
4321 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004322 case $as_dir in #(((
4323 '') as_dir=./ ;;
4324 */) ;;
4325 *) as_dir=$as_dir/ ;;
4326 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004327 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004328 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004329 ac_cv_prog_AWK="$ac_prog"
Illia Bobyra96d5442023-08-30 16:30:15 +02004330 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004331 break 2
4332 fi
4333done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004334 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004335IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004336
Bram Moolenaar071d4272004-06-13 20:20:40 +00004337fi
4338fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004339AWK=$ac_cv_prog_AWK
Bram Moolenaar071d4272004-06-13 20:20:40 +00004340if test -n "$AWK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4342printf "%s\n" "$AWK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004343else
Illia Bobyra96d5442023-08-30 16:30:15 +02004344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4345printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004346fi
4347
Bram Moolenaar446cb832008-06-24 21:56:24 +00004348
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004349 test -n "$AWK" && break
Bram Moolenaar071d4272004-06-13 20:20:40 +00004350done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004351
Bram Moolenaar071d4272004-06-13 20:20:40 +00004352# Extract the first word of "strip", so it can be a program name with args.
4353set dummy strip; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004354{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4355printf %s "checking for $ac_word... " >&6; }
4356if test ${ac_cv_prog_STRIP+y}
4357then :
4358 printf %s "(cached) " >&6
4359else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00004360 if test -n "$STRIP"; then
4361 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4362else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4364for as_dir in $PATH
4365do
4366 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004367 case $as_dir in #(((
4368 '') as_dir=./ ;;
4369 */) ;;
4370 *) as_dir=$as_dir/ ;;
4371 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004372 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004373 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004374 ac_cv_prog_STRIP="strip"
Illia Bobyra96d5442023-08-30 16:30:15 +02004375 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004376 break 2
4377 fi
4378done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004379 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004380IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004381
Bram Moolenaar071d4272004-06-13 20:20:40 +00004382 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4383fi
4384fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004385STRIP=$ac_cv_prog_STRIP
Bram Moolenaar071d4272004-06-13 20:20:40 +00004386if test -n "$STRIP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4388printf "%s\n" "$STRIP" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004389else
Illia Bobyra96d5442023-08-30 16:30:15 +02004390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4391printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004392fi
4393
4394
Bram Moolenaar071d4272004-06-13 20:20:40 +00004395
4396
Bram Moolenaar071d4272004-06-13 20:20:40 +00004397
Illia Bobyrf39842f2023-08-27 18:21:23 +02004398
Illia Bobyra96d5442023-08-30 16:30:15 +02004399{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
4400printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
4401if test ${ac_cv_header_sys_wait_h+y}
4402then :
4403 printf %s "(cached) " >&6
4404else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004406/* end confdefs.h. */
4407#include <sys/types.h>
4408#include <sys/wait.h>
4409#ifndef WEXITSTATUS
4410# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4411#endif
4412#ifndef WIFEXITED
4413# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4414#endif
4415
4416int
Illia Bobyra96d5442023-08-30 16:30:15 +02004417main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004418{
4419 int s;
4420 wait (&s);
4421 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4422 ;
4423 return 0;
4424}
4425_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004426if ac_fn_c_try_compile "$LINENO"
4427then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004428 ac_cv_header_sys_wait_h=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004429else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004430 ac_cv_header_sys_wait_h=no
Bram Moolenaar446cb832008-06-24 21:56:24 +00004431fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004432rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004433fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004434{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
4435printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004436if test $ac_cv_header_sys_wait_h = yes; then
4437
Illia Bobyra96d5442023-08-30 16:30:15 +02004438printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +00004439
4440fi
4441
4442
Bram Moolenaar22640082018-04-19 20:39:41 +02004443if test x"$ac_cv_prog_cc_c99" != xno; then
4444
4445
Illia Bobyra96d5442023-08-30 16:30:15 +02004446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
4447printf %s "checking for unsigned long long int... " >&6; }
4448if test ${ac_cv_type_unsigned_long_long_int+y}
4449then :
4450 printf %s "(cached) " >&6
4451else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004452 ac_cv_type_unsigned_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004453 case $ac_prog_cc_stdc in
4454 no | c89) ;;
4455 *)
4456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004457/* end confdefs.h. */
Bram Moolenaar22640082018-04-19 20:39:41 +02004458
4459 /* For now, do not test the preprocessor; as of 2007 there are too many
4460 implementations with broken preprocessors. Perhaps this can
4461 be revisited in 2012. In the meantime, code should not expect
4462 #if to work with literals wider than 32 bits. */
4463 /* Test literals. */
4464 long long int ll = 9223372036854775807ll;
4465 long long int nll = -9223372036854775807LL;
4466 unsigned long long int ull = 18446744073709551615ULL;
4467 /* Test constant expressions. */
4468 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4469 ? 1 : -1)];
4470 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4471 ? 1 : -1)];
4472 int i = 63;
4473int
Illia Bobyra96d5442023-08-30 16:30:15 +02004474main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004475{
4476/* Test availability of runtime routines for shift and division. */
4477 long long int llmax = 9223372036854775807ll;
4478 unsigned long long int ullmax = 18446744073709551615ull;
4479 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4480 | (llmax / ll) | (llmax % ll)
4481 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4482 | (ullmax / ull) | (ullmax % ull));
4483 ;
4484 return 0;
4485}
4486
4487_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004488if ac_fn_c_try_link "$LINENO"
4489then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004490
Illia Bobyra96d5442023-08-30 16:30:15 +02004491else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004492 ac_cv_type_unsigned_long_long_int=no
4493fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004494rm -f core conftest.err conftest.$ac_objext conftest.beam \
4495 conftest$ac_exeext conftest.$ac_ext;;
4496 esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004497fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004498{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
4499printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004500 if test $ac_cv_type_unsigned_long_long_int = yes; then
4501
Illia Bobyra96d5442023-08-30 16:30:15 +02004502printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004503
4504 fi
4505
4506
4507
Illia Bobyra96d5442023-08-30 16:30:15 +02004508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
4509printf %s "checking for long long int... " >&6; }
4510if test ${ac_cv_type_long_long_int+y}
4511then :
4512 printf %s "(cached) " >&6
4513else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004514 ac_cv_type_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004515 case $ac_prog_cc_stdc in
4516 no | c89) ;;
4517 *)
4518 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
4519 if test $ac_cv_type_long_long_int = yes; then
4520 if test "$cross_compiling" = yes
4521then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004522 :
Illia Bobyra96d5442023-08-30 16:30:15 +02004523else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4525/* end confdefs.h. */
4526#include <limits.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02004527 #ifndef LLONG_MAX
4528 # define HALF \
4529 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4530 # define LLONG_MAX (HALF - 1 + HALF)
4531 #endif
Bram Moolenaar22640082018-04-19 20:39:41 +02004532int
Illia Bobyra96d5442023-08-30 16:30:15 +02004533main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004534{
4535long long int n = 1;
Illia Bobyra96d5442023-08-30 16:30:15 +02004536 int i;
4537 for (i = 0; ; i++)
4538 {
4539 long long int m = n << i;
4540 if (m >> i != n)
4541 return 1;
4542 if (LLONG_MAX / 2 < m)
4543 break;
4544 }
4545 return 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02004546 ;
4547 return 0;
4548}
4549_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004550if ac_fn_c_try_run "$LINENO"
4551then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004552
Illia Bobyra96d5442023-08-30 16:30:15 +02004553else $as_nop
Bram Moolenaar22640082018-04-19 20:39:41 +02004554 ac_cv_type_long_long_int=no
4555fi
4556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4557 conftest.$ac_objext conftest.beam conftest.$ac_ext
4558fi
4559
Illia Bobyra96d5442023-08-30 16:30:15 +02004560 fi;;
4561 esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004562fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
4564printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004565 if test $ac_cv_type_long_long_int = yes; then
4566
Illia Bobyra96d5442023-08-30 16:30:15 +02004567printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004568
4569 fi
4570
4571 if test "$ac_cv_type_long_long_int" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004572 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4573printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004574as_fn_error $? "Compiler does not support long long int
4575See \`config.log' for more details" "$LINENO" 5; }
4576 fi
4577
Illia Bobyra96d5442023-08-30 16:30:15 +02004578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports trailing commas" >&5
4579printf %s "checking if the compiler supports trailing commas... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004580 trailing_commas=no
4581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4582/* end confdefs.h. */
4583
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004584int
Illia Bobyra96d5442023-08-30 16:30:15 +02004585main (void)
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004586{
4587
Bram Moolenaar22640082018-04-19 20:39:41 +02004588 enum {
4589 one,
4590 };
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004591 ;
4592 return 0;
4593}
4594_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004595if ac_fn_c_try_compile "$LINENO"
4596then :
4597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4598printf "%s\n" "yes" >&6; }; trailing_commas=yes
4599else $as_nop
4600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4601printf "%s\n" "no" >&6; }
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004602fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004603rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004604 if test "$trailing_commas" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004605 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4606printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004607as_fn_error $? "Compiler does not support trailing comma in enum
4608See \`config.log' for more details" "$LINENO" 5; }
4609 fi
4610
Illia Bobyra96d5442023-08-30 16:30:15 +02004611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports C++ comments" >&5
4612printf %s "checking if the compiler supports C++ comments... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004613 slash_comments=no
4614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4615/* end confdefs.h. */
4616
4617int
Illia Bobyra96d5442023-08-30 16:30:15 +02004618main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004619{
4620// C++ comments?
4621 ;
4622 return 0;
4623}
4624_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004625if ac_fn_c_try_compile "$LINENO"
4626then :
4627 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4628printf "%s\n" "yes" >&6; }; slash_comments=yes
4629else $as_nop
4630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4631printf "%s\n" "no" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004632fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004633rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004634 if test "$slash_comments" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004635 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4636printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004637as_fn_error $? "Compiler does not support C++ comments
4638See \`config.log' for more details" "$LINENO" 5; }
4639 fi
4640fi
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004641
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004642if test -n "$SOURCE_DATE_EPOCH"; then
4643 DATE_FMT="%b %d %Y %H:%M:%S"
4644 BUILD_DATE=$(LC_ALL=C date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || LC_ALL=C date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || LC_ALL=C date -u "+$DATE_FMT")
Illia Bobyra96d5442023-08-30 16:30:15 +02004645 printf "%s\n" "#define BUILD_DATE \"$BUILD_DATE\"" >>confdefs.h
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004646
4647 BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='"
4648
4649fi
4650
Bram Moolenaarf788a062011-12-14 20:51:25 +01004651
Illia Bobyra96d5442023-08-30 16:30:15 +02004652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
4653printf %s "checking --enable-fail-if-missing argument... " >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004654# Check whether --enable-fail_if_missing was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004655if test ${enable_fail_if_missing+y}
4656then :
Bram Moolenaarf788a062011-12-14 20:51:25 +01004657 enableval=$enable_fail_if_missing; fail_if_missing="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02004658else $as_nop
Bram Moolenaarf788a062011-12-14 20:51:25 +01004659 fail_if_missing="no"
4660fi
4661
Illia Bobyra96d5442023-08-30 16:30:15 +02004662{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5
4663printf "%s\n" "$fail_if_missing" >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004664
Bram Moolenaard2a05492018-07-27 22:35:15 +02004665with_x_arg="$with_x"
4666
Bram Moolenaar446cb832008-06-24 21:56:24 +00004667if test -z "$CFLAGS"; then
4668 CFLAGS="-O"
Bram Moolenaar4d8479b2021-01-31 14:36:06 +01004669 test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004670fi
Rose00d07e72023-05-06 18:07:14 +01004671
Bram Moolenaar446cb832008-06-24 21:56:24 +00004672if test "$GCC" = yes; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004673 gccversion=`$CC -dumpversion`
Bram Moolenaar446cb832008-06-24 21:56:24 +00004674 if test "x$gccversion" = "x"; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004675 gccversion=`$CC --version | sed -e '2,$d' -e 's/darwin.//' -e 's/^[^0-9]*\([0-9]\.[0-9.]*\).*$/\1/g'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00004676 fi
Rose00d07e72023-05-06 18:07:14 +01004677
4678 if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00004679 echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
4680 CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
4681 else
4682 if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
4683 echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
4684 CFLAGS="$CFLAGS -fno-strength-reduce"
4685 fi
4686 fi
4687fi
4688
Illia Bobyra96d5442023-08-30 16:30:15 +02004689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clang version" >&5
4690printf %s "checking for clang version... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004691CLANG_VERSION_STRING=`$CC --version 2>/dev/null | sed -n -e 's/^.*clang[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/p'`
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004692if test x"$CLANG_VERSION_STRING" != x"" ; then
4693 CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
4694 CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
4695 CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
4696 CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
Illia Bobyra96d5442023-08-30 16:30:15 +02004697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
4698printf "%s\n" "$CLANG_VERSION" >&6; }
4699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
4700printf %s "checking if clang supports -fno-strength-reduce... " >&6; }
Bram Moolenaarebd211c2021-01-30 19:33:36 +01004701 if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4703printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004704 CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
4705 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4707printf "%s\n" "yes" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004708 fi
4709else
Illia Bobyra96d5442023-08-30 16:30:15 +02004710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: N/A" >&5
4711printf "%s\n" "N/A" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004712fi
4713
Bram Moolenaar839e9542016-04-14 16:46:02 +02004714CROSS_COMPILING=
Bram Moolenaar446cb832008-06-24 21:56:24 +00004715if test "$cross_compiling" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
4717printf "%s\n" "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
Bram Moolenaar839e9542016-04-14 16:46:02 +02004718 CROSS_COMPILING=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00004719fi
4720
Bram Moolenaar839e9542016-04-14 16:46:02 +02004721
Bram Moolenaar446cb832008-06-24 21:56:24 +00004722test "$GCC" = yes && CPP_MM=M;
4723
4724if test -f ./toolcheck; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for buggy tools" >&5
4726printf %s "checking for buggy tools... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004727 sh ./toolcheck 1>&6
4728fi
4729
4730OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
4731
Illia Bobyra96d5442023-08-30 16:30:15 +02004732{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname" >&5
4733printf %s "checking uname... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004734if test "x$vim_cv_uname_output" = "x" ; then
4735 vim_cv_uname_output=`(uname) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output" >&5
4737printf "%s\n" "$vim_cv_uname_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004738else
Illia Bobyra96d5442023-08-30 16:30:15 +02004739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output (cached)" >&5
4740printf "%s\n" "$vim_cv_uname_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004741fi
4742
Illia Bobyra96d5442023-08-30 16:30:15 +02004743{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
4744printf %s "checking uname -r... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004745if test "x$vim_cv_uname_r_output" = "x" ; then
4746 vim_cv_uname_r_output=`(uname -r) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output" >&5
4748printf "%s\n" "$vim_cv_uname_r_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004749else
Illia Bobyra96d5442023-08-30 16:30:15 +02004750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output (cached)" >&5
4751printf "%s\n" "$vim_cv_uname_r_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004752fi
4753
Illia Bobyra96d5442023-08-30 16:30:15 +02004754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
4755printf %s "checking uname -m... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004756if test "x$vim_cv_uname_m_output" = "x" ; then
4757 vim_cv_uname_m_output=`(uname -m) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output" >&5
4759printf "%s\n" "$vim_cv_uname_m_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004760else
Illia Bobyra96d5442023-08-30 16:30:15 +02004761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output (cached)" >&5
4762printf "%s\n" "$vim_cv_uname_m_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004763fi
4764
Illia Bobyra96d5442023-08-30 16:30:15 +02004765{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5
4766printf %s "checking for Haiku... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004767case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +02004768 Haiku) HAIKU=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4769printf "%s\n" "yes" >&6; };;
4770 *) HAIKU=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4771printf "%s\n" "no" >&6; };;
Bram Moolenaarb3f74062020-02-26 16:16:53 +01004772esac
4773
Illia Bobyra96d5442023-08-30 16:30:15 +02004774{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
4775printf %s "checking for QNX... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004776case $vim_cv_uname_output in
Bram Moolenaar446cb832008-06-24 21:56:24 +00004777 QNX) OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
4778 test -z "$with_x" && with_x=no
Illia Bobyra96d5442023-08-30 16:30:15 +02004779 QNX=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4780printf "%s\n" "yes" >&6; };;
4781 *) QNX=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4782printf "%s\n" "no" >&6; };;
Bram Moolenaar446cb832008-06-24 21:56:24 +00004783esac
4784
Illia Bobyra96d5442023-08-30 16:30:15 +02004785{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Darwin (Mac OS X)" >&5
4786printf %s "checking for Darwin (Mac OS X)... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004787if test "$vim_cv_uname_output" = Darwin; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4789printf "%s\n" "yes" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02004790 MACOS_X=yes
Bram Moolenaar52ecaaa2018-05-12 21:38:13 +02004791 CPPFLAGS="$CPPFLAGS -DMACOS_X"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004792
Illia Bobyra96d5442023-08-30 16:30:15 +02004793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-darwin argument" >&5
4794printf %s "checking --disable-darwin argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004795 # Check whether --enable-darwin was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004796if test ${enable_darwin+y}
4797then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004798 enableval=$enable_darwin;
Illia Bobyra96d5442023-08-30 16:30:15 +02004799else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +00004800 enable_darwin="yes"
4801fi
4802
4803 if test "$enable_darwin" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4805printf "%s\n" "no" >&6; }
4806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Darwin files are there" >&5
4807printf %s "checking if Darwin files are there... " >&6; }
Bram Moolenaar164fca32010-07-14 13:58:07 +02004808 if test -f os_macosx.m; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4810printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004811 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, Darwin support disabled" >&5
4813printf "%s\n" "no, Darwin support disabled" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004814 enable_darwin=no
4815 fi
4816 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, Darwin support excluded" >&5
4818printf "%s\n" "yes, Darwin support excluded" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004819 fi
4820
Illia Bobyra96d5442023-08-30 16:30:15 +02004821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-mac-arch argument" >&5
4822printf %s "checking --with-mac-arch argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004823
4824# Check whether --with-mac-arch was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004825if test ${with_mac_arch+y}
4826then :
4827 withval=$with_mac_arch; MACARCH="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACARCH" >&5
4828printf "%s\n" "$MACARCH" >&6; }
4829else $as_nop
4830 MACARCH="current"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $MACARCH" >&5
4831printf "%s\n" "defaulting to $MACARCH" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004832fi
4833
4834
Illia Bobyra96d5442023-08-30 16:30:15 +02004835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-developer-dir argument" >&5
4836printf %s "checking --with-developer-dir argument... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004837
4838# Check whether --with-developer-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004839if test ${with_developer_dir+y}
4840then :
4841 withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4842printf "%s\n" "$DEVELOPER_DIR" >&6; }
4843else $as_nop
4844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not present" >&5
4845printf "%s\n" "not present" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004846fi
4847
4848
4849 if test "x$DEVELOPER_DIR" = "x"; then
4850 # Extract the first word of "xcode-select", so it can be a program name with args.
4851set dummy xcode-select; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4853printf %s "checking for $ac_word... " >&6; }
4854if test ${ac_cv_path_XCODE_SELECT+y}
4855then :
4856 printf %s "(cached) " >&6
4857else $as_nop
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004858 case $XCODE_SELECT in
4859 [\\/]* | ?:[\\/]*)
4860 ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
4861 ;;
4862 *)
4863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4864for as_dir in $PATH
4865do
4866 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004867 case $as_dir in #(((
4868 '') as_dir=./ ;;
4869 */) ;;
4870 *) as_dir=$as_dir/ ;;
4871 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004872 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004873 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4874 ac_cv_path_XCODE_SELECT="$as_dir$ac_word$ac_exec_ext"
4875 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004876 break 2
4877 fi
4878done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004879 done
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004880IFS=$as_save_IFS
4881
4882 ;;
4883esac
4884fi
4885XCODE_SELECT=$ac_cv_path_XCODE_SELECT
4886if test -n "$XCODE_SELECT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XCODE_SELECT" >&5
4888printf "%s\n" "$XCODE_SELECT" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004889else
Illia Bobyra96d5442023-08-30 16:30:15 +02004890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4891printf "%s\n" "no" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004892fi
4893
4894
4895 if test "x$XCODE_SELECT" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for developer dir using xcode-select" >&5
4897printf %s "checking for developer dir using xcode-select... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004898 DEVELOPER_DIR=`$XCODE_SELECT -print-path`
Illia Bobyra96d5442023-08-30 16:30:15 +02004899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4900printf "%s\n" "$DEVELOPER_DIR" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004901 else
4902 DEVELOPER_DIR=/Developer
4903 fi
4904 fi
4905
Bram Moolenaar446cb832008-06-24 21:56:24 +00004906 if test "x$MACARCH" = "xboth"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 10.4 universal SDK" >&5
4908printf %s "checking for 10.4 universal SDK... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004909 save_cppflags="$CPPFLAGS"
4910 save_cflags="$CFLAGS"
4911 save_ldflags="$LDFLAGS"
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004912 CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004914/* end confdefs.h. */
4915
4916int
Illia Bobyra96d5442023-08-30 16:30:15 +02004917main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004918{
4919
4920 ;
4921 return 0;
4922}
4923_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004924if ac_fn_c_try_link "$LINENO"
4925then :
4926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
4927printf "%s\n" "found" >&6; }
4928else $as_nop
4929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4930printf "%s\n" "not found" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004931 CFLAGS="$save_cflags"
Illia Bobyra96d5442023-08-30 16:30:15 +02004932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Intel architecture is supported" >&5
4933printf %s "checking if Intel architecture is supported... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004934 CPPFLAGS="$CPPFLAGS -arch i386"
4935 LDFLAGS="$save_ldflags -arch i386"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004937/* end confdefs.h. */
4938
4939int
Illia Bobyra96d5442023-08-30 16:30:15 +02004940main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004941{
4942
4943 ;
4944 return 0;
4945}
4946_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004947if ac_fn_c_try_link "$LINENO"
4948then :
4949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4950printf "%s\n" "yes" >&6; }; MACARCH="intel"
4951else $as_nop
4952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004954 MACARCH="ppc"
4955 CPPFLAGS="$save_cppflags -arch ppc"
4956 LDFLAGS="$save_ldflags -arch ppc"
4957fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004958rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004959 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004960fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004961rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004962 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004963 elif test "x$MACARCH" = "xintel"; then
4964 CPPFLAGS="$CPPFLAGS -arch intel"
4965 LDFLAGS="$LDFLAGS -arch intel"
4966 elif test "x$MACARCH" = "xppc"; then
4967 CPPFLAGS="$CPPFLAGS -arch ppc"
4968 LDFLAGS="$LDFLAGS -arch ppc"
4969 fi
4970
4971 if test "$enable_darwin" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02004972 MACOS_X_DARWIN=yes
Bram Moolenaar164fca32010-07-14 13:58:07 +02004973 OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
Bram Moolenaar446cb832008-06-24 21:56:24 +00004974 OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
Illia Bobyra96d5442023-08-30 16:30:15 +02004975 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Bram Moolenaare5303952022-06-19 17:05:47 +01004976
Bram Moolenaard0573012017-10-28 21:11:06 +02004977 CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
Bram Moolenaar040f9752020-08-11 23:08:48 +02004978
Bram Moolenaar0b40d082022-03-08 13:32:37 +00004979 if test -z "$with_x" -a "X$enable_gui" != Xmotif -a "X$enable_gui" != Xgtk2 -a "X$enable_gui" != Xgtk3; then
Bram Moolenaar040f9752020-08-11 23:08:48 +02004980 with_x=no
4981 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02004982 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02004983else
Illia Bobyra96d5442023-08-30 16:30:15 +02004984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4985printf "%s\n" "no" >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +02004986fi
4987
Illia Bobyra96d5442023-08-30 16:30:15 +02004988ac_header= ac_cache=
4989for ac_item in $ac_header_c_list
4990do
4991 if test $ac_cache; then
4992 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
4993 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
4994 printf "%s\n" "#define $ac_item 1" >> confdefs.h
4995 fi
4996 ac_header= ac_cache=
4997 elif test $ac_header; then
4998 ac_cache=$ac_item
4999 else
5000 ac_header=$ac_item
5001 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005002done
5003
5004
Illia Bobyra96d5442023-08-30 16:30:15 +02005005
5006
5007
5008
5009
5010
5011if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
5012then :
5013
5014printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
Bram Moolenaar18e54692013-11-03 20:26:31 +01005015
Bram Moolenaar39766a72013-11-03 00:41:00 +01005016fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005017ac_fn_c_check_header_compile "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
5018if test "x$ac_cv_header_AvailabilityMacros_h" = xyes
5019then :
5020 printf "%s\n" "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h
Bram Moolenaar39766a72013-11-03 00:41:00 +01005021
Illia Bobyra96d5442023-08-30 16:30:15 +02005022fi
Bram Moolenaar39766a72013-11-03 00:41:00 +01005023
Evan Miller25448072022-12-30 10:42:23 +00005024# 10.5 and earlier lack dispatch
Illia Bobyra96d5442023-08-30 16:30:15 +02005025ac_fn_c_check_header_compile "$LINENO" "dispatch/dispatch.h" "ac_cv_header_dispatch_dispatch_h" "$ac_includes_default"
5026if test "x$ac_cv_header_dispatch_dispatch_h" = xyes
5027then :
5028 printf "%s\n" "#define HAVE_DISPATCH_DISPATCH_H 1" >>confdefs.h
Evan Miller25448072022-12-30 10:42:23 +00005029
5030fi
5031
Bram Moolenaar39766a72013-11-03 00:41:00 +01005032
Bram Moolenaar071d4272004-06-13 20:20:40 +00005033
5034
5035
Bram Moolenaar446cb832008-06-24 21:56:24 +00005036if test "$cross_compiling" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-local-dir argument" >&5
5038printf %s "checking --with-local-dir argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005039 have_local_include=''
5040 have_local_lib=''
Bram Moolenaarc236c162008-07-13 17:41:49 +00005041
5042# Check whether --with-local-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005043if test ${with_local_dir+y}
5044then :
Bram Moolenaarc236c162008-07-13 17:41:49 +00005045 withval=$with_local_dir;
5046 local_dir="$withval"
5047 case "$withval" in
5048 */*) ;;
5049 no)
5050 # avoid adding local dir to LDFLAGS and CPPFLAGS
Bram Moolenaare06c1882010-07-21 22:05:20 +02005051 have_local_include=yes
Bram Moolenaarc236c162008-07-13 17:41:49 +00005052 have_local_lib=yes
5053 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01005054 *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
Bram Moolenaarc236c162008-07-13 17:41:49 +00005055 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02005056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
5057printf "%s\n" "$local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005058
Illia Bobyra96d5442023-08-30 16:30:15 +02005059else $as_nop
Bram Moolenaarc236c162008-07-13 17:41:49 +00005060
5061 local_dir=/usr/local
Illia Bobyra96d5442023-08-30 16:30:15 +02005062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $local_dir" >&5
5063printf "%s\n" "Defaulting to $local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005064
5065fi
5066
5067 if test "$GCC" = yes -a "$local_dir" != no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00005068 echo 'void f(){}' > conftest.c
Bram Moolenaar0958e0f2013-11-04 04:57:50 +01005069 have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
Bram Moolenaarc236c162008-07-13 17:41:49 +00005070 have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
Bram Moolenaar446cb832008-06-24 21:56:24 +00005071 rm -f conftest.c conftest.o
Bram Moolenaar071d4272004-06-13 20:20:40 +00005072 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005073 if test -z "$have_local_lib" -a -d "${local_dir}/lib"; then
5074 tt=`echo "$LDFLAGS" | sed -e "s+-L${local_dir}/lib ++g" -e "s+-L${local_dir}/lib$++g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +00005075 if test "$tt" = "$LDFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005076 LDFLAGS="$LDFLAGS -L${local_dir}/lib"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005077 fi
5078 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005079 if test -z "$have_local_include" -a -d "${local_dir}/include"; then
5080 tt=`echo "$CPPFLAGS" | sed -e "s+-I${local_dir}/include ++g" -e "s+-I${local_dir}/include$++g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +00005081 if test "$tt" = "$CPPFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005082 CPPFLAGS="$CPPFLAGS -I${local_dir}/include"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005083 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005084 fi
5085fi
5086
Illia Bobyra96d5442023-08-30 16:30:15 +02005087{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-vim-name argument" >&5
5088printf %s "checking --with-vim-name argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005089
Bram Moolenaar446cb832008-06-24 21:56:24 +00005090# Check whether --with-vim-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005091if test ${with_vim_name+y}
5092then :
5093 withval=$with_vim_name; VIMNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIMNAME" >&5
5094printf "%s\n" "$VIMNAME" >&6; }
5095else $as_nop
5096 VIMNAME="vim"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $VIMNAME" >&5
5097printf "%s\n" "Defaulting to $VIMNAME" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005098fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005099
5100
Illia Bobyra96d5442023-08-30 16:30:15 +02005101{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ex-name argument" >&5
5102printf %s "checking --with-ex-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005103
5104# Check whether --with-ex-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005105if test ${with_ex_name+y}
5106then :
5107 withval=$with_ex_name; EXNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXNAME" >&5
5108printf "%s\n" "$EXNAME" >&6; }
5109else $as_nop
5110 EXNAME="ex"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to ex" >&5
5111printf "%s\n" "Defaulting to ex" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005112fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005113
5114
Illia Bobyra96d5442023-08-30 16:30:15 +02005115{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-view-name argument" >&5
5116printf %s "checking --with-view-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005117
5118# Check whether --with-view-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005119if test ${with_view_name+y}
5120then :
5121 withval=$with_view_name; VIEWNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIEWNAME" >&5
5122printf "%s\n" "$VIEWNAME" >&6; }
5123else $as_nop
5124 VIEWNAME="view"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to view" >&5
5125printf "%s\n" "Defaulting to view" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005126fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005127
5128
5129
Illia Bobyra96d5442023-08-30 16:30:15 +02005130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-global-runtime argument" >&5
5131printf %s "checking --with-global-runtime argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005132
5133# Check whether --with-global-runtime was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005134if test ${with_global_runtime+y}
5135then :
5136 withval=$with_global_runtime; RUNTIME_GLOBAL="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5137printf "%s\n" "$withval" >&6; }
5138else $as_nop
5139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5140printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005141fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005142
5143
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005144if test "X$RUNTIME_GLOBAL" != "X"; then
5145 RUNTIME_GLOBAL_AFTER=$(printf -- "$RUNTIME_GLOBAL\\n" | $AWK -F, 'BEGIN { comma=0 } { for (i = NF; i > 0; i--) { if (comma) { printf ",%s/after", $i } else { printf "%s/after", $i; comma=1 } } } END { printf "\n" }')
Illia Bobyra96d5442023-08-30 16:30:15 +02005146 printf "%s\n" "#define RUNTIME_GLOBAL \"$RUNTIME_GLOBAL\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005147
Illia Bobyra96d5442023-08-30 16:30:15 +02005148 printf "%s\n" "#define RUNTIME_GLOBAL_AFTER \"$RUNTIME_GLOBAL_AFTER\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005149
5150fi
5151
Illia Bobyra96d5442023-08-30 16:30:15 +02005152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
5153printf %s "checking --with-modified-by argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005154
5155# Check whether --with-modified-by was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005156if test ${with_modified_by+y}
5157then :
5158 withval=$with_modified_by; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5159printf "%s\n" "$withval" >&6; }; printf "%s\n" "#define MODIFIED_BY \"$withval\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005160
Illia Bobyra96d5442023-08-30 16:30:15 +02005161else $as_nop
5162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5163printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005164fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005165
Bram Moolenaar446cb832008-06-24 21:56:24 +00005166
Illia Bobyra96d5442023-08-30 16:30:15 +02005167{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if character set is EBCDIC" >&5
5168printf %s "checking if character set is EBCDIC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005170/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00005171
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005172int
Illia Bobyra96d5442023-08-30 16:30:15 +02005173main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005174{
Bram Moolenaar071d4272004-06-13 20:20:40 +00005175 /* TryCompile function for CharSet.
5176 Treat any failure as ASCII for compatibility with existing art.
5177 Use compile-time rather than run-time tests for cross-compiler
5178 tolerance. */
5179#if '0'!=240
5180make an error "Character set is not EBCDIC"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005181#endif
5182 ;
5183 return 0;
5184}
5185_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005186if ac_fn_c_try_compile "$LINENO"
5187then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00005188 # TryCompile action if true
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005189cf_cv_ebcdic=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005190else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005191 # TryCompile action if false
Bram Moolenaar071d4272004-06-13 20:20:40 +00005192cf_cv_ebcdic=no
5193fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005194rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00005195# end of TryCompile ])
5196# end of CacheVal CvEbcdic
Illia Bobyra96d5442023-08-30 16:30:15 +02005197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ebcdic" >&5
5198printf "%s\n" "$cf_cv_ebcdic" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005199case "$cf_cv_ebcdic" in #(vi
Illia Bobyra96d5442023-08-30 16:30:15 +02005200 yes) printf "%s\n" "#define EBCDIC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005201
5202 line_break='"\\n"'
5203 ;;
5204 *) line_break='"\\012"';;
5205esac
5206
5207
5208if test "$cf_cv_ebcdic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005209{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for z/OS Unix" >&5
5210printf %s "checking for z/OS Unix... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005211case $vim_cv_uname_output in
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005212 OS/390) zOSUnix="yes";
Bram Moolenaar071d4272004-06-13 20:20:40 +00005213 if test "$CC" = "cc"; then
5214 ccm="$_CC_CCMODE"
5215 ccn="CC"
5216 else
5217 if test "$CC" = "c89"; then
5218 ccm="$_CC_C89MODE"
5219 ccn="C89"
5220 else
5221 ccm=1
5222 fi
5223 fi
5224 if test "$ccm" != "1"; then
5225 echo ""
5226 echo "------------------------------------------"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005227 echo " On z/OS Unix, the environment variable"
Bram Moolenaar77c19352012-06-13 19:19:41 +02005228 echo " _CC_${ccn}MODE must be set to \"1\"!"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005229 echo " Do:"
5230 echo " export _CC_${ccn}MODE=1"
5231 echo " and then call configure again."
5232 echo "------------------------------------------"
5233 exit 1
5234 fi
Bram Moolenaar77c19352012-06-13 19:19:41 +02005235 # Set CFLAGS for configure process.
5236 # This will be reset later for config.mk.
5237 # Use haltonmsg to force error for missing H files.
5238 CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
5239 LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
Illia Bobyra96d5442023-08-30 16:30:15 +02005240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5241printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005242 ;;
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005243 *) zOSUnix="no";
Illia Bobyra96d5442023-08-30 16:30:15 +02005244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5245printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005246 ;;
5247esac
5248fi
5249
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005250if test "$zOSUnix" = "yes"; then
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005251 QUOTESED="sed -e 's/[\\\\\"]/\\\\\\\\&/g' -e 's/\\\\\\\\\"/\"/' -e 's/\\\\\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005252else
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005253 QUOTESED="sed -e 's/[\\\\\"]/\\\\&/g' -e 's/\\\\\"/\"/' -e 's/\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005254fi
5255
5256
5257
Illia Bobyra96d5442023-08-30 16:30:15 +02005258{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5
5259printf %s "checking --disable-smack argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005260# Check whether --enable-smack was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005261if test ${enable_smack+y}
5262then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005263 enableval=$enable_smack;
Illia Bobyra96d5442023-08-30 16:30:15 +02005264else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005265 enable_smack="yes"
5266fi
5267
5268if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5270printf "%s\n" "no" >&6; }
5271 ac_fn_c_check_header_compile "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
5272if test "x$ac_cv_header_linux_xattr_h" = xyes
5273then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005274 true
Illia Bobyra96d5442023-08-30 16:30:15 +02005275else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005276 enable_smack="no"
5277fi
5278
Bram Moolenaar4ed89cd2014-04-05 12:02:25 +02005279else
Illia Bobyra96d5442023-08-30 16:30:15 +02005280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5281printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005282fi
5283if test "$enable_smack" = "yes"; then
Illia Bobyr8c358e02023-09-30 22:57:19 +02005284 ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
5285if test "x$ac_cv_header_sys_xattr_h" = xyes
Illia Bobyra96d5442023-08-30 16:30:15 +02005286then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005287 true
Illia Bobyra96d5442023-08-30 16:30:15 +02005288else $as_nop
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005289 enable_smack="no"
5290fi
5291
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005292fi
5293if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
5295printf %s "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
5296
5297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005298/* end confdefs.h. */
5299#include <linux/xattr.h>
5300_ACEOF
5301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +02005302 $EGREP "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1
5303then :
5304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5305printf "%s\n" "yes" >&6; }
5306else $as_nop
5307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5308printf "%s\n" "no" >&6; }; enable_smack="no"
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005309fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005310rm -rf conftest*
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005311
5312fi
5313if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
5315printf %s "checking for setxattr in -lattr... " >&6; }
5316if test ${ac_cv_lib_attr_setxattr+y}
5317then :
5318 printf %s "(cached) " >&6
5319else $as_nop
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005320 ac_check_lib_save_LIBS=$LIBS
5321LIBS="-lattr $LIBS"
5322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5323/* end confdefs.h. */
5324
5325/* Override any GCC internal prototype to avoid an error.
5326 Use char because int might match the return type of a GCC
5327 builtin and then its argument prototype would still apply. */
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005328char setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005329int
Illia Bobyra96d5442023-08-30 16:30:15 +02005330main (void)
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005331{
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005332return setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005333 ;
5334 return 0;
5335}
5336_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005337if ac_fn_c_try_link "$LINENO"
5338then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005339 ac_cv_lib_attr_setxattr=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005340else $as_nop
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005341 ac_cv_lib_attr_setxattr=no
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005342fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005343rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005344 conftest$ac_exeext conftest.$ac_ext
5345LIBS=$ac_check_lib_save_LIBS
5346fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005347{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
5348printf "%s\n" "$ac_cv_lib_attr_setxattr" >&6; }
5349if test "x$ac_cv_lib_attr_setxattr" = xyes
5350then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005351 LIBS="$LIBS -lattr"
5352 found_smack="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02005353 printf "%s\n" "#define HAVE_SMACK 1" >>confdefs.h
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005354
5355fi
5356
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005357fi
5358
5359if test "x$found_smack" = "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
5361printf %s "checking --disable-selinux argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005362 # Check whether --enable-selinux was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005363if test ${enable_selinux+y}
5364then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005365 enableval=$enable_selinux;
Illia Bobyra96d5442023-08-30 16:30:15 +02005366else $as_nop
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005367 enable_selinux="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005368fi
5369
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005370 if test "$enable_selinux" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5372printf "%s\n" "no" >&6; }
5373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
5374printf %s "checking for is_selinux_enabled in -lselinux... " >&6; }
5375if test ${ac_cv_lib_selinux_is_selinux_enabled+y}
5376then :
5377 printf %s "(cached) " >&6
5378else $as_nop
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005379 ac_check_lib_save_LIBS=$LIBS
5380LIBS="-lselinux $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005382/* end confdefs.h. */
5383
Bram Moolenaar446cb832008-06-24 21:56:24 +00005384/* Override any GCC internal prototype to avoid an error.
5385 Use char because int might match the return type of a GCC
5386 builtin and then its argument prototype would still apply. */
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005387char is_selinux_enabled ();
5388int
Illia Bobyra96d5442023-08-30 16:30:15 +02005389main (void)
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005390{
Bram Moolenaar446cb832008-06-24 21:56:24 +00005391return is_selinux_enabled ();
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005392 ;
5393 return 0;
5394}
5395_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005396if ac_fn_c_try_link "$LINENO"
5397then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005398 ac_cv_lib_selinux_is_selinux_enabled=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02005399else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005400 ac_cv_lib_selinux_is_selinux_enabled=no
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005401fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005402rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005403 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005404LIBS=$ac_check_lib_save_LIBS
5405fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005406{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
5407printf "%s\n" "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
5408if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes
5409then :
5410 ac_fn_c_check_header_compile "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
5411if test "x$ac_cv_header_selinux_selinux_h" = xyes
5412then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005413 LIBS="$LIBS -lselinux"
Illia Bobyra96d5442023-08-30 16:30:15 +02005414 printf "%s\n" "#define HAVE_SELINUX 1" >>confdefs.h
Bram Moolenaare4b78e22017-12-07 22:29:11 +01005415
5416fi
5417
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005418fi
5419
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005420 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5422printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005423 fi
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005424fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005425
Christian Brabandte085dfd2023-09-30 12:49:18 +02005426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xattr argument" >&5
5427printf %s "checking --enable-xattr argument... " >&6; }
5428# Check whether --enable-xattr was given.
5429if test ${enable_xattr+y}
5430then :
5431 enableval=$enable_xattr;
5432else $as_nop
5433 enable_xattr="yes"
5434fi
5435
5436if test "$enable_xattr" = "yes"; then
5437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5438printf "%s\n" "yes" >&6; }
Illia Bobyr8c358e02023-09-30 22:57:19 +02005439 ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
5440if test "x$ac_cv_header_sys_xattr_h" = xyes
Christian Brabandte085dfd2023-09-30 12:49:18 +02005441then :
5442 printf "%s\n" "#define HAVE_XATTR 1" >>confdefs.h
5443
5444fi
5445
5446else
5447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5448printf "%s\n" "no" >&6; }
5449fi
5450
5451
Illia Bobyra96d5442023-08-30 16:30:15 +02005452{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-features argument" >&5
5453printf %s "checking --with-features argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005454
Bram Moolenaar446cb832008-06-24 21:56:24 +00005455# Check whether --with-features was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005456if test ${with_features+y}
5457then :
5458 withval=$with_features; features="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $features" >&5
5459printf "%s\n" "$features" >&6; }
5460else $as_nop
5461 features="huge"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to huge" >&5
5462printf "%s\n" "Defaulting to huge" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005463fi
5464
Bram Moolenaar071d4272004-06-13 20:20:40 +00005465
Martin Tournoij7904fa42022-10-04 16:28:45 +01005466case "$features" in
Martin Tournoij25f3a142022-10-08 19:26:41 +01005467 small) features="tiny" ;;
5468 big) features="normal" ;;
Martin Tournoij7904fa42022-10-04 16:28:45 +01005469esac
5470
Bram Moolenaar071d4272004-06-13 20:20:40 +00005471dovimdiff=""
5472dogvimdiff=""
5473case "$features" in
Illia Bobyra96d5442023-08-30 16:30:15 +02005474 tiny) printf "%s\n" "#define FEAT_TINY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005475 ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005476 normal) printf "%s\n" "#define FEAT_NORMAL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005477 dovimdiff="installvimdiff";
5478 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005479 huge) printf "%s\n" "#define FEAT_HUGE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005480 dovimdiff="installvimdiff";
5481 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005482 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $features is not supported" >&5
5483printf "%s\n" "Sorry, $features is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00005484esac
5485
5486
5487
5488
Martin Tournoij7904fa42022-10-04 16:28:45 +01005489if test "x$features" = "xtiny"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005490 has_eval=no
5491else
5492 has_eval=yes
5493fi
5494
Illia Bobyra96d5442023-08-30 16:30:15 +02005495{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-compiledby argument" >&5
5496printf %s "checking --with-compiledby argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005497
Bram Moolenaar446cb832008-06-24 21:56:24 +00005498# Check whether --with-compiledby was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005499if test ${with_compiledby+y}
5500then :
5501 withval=$with_compiledby; compiledby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5502printf "%s\n" "$withval" >&6; }
5503else $as_nop
5504 compiledby=""; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5505printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005506fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005507
5508
Bram Moolenaar446cb832008-06-24 21:56:24 +00005509
Illia Bobyra96d5442023-08-30 16:30:15 +02005510{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp argument" >&5
5511printf %s "checking --disable-xsmp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005512# Check whether --enable-xsmp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005513if test ${enable_xsmp+y}
5514then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005515 enableval=$enable_xsmp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005516else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00005517 enable_xsmp="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005518fi
5519
Bram Moolenaar071d4272004-06-13 20:20:40 +00005520
5521if test "$enable_xsmp" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5523printf "%s\n" "no" >&6; }
5524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp-interact argument" >&5
5525printf %s "checking --disable-xsmp-interact argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005526 # Check whether --enable-xsmp-interact was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005527if test ${enable_xsmp_interact+y}
5528then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005529 enableval=$enable_xsmp_interact;
Illia Bobyra96d5442023-08-30 16:30:15 +02005530else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00005531 enable_xsmp_interact="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005532fi
5533
Bram Moolenaar071d4272004-06-13 20:20:40 +00005534 if test "$enable_xsmp_interact" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5536printf "%s\n" "no" >&6; }
5537 printf "%s\n" "#define USE_XSMP_INTERACT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005538
5539 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5541printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005542 fi
5543else
Illia Bobyra96d5442023-08-30 16:30:15 +02005544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5545printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005546fi
5547
Illia Bobyra96d5442023-08-30 16:30:15 +02005548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking diff feature" >&5
5549printf %s "checking diff feature... " >&6; }
Martin Tournoij7904fa42022-10-04 16:28:45 +01005550if test "x$features" = "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled in $features version" >&5
5552printf "%s\n" "disabled in $features version" >&6; }
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005553else
Illia Bobyra96d5442023-08-30 16:30:15 +02005554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
5555printf "%s\n" "enabled" >&6; }
5556 printf "%s\n" "#define FEAT_DIFF 1" >>confdefs.h
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005557
5558 XDIFF_OBJS_USED="\$(XDIFF_OBJS)"
5559
5560fi
5561
Illia Bobyra96d5442023-08-30 16:30:15 +02005562{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-luainterp argument" >&5
5563printf %s "checking --enable-luainterp argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005564# Check whether --enable-luainterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005565if test ${enable_luainterp+y}
5566then :
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005567 enableval=$enable_luainterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005568else $as_nop
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005569 enable_luainterp="no"
5570fi
5571
Illia Bobyra96d5442023-08-30 16:30:15 +02005572{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_luainterp" >&5
5573printf "%s\n" "$enable_luainterp" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005574
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005575if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005576 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01005577 as_fn_error $? "cannot use Lua with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01005578 fi
5579
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005580
5581
Illia Bobyra96d5442023-08-30 16:30:15 +02005582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-lua-prefix argument" >&5
5583printf %s "checking --with-lua-prefix argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005584
5585# Check whether --with-lua_prefix was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005586if test ${with_lua_prefix+y}
5587then :
5588 withval=$with_lua_prefix; with_lua_prefix="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_lua_prefix" >&5
5589printf "%s\n" "$with_lua_prefix" >&6; }
5590else $as_nop
5591 with_lua_prefix="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5592printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005593fi
5594
5595
5596 if test "X$with_lua_prefix" != "X"; then
5597 vi_cv_path_lua_pfx="$with_lua_prefix"
5598 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LUA_PREFIX environment var" >&5
5600printf %s "checking LUA_PREFIX environment var... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005601 if test "X$LUA_PREFIX" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$LUA_PREFIX\"" >&5
5603printf "%s\n" "\"$LUA_PREFIX\"" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005604 vi_cv_path_lua_pfx="$LUA_PREFIX"
5605 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set, default to /usr" >&5
5607printf "%s\n" "not set, default to /usr" >&6; }
Bram Moolenaar0d2e4fc2010-07-18 12:35:47 +02005608 vi_cv_path_lua_pfx="/usr"
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005609 fi
5610 fi
5611
Illia Bobyra96d5442023-08-30 16:30:15 +02005612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-luajit" >&5
5613printf %s "checking --with-luajit... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005614
5615# Check whether --with-luajit was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005616if test ${with_luajit+y}
5617then :
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005618 withval=$with_luajit; vi_cv_with_luajit="$withval"
Illia Bobyra96d5442023-08-30 16:30:15 +02005619else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005620 vi_cv_with_luajit="no"
5621fi
5622
Illia Bobyra96d5442023-08-30 16:30:15 +02005623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_with_luajit" >&5
5624printf "%s\n" "$vi_cv_with_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005625
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005626 LUA_INC=
5627 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005628 if test "x$vi_cv_with_luajit" != "xno"; then
5629 # Extract the first word of "luajit", so it can be a program name with args.
5630set dummy luajit; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005631{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5632printf %s "checking for $ac_word... " >&6; }
5633if test ${ac_cv_path_vi_cv_path_luajit+y}
5634then :
5635 printf %s "(cached) " >&6
5636else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005637 case $vi_cv_path_luajit in
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005638 [\\/]* | ?:[\\/]*)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005639 ac_cv_path_vi_cv_path_luajit="$vi_cv_path_luajit" # Let the user override the test with a path.
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005640 ;;
5641 *)
5642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5643for as_dir in $PATH
5644do
5645 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005646 case $as_dir in #(((
5647 '') as_dir=./ ;;
5648 */) ;;
5649 *) as_dir=$as_dir/ ;;
5650 esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005651 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005652 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5653 ac_cv_path_vi_cv_path_luajit="$as_dir$ac_word$ac_exec_ext"
5654 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005655 break 2
5656 fi
5657done
5658 done
5659IFS=$as_save_IFS
5660
5661 ;;
5662esac
5663fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005664vi_cv_path_luajit=$ac_cv_path_vi_cv_path_luajit
5665if test -n "$vi_cv_path_luajit"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_luajit" >&5
5667printf "%s\n" "$vi_cv_path_luajit" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005668else
Illia Bobyra96d5442023-08-30 16:30:15 +02005669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5670printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005671fi
5672
5673
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005674 if test "X$vi_cv_path_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005675 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
5676printf %s "checking LuaJIT version... " >&6; }
5677if test ${vi_cv_version_luajit+y}
5678then :
5679 printf %s "(cached) " >&6
5680else $as_nop
ichizokbddc6ad2023-08-29 20:54:32 +02005681 vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-*[a-z0-9]*\)* .*/\1/'`
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005682fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
5684printf "%s\n" "$vi_cv_version_luajit" >&6; }
5685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
5686printf %s "checking Lua version of LuaJIT... " >&6; }
5687if test ${vi_cv_version_lua_luajit+y}
5688then :
5689 printf %s "(cached) " >&6
5690else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005691 vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'`
5692fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005693{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua_luajit" >&5
5694printf "%s\n" "$vi_cv_version_lua_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005695 vi_cv_path_lua="$vi_cv_path_luajit"
5696 vi_cv_version_lua="$vi_cv_version_lua_luajit"
5697 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005698 else
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005699 # Extract the first word of "lua", so it can be a program name with args.
5700set dummy lua; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005701{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5702printf %s "checking for $ac_word... " >&6; }
5703if test ${ac_cv_path_vi_cv_path_plain_lua+y}
5704then :
5705 printf %s "(cached) " >&6
5706else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005707 case $vi_cv_path_plain_lua in
5708 [\\/]* | ?:[\\/]*)
5709 ac_cv_path_vi_cv_path_plain_lua="$vi_cv_path_plain_lua" # Let the user override the test with a path.
5710 ;;
5711 *)
5712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5713for as_dir in $PATH
5714do
5715 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005716 case $as_dir in #(((
5717 '') as_dir=./ ;;
5718 */) ;;
5719 *) as_dir=$as_dir/ ;;
5720 esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005721 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005722 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5723 ac_cv_path_vi_cv_path_plain_lua="$as_dir$ac_word$ac_exec_ext"
5724 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005725 break 2
5726 fi
5727done
5728 done
5729IFS=$as_save_IFS
5730
5731 ;;
5732esac
5733fi
5734vi_cv_path_plain_lua=$ac_cv_path_vi_cv_path_plain_lua
5735if test -n "$vi_cv_path_plain_lua"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005736 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_plain_lua" >&5
5737printf "%s\n" "$vi_cv_path_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005738else
Illia Bobyra96d5442023-08-30 16:30:15 +02005739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5740printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005741fi
5742
5743
5744 if test "X$vi_cv_path_plain_lua" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
5746printf %s "checking Lua version... " >&6; }
5747if test ${vi_cv_version_plain_lua+y}
5748then :
5749 printf %s "(cached) " >&6
5750else $as_nop
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005751 vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'`
5752fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_plain_lua" >&5
5754printf "%s\n" "$vi_cv_version_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005755 fi
5756 vi_cv_path_lua="$vi_cv_path_plain_lua"
5757 vi_cv_version_lua="$vi_cv_version_plain_lua"
5758 fi
5759 if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit" >&5
5761printf %s "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01005762 if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5764printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005765 LUA_INC=/luajit-$vi_cv_version_luajit
5766 fi
5767 fi
5768 if test "X$LUA_INC" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
5770printf %s "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01005771 if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5773printf "%s\n" "yes" >&6; }
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005774 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5776printf "%s\n" "no" >&6; }
5777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua" >&5
5778printf %s "checking if lua.h can be found in $vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01005779 if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5781printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005782 LUA_INC=/lua$vi_cv_version_lua
5783 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5785printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005786
5787 # Detect moonjit:
5788 # https://groups.google.com/forum/#!topic/vim_use/O0vek60WuTk
5789 lua_suf=/moonjit-2.3
5790 inc_path="$vi_cv_path_lua_pfx/include"
Bram Moolenaarad4dc832020-04-20 16:21:53 +02005791 for dir in "$inc_path"/moonjit-[0-9]* ; do
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005792 if test -d "$dir" ; then
Bram Moolenaara79a8942020-12-17 20:50:25 +01005793 lua_suf=`basename "$dir"`
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005794 lua_suf="/$lua_suf"
5795 break
5796 fi
5797 done
Illia Bobyra96d5442023-08-30 16:30:15 +02005798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $inc_path$lua_suf" >&5
5799printf %s "checking if lua.h can be found in $inc_path$lua_suf... " >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005800 if test -f "$inc_path$lua_suf/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5802printf "%s\n" "yes" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005803 LUA_INC=$lua_suf
5804 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5806printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02005807 vi_cv_path_lua_pfx=
5808 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005809 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005810 fi
5811 fi
5812 fi
5813
5814 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005815 if test "x$vi_cv_with_luajit" != "xno"; then
5816 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5817 if test "X$multiarch" != "X"; then
5818 lib_multiarch="lib/${multiarch}"
5819 else
5820 lib_multiarch="lib"
5821 fi
5822 if test "X$vi_cv_version_lua" = "X"; then
5823 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit"
5824 else
5825 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit-$vi_cv_version_lua"
5826 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005827 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01005828 if test -d "${vi_cv_path_lua_pfx}/lib/lua$vi_cv_version_lua"; then
5829 LUALIBDIR="lib/lua$vi_cv_version_lua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005830 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01005831 LUALIBDIR=lib
5832 fi
5833 if test "X$LUA_INC" != "X"; then
5834 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua$vi_cv_version_lua"
5835 else
5836 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005837 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005838 fi
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005839 if test "$enable_luainterp" = "dynamic"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005840 lua_ok="yes"
5841 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if link with ${LUA_LIBS} is sane" >&5
5843printf %s "checking if link with ${LUA_LIBS} is sane... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005844 libs_save=$LIBS
5845 LIBS="$LIBS $LUA_LIBS"
5846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5847/* end confdefs.h. */
5848
5849int
Illia Bobyra96d5442023-08-30 16:30:15 +02005850main (void)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005851{
5852
5853 ;
5854 return 0;
5855}
5856_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005857if ac_fn_c_try_link "$LINENO"
5858then :
5859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5860printf "%s\n" "yes" >&6; }; lua_ok="yes"
5861else $as_nop
5862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5863printf "%s\n" "no" >&6; }; lua_ok="no"; LUA_LIBS=""
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005864fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005865rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005866 conftest$ac_exeext conftest.$ac_ext
5867 LIBS=$libs_save
5868 fi
5869 if test "x$lua_ok" = "xyes"; then
5870 LUA_CFLAGS="-I${vi_cv_path_lua_pfx}/include${LUA_INC}"
5871 LUA_SRC="if_lua.c"
5872 LUA_OBJ="objects/if_lua.o"
5873 LUA_PRO="if_lua.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02005874 printf "%s\n" "#define FEAT_LUA 1" >>confdefs.h
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005875
5876 fi
5877 if test "$enable_luainterp" = "dynamic"; then
5878 if test "x$vi_cv_with_luajit" != "xno"; then
5879 luajit="jit"
5880 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005881 if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
5882 vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
5883 else
Bram Moolenaard0573012017-10-28 21:11:06 +02005884 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005885 ext="dylib"
5886 indexes=""
5887 else
5888 ext="so"
5889 indexes=".0 .1 .2 .3 .4 .5 .6 .7 .8 .9"
5890 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
5891 if test "X$multiarch" != "X"; then
5892 lib_multiarch="lib/${multiarch}"
5893 fi
Bram Moolenaar768baac2013-04-15 14:44:57 +02005894 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx" >&5
5896printf %s "checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005897 for subdir in "${lib_multiarch}" lib64 lib; do
Bram Moolenaar768baac2013-04-15 14:44:57 +02005898 if test -z "$subdir"; then
5899 continue
5900 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005901 for sover in "${vi_cv_version_lua}.${ext}" "-${vi_cv_version_lua}.${ext}" \
5902 ".${vi_cv_version_lua}.${ext}" ".${ext}.${vi_cv_version_lua}"; do
5903 for i in $indexes ""; do
5904 if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${luajit}${sover}$i"; then
Bram Moolenaar768baac2013-04-15 14:44:57 +02005905 sover2="$i"
5906 break 3
5907 fi
5908 done
Bram Moolenaar07e1da62013-02-06 19:49:43 +01005909 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005910 sover=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005911 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005912 if test "X$sover" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5914printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005915 lua_ok="no"
5916 vi_cv_dll_name_lua="liblua${luajit}.${ext}"
5917 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5919printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005920 lua_ok="yes"
5921 vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
5922 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005923 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005924 printf "%s\n" "#define DYNAMIC_LUA 1" >>confdefs.h
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005925
5926 LUA_LIBS=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005927 LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005928 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005929 if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
Bram Moolenaard0573012017-10-28 21:11:06 +02005930 test "x$MACOS_X" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005931 test "$vim_cv_uname_m_output" = "x86_64"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005932 LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
5933 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005934 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005935 if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01005936 as_fn_error $? "could not configure lua" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01005937 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005938
5939
5940
5941
5942
ichizok8bb3fe42021-12-28 15:51:45 +00005943
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005944fi
5945
5946
Illia Bobyra96d5442023-08-30 16:30:15 +02005947{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-mzschemeinterp argument" >&5
5948printf %s "checking --enable-mzschemeinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005949# Check whether --enable-mzschemeinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005950if test ${enable_mzschemeinterp+y}
5951then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005952 enableval=$enable_mzschemeinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02005953else $as_nop
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005954 enable_mzschemeinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005955fi
5956
Illia Bobyra96d5442023-08-30 16:30:15 +02005957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_mzschemeinterp" >&5
5958printf "%s\n" "$enable_mzschemeinterp" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005959
5960if test "$enable_mzschemeinterp" = "yes"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005961
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005962
Illia Bobyra96d5442023-08-30 16:30:15 +02005963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-plthome argument" >&5
5964printf %s "checking --with-plthome argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005965
Bram Moolenaar446cb832008-06-24 21:56:24 +00005966# Check whether --with-plthome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005967if test ${with_plthome+y}
5968then :
5969 withval=$with_plthome; with_plthome="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_plthome" >&5
5970printf "%s\n" "$with_plthome" >&6; }
5971else $as_nop
5972 with_plthome="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
5973printf "%s\n" "\"no\"" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005974fi
5975
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005976
5977 if test "X$with_plthome" != "X"; then
5978 vi_cv_path_mzscheme_pfx="$with_plthome"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01005979 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005980 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005981 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PLTHOME environment var" >&5
5982printf %s "checking PLTHOME environment var... " >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005983 if test "X$PLTHOME" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$PLTHOME\"" >&5
5985printf "%s\n" "\"$PLTHOME\"" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00005986 vi_cv_path_mzscheme_pfx="$PLTHOME"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01005987 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005988 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
5990printf "%s\n" "not set" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00005991 # Extract the first word of "mzscheme", so it can be a program name with args.
Bram Moolenaar325b7a22004-07-05 15:58:32 +00005992set dummy mzscheme; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005993{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5994printf %s "checking for $ac_word... " >&6; }
5995if test ${ac_cv_path_vi_cv_path_mzscheme+y}
5996then :
5997 printf %s "(cached) " >&6
5998else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005999 case $vi_cv_path_mzscheme in
6000 [\\/]* | ?:[\\/]*)
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006001 ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
6002 ;;
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006003 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH
6006do
6007 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006008 case $as_dir in #(((
6009 '') as_dir=./ ;;
6010 */) ;;
6011 *) as_dir=$as_dir/ ;;
6012 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006013 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006014 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6015 ac_cv_path_vi_cv_path_mzscheme="$as_dir$ac_word$ac_exec_ext"
6016 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006017 break 2
6018 fi
6019done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006020 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006021IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006022
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006023 ;;
6024esac
6025fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006026vi_cv_path_mzscheme=$ac_cv_path_vi_cv_path_mzscheme
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006027if test -n "$vi_cv_path_mzscheme"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme" >&5
6029printf "%s\n" "$vi_cv_path_mzscheme" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006030else
Illia Bobyra96d5442023-08-30 16:30:15 +02006031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6032printf "%s\n" "no" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006033fi
6034
6035
Bram Moolenaar446cb832008-06-24 21:56:24 +00006036
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006037 if test "X$vi_cv_path_mzscheme" != "X"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006038 lsout=`ls -l $vi_cv_path_mzscheme`
6039 if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
6040 vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
6041 fi
6042 fi
6043
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006044 if test "X$vi_cv_path_mzscheme" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
6046printf %s "checking MzScheme install prefix... " >&6; }
6047if test ${vi_cv_path_mzscheme_pfx+y}
6048then :
6049 printf %s "(cached) " >&6
6050else $as_nop
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006051 echo "(display (simplify-path \
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006052 (build-path (call-with-values \
6053 (lambda () (split-path (find-system-path (quote exec-file)))) \
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006054 (lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
6055 vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
6056 sed -e 's+/$++'`
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006057fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006058{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme_pfx" >&5
6059printf "%s\n" "$vi_cv_path_mzscheme_pfx" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006060 rm -f mzdirs.scm
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006061 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006062 fi
6063 fi
6064
6065 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket include directory" >&5
6067printf %s "checking for racket include directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006068 SCHEME_INC=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-include-dir))) (when (path? p) (display p)))'`
6069 if test "X$SCHEME_INC" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_INC}" >&5
6071printf "%s\n" "${SCHEME_INC}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006072 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6074printf "%s\n" "not found" >&6; }
6075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
6076printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006077 if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
6078 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
Illia Bobyra96d5442023-08-30 16:30:15 +02006079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6080printf "%s\n" "yes" >&6; }
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006081 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6083printf "%s\n" "no" >&6; }
6084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
6085printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006086 if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6088printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006089 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006090 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6092printf "%s\n" "no" >&6; }
6093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
6094printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006095 if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6097printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006098 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006099 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6101printf "%s\n" "no" >&6; }
6102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
6103printf %s "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006104 if test -f /usr/include/plt/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6106printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006107 SCHEME_INC=/usr/include/plt
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006108 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6110printf "%s\n" "no" >&6; }
6111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
6112printf %s "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006113 if test -f /usr/include/racket/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6115printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006116 SCHEME_INC=/usr/include/racket
6117 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6119printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006120 vi_cv_path_mzscheme_pfx=
6121 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006122 fi
6123 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006124 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006125 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006126 fi
6127 fi
6128
6129 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006130
Illia Bobyra96d5442023-08-30 16:30:15 +02006131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket lib directory" >&5
6132printf %s "checking for racket lib directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006133 SCHEME_LIB=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-lib-dir))) (when (path? p) (display p)))'`
6134 if test "X$SCHEME_LIB" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_LIB}" >&5
6136printf "%s\n" "${SCHEME_LIB}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006137 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6139printf "%s\n" "not found" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006140 fi
6141
6142 for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
6143 if test "X$path" != "X"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02006144 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006145 MZSCHEME_LIBS="-framework Racket"
6146 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6147 elif test -f "${path}/libmzscheme3m.a"; then
6148 MZSCHEME_LIBS="${path}/libmzscheme3m.a"
6149 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6150 elif test -f "${path}/libracket3m.a"; then
6151 MZSCHEME_LIBS="${path}/libracket3m.a"
Bram Moolenaar588d2412020-10-03 14:24:19 +02006152 if test -f "${path}/librktio.a"; then
6153 MZSCHEME_LIBS="${MZSCHEME_LIBS} ${path}/librktio.a"
6154 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006155 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6156 elif test -f "${path}/libracket.a"; then
6157 MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"
6158 elif test -f "${path}/libmzscheme.a"; then
6159 MZSCHEME_LIBS="${path}/libmzscheme.a ${path}/libmzgc.a"
6160 else
6161 if test -f "${path}/libmzscheme3m.so"; then
6162 MZSCHEME_LIBS="-L${path} -lmzscheme3m"
6163 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6164 elif test -f "${path}/libracket3m.so"; then
6165 MZSCHEME_LIBS="-L${path} -lracket3m"
6166 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6167 elif test -f "${path}/libracket.so"; then
6168 MZSCHEME_LIBS="-L${path} -lracket -lmzgc"
6169 else
6170 if test "$path" != "$SCHEME_LIB"; then
6171 continue
6172 fi
6173 MZSCHEME_LIBS="-L${path} -lmzscheme -lmzgc"
6174 fi
6175 if test "$GCC" = yes; then
6176 MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${path}"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006177 elif test "$vim_cv_uname_output" = SunOS &&
6178 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006179 MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${path}"
6180 fi
6181 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006182 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006183 if test "X$MZSCHEME_LIBS" != "X"; then
6184 break
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006185 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006186 done
6187
Illia Bobyra96d5442023-08-30 16:30:15 +02006188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if racket requires -pthread" >&5
6189printf %s "checking if racket requires -pthread... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006190 if test "X$SCHEME_LIB" != "X" && $FGREP -e -pthread "$SCHEME_LIB/buildinfo" >/dev/null ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6192printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006193 MZSCHEME_LIBS="${MZSCHEME_LIBS} -pthread"
6194 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -pthread"
6195 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6197printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006198 fi
6199
Illia Bobyra96d5442023-08-30 16:30:15 +02006200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket config directory" >&5
6201printf %s "checking for racket config directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006202 SCHEME_CONFIGDIR=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-config-dir))) (when (path? p) (display p)))'`
6203 if test "X$SCHEME_CONFIGDIR" != "X"; then
6204 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DMZSCHEME_CONFIGDIR='\"${SCHEME_CONFIGDIR}\"'"
Illia Bobyra96d5442023-08-30 16:30:15 +02006205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_CONFIGDIR}" >&5
6206printf "%s\n" "${SCHEME_CONFIGDIR}" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006207 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6209printf "%s\n" "not found" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006210 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006211
Illia Bobyra96d5442023-08-30 16:30:15 +02006212 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket collects directory" >&5
6213printf %s "checking for racket collects directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006214 SCHEME_COLLECTS=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-collects-dir))) (when (path? p) (let-values (((base _1 _2) (split-path p))) (display base))))'`
6215 if test "X$SCHEME_COLLECTS" = "X"; then
6216 if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
6217 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006218 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006219 if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
6220 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
Bram Moolenaar75676462013-01-30 14:55:42 +01006221 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006222 if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
6223 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
6224 else
6225 if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
6226 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
6227 fi
Bram Moolenaar75676462013-01-30 14:55:42 +01006228 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006229 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006230 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006231 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006232 if test "X$SCHEME_COLLECTS" != "X" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_COLLECTS}" >&5
6234printf "%s\n" "${SCHEME_COLLECTS}" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006235 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6237printf "%s\n" "not found" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006238 fi
6239
Illia Bobyra96d5442023-08-30 16:30:15 +02006240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mzscheme_base.c" >&5
6241printf %s "checking for mzscheme_base.c... " >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006242 if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006243 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006244 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6245 MZSCHEME_MOD="++lib scheme/base"
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006246 else
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006247 if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006248 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006249 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6250 MZSCHEME_MOD="++lib scheme/base"
6251 else
6252 if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
6253 MZSCHEME_EXTRA="mzscheme_base.c"
6254 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
6255 MZSCHEME_MOD=""
6256 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006257 fi
6258 fi
6259 if test "X$MZSCHEME_EXTRA" != "X" ; then
6260 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
Illia Bobyra96d5442023-08-30 16:30:15 +02006261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: needed" >&5
6262printf "%s\n" "needed" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006263 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
6265printf "%s\n" "not needed" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006266 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006267
Illia Bobyra96d5442023-08-30 16:30:15 +02006268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
6269printf %s "checking for ffi_type_void in -lffi... " >&6; }
6270if test ${ac_cv_lib_ffi_ffi_type_void+y}
6271then :
6272 printf %s "(cached) " >&6
6273else $as_nop
Bram Moolenaar9e902192013-07-17 18:58:11 +02006274 ac_check_lib_save_LIBS=$LIBS
6275LIBS="-lffi $LIBS"
6276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6277/* end confdefs.h. */
6278
6279/* Override any GCC internal prototype to avoid an error.
6280 Use char because int might match the return type of a GCC
6281 builtin and then its argument prototype would still apply. */
Bram Moolenaar9e902192013-07-17 18:58:11 +02006282char ffi_type_void ();
6283int
Illia Bobyra96d5442023-08-30 16:30:15 +02006284main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006285{
6286return ffi_type_void ();
6287 ;
6288 return 0;
6289}
6290_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006291if ac_fn_c_try_link "$LINENO"
6292then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006293 ac_cv_lib_ffi_ffi_type_void=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006294else $as_nop
Bram Moolenaar9e902192013-07-17 18:58:11 +02006295 ac_cv_lib_ffi_ffi_type_void=no
6296fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006297rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006298 conftest$ac_exeext conftest.$ac_ext
6299LIBS=$ac_check_lib_save_LIBS
6300fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006301{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
6302printf "%s\n" "$ac_cv_lib_ffi_ffi_type_void" >&6; }
6303if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes
6304then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006305 MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
6306fi
6307
6308
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006309 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006310 -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006311
Illia Bobyra96d5442023-08-30 16:30:15 +02006312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for MzScheme are sane" >&5
6313printf %s "checking if compile and link flags for MzScheme are sane... " >&6; }
Bram Moolenaar9e902192013-07-17 18:58:11 +02006314 cflags_save=$CFLAGS
6315 libs_save=$LIBS
6316 CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
6317 LIBS="$LIBS $MZSCHEME_LIBS"
6318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6319/* end confdefs.h. */
6320
6321int
Illia Bobyra96d5442023-08-30 16:30:15 +02006322main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006323{
6324
6325 ;
6326 return 0;
6327}
6328_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006329if ac_fn_c_try_link "$LINENO"
6330then :
6331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6332printf "%s\n" "yes" >&6; }; mzs_ok=yes
6333else $as_nop
6334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: MZSCHEME DISABLED" >&5
6335printf "%s\n" "no: MZSCHEME DISABLED" >&6; }; mzs_ok=no
Bram Moolenaar9e902192013-07-17 18:58:11 +02006336fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006337rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006338 conftest$ac_exeext conftest.$ac_ext
6339 CFLAGS=$cflags_save
6340 LIBS=$libs_save
6341 if test $mzs_ok = yes; then
6342 MZSCHEME_SRC="if_mzsch.c"
6343 MZSCHEME_OBJ="objects/if_mzsch.o"
6344 MZSCHEME_PRO="if_mzsch.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006345 printf "%s\n" "#define FEAT_MZSCHEME 1" >>confdefs.h
Bram Moolenaar9e902192013-07-17 18:58:11 +02006346
6347 else
6348 MZSCHEME_CFLAGS=
6349 MZSCHEME_LIBS=
6350 MZSCHEME_EXTRA=
6351 MZSCHEME_MZC=
6352 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006353 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006354
6355
6356
6357
6358
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006359
6360
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006361fi
6362
6363
Illia Bobyra96d5442023-08-30 16:30:15 +02006364{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-perlinterp argument" >&5
6365printf %s "checking --enable-perlinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006366# Check whether --enable-perlinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006367if test ${enable_perlinterp+y}
6368then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006369 enableval=$enable_perlinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006370else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006371 enable_perlinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00006372fi
6373
Illia Bobyra96d5442023-08-30 16:30:15 +02006374{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_perlinterp" >&5
6375printf "%s\n" "$enable_perlinterp" >&6; }
Bram Moolenaare06c1882010-07-21 22:05:20 +02006376if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006377 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006378 as_fn_error $? "cannot use Perl with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01006379 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006380
Bram Moolenaar071d4272004-06-13 20:20:40 +00006381 # Extract the first word of "perl", so it can be a program name with args.
6382set dummy perl; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006383{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6384printf %s "checking for $ac_word... " >&6; }
6385if test ${ac_cv_path_vi_cv_path_perl+y}
6386then :
6387 printf %s "(cached) " >&6
6388else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006389 case $vi_cv_path_perl in
6390 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006391 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
6392 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006393 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6395for as_dir in $PATH
6396do
6397 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006398 case $as_dir in #(((
6399 '') as_dir=./ ;;
6400 */) ;;
6401 *) as_dir=$as_dir/ ;;
6402 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006403 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006404 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6405 ac_cv_path_vi_cv_path_perl="$as_dir$ac_word$ac_exec_ext"
6406 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006407 break 2
6408 fi
6409done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006410 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006411IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006412
Bram Moolenaar071d4272004-06-13 20:20:40 +00006413 ;;
6414esac
6415fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006416vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl
Bram Moolenaar071d4272004-06-13 20:20:40 +00006417if test -n "$vi_cv_path_perl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_perl" >&5
6419printf "%s\n" "$vi_cv_path_perl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006420else
Illia Bobyra96d5442023-08-30 16:30:15 +02006421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006423fi
6424
Bram Moolenaar446cb832008-06-24 21:56:24 +00006425
Bram Moolenaar071d4272004-06-13 20:20:40 +00006426 if test "X$vi_cv_path_perl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Perl version" >&5
6428printf %s "checking Perl version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006429 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
6430 eval `$vi_cv_path_perl -V:usethreads`
Bram Moolenaare06c1882010-07-21 22:05:20 +02006431 eval `$vi_cv_path_perl -V:libperl`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006432 if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
6433 badthreads=no
6434 else
6435 if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
6436 eval `$vi_cv_path_perl -V:use5005threads`
6437 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
6438 badthreads=no
6439 else
6440 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&5
6442printf "%s\n" ">>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006443 fi
6444 else
6445 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl 5.5 with threads cannot be used <<<" >&5
6447printf "%s\n" ">>> Perl 5.5 with threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006448 fi
6449 fi
6450 if test $badthreads = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
6452printf "%s\n" "OK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006453 eval `$vi_cv_path_perl -V:shrpenv`
6454 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
6455 shrpenv=""
6456 fi
6457 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006458
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006459 vi_cv_perl_extutils=unknown_perl_extutils_path
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +01006460
6461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-xsubpp path" >&5
6462printf %s "checking --with-xsubpp path... " >&6; }
6463 vi_cv_perl_xsubpp=
6464
6465# Check whether --with-xsubpp was given.
6466if test ${with_xsubpp+y}
6467then :
6468 withval=$with_xsubpp;
6469 if test -f "$withval"
6470 then
6471 vi_cv_perl_xsubpp="$withval"
6472 fi
6473
6474fi
6475
6476
6477 if test "x$vi_cv_perl_xsubpp" = "x"
6478 then
6479 for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
6480 xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
6481 if test -f "$xsubpp_path"; then
6482 vi_cv_perl_xsubpp="$xsubpp_path"
6483 fi
6484 done
6485 fi
6486
6487 if test "x$vi_cv_perl_xsubpp" = "x"
6488 then
6489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty" >&5
6490printf "%s\n" "empty" >&6; }
6491 else
6492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_perl_xsubpp" >&5
6493printf "%s\n" "$vi_cv_perl_xsubpp" >&6; }
6494 fi
6495
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006496
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006497 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
Bram Moolenaare8ff56b2017-09-14 23:06:23 +02006498 -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
6499 -e 's/-fdebug-prefix-map[^ ]*//g' \
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006500 -e 's/-pipe //' \
6501 -e 's/-W[^ ]*//g' \
Bram Moolenaar92021622017-10-12 12:33:43 +02006502 -e 's/-D_FORTIFY_SOURCE=.//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006503 perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
6504 sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
6505 -e 's/-bE:perl.exp//' -e 's/-lc //'`
6506 perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
6507 -e 'ccdlflags' | sed -e 's/-bE:perl.exp//'`
6508
Illia Bobyra96d5442023-08-30 16:30:15 +02006509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Perl are sane" >&5
6510printf %s "checking if compile and link flags for Perl are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006511 cflags_save=$CFLAGS
6512 libs_save=$LIBS
6513 ldflags_save=$LDFLAGS
6514 CFLAGS="$CFLAGS $perlcppflags"
6515 LIBS="$LIBS $perllibs"
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006516 perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006517 LDFLAGS="$perlldflags $LDFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006519/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006520
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006521int
Illia Bobyra96d5442023-08-30 16:30:15 +02006522main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006523{
6524
6525 ;
6526 return 0;
6527}
6528_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006529if ac_fn_c_try_link "$LINENO"
6530then :
6531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6532printf "%s\n" "yes" >&6; }; perl_ok=yes
6533else $as_nop
6534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PERL DISABLED" >&5
6535printf "%s\n" "no: PERL DISABLED" >&6; }; perl_ok=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00006536fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006537rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006538 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006539 CFLAGS=$cflags_save
6540 LIBS=$libs_save
6541 LDFLAGS=$ldflags_save
6542 if test $perl_ok = yes; then
6543 if test "X$perlcppflags" != "X"; then
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006544 PERL_CFLAGS=$perlcppflags
Bram Moolenaar071d4272004-06-13 20:20:40 +00006545 fi
6546 if test "X$perlldflags" != "X"; then
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01006547 if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006548 LDFLAGS="$perlldflags $LDFLAGS"
6549 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006550 fi
6551 PERL_LIBS=$perllibs
6552 PERL_SRC="auto/if_perl.c if_perlsfio.c"
6553 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
6554 PERL_PRO="if_perl.pro if_perlsfio.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006555 printf "%s\n" "#define FEAT_PERL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006556
6557 fi
6558 fi
6559 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> too old; need Perl version 5.003_01 or later <<<" >&5
6561printf "%s\n" ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006562 fi
6563 fi
6564
Bram Moolenaard0573012017-10-28 21:11:06 +02006565 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006566 dir=/System/Library/Perl
6567 darwindir=$dir/darwin
6568 if test -d $darwindir; then
6569 PERL=/usr/bin/perl
6570 else
6571 dir=/System/Library/Perl/5.8.1
6572 darwindir=$dir/darwin-thread-multi-2level
6573 if test -d $darwindir; then
6574 PERL=/usr/bin/perl
6575 fi
6576 fi
6577 if test -n "$PERL"; then
6578 PERL_DIR="$dir"
6579 PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
6580 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
6581 PERL_LIBS="-L$darwindir/CORE -lperl"
6582 fi
Bram Moolenaar5dff57d2010-07-24 16:19:44 +02006583 PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6584 PERL_CFLAGS=`echo "$PERL_CFLAGS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006585 fi
Bram Moolenaare06c1882010-07-21 22:05:20 +02006586 if test "$enable_perlinterp" = "dynamic"; then
6587 if test "$perl_ok" = "yes" -a "X$libperl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006588 printf "%s\n" "#define DYNAMIC_PERL 1" >>confdefs.h
Bram Moolenaare06c1882010-07-21 22:05:20 +02006589
6590 PERL_CFLAGS="-DDYNAMIC_PERL_DLL=\\\"$libperl\\\" $PERL_CFLAGS"
Christian Brabandt55460da2023-08-29 21:31:28 +02006591 PERL_LIBS=""
Bram Moolenaare06c1882010-07-21 22:05:20 +02006592 fi
6593 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006594
6595 if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006596 as_fn_error $? "could not configure perl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006597 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006598fi
6599
6600
6601
6602
6603
6604
6605
ichizok8bb3fe42021-12-28 15:51:45 +00006606
Illia Bobyra96d5442023-08-30 16:30:15 +02006607{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-pythoninterp argument" >&5
6608printf %s "checking --enable-pythoninterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006609# Check whether --enable-pythoninterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006610if test ${enable_pythoninterp+y}
6611then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006612 enableval=$enable_pythoninterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006613else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006614 enable_pythoninterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00006615fi
6616
Illia Bobyra96d5442023-08-30 16:30:15 +02006617{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
6618printf "%s\n" "$enable_pythoninterp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006619if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006620 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006621 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006622 fi
6623
Illia Bobyra96d5442023-08-30 16:30:15 +02006624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python-command argument" >&5
6625printf %s "checking --with-python-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006626
6627
6628# Check whether --with-python-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006629if test ${with_python_command+y}
6630then :
6631 withval=$with_python_command; vi_cv_path_python="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6632printf "%s\n" "$vi_cv_path_python" >&6; }
6633else $as_nop
6634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6635printf "%s\n" "no" >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006636fi
6637
6638
6639 if test "X$vi_cv_path_python" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006640 for ac_prog in python2 python
6641do
6642 # Extract the first word of "$ac_prog", so it can be a program name with args.
6643set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006644{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6645printf %s "checking for $ac_word... " >&6; }
6646if test ${ac_cv_path_vi_cv_path_python+y}
6647then :
6648 printf %s "(cached) " >&6
6649else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006650 case $vi_cv_path_python in
6651 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006652 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
6653 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006654 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6656for as_dir in $PATH
6657do
6658 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006659 case $as_dir in #(((
6660 '') as_dir=./ ;;
6661 */) ;;
6662 *) as_dir=$as_dir/ ;;
6663 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006664 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006665 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6666 ac_cv_path_vi_cv_path_python="$as_dir$ac_word$ac_exec_ext"
6667 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006668 break 2
6669 fi
6670done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006671 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006672IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006673
Bram Moolenaar071d4272004-06-13 20:20:40 +00006674 ;;
6675esac
6676fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006677vi_cv_path_python=$ac_cv_path_vi_cv_path_python
Bram Moolenaar071d4272004-06-13 20:20:40 +00006678if test -n "$vi_cv_path_python"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6680printf "%s\n" "$vi_cv_path_python" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006681else
Illia Bobyra96d5442023-08-30 16:30:15 +02006682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6683printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006684fi
6685
Bram Moolenaar446cb832008-06-24 21:56:24 +00006686
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006687 test -n "$vi_cv_path_python" && break
6688done
6689
Bram Moolenaare1a32312018-04-15 16:03:25 +02006690 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006691 if test "X$vi_cv_path_python" != "X"; then
6692
Illia Bobyra96d5442023-08-30 16:30:15 +02006693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6694printf %s "checking Python version... " >&6; }
6695if test ${vi_cv_var_python_version+y}
6696then :
6697 printf %s "(cached) " >&6
6698else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006699 vi_cv_var_python_version=`
6700 ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006701
Bram Moolenaar071d4272004-06-13 20:20:40 +00006702fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006703{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python_version" >&5
6704printf "%s\n" "$vi_cv_var_python_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006705
Illia Bobyra96d5442023-08-30 16:30:15 +02006706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 2.3 or better" >&5
6707printf %s "checking Python is 2.3 or better... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006708 if ${vi_cv_path_python} -c \
Bram Moolenaarc09a6d62013-06-10 21:27:29 +02006709 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006710 then
Illia Bobyra96d5442023-08-30 16:30:15 +02006711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
6712printf "%s\n" "yep" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006713
Illia Bobyra96d5442023-08-30 16:30:15 +02006714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
6715printf %s "checking Python's install prefix... " >&6; }
6716if test ${vi_cv_path_python_pfx+y}
6717then :
6718 printf %s "(cached) " >&6
6719else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006720 vi_cv_path_python_pfx=`
6721 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006722 "import sys; print sys.prefix"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006723fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_pfx" >&5
6725printf "%s\n" "$vi_cv_path_python_pfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006726
Illia Bobyra96d5442023-08-30 16:30:15 +02006727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
6728printf %s "checking Python's execution prefix... " >&6; }
6729if test ${vi_cv_path_python_epfx+y}
6730then :
6731 printf %s "(cached) " >&6
6732else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006733 vi_cv_path_python_epfx=`
6734 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006735 "import sys; print sys.exec_prefix"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006736fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006737{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_epfx" >&5
6738printf "%s\n" "$vi_cv_path_python_epfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006739
Bram Moolenaar071d4272004-06-13 20:20:40 +00006740
Illia Bobyra96d5442023-08-30 16:30:15 +02006741 if test ${vi_cv_path_pythonpath+y}
6742then :
6743 printf %s "(cached) " >&6
6744else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006745 vi_cv_path_pythonpath=`
6746 unset PYTHONPATH;
6747 ${vi_cv_path_python} -c \
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006748 "import sys, string; print string.join(sys.path,':')"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006749fi
6750
6751
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006752
6753
Bram Moolenaar446cb832008-06-24 21:56:24 +00006754# Check whether --with-python-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006755if test ${with_python_config_dir+y}
6756then :
Bram Moolenaard0882402018-04-10 18:13:05 +02006757 withval=$with_python_config_dir; vi_cv_path_python_conf="${withval}"; have_python_config_dir=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00006758fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006759
Bram Moolenaar446cb832008-06-24 21:56:24 +00006760
Illia Bobyra96d5442023-08-30 16:30:15 +02006761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
6762printf %s "checking Python's configuration directory... " >&6; }
6763if test ${vi_cv_path_python_conf+y}
6764then :
6765 printf %s "(cached) " >&6
6766else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006767
Bram Moolenaar071d4272004-06-13 20:20:40 +00006768 vi_cv_path_python_conf=
Bram Moolenaarac499e32013-06-02 19:14:17 +02006769 d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
6770 if test -d "$d" && test -f "$d/config.c"; then
6771 vi_cv_path_python_conf="$d"
6772 else
6773 for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
6774 for subdir in lib64 lib share; do
6775 d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
6776 if test -d "$d" && test -f "$d/config.c"; then
6777 vi_cv_path_python_conf="$d"
6778 fi
6779 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00006780 done
Bram Moolenaarac499e32013-06-02 19:14:17 +02006781 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006782
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006783fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006784{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5
6785printf "%s\n" "$vi_cv_path_python_conf" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006786
6787 PYTHON_CONFDIR="${vi_cv_path_python_conf}"
6788
6789 if test "X$PYTHON_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
6791printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006792 else
6793
Illia Bobyra96d5442023-08-30 16:30:15 +02006794 if test ${vi_cv_path_python_plibs+y}
6795then :
6796 printf %s "(cached) " >&6
6797else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006798
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00006799 pwd=`pwd`
6800 tmp_mkf="$pwd/config-PyMake$$"
6801 cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006802__:
Bram Moolenaar218116c2010-05-20 21:46:00 +02006803 @echo "python_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006804 @echo "python_LIBS='$(LIBS)'"
6805 @echo "python_SYSLIBS='$(SYSLIBS)'"
6806 @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02006807 @echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02006808 @echo "python_INSTSONAME='$(INSTSONAME)'"
Bram Moolenaar6c927552015-03-24 12:21:33 +01006809 @echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
6810 @echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
6811 @echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006812eof
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00006813 eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
6814 rm -f -- "${tmp_mkf}"
Bram Moolenaard0573012017-10-28 21:11:06 +02006815 if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
Bram Moolenaar071d4272004-06-13 20:20:40 +00006816 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
6817 vi_cv_path_python_plibs="-framework Python"
Bram Moolenaar6c927552015-03-24 12:21:33 +01006818 if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
6819 vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
6820 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006821 else
Bram Moolenaar9ce42132018-04-11 22:19:36 +02006822 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
Bram Moolenaara161e262015-03-24 15:14:27 +01006823 if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
Bram Moolenaar6c927552015-03-24 12:21:33 +01006824 python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
6825 python_link_path=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
6826 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6827 python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
6828 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
6829 python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
6830 fi
6831 python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
6832 fi
6833 fi
Bram Moolenaar218116c2010-05-20 21:46:00 +02006834 vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006835 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
6836 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006837
Bram Moolenaar071d4272004-06-13 20:20:40 +00006838fi
6839
Illia Bobyra96d5442023-08-30 16:30:15 +02006840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5
6841printf %s "checking Python's dll name... " >&6; }
6842if test ${vi_cv_dll_name_python+y}
6843then :
6844 printf %s "(cached) " >&6
6845else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00006846
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02006847 if test "X$python_DLLLIBRARY" != "X"; then
6848 vi_cv_dll_name_python="$python_DLLLIBRARY"
6849 else
6850 vi_cv_dll_name_python="$python_INSTSONAME"
6851 fi
6852
6853fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006854{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
6855printf "%s\n" "$vi_cv_dll_name_python" >&6; }
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02006856
Bram Moolenaar071d4272004-06-13 20:20:40 +00006857 PYTHON_LIBS="${vi_cv_path_python_plibs}"
6858 if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
Bram Moolenaar04249582018-04-10 13:29:34 +02006859 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006860 else
Bram Moolenaar04249582018-04-10 13:29:34 +02006861 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}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006862 fi
Bram Moolenaar3a21d9c2018-04-10 20:26:20 +02006863 if test "X$have_python_config_dir" = "X1" -a "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaard0882402018-04-10 18:13:05 +02006864 PYTHON_CFLAGS="${PYTHON_CFLAGS} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
6865
6866 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006867 PYTHON_SRC="if_python.c"
Bram Moolenaar9bdb9a02012-07-25 16:32:08 +02006868 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006869
Illia Bobyra96d5442023-08-30 16:30:15 +02006870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
6871printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006872 threadsafe_flag=
6873 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006874 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006875 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006876 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006877 threadsafe_flag="-D_THREAD_SAFE"
6878 thread_lib="-pthread"
6879 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006880 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02006881 threadsafe_flag="-pthreads"
6882 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006883 fi
6884 libs_save_old=$LIBS
6885 if test -n "$threadsafe_flag"; then
6886 cflags_save=$CFLAGS
6887 CFLAGS="$CFLAGS $threadsafe_flag"
6888 LIBS="$LIBS $thread_lib"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006890/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006891
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006892int
Illia Bobyra96d5442023-08-30 16:30:15 +02006893main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006894{
6895
6896 ;
6897 return 0;
6898}
6899_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006900if ac_fn_c_try_link "$LINENO"
6901then :
6902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6903printf "%s\n" "yes" >&6; }; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
6904else $as_nop
6905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6906printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006907
Bram Moolenaar071d4272004-06-13 20:20:40 +00006908fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006909rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006910 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006911 CFLAGS=$cflags_save
6912 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6914printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006915 fi
6916
Illia Bobyra96d5442023-08-30 16:30:15 +02006917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
6918printf %s "checking if compile and link flags for Python are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006919 cflags_save=$CFLAGS
6920 libs_save=$LIBS
Bram Moolenaar69f787a2010-07-11 20:52:58 +02006921 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00006922 LIBS="$LIBS $PYTHON_LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006924/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006925
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006926int
Illia Bobyra96d5442023-08-30 16:30:15 +02006927main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006928{
6929
6930 ;
6931 return 0;
6932}
6933_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006934if ac_fn_c_try_link "$LINENO"
6935then :
6936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6937printf "%s\n" "yes" >&6; }; python_ok=yes
6938else $as_nop
6939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON DISABLED" >&5
6940printf "%s\n" "no: PYTHON DISABLED" >&6; }; python_ok=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00006941fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006942rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006943 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006944 CFLAGS=$cflags_save
6945 LIBS=$libs_save
6946 if test $python_ok = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006947 printf "%s\n" "#define FEAT_PYTHON 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006948
6949 else
6950 LIBS=$libs_save_old
6951 PYTHON_SRC=
6952 PYTHON_OBJ=
6953 PYTHON_LIBS=
6954 PYTHON_CFLAGS=
6955 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006956 fi
6957 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
6959printf "%s\n" "too old" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006960 fi
6961 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006962
6963 if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006964 as_fn_error $? "could not configure python" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006965 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006966fi
6967
6968
6969
6970
6971
6972
6973
ichizok8bb3fe42021-12-28 15:51:45 +00006974
Illia Bobyra96d5442023-08-30 16:30:15 +02006975{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5
6976printf %s "checking --enable-python3interp argument... " >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006977# Check whether --enable-python3interp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006978if test ${enable_python3interp+y}
6979then :
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006980 enableval=$enable_python3interp;
Illia Bobyra96d5442023-08-30 16:30:15 +02006981else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02006982 enable_python3interp="no"
6983fi
6984
Illia Bobyra96d5442023-08-30 16:30:15 +02006985{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
6986printf "%s\n" "$enable_python3interp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006987if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006988 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006989 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006990 fi
6991
Illia Bobyra96d5442023-08-30 16:30:15 +02006992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-command argument" >&5
6993printf %s "checking --with-python3-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006994
6995
6996# Check whether --with-python3-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006997if test ${with_python3_command+y}
6998then :
6999 withval=$with_python3_command; vi_cv_path_python3="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
7000printf "%s\n" "$vi_cv_path_python3" >&6; }
7001else $as_nop
7002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7003printf "%s\n" "no" >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02007004fi
7005
7006
7007 if test "X$vi_cv_path_python3" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01007008 for ac_prog in python3 python
7009do
7010 # Extract the first word of "$ac_prog", so it can be a program name with args.
7011set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007012{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7013printf %s "checking for $ac_word... " >&6; }
7014if test ${ac_cv_path_vi_cv_path_python3+y}
7015then :
7016 printf %s "(cached) " >&6
7017else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007018 case $vi_cv_path_python3 in
7019 [\\/]* | ?:[\\/]*)
7020 ac_cv_path_vi_cv_path_python3="$vi_cv_path_python3" # Let the user override the test with a path.
7021 ;;
7022 *)
7023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7024for as_dir in $PATH
7025do
7026 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007027 case $as_dir in #(((
7028 '') as_dir=./ ;;
7029 */) ;;
7030 *) as_dir=$as_dir/ ;;
7031 esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007032 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007033 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7034 ac_cv_path_vi_cv_path_python3="$as_dir$ac_word$ac_exec_ext"
7035 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007036 break 2
7037 fi
7038done
7039 done
7040IFS=$as_save_IFS
7041
7042 ;;
7043esac
7044fi
7045vi_cv_path_python3=$ac_cv_path_vi_cv_path_python3
7046if test -n "$vi_cv_path_python3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
7048printf "%s\n" "$vi_cv_path_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007049else
Illia Bobyra96d5442023-08-30 16:30:15 +02007050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7051printf "%s\n" "no" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007052fi
7053
7054
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01007055 test -n "$vi_cv_path_python3" && break
7056done
7057
Bram Moolenaare1a32312018-04-15 16:03:25 +02007058 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007059 if test "X$vi_cv_path_python3" != "X"; then
7060
Illia Bobyra96d5442023-08-30 16:30:15 +02007061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
7062printf %s "checking Python version... " >&6; }
7063if test ${vi_cv_var_python3_version+y}
7064then :
7065 printf %s "(cached) " >&6
7066else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007067 vi_cv_var_python3_version=`
Bram Moolenaar23c01922021-05-21 11:43:58 +02007068 ${vi_cv_path_python3} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007069
7070fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007071{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
7072printf "%s\n" "$vi_cv_var_python3_version" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007073
Illia Bobyra96d5442023-08-30 16:30:15 +02007074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 3.0 or better" >&5
7075printf %s "checking Python is 3.0 or better... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007076 if ${vi_cv_path_python3} -c \
7077 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
7078 then
Illia Bobyra96d5442023-08-30 16:30:15 +02007079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
7080printf "%s\n" "yep" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007081
Illia Bobyra96d5442023-08-30 16:30:15 +02007082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-stable-abi argument" >&5
7083printf %s "checking --with-python3-stable-abi argument... " >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007084
7085
7086# Check whether --with-python3-stable-abi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007087if test ${with_python3_stable_abi+y}
7088then :
7089 withval=$with_python3_stable_abi; vi_cv_var_python3_stable_abi="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_stable_abi" >&5
7090printf "%s\n" "$vi_cv_var_python3_stable_abi" >&6; }
7091else $as_nop
7092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7093printf "%s\n" "no" >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007094fi
7095
7096 if test "X$vi_cv_var_python3_stable_abi" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007097 if test ${vi_cv_var_python3_stable_abi_hex+y}
7098then :
7099 printf %s "(cached) " >&6
7100else $as_nop
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007101
7102 vi_cv_var_python3_stable_abi_hex=`
7103 ${vi_cv_path_python3} -c \
7104 "major_minor='${vi_cv_var_python3_stable_abi}'.split('.'); print('0x{0:X}'.format( (int(major_minor.__getitem__(0))<<24) + (int(major_minor.__getitem__(1))<<16) ))"`
7105fi
7106
Yee Cheng Chine7d79eb2023-09-16 13:38:26 +02007107 if test "X$vi_cv_var_python3_stable_abi_hex" = "X"; then
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007108 as_fn_error $? "can't parse Python 3 stable ABI version. It should be \"<major>.<minor>\"" "$LINENO" 5
7109 fi
7110 fi
7111
Illia Bobyra96d5442023-08-30 16:30:15 +02007112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
7113printf %s "checking Python's abiflags... " >&6; }
7114if test ${vi_cv_var_python3_abiflags+y}
7115then :
7116 printf %s "(cached) " >&6
7117else $as_nop
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007118
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007119 vi_cv_var_python3_abiflags=
7120 if ${vi_cv_path_python3} -c \
7121 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
7122 then
7123 vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
7124 "import sys; print(sys.abiflags)"`
7125 fi
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007126fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007127{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
7128printf "%s\n" "$vi_cv_var_python3_abiflags" >&6; }
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007129
Illia Bobyra96d5442023-08-30 16:30:15 +02007130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
7131printf %s "checking Python's install prefix... " >&6; }
7132if test ${vi_cv_path_python3_pfx+y}
7133then :
7134 printf %s "(cached) " >&6
7135else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007136 vi_cv_path_python3_pfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007137 ${vi_cv_path_python3} -c \
7138 "import sys; print(sys.prefix)"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007139fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007140{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
7141printf "%s\n" "$vi_cv_path_python3_pfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007142
Illia Bobyra96d5442023-08-30 16:30:15 +02007143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
7144printf %s "checking Python's execution prefix... " >&6; }
7145if test ${vi_cv_path_python3_epfx+y}
7146then :
7147 printf %s "(cached) " >&6
7148else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007149 vi_cv_path_python3_epfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007150 ${vi_cv_path_python3} -c \
7151 "import sys; print(sys.exec_prefix)"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007152fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
7154printf "%s\n" "$vi_cv_path_python3_epfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007155
Illia Bobyra96d5442023-08-30 16:30:15 +02007156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7157printf %s "checking Python's include path... " >&6; }
7158if test ${vi_cv_path_python3_include+y}
7159then :
7160 printf %s "(cached) " >&6
7161else $as_nop
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007162 vi_cv_path_python3_include=`
7163 ${vi_cv_path_python3} -c \
7164 "import sysconfig; print(sysconfig.get_path(\"include\"))"`
7165fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007166{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_include" >&5
7167printf "%s\n" "$vi_cv_path_python3_include" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007168
Illia Bobyra96d5442023-08-30 16:30:15 +02007169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7170printf %s "checking Python's include path... " >&6; }
7171if test ${vi_cv_path_python3_platinclude+y}
7172then :
7173 printf %s "(cached) " >&6
7174else $as_nop
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007175 vi_cv_path_python3_platinclude=`
7176 ${vi_cv_path_python3} -c \
7177 "import sysconfig; print(sysconfig.get_path(\"platinclude\"))"`
7178fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007179{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_platinclude" >&5
7180printf "%s\n" "$vi_cv_path_python3_platinclude" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007181
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007182
Illia Bobyra96d5442023-08-30 16:30:15 +02007183 if test ${vi_cv_path_python3path+y}
7184then :
7185 printf %s "(cached) " >&6
7186else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007187 vi_cv_path_python3path=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007188 unset PYTHONPATH;
7189 ${vi_cv_path_python3} -c \
7190 "import sys, string; print(':'.join(sys.path))"`
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007191fi
7192
7193
7194
7195
7196# Check whether --with-python3-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007197if test ${with_python3_config_dir+y}
7198then :
Bram Moolenaard0882402018-04-10 18:13:05 +02007199 withval=$with_python3_config_dir; vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007200fi
7201
7202
Illia Bobyra96d5442023-08-30 16:30:15 +02007203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
7204printf %s "checking Python's configuration directory... " >&6; }
7205if test ${vi_cv_path_python3_conf+y}
7206then :
7207 printf %s "(cached) " >&6
7208else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007209
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007210 vi_cv_path_python3_conf=
Bram Moolenaarfee496d2013-07-12 20:07:24 +02007211 config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
Zdenek Dohnal31e299c2021-06-10 18:50:55 +02007212 d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null`
7213 if test "x$d" = "x"; then
7214 d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
7215 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007216 if test -d "$d" && test -f "$d/config.c"; then
7217 vi_cv_path_python3_conf="$d"
7218 else
7219 for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
7220 for subdir in lib64 lib share; do
7221 d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
7222 if test -d "$d" && test -f "$d/config.c"; then
7223 vi_cv_path_python3_conf="$d"
7224 fi
7225 done
7226 done
7227 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007228
7229fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007230{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
7231printf "%s\n" "$vi_cv_path_python3_conf" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007232
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007233 PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007234
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007235 if test "X$PYTHON3_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
7237printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007238 else
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007239
Illia Bobyra96d5442023-08-30 16:30:15 +02007240 if test ${vi_cv_path_python3_plibs+y}
7241then :
7242 printf %s "(cached) " >&6
7243else $as_nop
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007244
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007245 pwd=`pwd`
7246 tmp_mkf="$pwd/config-PyMake$$"
7247 cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007248__:
Bram Moolenaar3804aeb2010-07-19 21:18:54 +02007249 @echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007250 @echo "python3_LIBS='$(LIBS)'"
7251 @echo "python3_SYSLIBS='$(SYSLIBS)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02007252 @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02007253 @echo "python3_INSTSONAME='$(INSTSONAME)'"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007254 @echo "python3_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007255eof
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007256 eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
7257 rm -f -- "${tmp_mkf}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007258 vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007259 vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
7260 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
7261 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
7262
7263fi
7264
Illia Bobyra96d5442023-08-30 16:30:15 +02007265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5
7266printf %s "checking Python3's dll name... " >&6; }
7267if test ${vi_cv_dll_name_python3+y}
7268then :
7269 printf %s "(cached) " >&6
7270else $as_nop
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007271
7272 if test "X$python3_DLLLIBRARY" != "X"; then
7273 vi_cv_dll_name_python3="$python3_DLLLIBRARY"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007274 elif test "X$python3_PYTHONFRAMEWORKPREFIX" != "X"; then
7275 vi_cv_dll_name_python3="${python3_PYTHONFRAMEWORKPREFIX}/${python3_INSTSONAME}"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007276 else
7277 vi_cv_dll_name_python3="$python3_INSTSONAME"
7278 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007279
7280fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007281{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
7282printf "%s\n" "$vi_cv_dll_name_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007283
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007284 PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007285 if test "${vi_cv_path_python3_include}" = "${vi_cv_path_python3_platinclude}"; then
7286 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007287 else
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007288 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include} -I${vi_cv_path_python3_platinclude}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007289 fi
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007290 if test "X$have_python3_config_dir" = "X1" -a "$enable_python3interp" = "dynamic"; then
7291 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
7292 fi
7293 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
7294 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPy_LIMITED_API=${vi_cv_var_python3_stable_abi_hex}"
7295 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007296 PYTHON3_SRC="if_python3.c"
7297 PYTHON3_OBJ="objects/if_python3.o"
7298
Illia Bobyra96d5442023-08-30 16:30:15 +02007299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
7300printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007301 threadsafe_flag=
7302 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007303 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007304 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007305 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007306 threadsafe_flag="-D_THREAD_SAFE"
7307 thread_lib="-pthread"
7308 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007309 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007310 threadsafe_flag="-pthreads"
7311 fi
7312 fi
7313 libs_save_old=$LIBS
7314 if test -n "$threadsafe_flag"; then
7315 cflags_save=$CFLAGS
7316 CFLAGS="$CFLAGS $threadsafe_flag"
7317 LIBS="$LIBS $thread_lib"
7318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007319/* end confdefs.h. */
7320
7321int
Illia Bobyra96d5442023-08-30 16:30:15 +02007322main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007323{
7324
7325 ;
7326 return 0;
7327}
7328_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007329if ac_fn_c_try_link "$LINENO"
7330then :
7331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7332printf "%s\n" "yes" >&6; }; PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag"
7333else $as_nop
7334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7335printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007336
7337fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007338rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007339 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007340 CFLAGS=$cflags_save
7341 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7343printf "%s\n" "no" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007344 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007345
Illia Bobyra96d5442023-08-30 16:30:15 +02007346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
7347printf %s "checking if compile and link flags for Python 3 are sane... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007348 cflags_save=$CFLAGS
7349 libs_save=$LIBS
7350 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
7351 LIBS="$LIBS $PYTHON3_LIBS"
7352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007353/* end confdefs.h. */
7354
7355int
Illia Bobyra96d5442023-08-30 16:30:15 +02007356main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007357{
7358
7359 ;
7360 return 0;
7361}
7362_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007363if ac_fn_c_try_link "$LINENO"
7364then :
7365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7366printf "%s\n" "yes" >&6; }; python3_ok=yes
7367else $as_nop
7368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON3 DISABLED" >&5
7369printf "%s\n" "no: PYTHON3 DISABLED" >&6; }; python3_ok=no
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007370fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007371rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007372 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007373 CFLAGS=$cflags_save
7374 LIBS=$libs_save
7375 if test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007376 printf "%s\n" "#define FEAT_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007377
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007378 else
7379 LIBS=$libs_save_old
7380 PYTHON3_SRC=
7381 PYTHON3_OBJ=
7382 PYTHON3_LIBS=
7383 PYTHON3_CFLAGS=
7384 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007385 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007386 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
7388printf "%s\n" "too old" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007389 fi
7390 fi
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007391 if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01007392 as_fn_error $? "could not configure python3" "$LINENO" 5
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007393 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007394fi
7395
7396
7397
7398
7399
7400
ichizok8bb3fe42021-12-28 15:51:45 +00007401
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007402if test "$python_ok" = yes && test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007403 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007404
Illia Bobyra96d5442023-08-30 16:30:15 +02007405 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007406
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007407 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007408 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007409
7410 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5
7412printf %s "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007413 cflags_save=$CFLAGS
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007414 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007415 libs_save=$LIBS
7416 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007417 if test "$cross_compiling" = yes
7418then :
7419 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7420printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007421as_fn_error $? "cannot run test program while cross compiling
7422See \`config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02007423else $as_nop
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7425/* end confdefs.h. */
7426
7427 #include <dlfcn.h>
7428 /* If this program fails, then RTLD_GLOBAL is needed.
7429 * RTLD_GLOBAL will be used and then it is not possible to
7430 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007431 * Only the first python version used will be switched on.
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007432 */
7433
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007434 static int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007435 {
7436 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007437 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007438 if (pylib != 0)
7439 {
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007440 void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007441 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7442 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7443 void (*final)(void) = dlsym(pylib, "Py_Finalize");
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007444 (*pfx)(prefix);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007445 (*init)();
7446 needed = (*simple)("import termios") == -1;
7447 (*final)();
7448 dlclose(pylib);
7449 }
7450 return !needed;
7451 }
7452
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007453 int main()
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007454 {
7455 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007456 if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007457 not_needed = 1;
7458 return !not_needed;
7459 }
7460_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007461if ac_fn_c_try_run "$LINENO"
7462then :
7463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7464printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007465
Illia Bobyra96d5442023-08-30 16:30:15 +02007466else $as_nop
7467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7468printf "%s\n" "no" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007469fi
7470rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7471 conftest.$ac_objext conftest.beam conftest.$ac_ext
7472fi
7473
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007474
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007475 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007476 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007477
Illia Bobyra96d5442023-08-30 16:30:15 +02007478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
7479printf %s "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007480 cflags_save=$CFLAGS
7481 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007482 libs_save=$LIBS
7483 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007484 if test "$cross_compiling" = yes
7485then :
7486 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7487printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007488as_fn_error $? "cannot run test program while cross compiling
7489See \`config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02007490else $as_nop
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7492/* end confdefs.h. */
7493
7494 #include <dlfcn.h>
7495 #include <wchar.h>
7496 /* If this program fails, then RTLD_GLOBAL is needed.
7497 * RTLD_GLOBAL will be used and then it is not possible to
7498 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007499 * Only the first python version used will be switched on.
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007500 */
7501
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007502 static int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007503 {
7504 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007505 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007506 if (pylib != 0)
7507 {
7508 void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
7509 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7510 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7511 void (*final)(void) = dlsym(pylib, "Py_Finalize");
7512 (*pfx)(prefix);
7513 (*init)();
7514 needed = (*simple)("import termios") == -1;
7515 (*final)();
7516 dlclose(pylib);
7517 }
7518 return !needed;
7519 }
7520
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007521 int main()
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007522 {
7523 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007524 if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007525 not_needed = 1;
7526 return !not_needed;
7527 }
7528_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007529if ac_fn_c_try_run "$LINENO"
7530then :
7531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7532printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007533
Illia Bobyra96d5442023-08-30 16:30:15 +02007534else $as_nop
7535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7536printf "%s\n" "no" >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007537fi
7538rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7539 conftest.$ac_objext conftest.beam conftest.$ac_ext
7540fi
7541
7542
7543 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007544 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007545
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007546 PYTHON_SRC="if_python.c"
7547 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007548 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007549 PYTHON_LIBS=
7550 PYTHON3_SRC="if_python3.c"
7551 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007552 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007553 PYTHON3_LIBS=
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007554elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007555 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007556
7557 PYTHON_SRC="if_python.c"
7558 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007559 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007560 PYTHON_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007561elif test "$python_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
7563printf %s "checking if -fPIE can be added for Python... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007564 cflags_save=$CFLAGS
7565 libs_save=$LIBS
7566 CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
7567 LIBS="$LIBS $PYTHON_LIBS"
7568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7569/* end confdefs.h. */
7570
7571int
Illia Bobyra96d5442023-08-30 16:30:15 +02007572main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007573{
7574
7575 ;
7576 return 0;
7577}
7578_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007579if ac_fn_c_try_link "$LINENO"
7580then :
7581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7582printf "%s\n" "yes" >&6; }; fpie_ok=yes
7583else $as_nop
7584 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7585printf "%s\n" "no" >&6; }; fpie_ok=no
Bram Moolenaare741f272013-07-09 21:57:52 +02007586fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007587rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007588 conftest$ac_exeext conftest.$ac_ext
7589 CFLAGS=$cflags_save
7590 LIBS=$libs_save
7591 if test $fpie_ok = yes; then
7592 PYTHON_CFLAGS="$PYTHON_CFLAGS -fPIE"
7593 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007594elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007595 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007596
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007597 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007598 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007599
7600 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007601 PYTHON3_SRC="if_python3.c"
7602 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007603 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007604 PYTHON3_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007605elif test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
7607printf %s "checking if -fPIE can be added for Python3... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007608 cflags_save=$CFLAGS
7609 libs_save=$LIBS
7610 CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
7611 LIBS="$LIBS $PYTHON3_LIBS"
7612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7613/* end confdefs.h. */
7614
7615int
Illia Bobyra96d5442023-08-30 16:30:15 +02007616main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007617{
7618
7619 ;
7620 return 0;
7621}
7622_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007623if ac_fn_c_try_link "$LINENO"
7624then :
7625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7626printf "%s\n" "yes" >&6; }; fpie_ok=yes
7627else $as_nop
7628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7629printf "%s\n" "no" >&6; }; fpie_ok=no
Bram Moolenaare741f272013-07-09 21:57:52 +02007630fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007631rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007632 conftest$ac_exeext conftest.$ac_ext
7633 CFLAGS=$cflags_save
7634 LIBS=$libs_save
7635 if test $fpie_ok = yes; then
7636 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -fPIE"
7637 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007638fi
7639
Illia Bobyra96d5442023-08-30 16:30:15 +02007640{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5
7641printf %s "checking --enable-tclinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007642# Check whether --enable-tclinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007643if test ${enable_tclinterp+y}
7644then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00007645 enableval=$enable_tclinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02007646else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00007647 enable_tclinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00007648fi
7649
Illia Bobyra96d5442023-08-30 16:30:15 +02007650{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
7651printf "%s\n" "$enable_tclinterp" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007652
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007653if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007654
Illia Bobyra96d5442023-08-30 16:30:15 +02007655 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
7656printf %s "checking --with-tclsh argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007657
Bram Moolenaar446cb832008-06-24 21:56:24 +00007658# Check whether --with-tclsh was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007659if test ${with_tclsh+y}
7660then :
7661 withval=$with_tclsh; tclsh_name="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclsh_name" >&5
7662printf "%s\n" "$tclsh_name" >&6; }
7663else $as_nop
7664 tclsh_name="tclsh8.5"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7665printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007666fi
7667
Bram Moolenaar071d4272004-06-13 20:20:40 +00007668 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7669set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007670{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7671printf %s "checking for $ac_word... " >&6; }
7672if test ${ac_cv_path_vi_cv_path_tcl+y}
7673then :
7674 printf %s "(cached) " >&6
7675else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007676 case $vi_cv_path_tcl in
7677 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007678 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7679 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007680 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7682for as_dir in $PATH
7683do
7684 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007685 case $as_dir in #(((
7686 '') as_dir=./ ;;
7687 */) ;;
7688 *) as_dir=$as_dir/ ;;
7689 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007690 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007691 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7692 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7693 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007694 break 2
7695 fi
7696done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007697 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007698IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007699
Bram Moolenaar071d4272004-06-13 20:20:40 +00007700 ;;
7701esac
7702fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007703vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007704if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7706printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007707else
Illia Bobyra96d5442023-08-30 16:30:15 +02007708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7709printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007710fi
7711
Bram Moolenaar071d4272004-06-13 20:20:40 +00007712
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007713
Bram Moolenaar446cb832008-06-24 21:56:24 +00007714
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007715 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.5"; then
7716 tclsh_name="tclsh8.4"
7717 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7718set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007719{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7720printf %s "checking for $ac_word... " >&6; }
7721if test ${ac_cv_path_vi_cv_path_tcl+y}
7722then :
7723 printf %s "(cached) " >&6
7724else $as_nop
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007725 case $vi_cv_path_tcl in
7726 [\\/]* | ?:[\\/]*)
7727 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7728 ;;
7729 *)
7730 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7731for as_dir in $PATH
7732do
7733 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007734 case $as_dir in #(((
7735 '') as_dir=./ ;;
7736 */) ;;
7737 *) as_dir=$as_dir/ ;;
7738 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007739 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007740 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7741 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7742 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007743 break 2
7744 fi
7745done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007746 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007747IFS=$as_save_IFS
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007748
7749 ;;
7750esac
7751fi
7752vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007753if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7755printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007756else
Illia Bobyra96d5442023-08-30 16:30:15 +02007757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7758printf "%s\n" "no" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007759fi
7760
Bram Moolenaar446cb832008-06-24 21:56:24 +00007761
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007762 fi
7763 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.4"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007764 tclsh_name="tclsh8.2"
7765 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7766set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007767{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7768printf %s "checking for $ac_word... " >&6; }
7769if test ${ac_cv_path_vi_cv_path_tcl+y}
7770then :
7771 printf %s "(cached) " >&6
7772else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007773 case $vi_cv_path_tcl in
7774 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007775 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7776 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007777 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7779for as_dir in $PATH
7780do
7781 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007782 case $as_dir in #(((
7783 '') as_dir=./ ;;
7784 */) ;;
7785 *) as_dir=$as_dir/ ;;
7786 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007787 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007788 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7789 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7790 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007791 break 2
7792 fi
7793done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007794 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007795IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007796
Bram Moolenaar071d4272004-06-13 20:20:40 +00007797 ;;
7798esac
7799fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007800vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007801if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7803printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007804else
Illia Bobyra96d5442023-08-30 16:30:15 +02007805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7806printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007807fi
7808
Bram Moolenaar446cb832008-06-24 21:56:24 +00007809
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007810 fi
7811 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.2"; then
7812 tclsh_name="tclsh8.0"
7813 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7814set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007815{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7816printf %s "checking for $ac_word... " >&6; }
7817if test ${ac_cv_path_vi_cv_path_tcl+y}
7818then :
7819 printf %s "(cached) " >&6
7820else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007821 case $vi_cv_path_tcl in
7822 [\\/]* | ?:[\\/]*)
7823 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7824 ;;
7825 *)
7826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7827for as_dir in $PATH
7828do
7829 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007830 case $as_dir in #(((
7831 '') as_dir=./ ;;
7832 */) ;;
7833 *) as_dir=$as_dir/ ;;
7834 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007835 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007836 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7837 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7838 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007839 break 2
7840 fi
7841done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007842 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007843IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007844
7845 ;;
7846esac
7847fi
7848vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007849if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7851printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007852else
Illia Bobyra96d5442023-08-30 16:30:15 +02007853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7854printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007855fi
7856
Bram Moolenaar446cb832008-06-24 21:56:24 +00007857
Bram Moolenaar071d4272004-06-13 20:20:40 +00007858 fi
7859 if test "X$vi_cv_path_tcl" = "X"; then
7860 tclsh_name="tclsh"
7861 # Extract the first word of "$tclsh_name", so it can be a program name with args.
7862set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007863{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7864printf %s "checking for $ac_word... " >&6; }
7865if test ${ac_cv_path_vi_cv_path_tcl+y}
7866then :
7867 printf %s "(cached) " >&6
7868else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007869 case $vi_cv_path_tcl in
7870 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007871 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
7872 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00007873 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7875for as_dir in $PATH
7876do
7877 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007878 case $as_dir in #(((
7879 '') as_dir=./ ;;
7880 */) ;;
7881 *) as_dir=$as_dir/ ;;
7882 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007883 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007884 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7885 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
7886 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007887 break 2
7888 fi
7889done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007890 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00007891IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007892
Bram Moolenaar071d4272004-06-13 20:20:40 +00007893 ;;
7894esac
7895fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007896vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00007897if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
7899printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007900else
Illia Bobyra96d5442023-08-30 16:30:15 +02007901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7902printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007903fi
7904
Bram Moolenaar446cb832008-06-24 21:56:24 +00007905
Bram Moolenaar071d4272004-06-13 20:20:40 +00007906 fi
7907 if test "X$vi_cv_path_tcl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Tcl version" >&5
7909printf %s "checking Tcl version... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007910 if echo 'exit [expr [info tclversion] < 8.0]' | "$vi_cv_path_tcl" - ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007911 tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
Illia Bobyra96d5442023-08-30 16:30:15 +02007912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
7913printf "%s\n" "$tclver - OK" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +00007914 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 -`
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007915 tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007916
Illia Bobyra96d5442023-08-30 16:30:15 +02007917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
7918printf %s "checking for location of Tcl include... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02007919 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00007920 tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/local/include/tcl$tclver /usr/include /usr/include/tcl$tclver"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007921 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02007922 tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /System/Library/Frameworks/Tcl.framework/Headers `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework/Versions/Current/Headers"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007923 fi
Bram Moolenaar0ff8f602008-02-20 11:44:03 +00007924 TCL_INC=
Bram Moolenaar071d4272004-06-13 20:20:40 +00007925 for try in $tclinc; do
7926 if test -f "$try/tcl.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tcl.h" >&5
7928printf "%s\n" "$try/tcl.h" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007929 TCL_INC=$try
7930 break
7931 fi
7932 done
7933 if test -z "$TCL_INC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7935printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007936 SKIP_TCL=YES
7937 fi
7938 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
7940printf %s "checking for location of tclConfig.sh script... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02007941 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007942 tclcnf=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007943 tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007944 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02007945 tclcnf=`echo $tclinc | sed s/include/lib/g`
7946 tclcnf="$tclcnf /System/Library/Frameworks/Tcl.framework `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007947 fi
7948 for try in $tclcnf; do
Bram Moolenaar49222be2015-12-11 18:11:30 +01007949 if test -f "$try/tclConfig.sh"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
7951printf "%s\n" "$try/tclConfig.sh" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007952 . "$try/tclConfig.sh"
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007953 if test "$enable_tclinterp" = "dynamic"; then
7954 TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
7955 else
7956 TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
7957 fi
Bram Moolenaar4394bff2008-07-24 11:21:31 +00007958 TCL_DEFS=`echo $TCL_DEFS | sed -e 's/\\\\ /\\\\X/g' | tr ' ' '\012' | sed -e '/^[^-]/d' -e '/^-[^D]/d' -e '/-D[^_]/d' -e 's/-D_/ -D_/' | tr '\012' ' ' | sed -e 's/\\\\X/\\\\ /g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007959 break
7960 fi
7961 done
7962 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007963 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7964printf "%s\n" "<not found>" >&6; }
7965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl library by myself" >&5
7966printf %s "checking for Tcl library by myself... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007967 tcllib=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00007968 tcllib="$tcllib `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007969 for ext in .so .a ; do
7970 for ver in "" $tclver ; do
7971 for try in $tcllib ; do
7972 trylib=tcl$ver$ext
Bram Moolenaar49222be2015-12-11 18:11:30 +01007973 if test -f "$try/lib$trylib" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/lib$trylib" >&5
7975printf "%s\n" "$try/lib$trylib" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01007976 TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007977 if test "$vim_cv_uname_output" = SunOS &&
7978 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007979 TCL_LIBS="$TCL_LIBS -R $try"
7980 fi
7981 break 3
7982 fi
7983 done
7984 done
7985 done
7986 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007987 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
7988printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007989 SKIP_TCL=YES
7990 fi
7991 fi
7992 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007993 printf "%s\n" "#define FEAT_TCL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00007994
7995 TCL_SRC=if_tcl.c
7996 TCL_OBJ=objects/if_tcl.o
7997 TCL_PRO=if_tcl.pro
7998 TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
7999 fi
8000 fi
8001 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Tcl version 8.0 or later" >&5
8003printf "%s\n" "too old; need Tcl version 8.0 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008004 fi
8005 fi
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008006 if test "$enable_tclinterp" = "dynamic"; then
8007 if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008008 printf "%s\n" "#define DYNAMIC_TCL 1" >>confdefs.h
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008009
8010 TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
8011 fi
8012 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008013 if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008014 as_fn_error $? "could not configure Tcl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008015 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008016fi
8017
8018
8019
8020
8021
8022
ichizok8bb3fe42021-12-28 15:51:45 +00008023
Illia Bobyra96d5442023-08-30 16:30:15 +02008024{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-rubyinterp argument" >&5
8025printf %s "checking --enable-rubyinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008026# Check whether --enable-rubyinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008027if test ${enable_rubyinterp+y}
8028then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008029 enableval=$enable_rubyinterp;
Illia Bobyra96d5442023-08-30 16:30:15 +02008030else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008031 enable_rubyinterp="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008032fi
8033
Illia Bobyra96d5442023-08-30 16:30:15 +02008034{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
8035printf "%s\n" "$enable_rubyinterp" >&6; }
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008036if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008037 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01008038 as_fn_error $? "cannot use Ruby with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01008039 fi
8040
Illia Bobyra96d5442023-08-30 16:30:15 +02008041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
8042printf %s "checking --with-ruby-command argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008043
Bram Moolenaar948733a2011-05-05 18:10:16 +02008044
Bram Moolenaar165641d2010-02-17 16:23:09 +01008045# Check whether --with-ruby-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008046if test ${with_ruby_command+y}
8047then :
8048 withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
8049printf "%s\n" "$RUBY_CMD" >&6; }
8050else $as_nop
8051 RUBY_CMD="ruby"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
8052printf "%s\n" "defaulting to $RUBY_CMD" >&6; }
Bram Moolenaar165641d2010-02-17 16:23:09 +01008053fi
8054
Bram Moolenaar165641d2010-02-17 16:23:09 +01008055 # Extract the first word of "$RUBY_CMD", so it can be a program name with args.
8056set dummy $RUBY_CMD; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008057{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8058printf %s "checking for $ac_word... " >&6; }
8059if test ${ac_cv_path_vi_cv_path_ruby+y}
8060then :
8061 printf %s "(cached) " >&6
8062else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008063 case $vi_cv_path_ruby in
8064 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008065 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
8066 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008067 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8069for as_dir in $PATH
8070do
8071 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008072 case $as_dir in #(((
8073 '') as_dir=./ ;;
8074 */) ;;
8075 *) as_dir=$as_dir/ ;;
8076 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008077 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008078 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8079 ac_cv_path_vi_cv_path_ruby="$as_dir$ac_word$ac_exec_ext"
8080 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008081 break 2
8082 fi
8083done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008084 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008085IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008086
Bram Moolenaar071d4272004-06-13 20:20:40 +00008087 ;;
8088esac
8089fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008090vi_cv_path_ruby=$ac_cv_path_vi_cv_path_ruby
Bram Moolenaar071d4272004-06-13 20:20:40 +00008091if test -n "$vi_cv_path_ruby"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_ruby" >&5
8093printf "%s\n" "$vi_cv_path_ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008094else
Illia Bobyra96d5442023-08-30 16:30:15 +02008095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8096printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008097fi
8098
Bram Moolenaar446cb832008-06-24 21:56:24 +00008099
Bram Moolenaar071d4272004-06-13 20:20:40 +00008100 if test "X$vi_cv_path_ruby" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5
8102printf %s "checking Ruby version... " >&6; }
K.Takata236ccbf2022-09-22 16:12:06 +01008103 if $vi_cv_path_ruby -e 'RUBY_VERSION >= "1.9.1" or exit 1' >/dev/null 2>/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
8105printf "%s\n" "OK" >&6; }
8106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
8107printf %s "checking Ruby rbconfig... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008108 ruby_rbconfig="RbConfig"
8109 if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
8110 ruby_rbconfig="Config"
8111 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
8113printf "%s\n" "$ruby_rbconfig" >&6; }
8114 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
8115printf %s "checking Ruby header files... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008116 rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG['rubyhdrdir'] || $ruby_rbconfig::CONFIG['archdir'] || \\$hdrdir" 2>/dev/null`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008117 if test "X$rubyhdrdir" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
8119printf "%s\n" "$rubyhdrdir" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008120 RUBY_CFLAGS="-I$rubyhdrdir"
Bram Moolenaara6fd37b2014-03-27 17:19:09 +01008121 rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
8122 if test -d "$rubyarchdir"; then
8123 RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
Bram Moolenaar165641d2010-02-17 16:23:09 +01008124 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008125 rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008126 if test "X$rubyversion" = "X"; then
K.Takata236ccbf2022-09-22 16:12:06 +01008127 rubyversion=`$vi_cv_path_ruby -e "print RUBY_VERSION.gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008128 fi
Bram Moolenaar165641d2010-02-17 16:23:09 +01008129 RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
Bram Moolenaar81398892012-10-03 21:09:35 +02008130 rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008131 if test "X$rubylibs" != "X"; then
8132 RUBY_LIBS="$rubylibs"
8133 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008134 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
8135 librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
Bram Moolenaarac499e32013-06-02 19:14:17 +02008136 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
Illia Bobyre379e212023-09-30 22:59:27 +02008137 if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby" >/dev/null; then
Bram Moolenaarac499e32013-06-02 19:14:17 +02008138 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
8139 elif test "$librubyarg" = "libruby.a"; then
8140 librubyarg="-lruby"
8141 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008142 fi
8143
8144 if test "X$librubyarg" != "X"; then
8145 RUBY_LIBS="$librubyarg $RUBY_LIBS"
8146 fi
Zdenek Dohnal1d822af2022-11-23 12:06:08 +00008147
8148
Bram Moolenaar071d4272004-06-13 20:20:40 +00008149 RUBY_SRC="if_ruby.c"
8150 RUBY_OBJ="objects/if_ruby.o"
8151 RUBY_PRO="if_ruby.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02008152 printf "%s\n" "#define FEAT_RUBY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008153
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008154 if test "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar92021622017-10-12 12:33:43 +02008155 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
Bram Moolenaar87ea64c2018-08-04 15:13:34 +02008156 if test -z "$libruby_soname"; then
8157 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
8158 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008159 printf "%s\n" "#define DYNAMIC_RUBY 1" >>confdefs.h
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008160
Bram Moolenaar41a41412020-01-07 21:32:19 +01008161 RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" $RUBY_CFLAGS"
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008162 RUBY_LIBS=
8163 fi
Bram Moolenaar864a28b2020-12-28 21:36:56 +01008164 if test "X$CLANG_VERSION" != "X" -a "$rubyversion" -ge 30; then
8165 RUBY_CFLAGS="$RUBY_CFLAGS -fdeclspec"
8166 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008167 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found; disabling Ruby" >&5
8169printf "%s\n" "not found; disabling Ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008170 fi
8171 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Ruby version 1.9.1 or later" >&5
8173printf "%s\n" "too old; need Ruby version 1.9.1 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008174 fi
8175 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008176
8177 if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008178 as_fn_error $? "could not configure Ruby" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008179 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008180fi
8181
8182
8183
8184
8185
8186
ichizok8bb3fe42021-12-28 15:51:45 +00008187
Illia Bobyra96d5442023-08-30 16:30:15 +02008188{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-cscope argument" >&5
8189printf %s "checking --enable-cscope argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008190# Check whether --enable-cscope was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008191if test ${enable_cscope+y}
8192then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008193 enableval=$enable_cscope;
Illia Bobyra96d5442023-08-30 16:30:15 +02008194else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008195 enable_cscope="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008196fi
8197
Illia Bobyra96d5442023-08-30 16:30:15 +02008198{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_cscope" >&5
8199printf "%s\n" "$enable_cscope" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008200if test "$enable_cscope" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008201 printf "%s\n" "#define FEAT_CSCOPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008202
8203fi
8204
Illia Bobyra96d5442023-08-30 16:30:15 +02008205{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-netbeans argument" >&5
8206printf %s "checking --disable-netbeans argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008207# Check whether --enable-netbeans was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008208if test ${enable_netbeans+y}
8209then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008210 enableval=$enable_netbeans;
Illia Bobyra96d5442023-08-30 16:30:15 +02008211else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008212 enable_netbeans="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008213fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008214
Bram Moolenaar446cb832008-06-24 21:56:24 +00008215if test "$enable_netbeans" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008216 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny features" >&5
8218printf "%s\n" "cannot use NetBeans with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008219 enable_netbeans="no"
8220 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8222printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008223 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008224else
Illia Bobyra96d5442023-08-30 16:30:15 +02008225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8226printf "%s\n" "yes" >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008227fi
8228
Illia Bobyra96d5442023-08-30 16:30:15 +02008229{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-channel argument" >&5
8230printf %s "checking --disable-channel argument... " >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008231# Check whether --enable-channel was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008232if test ${enable_channel+y}
8233then :
Bram Moolenaare0874f82016-01-24 20:36:41 +01008234 enableval=$enable_channel;
Illia Bobyra96d5442023-08-30 16:30:15 +02008235else $as_nop
Bram Moolenaare0874f82016-01-24 20:36:41 +01008236 enable_channel="yes"
8237fi
8238
8239if test "$enable_channel" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008240 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny features" >&5
8242printf "%s\n" "cannot use channels with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008243 enable_channel="no"
8244 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8246printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008247 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008248else
Bram Moolenaar16435482016-01-24 21:31:54 +01008249 if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, netbeans also disabled" >&5
8251printf "%s\n" "yes, netbeans also disabled" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008252 enable_netbeans="no"
8253 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8255printf "%s\n" "yes" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008256 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008257fi
8258
Bram Moolenaar16435482016-01-24 21:31:54 +01008259if test "$enable_channel" = "yes"; then
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008260 if test "x$HAIKU" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
8262printf %s "checking for socket in -lnetwork... " >&6; }
8263if test ${ac_cv_lib_network_socket+y}
8264then :
8265 printf %s "(cached) " >&6
8266else $as_nop
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008267 ac_check_lib_save_LIBS=$LIBS
8268LIBS="-lnetwork $LIBS"
8269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8270/* end confdefs.h. */
8271
8272/* Override any GCC internal prototype to avoid an error.
8273 Use char because int might match the return type of a GCC
8274 builtin and then its argument prototype would still apply. */
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008275char socket ();
8276int
Illia Bobyra96d5442023-08-30 16:30:15 +02008277main (void)
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008278{
8279return socket ();
8280 ;
8281 return 0;
8282}
8283_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008284if ac_fn_c_try_link "$LINENO"
8285then :
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008286 ac_cv_lib_network_socket=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008287else $as_nop
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008288 ac_cv_lib_network_socket=no
8289fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008290rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008291 conftest$ac_exeext conftest.$ac_ext
8292LIBS=$ac_check_lib_save_LIBS
8293fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008294{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
8295printf "%s\n" "$ac_cv_lib_network_socket" >&6; }
8296if test "x$ac_cv_lib_network_socket" = xyes
8297then :
8298 printf "%s\n" "#define HAVE_LIBNETWORK 1" >>confdefs.h
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008299
8300 LIBS="-lnetwork $LIBS"
8301
8302fi
8303
8304 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8306printf %s "checking for socket in -lsocket... " >&6; }
8307if test ${ac_cv_lib_socket_socket+y}
8308then :
8309 printf %s "(cached) " >&6
8310else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008311 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008312LIBS="-lsocket $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008314/* end confdefs.h. */
8315
Bram Moolenaar446cb832008-06-24 21:56:24 +00008316/* Override any GCC internal prototype to avoid an error.
8317 Use char because int might match the return type of a GCC
8318 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008319char socket ();
8320int
Illia Bobyra96d5442023-08-30 16:30:15 +02008321main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008322{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008323return socket ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008324 ;
8325 return 0;
8326}
8327_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008328if ac_fn_c_try_link "$LINENO"
8329then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008330 ac_cv_lib_socket_socket=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008331else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008332 ac_cv_lib_socket_socket=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008333fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008334rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008335 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008336LIBS=$ac_check_lib_save_LIBS
8337fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008338{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8339printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
8340if test "x$ac_cv_lib_socket_socket" = xyes
8341then :
8342 printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008343
8344 LIBS="-lsocket $LIBS"
8345
Bram Moolenaar071d4272004-06-13 20:20:40 +00008346fi
8347
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008348 fi
8349
Illia Bobyra96d5442023-08-30 16:30:15 +02008350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv6 networking is possible" >&5
8351printf %s "checking whether compiling with IPv6 networking is possible... " >&6; }
8352if test ${vim_cv_ipv6_networking+y}
8353then :
8354 printf %s "(cached) " >&6
8355else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8357/* end confdefs.h. */
8358
8359#include <stdio.h>
8360#include <stdlib.h>
8361#include <stdarg.h>
8362#include <fcntl.h>
8363#include <netdb.h>
8364#include <netinet/in.h>
8365#include <errno.h>
8366#include <sys/types.h>
8367#include <sys/socket.h>
8368 /* Check bitfields */
8369 struct nbbuf {
8370 unsigned int initDone:1;
8371 unsigned short signmaplen;
8372 };
8373
8374int
Illia Bobyra96d5442023-08-30 16:30:15 +02008375main (void)
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008376{
8377
8378 /* Check creating a socket. */
8379 struct sockaddr_in server;
8380 struct addrinfo *res;
8381 (void)socket(AF_INET, SOCK_STREAM, 0);
8382 (void)htons(100);
8383 (void)getaddrinfo("microsoft.com", NULL, NULL, &res);
8384 if (errno == ECONNREFUSED)
8385 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
8386 (void)freeaddrinfo(res);
8387
8388 ;
8389 return 0;
8390}
8391_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008392if ac_fn_c_try_link "$LINENO"
8393then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008394 vim_cv_ipv6_networking="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008395else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008396 vim_cv_ipv6_networking="no"
8397fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008398rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008399 conftest$ac_exeext conftest.$ac_ext
8400fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008401{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv6_networking" >&5
8402printf "%s\n" "$vim_cv_ipv6_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008403
8404 if test "x$vim_cv_ipv6_networking" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008405 printf "%s\n" "#define FEAT_IPV6 1" >>confdefs.h
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008406
Illia Bobyra96d5442023-08-30 16:30:15 +02008407 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
8408if test "x$ac_cv_func_inet_ntop" = xyes
8409then :
8410 printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008411
8412fi
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008413
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008414 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
8416printf %s "checking for gethostbyname in -lnsl... " >&6; }
8417if test ${ac_cv_lib_nsl_gethostbyname+y}
8418then :
8419 printf %s "(cached) " >&6
8420else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008421 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008422LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008424/* end confdefs.h. */
8425
Bram Moolenaar446cb832008-06-24 21:56:24 +00008426/* Override any GCC internal prototype to avoid an error.
8427 Use char because int might match the return type of a GCC
8428 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008429char gethostbyname ();
8430int
Illia Bobyra96d5442023-08-30 16:30:15 +02008431main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008432{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008433return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008434 ;
8435 return 0;
8436}
8437_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008438if ac_fn_c_try_link "$LINENO"
8439then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008440 ac_cv_lib_nsl_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02008441else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008442 ac_cv_lib_nsl_gethostbyname=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008443fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008444rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008445 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008446LIBS=$ac_check_lib_save_LIBS
8447fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008448{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
8449printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
8450if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
8451then :
8452 printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008453
8454 LIBS="-lnsl $LIBS"
8455
Bram Moolenaar071d4272004-06-13 20:20:40 +00008456fi
8457
Illia Bobyra96d5442023-08-30 16:30:15 +02008458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv4 networking is possible" >&5
8459printf %s "checking whether compiling with IPv4 networking is possible... " >&6; }
8460if test ${vim_cv_ipv4_networking+y}
8461then :
8462 printf %s "(cached) " >&6
8463else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008465/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008466
8467#include <stdio.h>
8468#include <stdlib.h>
8469#include <stdarg.h>
8470#include <fcntl.h>
8471#include <netdb.h>
8472#include <netinet/in.h>
8473#include <errno.h>
8474#include <sys/types.h>
8475#include <sys/socket.h>
8476 /* Check bitfields */
8477 struct nbbuf {
8478 unsigned int initDone:1;
Bram Moolenaar63de19e2016-12-09 20:11:26 +01008479 unsigned short signmaplen;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008480 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008481
8482int
Illia Bobyra96d5442023-08-30 16:30:15 +02008483main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008484{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008485
8486 /* Check creating a socket. */
8487 struct sockaddr_in server;
8488 (void)socket(AF_INET, SOCK_STREAM, 0);
8489 (void)htons(100);
8490 (void)gethostbyname("microsoft.com");
8491 if (errno == ECONNREFUSED)
8492 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008493
8494 ;
8495 return 0;
8496}
8497_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008498if ac_fn_c_try_link "$LINENO"
8499then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008500 vim_cv_ipv4_networking="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008501else $as_nop
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008502 vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008503fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008504rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008505 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00008506fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008507{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv4_networking" >&5
8508printf "%s\n" "$vim_cv_ipv4_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008509 fi
8510fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008511if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008512 printf "%s\n" "#define FEAT_NETBEANS_INTG 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008513
8514 NETBEANS_SRC="netbeans.c"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008515
Bram Moolenaar071d4272004-06-13 20:20:40 +00008516 NETBEANS_OBJ="objects/netbeans.o"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008517
Bram Moolenaar071d4272004-06-13 20:20:40 +00008518fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008519if test "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008520 printf "%s\n" "#define FEAT_JOB_CHANNEL 1" >>confdefs.h
Bram Moolenaare0874f82016-01-24 20:36:41 +01008521
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008522 CHANNEL_SRC="job.c channel.c"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008523
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008524 CHANNEL_OBJ="objects/job.o objects/channel.o"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008525
8526fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008527
Illia Bobyra96d5442023-08-30 16:30:15 +02008528{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-terminal argument" >&5
8529printf %s "checking --enable-terminal argument... " >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008530# Check whether --enable-terminal was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008531if test ${enable_terminal+y}
8532then :
Bram Moolenaaref839562017-10-28 20:28:23 +02008533 enableval=$enable_terminal;
Illia Bobyra96d5442023-08-30 16:30:15 +02008534else $as_nop
Bram Moolenaar595a4022017-09-03 19:15:57 +02008535 enable_terminal="auto"
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008536fi
8537
Bram Moolenaar595a4022017-09-03 19:15:57 +02008538if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008539 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny features" >&5
8541printf "%s\n" "cannot use terminal emulator with tiny features" >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008542 enable_terminal="no"
8543 else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008544 if test "$enable_terminal" = "auto"; then
8545 enable_terminal="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to yes" >&5
8547printf "%s\n" "defaulting to yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008548 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8550printf "%s\n" "yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008551 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008552 fi
8553else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008554 if test "$enable_terminal" = "auto"; then
8555 enable_terminal="no"
Illia Bobyra96d5442023-08-30 16:30:15 +02008556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to no" >&5
8557printf "%s\n" "defaulting to no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008558 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8560printf "%s\n" "no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008561 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008562fi
Bram Moolenaar8b423282017-12-16 14:37:06 +01008563if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008564 printf "%s\n" "#define FEAT_TERMINAL 1" >>confdefs.h
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008565
Bram Moolenaar93268052019-10-10 13:22:54 +02008566 TERM_SRC="libvterm/src/encoding.c libvterm/src/keyboard.c libvterm/src/mouse.c libvterm/src/parser.c libvterm/src/pen.c libvterm/src/creen.c libvterm/src/state.c libvterm/src/unicode.c libvterm/src/vterm.c"
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008567
Bram Moolenaar93268052019-10-10 13:22:54 +02008568 TERM_OBJ="objects/vterm_encoding.o objects/vterm_keyboard.o objects/vterm_mouse.o objects/vterm_parser.o objects/vterm_pen.o objects/vterm_screen.o objects/vterm_state.o objects/vterm_unicode.o objects/vterm_vterm.o"
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008569
Bram Moolenaar823edd12019-10-23 22:35:36 +02008570 TERM_TEST="test_libvterm"
8571
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008572fi
8573
Illia Bobyra96d5442023-08-30 16:30:15 +02008574{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-autoservername argument" >&5
8575printf %s "checking --enable-autoservername argument... " >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008576# Check whether --enable-autoservername was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008577if test ${enable_autoservername+y}
8578then :
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008579 enableval=$enable_autoservername;
Illia Bobyra96d5442023-08-30 16:30:15 +02008580else $as_nop
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008581 enable_autoservername="no"
8582fi
8583
Illia Bobyra96d5442023-08-30 16:30:15 +02008584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_autoservername" >&5
8585printf "%s\n" "$enable_autoservername" >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008586if test "$enable_autoservername" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008587 printf "%s\n" "#define FEAT_AUTOSERVERNAME 1" >>confdefs.h
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008588
8589fi
8590
Illia Bobyra96d5442023-08-30 16:30:15 +02008591{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
8592printf %s "checking --enable-multibyte argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008593# Check whether --enable-multibyte was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008594if test ${enable_multibyte+y}
8595then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008596 enableval=$enable_multibyte;
Illia Bobyra96d5442023-08-30 16:30:15 +02008597else $as_nop
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008598 enable_multibyte="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008599fi
8600
Illia Bobyra96d5442023-08-30 16:30:15 +02008601{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
8602printf "%s\n" "$enable_multibyte" >&6; }
Bram Moolenaar30276f22019-01-24 17:59:39 +01008603if test "$enable_multibyte" != "yes"; then
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008604 as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
8605 a problem with this, discuss on the Vim mailing list." "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008606fi
8607
Illia Bobyra96d5442023-08-30 16:30:15 +02008608{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-rightleft argument" >&5
8609printf %s "checking --disable-rightleft argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008610# Check whether --enable-rightleft was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008611if test ${enable_rightleft+y}
8612then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008613 enableval=$enable_rightleft;
Illia Bobyra96d5442023-08-30 16:30:15 +02008614else $as_nop
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008615 enable_rightleft="yes"
8616fi
8617
8618if test "$enable_rightleft" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8620printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008621else
Illia Bobyra96d5442023-08-30 16:30:15 +02008622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8623printf "%s\n" "yes" >&6; }
8624 printf "%s\n" "#define DISABLE_RIGHTLEFT 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008625
8626fi
8627
Illia Bobyra96d5442023-08-30 16:30:15 +02008628{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-arabic argument" >&5
8629printf %s "checking --disable-arabic argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008630# Check whether --enable-arabic was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008631if test ${enable_arabic+y}
8632then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008633 enableval=$enable_arabic;
Illia Bobyra96d5442023-08-30 16:30:15 +02008634else $as_nop
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008635 enable_arabic="yes"
8636fi
8637
8638if test "$enable_arabic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8640printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008641else
Illia Bobyra96d5442023-08-30 16:30:15 +02008642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8643printf "%s\n" "yes" >&6; }
8644 printf "%s\n" "#define DISABLE_ARABIC 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008645
8646fi
8647
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008648# Check whether --enable-farsi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008649if test ${enable_farsi+y}
8650then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008651 enableval=$enable_farsi;
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008652fi
8653
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008654
Illia Bobyra96d5442023-08-30 16:30:15 +02008655{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
8656printf %s "checking --enable-xim argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008657# Check whether --enable-xim was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008658if test ${enable_xim+y}
8659then :
8660 enableval=$enable_xim; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_xim" >&5
8661printf "%s\n" "$enable_xim" >&6; }
8662else $as_nop
8663 enable_xim="auto"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to auto" >&5
8664printf "%s\n" "defaulting to auto" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008665fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008666
Bram Moolenaar446cb832008-06-24 21:56:24 +00008667
Illia Bobyra96d5442023-08-30 16:30:15 +02008668{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fontset argument" >&5
8669printf %s "checking --enable-fontset argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008670# Check whether --enable-fontset was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008671if test ${enable_fontset+y}
8672then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008673 enableval=$enable_fontset;
Illia Bobyra96d5442023-08-30 16:30:15 +02008674else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008675 enable_fontset="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00008676fi
8677
Illia Bobyra96d5442023-08-30 16:30:15 +02008678{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
8679printf "%s\n" "$enable_fontset" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008680
8681test -z "$with_x" && with_x=yes
Bram Moolenaard0573012017-10-28 21:11:06 +02008682test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00008683if test "$with_x" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't HAVE_X11" >&5
8685printf "%s\n" "defaulting to: don't HAVE_X11" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008686else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008687
Bram Moolenaar071d4272004-06-13 20:20:40 +00008688 # Extract the first word of "xmkmf", so it can be a program name with args.
8689set dummy xmkmf; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8691printf %s "checking for $ac_word... " >&6; }
8692if test ${ac_cv_path_xmkmfpath+y}
8693then :
8694 printf %s "(cached) " >&6
8695else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008696 case $xmkmfpath in
8697 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008698 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
8699 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008700 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008701 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8702for as_dir in $PATH
8703do
8704 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008705 case $as_dir in #(((
8706 '') as_dir=./ ;;
8707 */) ;;
8708 *) as_dir=$as_dir/ ;;
8709 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008710 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008711 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8712 ac_cv_path_xmkmfpath="$as_dir$ac_word$ac_exec_ext"
8713 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008714 break 2
8715 fi
8716done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008717 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008718IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008719
Bram Moolenaar071d4272004-06-13 20:20:40 +00008720 ;;
8721esac
8722fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008723xmkmfpath=$ac_cv_path_xmkmfpath
Bram Moolenaar071d4272004-06-13 20:20:40 +00008724if test -n "$xmkmfpath"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xmkmfpath" >&5
8726printf "%s\n" "$xmkmfpath" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008727else
Illia Bobyra96d5442023-08-30 16:30:15 +02008728 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8729printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008730fi
8731
8732
Bram Moolenaar446cb832008-06-24 21:56:24 +00008733
Illia Bobyra96d5442023-08-30 16:30:15 +02008734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5
8735printf %s "checking for X... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008736
Bram Moolenaar071d4272004-06-13 20:20:40 +00008737
Bram Moolenaar446cb832008-06-24 21:56:24 +00008738# Check whether --with-x was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008739if test ${with_x+y}
8740then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008741 withval=$with_x;
8742fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008743
8744# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8745if test "x$with_x" = xno; then
8746 # The user explicitly disabled X.
8747 have_x=disabled
8748else
Bram Moolenaar446cb832008-06-24 21:56:24 +00008749 case $x_includes,$x_libraries in #(
Bram Moolenaar7db77842014-03-27 17:40:59 +01008750 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
Illia Bobyra96d5442023-08-30 16:30:15 +02008751 *,NONE | NONE,*) if test ${ac_cv_have_x+y}
8752then :
8753 printf %s "(cached) " >&6
8754else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00008755 # One or both of the vars are not set, and there is no cached value.
Illia Bobyra96d5442023-08-30 16:30:15 +02008756ac_x_includes=no
8757ac_x_libraries=no
8758# Do we need to do anything special at all?
8759ac_save_LIBS=$LIBS
8760LIBS="-lX11 $LIBS"
8761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8762/* end confdefs.h. */
8763#include <X11/Xlib.h>
8764int
8765main (void)
8766{
8767XrmInitialize ()
8768 ;
8769 return 0;
8770}
8771_ACEOF
8772if ac_fn_c_try_link "$LINENO"
8773then :
8774 # We can compile and link X programs with no special options.
8775 ac_x_includes=
8776 ac_x_libraries=
8777fi
8778rm -f core conftest.err conftest.$ac_objext conftest.beam \
8779 conftest$ac_exeext conftest.$ac_ext
8780LIBS="$ac_save_LIBS"
8781# If that didn't work, only try xmkmf and file system searches
8782# for native compilation.
8783if test x"$ac_x_includes" = xno && test "$cross_compiling" = no
8784then :
8785 rm -f -r conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008786if mkdir conftest.dir; then
8787 cd conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008788 cat >Imakefile <<'_ACEOF'
Bram Moolenaar446cb832008-06-24 21:56:24 +00008789incroot:
8790 @echo incroot='${INCROOT}'
8791usrlibdir:
8792 @echo usrlibdir='${USRLIBDIR}'
8793libdir:
8794 @echo libdir='${LIBDIR}'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008795_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00008796 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008797 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008798 for ac_var in incroot usrlibdir libdir; do
8799 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8800 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00008801 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008802 for ac_extension in a so sl dylib la dll; do
8803 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8804 test -f "$ac_im_libdir/libX11.$ac_extension"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008805 ac_im_usrlibdir=$ac_im_libdir; break
Bram Moolenaar071d4272004-06-13 20:20:40 +00008806 fi
8807 done
8808 # Screen out bogus values from the imake configuration. They are
8809 # bogus both because they are the default anyway, and because
8810 # using them would break gcc on systems where it needs fixed includes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008811 case $ac_im_incroot in
Bram Moolenaar446cb832008-06-24 21:56:24 +00008812 /usr/include) ac_x_includes= ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008813 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008814 esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008815 case $ac_im_usrlibdir in
Bram Moolenaar32f31b12009-05-21 13:20:59 +00008816 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008817 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008818 esac
8819 fi
8820 cd ..
Bram Moolenaar446cb832008-06-24 21:56:24 +00008821 rm -f -r conftest.dir
Bram Moolenaar071d4272004-06-13 20:20:40 +00008822fi
8823
Illia Bobyra96d5442023-08-30 16:30:15 +02008824 # Standard set of common directories for X headers.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008825# Check X11 before X11Rn because it is often a symlink to the current release.
8826ac_x_header_dirs='
8827/usr/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008828/usr/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008829/usr/X11R6/include
8830/usr/X11R5/include
8831/usr/X11R4/include
Bram Moolenaar071d4272004-06-13 20:20:40 +00008832
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008833/usr/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008834/usr/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008835/usr/include/X11R6
8836/usr/include/X11R5
8837/usr/include/X11R4
8838
8839/usr/local/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008840/usr/local/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008841/usr/local/X11R6/include
8842/usr/local/X11R5/include
8843/usr/local/X11R4/include
8844
8845/usr/local/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008846/usr/local/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008847/usr/local/include/X11R6
8848/usr/local/include/X11R5
8849/usr/local/include/X11R4
8850
Illia Bobyra96d5442023-08-30 16:30:15 +02008851/opt/X11/include
8852
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008853/usr/X386/include
8854/usr/x386/include
8855/usr/XFree86/include/X11
8856
8857/usr/include
8858/usr/local/include
8859/usr/unsupported/include
8860/usr/athena/include
8861/usr/local/x11r5/include
8862/usr/lpp/Xamples/include
8863
8864/usr/openwin/include
8865/usr/openwin/share/include'
8866
8867if test "$ac_x_includes" = no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00008868 # Guess where to find include files, by looking for Xlib.h.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008869 # First, try using that file with no special directory specified.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008871/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00008872#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008873_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008874if ac_fn_c_try_cpp "$LINENO"
8875then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00008876 # We can compile using X headers with no special include directory.
8877ac_x_includes=
Illia Bobyra96d5442023-08-30 16:30:15 +02008878else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008879 for ac_dir in $ac_x_header_dirs; do
Bram Moolenaar446cb832008-06-24 21:56:24 +00008880 if test -r "$ac_dir/X11/Xlib.h"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008881 ac_x_includes=$ac_dir
8882 break
8883 fi
8884done
Bram Moolenaar071d4272004-06-13 20:20:40 +00008885fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01008886rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008887fi # $ac_x_includes = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008888
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008889if test "$ac_x_libraries" = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008890 # Check for the libraries.
Bram Moolenaar071d4272004-06-13 20:20:40 +00008891 # See if we find them without any special options.
8892 # Don't add to $LIBS permanently.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008893 ac_save_LIBS=$LIBS
Bram Moolenaar446cb832008-06-24 21:56:24 +00008894 LIBS="-lX11 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008896/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00008897#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008898int
Illia Bobyra96d5442023-08-30 16:30:15 +02008899main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008900{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008901XrmInitialize ()
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008902 ;
8903 return 0;
8904}
8905_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008906if ac_fn_c_try_link "$LINENO"
8907then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008908 LIBS=$ac_save_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008909# We can link X programs with no special library path.
8910ac_x_libraries=
Illia Bobyra96d5442023-08-30 16:30:15 +02008911else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008912 LIBS=$ac_save_LIBS
Illia Bobyra96d5442023-08-30 16:30:15 +02008913for ac_dir in `printf "%s\n" "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008914do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008915 # Don't even attempt the hair of trying to link an X program!
Bram Moolenaar446cb832008-06-24 21:56:24 +00008916 for ac_extension in a so sl dylib la dll; do
8917 if test -r "$ac_dir/libX11.$ac_extension"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008918 ac_x_libraries=$ac_dir
8919 break 2
8920 fi
8921 done
8922done
8923fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008924rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008925 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008926fi # $ac_x_libraries = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00008927
Illia Bobyra96d5442023-08-30 16:30:15 +02008928fi
8929# Record the results.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008930case $ac_x_includes,$ac_x_libraries in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02008931 no,* | *,no | *\'*) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008932 # Didn't find X, or a directory has "'" in its name.
Illia Bobyra96d5442023-08-30 16:30:15 +02008933 ac_cv_have_x="have_x=no" ;; #(
8934 *) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008935 # Record where we found X for the cache.
8936 ac_cv_have_x="have_x=yes\
8937 ac_x_includes='$ac_x_includes'\
Illia Bobyra96d5442023-08-30 16:30:15 +02008938 ac_x_libraries='$ac_x_libraries'" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00008939esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008940fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00008941;; #(
8942 *) have_x=yes;;
8943 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008944 eval "$ac_cv_have_x"
8945fi # $with_x != no
8946
8947if test "$have_x" != yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
8949printf "%s\n" "$have_x" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008950 no_x=yes
8951else
8952 # If each of the values was on the command line, it overrides each guess.
8953 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8954 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8955 # Update the cache value to reflect the command line values.
Bram Moolenaar446cb832008-06-24 21:56:24 +00008956 ac_cv_have_x="have_x=yes\
8957 ac_x_includes='$x_includes'\
8958 ac_x_libraries='$x_libraries'"
Illia Bobyra96d5442023-08-30 16:30:15 +02008959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
8960printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008961fi
8962
8963if test "$no_x" = yes; then
8964 # Not all programs may use this symbol, but it does not hurt to define it.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008965
Illia Bobyra96d5442023-08-30 16:30:15 +02008966printf "%s\n" "#define X_DISPLAY_MISSING 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008967
8968 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
8969else
8970 if test -n "$x_includes"; then
8971 X_CFLAGS="$X_CFLAGS -I$x_includes"
8972 fi
8973
8974 # It would also be nice to do this for all -L options, not just this one.
8975 if test -n "$x_libraries"; then
8976 X_LIBS="$X_LIBS -L$x_libraries"
8977 # For Solaris; some versions of Sun CC require a space after -R and
8978 # others require no space. Words are not sufficient . . . .
Illia Bobyra96d5442023-08-30 16:30:15 +02008979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
8980printf %s "checking whether -R must be followed by a space... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008981 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8982 ac_xsave_c_werror_flag=$ac_c_werror_flag
8983 ac_c_werror_flag=yes
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008985/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008986
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008987int
Illia Bobyra96d5442023-08-30 16:30:15 +02008988main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008989{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008990
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008991 ;
8992 return 0;
8993}
8994_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008995if ac_fn_c_try_link "$LINENO"
8996then :
8997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8998printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008999 X_LIBS="$X_LIBS -R$x_libraries"
Illia Bobyra96d5442023-08-30 16:30:15 +02009000else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009001 LIBS="$ac_xsave_LIBS -R $x_libraries"
9002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009003/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009004
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009005int
Illia Bobyra96d5442023-08-30 16:30:15 +02009006main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009007{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009008
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009009 ;
9010 return 0;
9011}
9012_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009013if ac_fn_c_try_link "$LINENO"
9014then :
9015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9016printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009017 X_LIBS="$X_LIBS -R $x_libraries"
Illia Bobyra96d5442023-08-30 16:30:15 +02009018else $as_nop
9019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
9020printf "%s\n" "neither works" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009021fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009022rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009023 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00009024fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009025rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009026 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00009027 ac_c_werror_flag=$ac_xsave_c_werror_flag
9028 LIBS=$ac_xsave_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009029 fi
9030
9031 # Check for system-dependent libraries X programs must link with.
9032 # Do this before checking for the system-independent R6 libraries
9033 # (-lICE), since we may need -lsocket or whatever for X linking.
9034
9035 if test "$ISC" = yes; then
9036 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9037 else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009038 # Martyn Johnson says this is needed for Ultrix, if the X
9039 # libraries were built with DECnet support. And Karl Berry says
Bram Moolenaar071d4272004-06-13 20:20:40 +00009040 # the Alpha needs dnet_stub (dnet does not exist).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009041 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009043/* end confdefs.h. */
9044
Bram Moolenaar446cb832008-06-24 21:56:24 +00009045/* Override any GCC internal prototype to avoid an error.
9046 Use char because int might match the return type of a GCC
9047 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009048char XOpenDisplay ();
9049int
Illia Bobyra96d5442023-08-30 16:30:15 +02009050main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009051{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009052return XOpenDisplay ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009053 ;
9054 return 0;
9055}
9056_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009057if ac_fn_c_try_link "$LINENO"
9058then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009059
Illia Bobyra96d5442023-08-30 16:30:15 +02009060else $as_nop
9061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
9062printf %s "checking for dnet_ntoa in -ldnet... " >&6; }
9063if test ${ac_cv_lib_dnet_dnet_ntoa+y}
9064then :
9065 printf %s "(cached) " >&6
9066else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009067 ac_check_lib_save_LIBS=$LIBS
9068LIBS="-ldnet $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009070/* end confdefs.h. */
9071
Bram Moolenaar446cb832008-06-24 21:56:24 +00009072/* Override any GCC internal prototype to avoid an error.
9073 Use char because int might match the return type of a GCC
9074 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009075char dnet_ntoa ();
9076int
Illia Bobyra96d5442023-08-30 16:30:15 +02009077main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009078{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009079return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009080 ;
9081 return 0;
9082}
9083_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009084if ac_fn_c_try_link "$LINENO"
9085then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009086 ac_cv_lib_dnet_dnet_ntoa=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009087else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009088 ac_cv_lib_dnet_dnet_ntoa=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009089fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009090rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009091 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009092LIBS=$ac_check_lib_save_LIBS
9093fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9095printf "%s\n" "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
9096if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes
9097then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009098 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009099fi
9100
9101 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
9103printf %s "checking for dnet_ntoa in -ldnet_stub... " >&6; }
9104if test ${ac_cv_lib_dnet_stub_dnet_ntoa+y}
9105then :
9106 printf %s "(cached) " >&6
9107else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009108 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009109LIBS="-ldnet_stub $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009111/* end confdefs.h. */
9112
Bram Moolenaar446cb832008-06-24 21:56:24 +00009113/* Override any GCC internal prototype to avoid an error.
9114 Use char because int might match the return type of a GCC
9115 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009116char dnet_ntoa ();
9117int
Illia Bobyra96d5442023-08-30 16:30:15 +02009118main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009119{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009120return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009121 ;
9122 return 0;
9123}
9124_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009125if ac_fn_c_try_link "$LINENO"
9126then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009127 ac_cv_lib_dnet_stub_dnet_ntoa=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009128else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009129 ac_cv_lib_dnet_stub_dnet_ntoa=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009130fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009131rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009132 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009133LIBS=$ac_check_lib_save_LIBS
9134fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009135{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9136printf "%s\n" "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
9137if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes
9138then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009139 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009140fi
9141
9142 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009143fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009144rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009145 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009146 LIBS="$ac_xsave_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009147
9148 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9149 # to get the SysV transport functions.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009150 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009151 # needs -lnsl.
9152 # The nsl library prevents programs from opening the X display
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009153 # on Irix 5.2, according to T.E. Dickey.
9154 # The functions gethostbyname, getservbyname, and inet_addr are
9155 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009156 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Illia Bobyra96d5442023-08-30 16:30:15 +02009157if test "x$ac_cv_func_gethostbyname" = xyes
9158then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009159
Bram Moolenaar071d4272004-06-13 20:20:40 +00009160fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009161
Bram Moolenaar071d4272004-06-13 20:20:40 +00009162 if test $ac_cv_func_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
9164printf %s "checking for gethostbyname in -lnsl... " >&6; }
9165if test ${ac_cv_lib_nsl_gethostbyname+y}
9166then :
9167 printf %s "(cached) " >&6
9168else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009169 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009170LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009172/* end confdefs.h. */
9173
Bram Moolenaar446cb832008-06-24 21:56:24 +00009174/* Override any GCC internal prototype to avoid an error.
9175 Use char because int might match the return type of a GCC
9176 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009177char gethostbyname ();
9178int
Illia Bobyra96d5442023-08-30 16:30:15 +02009179main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009180{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009181return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009182 ;
9183 return 0;
9184}
9185_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009186if ac_fn_c_try_link "$LINENO"
9187then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009188 ac_cv_lib_nsl_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009189else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009190 ac_cv_lib_nsl_gethostbyname=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009191fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009192rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009193 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009194LIBS=$ac_check_lib_save_LIBS
9195fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
9197printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
9198if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
9199then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009200 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009201fi
9202
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009203 if test $ac_cv_lib_nsl_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
9205printf %s "checking for gethostbyname in -lbsd... " >&6; }
9206if test ${ac_cv_lib_bsd_gethostbyname+y}
9207then :
9208 printf %s "(cached) " >&6
9209else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009210 ac_check_lib_save_LIBS=$LIBS
9211LIBS="-lbsd $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009213/* end confdefs.h. */
9214
Bram Moolenaar446cb832008-06-24 21:56:24 +00009215/* Override any GCC internal prototype to avoid an error.
9216 Use char because int might match the return type of a GCC
9217 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009218char gethostbyname ();
9219int
Illia Bobyra96d5442023-08-30 16:30:15 +02009220main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009221{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009222return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009223 ;
9224 return 0;
9225}
9226_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009227if ac_fn_c_try_link "$LINENO"
9228then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009229 ac_cv_lib_bsd_gethostbyname=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009230else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009231 ac_cv_lib_bsd_gethostbyname=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009232fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009233rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009234 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009235LIBS=$ac_check_lib_save_LIBS
9236fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009237{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
9238printf "%s\n" "$ac_cv_lib_bsd_gethostbyname" >&6; }
9239if test "x$ac_cv_lib_bsd_gethostbyname" = xyes
9240then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009241 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9242fi
9243
9244 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009245 fi
9246
9247 # lieder@skyler.mavd.honeywell.com says without -lsocket,
9248 # socket/setsockopt and other routines are undefined under SCO ODT
9249 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009250 # on later versions), says Simon Leinen: it contains gethostby*
9251 # variants that don't use the name server (or something). -lsocket
9252 # must be given before -lnsl if both are needed. We assume that
9253 # if connect needs -lnsl, so does gethostbyname.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009254 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
Illia Bobyra96d5442023-08-30 16:30:15 +02009255if test "x$ac_cv_func_connect" = xyes
9256then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009257
Bram Moolenaar071d4272004-06-13 20:20:40 +00009258fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009259
Bram Moolenaar071d4272004-06-13 20:20:40 +00009260 if test $ac_cv_func_connect = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
9262printf %s "checking for connect in -lsocket... " >&6; }
9263if test ${ac_cv_lib_socket_connect+y}
9264then :
9265 printf %s "(cached) " >&6
9266else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009267 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009268LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009270/* end confdefs.h. */
9271
Bram Moolenaar446cb832008-06-24 21:56:24 +00009272/* Override any GCC internal prototype to avoid an error.
9273 Use char because int might match the return type of a GCC
9274 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009275char connect ();
9276int
Illia Bobyra96d5442023-08-30 16:30:15 +02009277main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009278{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009279return connect ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009280 ;
9281 return 0;
9282}
9283_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009284if ac_fn_c_try_link "$LINENO"
9285then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009286 ac_cv_lib_socket_connect=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009287else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009288 ac_cv_lib_socket_connect=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009289fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009290rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009291 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009292LIBS=$ac_check_lib_save_LIBS
9293fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009294{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
9295printf "%s\n" "$ac_cv_lib_socket_connect" >&6; }
9296if test "x$ac_cv_lib_socket_connect" = xyes
9297then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009298 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009299fi
9300
9301 fi
9302
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009303 # Guillermo Gomez says -lposix is necessary on A/UX.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009304 ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
Illia Bobyra96d5442023-08-30 16:30:15 +02009305if test "x$ac_cv_func_remove" = xyes
9306then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009307
Bram Moolenaar071d4272004-06-13 20:20:40 +00009308fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009309
Bram Moolenaar071d4272004-06-13 20:20:40 +00009310 if test $ac_cv_func_remove = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
9312printf %s "checking for remove in -lposix... " >&6; }
9313if test ${ac_cv_lib_posix_remove+y}
9314then :
9315 printf %s "(cached) " >&6
9316else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009317 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009318LIBS="-lposix $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009320/* end confdefs.h. */
9321
Bram Moolenaar446cb832008-06-24 21:56:24 +00009322/* Override any GCC internal prototype to avoid an error.
9323 Use char because int might match the return type of a GCC
9324 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009325char remove ();
9326int
Illia Bobyra96d5442023-08-30 16:30:15 +02009327main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009328{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009329return remove ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009330 ;
9331 return 0;
9332}
9333_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009334if ac_fn_c_try_link "$LINENO"
9335then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009336 ac_cv_lib_posix_remove=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009337else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009338 ac_cv_lib_posix_remove=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009339fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009340rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009341 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009342LIBS=$ac_check_lib_save_LIBS
9343fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009344{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
9345printf "%s\n" "$ac_cv_lib_posix_remove" >&6; }
9346if test "x$ac_cv_lib_posix_remove" = xyes
9347then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009348 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009349fi
9350
9351 fi
9352
9353 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009354 ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
Illia Bobyra96d5442023-08-30 16:30:15 +02009355if test "x$ac_cv_func_shmat" = xyes
9356then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009357
Bram Moolenaar071d4272004-06-13 20:20:40 +00009358fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009359
Bram Moolenaar071d4272004-06-13 20:20:40 +00009360 if test $ac_cv_func_shmat = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
9362printf %s "checking for shmat in -lipc... " >&6; }
9363if test ${ac_cv_lib_ipc_shmat+y}
9364then :
9365 printf %s "(cached) " >&6
9366else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009367 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009368LIBS="-lipc $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009370/* end confdefs.h. */
9371
Bram Moolenaar446cb832008-06-24 21:56:24 +00009372/* Override any GCC internal prototype to avoid an error.
9373 Use char because int might match the return type of a GCC
9374 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009375char shmat ();
9376int
Illia Bobyra96d5442023-08-30 16:30:15 +02009377main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009378{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009379return shmat ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009380 ;
9381 return 0;
9382}
9383_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009384if ac_fn_c_try_link "$LINENO"
9385then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009386 ac_cv_lib_ipc_shmat=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009387else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009388 ac_cv_lib_ipc_shmat=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009389fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009390rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009391 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009392LIBS=$ac_check_lib_save_LIBS
9393fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009394{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
9395printf "%s\n" "$ac_cv_lib_ipc_shmat" >&6; }
9396if test "x$ac_cv_lib_ipc_shmat" = xyes
9397then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009398 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009399fi
9400
9401 fi
9402 fi
9403
9404 # Check for libraries that X11R6 Xt/Xaw programs need.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009405 ac_save_LDFLAGS=$LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009406 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9407 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9408 # check for ICE first), but we must link in the order -lSM -lICE or
9409 # we get undefined symbols. So assume we have SM if we have ICE.
9410 # These have to be linked with before -lX11, unlike the other
9411 # libraries we check for below, so use a different variable.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009412 # John Interrante, Karl Berry
Illia Bobyra96d5442023-08-30 16:30:15 +02009413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
9414printf %s "checking for IceConnectionNumber in -lICE... " >&6; }
9415if test ${ac_cv_lib_ICE_IceConnectionNumber+y}
9416then :
9417 printf %s "(cached) " >&6
9418else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009419 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009420LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009422/* end confdefs.h. */
9423
Bram Moolenaar446cb832008-06-24 21:56:24 +00009424/* Override any GCC internal prototype to avoid an error.
9425 Use char because int might match the return type of a GCC
9426 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009427char IceConnectionNumber ();
9428int
Illia Bobyra96d5442023-08-30 16:30:15 +02009429main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009430{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009431return IceConnectionNumber ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009432 ;
9433 return 0;
9434}
9435_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009436if ac_fn_c_try_link "$LINENO"
9437then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009438 ac_cv_lib_ICE_IceConnectionNumber=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009439else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009440 ac_cv_lib_ICE_IceConnectionNumber=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009441fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009442rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009443 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009444LIBS=$ac_check_lib_save_LIBS
9445fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009446{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9447printf "%s\n" "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
9448if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes
9449then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009450 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009451fi
9452
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009453 LDFLAGS=$ac_save_LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009454
9455fi
9456
9457
Bram Moolenaar2c704a72010-06-03 21:17:25 +02009458 if test "$zOSUnix" = "yes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009459 CFLAGS="$CFLAGS -W c,dll"
9460 LDFLAGS="$LDFLAGS -W l,dll"
9461 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
9462 fi
9463
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009464
Bram Moolenaar071d4272004-06-13 20:20:40 +00009465 if test -d "$x_includes" && test ! -d "$x_libraries"; then
9466 x_libraries=`echo "$x_includes" | sed s/include/lib/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X libraries to $x_libraries" >&5
9468printf "%s\n" "Corrected X libraries to $x_libraries" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009469 X_LIBS="$X_LIBS -L$x_libraries"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00009470 if test "$vim_cv_uname_output" = SunOS &&
9471 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009472 X_LIBS="$X_LIBS -R $x_libraries"
9473 fi
9474 fi
9475
9476 if test -d "$x_libraries" && test ! -d "$x_includes"; then
9477 x_includes=`echo "$x_libraries" | sed s/lib/include/`
Illia Bobyra96d5442023-08-30 16:30:15 +02009478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X includes to $x_includes" >&5
9479printf "%s\n" "Corrected X includes to $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009480 X_CFLAGS="$X_CFLAGS -I$x_includes"
9481 fi
9482
9483 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`"
9484 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`"
9485 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
9486
9487
Illia Bobyra96d5442023-08-30 16:30:15 +02009488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files can be found" >&5
9489printf %s "checking if X11 header files can be found... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009490 cflags_save=$CFLAGS
9491 CFLAGS="$CFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009493/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009494#include <X11/Xlib.h>
Bram Moolenaar00ca2842008-06-26 20:14:00 +00009495#include <X11/Intrinsic.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009496int
Illia Bobyra96d5442023-08-30 16:30:15 +02009497main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009498{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009499
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009500 ;
9501 return 0;
9502}
9503_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009504if ac_fn_c_try_compile "$LINENO"
9505then :
9506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9507printf "%s\n" "yes" >&6; }
9508else $as_nop
9509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9510printf "%s\n" "no" >&6; }; no_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009511fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009512rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009513 CFLAGS=$cflags_save
9514
9515 if test "${no_x-no}" = yes; then
9516 with_x=no
9517 else
Illia Bobyra96d5442023-08-30 16:30:15 +02009518 printf "%s\n" "#define HAVE_X11 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00009519
9520 X_LIB="-lXt -lX11";
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009521
Bram Moolenaar071d4272004-06-13 20:20:40 +00009522
9523 ac_save_LDFLAGS="$LDFLAGS"
9524 LDFLAGS="-L$x_libraries $LDFLAGS"
9525
Illia Bobyra96d5442023-08-30 16:30:15 +02009526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
9527printf %s "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
9528if test ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+y}
9529then :
9530 printf %s "(cached) " >&6
9531else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009532 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009533LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009535/* end confdefs.h. */
9536
Bram Moolenaar446cb832008-06-24 21:56:24 +00009537/* Override any GCC internal prototype to avoid an error.
9538 Use char because int might match the return type of a GCC
9539 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009540char _XdmcpAuthDoIt ();
9541int
Illia Bobyra96d5442023-08-30 16:30:15 +02009542main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009543{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009544return _XdmcpAuthDoIt ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009545 ;
9546 return 0;
9547}
9548_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009549if ac_fn_c_try_link "$LINENO"
9550then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009551 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009552else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009553 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009554fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009555rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009556 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009557LIBS=$ac_check_lib_save_LIBS
9558fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009559{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
9560printf "%s\n" "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
9561if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes
9562then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009563 X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009564fi
9565
9566
Illia Bobyra96d5442023-08-30 16:30:15 +02009567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
9568printf %s "checking for IceOpenConnection in -lICE... " >&6; }
9569if test ${ac_cv_lib_ICE_IceOpenConnection+y}
9570then :
9571 printf %s "(cached) " >&6
9572else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009573 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009574LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009576/* end confdefs.h. */
9577
Bram Moolenaar446cb832008-06-24 21:56:24 +00009578/* Override any GCC internal prototype to avoid an error.
9579 Use char because int might match the return type of a GCC
9580 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009581char IceOpenConnection ();
9582int
Illia Bobyra96d5442023-08-30 16:30:15 +02009583main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009584{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009585return IceOpenConnection ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009586 ;
9587 return 0;
9588}
9589_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009590if ac_fn_c_try_link "$LINENO"
9591then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009592 ac_cv_lib_ICE_IceOpenConnection=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009593else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009594 ac_cv_lib_ICE_IceOpenConnection=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009595fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009596rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009597 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009598LIBS=$ac_check_lib_save_LIBS
9599fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009600{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
9601printf "%s\n" "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
9602if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes
9603then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009604 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009605fi
9606
9607
9608 LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +02009609 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
9610printf %s "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
9611if test ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+y}
9612then :
9613 printf %s "(cached) " >&6
9614else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009615 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009616LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009618/* end confdefs.h. */
9619
Bram Moolenaar446cb832008-06-24 21:56:24 +00009620/* Override any GCC internal prototype to avoid an error.
9621 Use char because int might match the return type of a GCC
9622 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009623char XpmCreatePixmapFromData ();
9624int
Illia Bobyra96d5442023-08-30 16:30:15 +02009625main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009626{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009627return XpmCreatePixmapFromData ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009628 ;
9629 return 0;
9630}
9631_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009632if ac_fn_c_try_link "$LINENO"
9633then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009634 ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02009635else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009636 ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009637fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009638rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009639 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009640LIBS=$ac_check_lib_save_LIBS
9641fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009642{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
9643printf "%s\n" "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
9644if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes
9645then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009646 X_PRE_LIBS="$X_PRE_LIBS -lXpm"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009647fi
9648
9649
Illia Bobyra96d5442023-08-30 16:30:15 +02009650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
9651printf %s "checking if X11 header files implicitly declare return values... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009652 cflags_save=$CFLAGS
Bram Moolenaard1864592013-05-04 04:40:15 +02009653 if test "$GCC" = yes; then
9654 CFLAGS="$CFLAGS $X_CFLAGS -Werror"
9655 else
9656 CFLAGS="$CFLAGS $X_CFLAGS"
9657 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009659/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009660#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009661int
Illia Bobyra96d5442023-08-30 16:30:15 +02009662main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009663{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009664
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009665 ;
9666 return 0;
9667}
9668_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009669if ac_fn_c_try_compile "$LINENO"
9670then :
9671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9672printf "%s\n" "no" >&6; }
9673else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009674 CFLAGS="$CFLAGS -Wno-implicit-int"
9675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009676/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009677#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009678int
Illia Bobyra96d5442023-08-30 16:30:15 +02009679main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009680{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009681
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009682 ;
9683 return 0;
9684}
9685_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009686if ac_fn_c_try_compile "$LINENO"
9687then :
9688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9689printf "%s\n" "yes" >&6; }; cflags_save="$cflags_save -Wno-implicit-int"
9690else $as_nop
9691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
9692printf "%s\n" "test failed" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009693
Bram Moolenaar071d4272004-06-13 20:20:40 +00009694fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009695rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009696
Bram Moolenaar071d4272004-06-13 20:20:40 +00009697fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009698rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00009699 CFLAGS=$cflags_save
9700
9701 LDFLAGS="$ac_save_LDFLAGS"
9702
Mike Gilberta055b442023-08-20 19:01:41 +02009703 # The cast to long int works around a bug in the HP C Compiler
9704# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9705# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9706# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +02009707{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
9708printf %s "checking size of wchar_t... " >&6; }
9709if test ${ac_cv_sizeof_wchar_t+y}
9710then :
9711 printf %s "(cached) " >&6
9712else $as_nop
9713 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"
9714then :
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009715
Illia Bobyra96d5442023-08-30 16:30:15 +02009716else $as_nop
Mike Gilberta055b442023-08-20 19:01:41 +02009717 if test "$ac_cv_type_wchar_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009718 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9719printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Mike Gilberta055b442023-08-20 19:01:41 +02009720as_fn_error 77 "cannot compute sizeof (wchar_t)
9721See \`config.log' for more details" "$LINENO" 5; }
9722 else
9723 ac_cv_sizeof_wchar_t=0
9724 fi
9725fi
9726
9727fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009728{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
9729printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02009730
9731
9732
Illia Bobyra96d5442023-08-30 16:30:15 +02009733printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009734
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009735
Mike Gilberta055b442023-08-20 19:01:41 +02009736 if test "$ac_cv_sizeof_wchar_t" -le 2; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009737 printf "%s\n" "#define SMALL_WCHAR_T 1" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +00009738
9739 fi
9740
Bram Moolenaar071d4272004-06-13 20:20:40 +00009741 fi
9742fi
9743
Bram Moolenaard2a05492018-07-27 22:35:15 +02009744if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
9745 as_fn_error $? "could not configure X" "$LINENO" 5
9746fi
9747
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009748test "x$with_x" = xno -a "x$HAIKU" != "xyes" -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009749
Illia Bobyra96d5442023-08-30 16:30:15 +02009750{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
9751printf %s "checking --enable-gui argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009752# Check whether --enable-gui was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009753if test ${enable_gui+y}
9754then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009755 enableval=$enable_gui;
Illia Bobyra96d5442023-08-30 16:30:15 +02009756else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009757 enable_gui="auto"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009758fi
9759
Bram Moolenaar071d4272004-06-13 20:20:40 +00009760
9761enable_gui_canon=`echo "_$enable_gui" | \
9762 sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
9763
Bram Moolenaar071d4272004-06-13 20:20:40 +00009764SKIP_GTK2=YES
Bram Moolenaar1858a842016-02-23 22:30:31 +01009765SKIP_GTK3=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009766SKIP_GNOME=YES
9767SKIP_MOTIF=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009768SKIP_PHOTON=YES
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009769SKIP_HAIKU=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009770GUITYPE=NONE
9771
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009772if test "x$HAIKU" = "xyes"; then
9773 SKIP_HAIKU=
9774 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009775 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9776printf "%s\n" "no GUI support" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009777 SKIP_HAIKU=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009778 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9779printf "%s\n" "yes - automatic GUI support" >&6; } ;;
9780 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
9781printf "%s\n" "auto - automatic GUI support" >&6; } ;;
9782 haiku) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Haiku GUI support" >&5
9783printf "%s\n" "Haiku GUI support" >&6; } ;;
9784 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9785printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +01009786 SKIP_HAIKU=YES ;;
9787 esac
9788elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009789 SKIP_PHOTON=
9790 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009791 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9792printf "%s\n" "no GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009793 SKIP_PHOTON=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009794 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
9795printf "%s\n" "automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +01009796 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009797 photon) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
9798printf "%s\n" "Photon GUI support" >&6; } ;;
9799 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9800printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009801 SKIP_PHOTON=YES ;;
9802 esac
9803
Bram Moolenaar040f9752020-08-11 23:08:48 +02009804elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
9805 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009806 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9807printf "%s\n" "no GUI support" >&6; } ;;
9808 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
9809printf "%s\n" "yes - automatic GUI support" >&6; }
Bram Moolenaar040f9752020-08-11 23:08:48 +02009810 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009811 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - disable GUI support for Mac OS" >&5
9812printf "%s\n" "auto - disable GUI support for Mac OS" >&6; } ;;
9813 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9814printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar040f9752020-08-11 23:08:48 +02009815 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009816else
9817
Bram Moolenaar071d4272004-06-13 20:20:40 +00009818 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +02009819 no|none) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
9820printf "%s\n" "no GUI support" >&6; } ;;
9821 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
9822printf "%s\n" "yes/auto - automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +01009823 gui_auto=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009824 SKIP_GTK2=
Bram Moolenaarf272ae12021-01-31 19:52:50 +01009825 SKIP_GTK3=
Bram Moolenaar071d4272004-06-13 20:20:40 +00009826 SKIP_GNOME=
Bram Moolenaarf52fac22022-03-11 16:01:26 +00009827 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009828 gtk2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
9829printf "%s\n" "GTK+ 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009830 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009831 gnome2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GNOME 2.x GUI support" >&5
9832printf "%s\n" "GNOME 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009833 SKIP_GNOME=
Bram Moolenaar071d4272004-06-13 20:20:40 +00009834 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009835 gtk3) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
9836printf "%s\n" "GTK+ 3.x GUI support" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009837 SKIP_GTK3=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009838 motif) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
9839printf "%s\n" "Motif GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009840 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +02009841 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
9842printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009843 esac
9844
9845fi
9846
Bram Moolenaar071d4272004-06-13 20:20:40 +00009847if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
9848 -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 2" >&5
9850printf %s "checking whether or not to look for GTK+ 2... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009851 # Check whether --enable-gtk2-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009852if test ${enable_gtk2_check+y}
9853then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009854 enableval=$enable_gtk2_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009855else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009856 enable_gtk2_check="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009857fi
9858
Illia Bobyra96d5442023-08-30 16:30:15 +02009859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk2_check" >&5
9860printf "%s\n" "$enable_gtk2_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009861 if test "x$enable_gtk2_check" = "xno"; then
9862 SKIP_GTK2=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +02009863 SKIP_GNOME=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +00009864 fi
9865fi
9866
Bram Moolenaar182c5be2010-06-25 05:37:59 +02009867if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GNOME" >&5
9869printf %s "checking whether or not to look for GNOME... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009870 # Check whether --enable-gnome-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009871if test ${enable_gnome_check+y}
9872then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009873 enableval=$enable_gnome_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009874else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009875 enable_gnome_check="no"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009876fi
9877
Illia Bobyra96d5442023-08-30 16:30:15 +02009878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gnome_check" >&5
9879printf "%s\n" "$enable_gnome_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009880 if test "x$enable_gnome_check" = "xno"; then
9881 SKIP_GNOME=YES
9882 fi
9883fi
9884
Bram Moolenaar98921892016-02-23 17:14:37 +01009885if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
9887printf %s "checking whether or not to look for GTK+ 3... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009888 # Check whether --enable-gtk3-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009889if test ${enable_gtk3_check+y}
9890then :
Bram Moolenaar98921892016-02-23 17:14:37 +01009891 enableval=$enable_gtk3_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009892else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +01009893 enable_gtk3_check="yes"
9894fi
9895
Illia Bobyra96d5442023-08-30 16:30:15 +02009896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
9897printf "%s\n" "$enable_gtk3_check" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +01009898 if test "x$enable_gtk3_check" = "xno"; then
9899 SKIP_GTK3=YES
9900 fi
9901fi
9902
Bram Moolenaar071d4272004-06-13 20:20:40 +00009903if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
9905printf %s "checking whether or not to look for Motif... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009906 # Check whether --enable-motif-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009907if test ${enable_motif_check+y}
9908then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009909 enableval=$enable_motif_check;
Illia Bobyra96d5442023-08-30 16:30:15 +02009910else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +00009911 enable_motif_check="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +00009912fi
9913
Illia Bobyra96d5442023-08-30 16:30:15 +02009914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_motif_check" >&5
9915printf "%s\n" "$enable_motif_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009916 if test "x$enable_motif_check" = "xno"; then
9917 SKIP_MOTIF=YES
9918 fi
9919fi
9920
Bram Moolenaar071d4272004-06-13 20:20:40 +00009921
9922
9923
9924
9925
9926
Bram Moolenaar427f5b62019-06-09 13:43:51 +02009927if test "X$PKG_CONFIG" = "X"; then
9928 if test -n "$ac_tool_prefix"; then
Bram Moolenaard6d30422018-01-28 22:48:55 +01009929 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9930set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009931{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9932printf %s "checking for $ac_word... " >&6; }
9933if test ${ac_cv_path_PKG_CONFIG+y}
9934then :
9935 printf %s "(cached) " >&6
9936else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009937 case $PKG_CONFIG in
9938 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009939 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9940 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009941 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9943for as_dir in $PATH
9944do
9945 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009946 case $as_dir in #(((
9947 '') as_dir=./ ;;
9948 */) ;;
9949 *) as_dir=$as_dir/ ;;
9950 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009951 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02009952 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9953 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
9954 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009955 break 2
9956 fi
9957done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009958 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00009959IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009960
Bram Moolenaar071d4272004-06-13 20:20:40 +00009961 ;;
9962esac
9963fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009964PKG_CONFIG=$ac_cv_path_PKG_CONFIG
Bram Moolenaar071d4272004-06-13 20:20:40 +00009965if test -n "$PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9967printf "%s\n" "$PKG_CONFIG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009968else
Illia Bobyra96d5442023-08-30 16:30:15 +02009969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9970printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009971fi
9972
Bram Moolenaar446cb832008-06-24 21:56:24 +00009973
Bram Moolenaard6d30422018-01-28 22:48:55 +01009974fi
9975if test -z "$ac_cv_path_PKG_CONFIG"; then
9976 ac_pt_PKG_CONFIG=$PKG_CONFIG
9977 # Extract the first word of "pkg-config", so it can be a program name with args.
9978set dummy pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009979{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9980printf %s "checking for $ac_word... " >&6; }
9981if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
9982then :
9983 printf %s "(cached) " >&6
9984else $as_nop
Bram Moolenaard6d30422018-01-28 22:48:55 +01009985 case $ac_pt_PKG_CONFIG in
9986 [\\/]* | ?:[\\/]*)
9987 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9988 ;;
9989 *)
9990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9991for as_dir in $PATH
9992do
9993 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009994 case $as_dir in #(((
9995 '') as_dir=./ ;;
9996 */) ;;
9997 *) as_dir=$as_dir/ ;;
9998 esac
Bram Moolenaard6d30422018-01-28 22:48:55 +01009999 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010000 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10001 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
10002 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaard6d30422018-01-28 22:48:55 +010010003 break 2
10004 fi
10005done
10006 done
10007IFS=$as_save_IFS
10008
10009 ;;
10010esac
10011fi
10012ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10013if test -n "$ac_pt_PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10015printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010010016else
Illia Bobyra96d5442023-08-30 16:30:15 +020010017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10018printf "%s\n" "no" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010010019fi
10020
10021 if test "x$ac_pt_PKG_CONFIG" = x; then
10022 PKG_CONFIG="no"
10023 else
10024 case $cross_compiling:$ac_tool_warned in
10025yes:)
Illia Bobyra96d5442023-08-30 16:30:15 +020010026{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10027printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Bram Moolenaard6d30422018-01-28 22:48:55 +010010028ac_tool_warned=yes ;;
10029esac
10030 PKG_CONFIG=$ac_pt_PKG_CONFIG
10031 fi
10032else
10033 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10034fi
10035
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010036fi
10037
10038
10039if test -z "$SKIP_GTK2"; then
10040
Illia Bobyra96d5442023-08-30 16:30:15 +020010041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10042printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010043 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010044if test ${enable_gtktest+y}
10045then :
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010046 enableval=$enable_gtktest;
Illia Bobyra96d5442023-08-30 16:30:15 +020010047else $as_nop
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010048 enable_gtktest=yes
10049fi
10050
10051 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10053printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010054 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10056printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010057 fi
10058
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010059 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010060 save_skip_gtk3=$SKIP_GTK3
10061 SKIP_GTK3=YES
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010062
Bram Moolenaar071d4272004-06-13 20:20:40 +000010063 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10064 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010065 no_gtk=""
10066 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10067 && $PKG_CONFIG --exists gtk+-2.0; then
10068 {
Bram Moolenaar98921892016-02-23 17:14:37 +010010069 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10071printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010072 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010073 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
Bram Moolenaar071d4272004-06-13 20:20:40 +000010074 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10075 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10076 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10077 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10078 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10079 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10080 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10081 }
Bram Moolenaar98921892016-02-23 17:14:37 +010010082 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10083 && $PKG_CONFIG --exists gtk+-3.0; then
10084 {
10085 min_gtk_version=2.2.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10087printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010088
10089 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10090 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10091 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10092 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10093 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10094 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10095 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10096 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10097 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10098 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010099 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10101printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010102 no_gtk=yes
10103 fi
10104
10105 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10106 {
10107 ac_save_CFLAGS="$CFLAGS"
10108 ac_save_LIBS="$LIBS"
10109 CFLAGS="$CFLAGS $GTK_CFLAGS"
10110 LIBS="$LIBS $GTK_LIBS"
10111
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010112 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010113 if test "$cross_compiling" = yes
10114then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010115 echo $ac_n "cross compiling; assumed OK... $ac_c"
Illia Bobyra96d5442023-08-30 16:30:15 +020010116else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010118/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010119
10120#include <gtk/gtk.h>
10121#include <stdio.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000010122#if STDC_HEADERS
10123# include <stdlib.h>
10124# include <stddef.h>
10125#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000010126
10127int
10128main ()
10129{
10130int major, minor, micro;
10131char *tmp_version;
10132
10133system ("touch conf.gtktest");
10134
10135/* HP/UX 9 (%@#!) writes to sscanf strings */
10136tmp_version = g_strdup("$min_gtk_version");
10137if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10138 printf("%s, bad version string\n", "$min_gtk_version");
Zdenek Dohnal549f8c02023-12-14 20:22:49 +010010139 g_free(tmp_version);
Bram Moolenaar071d4272004-06-13 20:20:40 +000010140 exit(1);
10141 }
10142
Zdenek Dohnal549f8c02023-12-14 20:22:49 +010010143g_free(tmp_version);
10144
Bram Moolenaar071d4272004-06-13 20:20:40 +000010145if ((gtk_major_version > major) ||
10146 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10147 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10148 (gtk_micro_version >= micro)))
10149{
10150 return 0;
10151}
10152return 1;
10153}
10154
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010155_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010156if ac_fn_c_try_run "$LINENO"
10157then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010158
Illia Bobyra96d5442023-08-30 16:30:15 +020010159else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010160 no_gtk=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010161fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10163 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010164fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000010165
Bram Moolenaar071d4272004-06-13 20:20:40 +000010166 CFLAGS="$ac_save_CFLAGS"
10167 LIBS="$ac_save_LIBS"
10168 }
10169 fi
10170 if test "x$no_gtk" = x ; then
10171 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10173printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010174 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10176printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010177 fi
Bram Moolenaar7b0294c2004-10-11 10:16:09 +000010178 GUI_LIB_LOC="$GTK_LIBDIR"
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010179 GTK_LIBNAME="$GTK_LIBS"
10180 GUI_INC_LOC="$GTK_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010181 else
10182 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10184printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010185 GTK_CFLAGS=""
10186 GTK_LIBS=""
10187 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010188 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10189 as_fn_error $? "could not configure GTK" "$LINENO" 5
10190 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010191 }
10192 fi
10193 }
10194 else
10195 GTK_CFLAGS=""
10196 GTK_LIBS=""
10197 :
10198 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010199
10200
Bram Moolenaar071d4272004-06-13 20:20:40 +000010201 rm -f conf.gtktest
10202
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010203 if test "x$GTK_CFLAGS" != "x"; then
Bram Moolenaar98921892016-02-23 17:14:37 +010010204 SKIP_GTK3=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010205 SKIP_MOTIF=YES
10206 GUITYPE=GTK
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010207
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010208 else
10209 SKIP_GTK3=$save_skip_gtk3
Bram Moolenaar071d4272004-06-13 20:20:40 +000010210 fi
10211 fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010212 if test "x$GUITYPE" = "xGTK"; then
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010213 if test -z "$SKIP_GNOME"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010214 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000010215
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010216
10217
10218
10219
10220
Bram Moolenaar446cb832008-06-24 21:56:24 +000010221# Check whether --with-gnome-includes was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010222if test ${with_gnome_includes+y}
10223then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010224 withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010225
Bram Moolenaar446cb832008-06-24 21:56:24 +000010226fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010227
10228
Bram Moolenaar446cb832008-06-24 21:56:24 +000010229
10230# Check whether --with-gnome-libs was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010231if test ${with_gnome_libs+y}
10232then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010233 withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010234
Bram Moolenaar446cb832008-06-24 21:56:24 +000010235fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010236
10237
Bram Moolenaar446cb832008-06-24 21:56:24 +000010238
10239# Check whether --with-gnome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010240if test ${with_gnome+y}
10241then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010242 withval=$with_gnome; if test x$withval = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010243 want_gnome=yes
10244 have_gnome=yes
10245 else
10246 if test "x$withval" = xno; then
10247 want_gnome=no
10248 else
10249 want_gnome=yes
10250 LDFLAGS="$LDFLAGS -L$withval/lib"
10251 CFLAGS="$CFLAGS -I$withval/include"
10252 gnome_prefix=$withval/lib
10253 fi
10254 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010255else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000010256 want_gnome=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +000010257fi
10258
Bram Moolenaar071d4272004-06-13 20:20:40 +000010259
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010260 if test "x$want_gnome" = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010261 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
10263printf %s "checking for libgnomeui-2.0... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010264 if $PKG_CONFIG --exists libgnomeui-2.0; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10266printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010267 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
10268 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
10269 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010270
Illia Bobyra96d5442023-08-30 16:30:15 +020010271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
10272printf %s "checking for FreeBSD... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010273 if test "$vim_cv_uname_output" = FreeBSD; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10275printf "%s\n" "yes" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000010276 GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010277 GNOME_LIBS="$GNOME_LIBS -pthread"
10278 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10280printf "%s\n" "no" >&6; }
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000010281 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010282 have_gnome=yes
10283 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10285printf "%s\n" "not found" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010286 if test "x" = xfail; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010010287 as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000010288 fi
10289 fi
10290 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010291 fi
10292
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010293 if test "x$have_gnome" = xyes ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010294 printf "%s\n" "#define FEAT_GUI_GNOME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000010295
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010296 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
10297 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010298 fi
10299 }
10300 fi
10301 fi
10302fi
10303
Bram Moolenaar98921892016-02-23 17:14:37 +010010304
10305if test -z "$SKIP_GTK3"; then
10306
Illia Bobyra96d5442023-08-30 16:30:15 +020010307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10308printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010309 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010310if test ${enable_gtktest+y}
10311then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010312 enableval=$enable_gtktest;
Illia Bobyra96d5442023-08-30 16:30:15 +020010313else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010314 enable_gtktest=yes
10315fi
10316
10317 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10319printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010320 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10322printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010323 fi
10324
Bram Moolenaar98921892016-02-23 17:14:37 +010010325 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010326 save_skip_gtk2=$SKIP_GTK2
10327 SKIP_GTK2=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010328
10329 if test "X$GTK_CONFIG" != "Xno" -o "X$PKG_CONFIG" != "Xno"; then
10330 {
10331 no_gtk=""
10332 if (test "X$SKIP_GTK2" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10333 && $PKG_CONFIG --exists gtk+-2.0; then
10334 {
10335 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10337printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010338 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
10339 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-2.0`
10340 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
10341 gtk_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10342 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10343 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10344 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10345 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
10346 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10347 }
10348 elif (test "X$SKIP_GTK3" != "XYES" -a "X$PKG_CONFIG" != "Xno") \
10349 && $PKG_CONFIG --exists gtk+-3.0; then
10350 {
10351 min_gtk_version=3.0.0
Illia Bobyra96d5442023-08-30 16:30:15 +020010352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10353printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010354
10355 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-3.0`
10356 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L gtk+-3.0`
10357 GTK_LIBS=`$PKG_CONFIG --libs gtk+-3.0`
10358 gtk_major_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10359 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10360 gtk_minor_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10361 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10362 gtk_micro_version=`$PKG_CONFIG --modversion gtk+-3.0 | \
10363 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10364 }
10365 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK -dev package" >&5
10367printf %s "checking for GTK -dev package... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010368 no_gtk=yes
10369 fi
10370
10371 if test "x$enable_gtktest" = "xyes" -a "x$no_gtk" = "x"; then
10372 {
10373 ac_save_CFLAGS="$CFLAGS"
10374 ac_save_LIBS="$LIBS"
10375 CFLAGS="$CFLAGS $GTK_CFLAGS"
10376 LIBS="$LIBS $GTK_LIBS"
10377
10378 rm -f conf.gtktest
Illia Bobyra96d5442023-08-30 16:30:15 +020010379 if test "$cross_compiling" = yes
10380then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010381 echo $ac_n "cross compiling; assumed OK... $ac_c"
Illia Bobyra96d5442023-08-30 16:30:15 +020010382else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10384/* end confdefs.h. */
10385
10386#include <gtk/gtk.h>
10387#include <stdio.h>
10388#if STDC_HEADERS
10389# include <stdlib.h>
10390# include <stddef.h>
10391#endif
10392
10393int
10394main ()
10395{
10396int major, minor, micro;
10397char *tmp_version;
10398
10399system ("touch conf.gtktest");
10400
10401/* HP/UX 9 (%@#!) writes to sscanf strings */
10402tmp_version = g_strdup("$min_gtk_version");
10403if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
10404 printf("%s, bad version string\n", "$min_gtk_version");
10405 exit(1);
10406 }
10407
10408if ((gtk_major_version > major) ||
10409 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
10410 ((gtk_major_version == major) && (gtk_minor_version == minor) &&
10411 (gtk_micro_version >= micro)))
10412{
10413 return 0;
10414}
10415return 1;
10416}
10417
10418_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010419if ac_fn_c_try_run "$LINENO"
10420then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010421
Illia Bobyra96d5442023-08-30 16:30:15 +020010422else $as_nop
Bram Moolenaar98921892016-02-23 17:14:37 +010010423 no_gtk=yes
10424fi
10425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10426 conftest.$ac_objext conftest.beam conftest.$ac_ext
10427fi
10428
10429 CFLAGS="$ac_save_CFLAGS"
10430 LIBS="$ac_save_LIBS"
10431 }
10432 fi
10433 if test "x$no_gtk" = x ; then
10434 if test "x$enable_gtktest" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10436printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010437 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10439printf "%s\n" "found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010440 fi
10441 GUI_LIB_LOC="$GTK_LIBDIR"
10442 GTK_LIBNAME="$GTK_LIBS"
10443 GUI_INC_LOC="$GTK_CFLAGS"
10444 else
10445 {
Illia Bobyra96d5442023-08-30 16:30:15 +020010446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447printf "%s\n" "no" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010448 GTK_CFLAGS=""
10449 GTK_LIBS=""
10450 :
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010451 if test "$fail_if_missing" = "yes" -a "X$gui_auto" != "Xyes"; then
10452 as_fn_error $? "could not configure GTK" "$LINENO" 5
10453 fi
Bram Moolenaar98921892016-02-23 17:14:37 +010010454 }
10455 fi
10456 }
10457 else
10458 GTK_CFLAGS=""
10459 GTK_LIBS=""
10460 :
10461 fi
10462
10463
10464 rm -f conf.gtktest
10465
10466 if test "x$GTK_CFLAGS" != "x"; then
10467 SKIP_GTK2=YES
10468 SKIP_GNOME=YES
Bram Moolenaar98921892016-02-23 17:14:37 +010010469 SKIP_MOTIF=YES
10470 GUITYPE=GTK
10471
Illia Bobyra96d5442023-08-30 16:30:15 +020010472 printf "%s\n" "#define USE_GTK3 1" >>confdefs.h
Bram Moolenaar98921892016-02-23 17:14:37 +010010473
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010474 else
10475 SKIP_GTK2=$save_skip_gtk2
Bram Moolenaar98921892016-02-23 17:14:37 +010010476 fi
10477 fi
10478fi
10479
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010480if test "x$GUITYPE" = "xGTK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
10482printf %s "checking version of Gdk-Pixbuf... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010483 gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
10484 if test "x$gdk_pixbuf_version" != x ; then
10485 gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
10486 sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
10487 if test "x$gdk_pixbuf_version_minor" != x -a \
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010488 $gdk_pixbuf_version_minor -ge 31 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK." >&5
10490printf "%s\n" "OK." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010491 # Extract the first word of "glib-compile-resources", so it can be a program name with args.
10492set dummy glib-compile-resources; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010493{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10494printf %s "checking for $ac_word... " >&6; }
10495if test ${ac_cv_path_GLIB_COMPILE_RESOURCES+y}
10496then :
10497 printf %s "(cached) " >&6
10498else $as_nop
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010499 case $GLIB_COMPILE_RESOURCES in
10500 [\\/]* | ?:[\\/]*)
10501 ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
10502 ;;
10503 *)
10504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10505for as_dir in $PATH
10506do
10507 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010508 case $as_dir in #(((
10509 '') as_dir=./ ;;
10510 */) ;;
10511 *) as_dir=$as_dir/ ;;
10512 esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010513 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010514 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10515 ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir$ac_word$ac_exec_ext"
10516 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010517 break 2
10518 fi
10519done
10520 done
10521IFS=$as_save_IFS
10522
10523 test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
10524 ;;
10525esac
10526fi
10527GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
10528if test -n "$GLIB_COMPILE_RESOURCES"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
10530printf "%s\n" "$GLIB_COMPILE_RESOURCES" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010531else
Illia Bobyra96d5442023-08-30 16:30:15 +020010532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10533printf "%s\n" "no" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010534fi
10535
10536
Illia Bobyra96d5442023-08-30 16:30:15 +020010537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
10538printf %s "checking glib-compile-resources... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010539 if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010540 GLIB_COMPILE_RESOURCES=""
Illia Bobyra96d5442023-08-30 16:30:15 +020010541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
10542printf "%s\n" "cannot be found in PATH." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010543 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: usable." >&5
10545printf "%s\n" "usable." >&6; }
10546 printf "%s\n" "#define USE_GRESOURCE 1" >>confdefs.h
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010547
Bram Moolenaar33c31d52016-02-22 21:07:06 +010010548 GRESOURCE_SRC="auto/gui_gtk_gresources.c"
10549 GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010550 fi
10551 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
10553printf "%s\n" "not usable." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010554 fi
10555 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
10557printf "%s\n" "cannot obtain from pkg_config." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010558 fi
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010559
Illia Bobyra96d5442023-08-30 16:30:15 +020010560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
10561printf %s "checking --disable-icon-cache-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010562 # Check whether --enable-icon_cache_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010563if test ${enable_icon_cache_update+y}
10564then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010565 enableval=$enable_icon_cache_update;
Illia Bobyra96d5442023-08-30 16:30:15 +020010566else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010567 enable_icon_cache_update="yes"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010568fi
10569
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010570 if test "$enable_icon_cache_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10572printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010573 # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
10574set dummy gtk-update-icon-cache; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10576printf %s "checking for $ac_word... " >&6; }
10577if test ${ac_cv_path_GTK_UPDATE_ICON_CACHE+y}
10578then :
10579 printf %s "(cached) " >&6
10580else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010581 case $GTK_UPDATE_ICON_CACHE in
10582 [\\/]* | ?:[\\/]*)
10583 ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
10584 ;;
10585 *)
10586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10587for as_dir in $PATH
10588do
10589 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010590 case $as_dir in #(((
10591 '') as_dir=./ ;;
10592 */) ;;
10593 *) as_dir=$as_dir/ ;;
10594 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010595 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010596 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10597 ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir$ac_word$ac_exec_ext"
10598 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010599 break 2
10600 fi
10601done
10602 done
10603IFS=$as_save_IFS
10604
10605 test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
10606 ;;
10607esac
10608fi
10609GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
10610if test -n "$GTK_UPDATE_ICON_CACHE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
10612printf "%s\n" "$GTK_UPDATE_ICON_CACHE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010613else
Illia Bobyra96d5442023-08-30 16:30:15 +020010614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10615printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010616fi
10617
10618
10619 if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10621printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010622 fi
10623 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10625printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010626 fi
10627
Illia Bobyra96d5442023-08-30 16:30:15 +020010628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
10629printf %s "checking --disable-desktop-database-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010630 # Check whether --enable-desktop_database_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010631if test ${enable_desktop_database_update+y}
10632then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010633 enableval=$enable_desktop_database_update;
Illia Bobyra96d5442023-08-30 16:30:15 +020010634else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010635 enable_desktop_database_update="yes"
10636fi
10637
10638 if test "$enable_desktop_database_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
10640printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010641 # Extract the first word of "update-desktop-database", so it can be a program name with args.
10642set dummy update-desktop-database; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010643{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10644printf %s "checking for $ac_word... " >&6; }
10645if test ${ac_cv_path_UPDATE_DESKTOP_DATABASE+y}
10646then :
10647 printf %s "(cached) " >&6
10648else $as_nop
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010649 case $UPDATE_DESKTOP_DATABASE in
10650 [\\/]* | ?:[\\/]*)
10651 ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
10652 ;;
10653 *)
10654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10655for as_dir in $PATH
10656do
10657 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010658 case $as_dir in #(((
10659 '') as_dir=./ ;;
10660 */) ;;
10661 *) as_dir=$as_dir/ ;;
10662 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010663 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010664 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10665 ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir$ac_word$ac_exec_ext"
10666 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010667 break 2
10668 fi
10669done
10670 done
10671IFS=$as_save_IFS
10672
10673 test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
10674 ;;
10675esac
10676fi
10677UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
10678if test -n "$UPDATE_DESKTOP_DATABASE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
10680printf "%s\n" "$UPDATE_DESKTOP_DATABASE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010681else
Illia Bobyra96d5442023-08-30 16:30:15 +020010682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10683printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010684fi
10685
10686
10687 if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
10689printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010690 fi
10691 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
10693printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020010694 fi
10695fi
10696
10697
10698
Bram Moolenaar36e294c2015-12-29 18:55:46 +010010699
10700
10701
10702
Bram Moolenaar071d4272004-06-13 20:20:40 +000010703if test -z "$SKIP_MOTIF"; then
10704 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"
10705 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
10706
Illia Bobyra96d5442023-08-30 16:30:15 +020010707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
10708printf %s "checking for location of Motif GUI includes... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010709 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
10710 GUI_INC_LOC=
10711 for try in $gui_includes; do
10712 if test -f "$try/Xm/Xm.h"; then
10713 GUI_INC_LOC=$try
10714 fi
10715 done
10716 if test -n "$GUI_INC_LOC"; then
10717 if test "$GUI_INC_LOC" = /usr/include; then
10718 GUI_INC_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020010719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10720printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010721 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
10723printf "%s\n" "$GUI_INC_LOC" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010724 fi
10725 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10727printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010728 SKIP_MOTIF=YES
10729 fi
10730fi
10731
10732
10733if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
10735printf %s "checking --with-motif-lib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010736
Bram Moolenaar446cb832008-06-24 21:56:24 +000010737# Check whether --with-motif-lib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010738if test ${with_motif_lib+y}
10739then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010740 withval=$with_motif_lib; MOTIF_LIBNAME="${withval}"
10741fi
10742
Bram Moolenaar071d4272004-06-13 20:20:40 +000010743
10744 if test -n "$MOTIF_LIBNAME"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
10746printf "%s\n" "$MOTIF_LIBNAME" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010747 GUI_LIB_LOC=
10748 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10750printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010751
10752 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
10753
Illia Bobyra96d5442023-08-30 16:30:15 +020010754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
10755printf %s "checking for location of Motif GUI libs... " >&6; }
Bram Moolenaar01967f52023-04-12 16:24:03 +010010756 gui_libs="`echo $x_libraries|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/lib/g` /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu `echo "$GUI_INC_LOC" | sed s/include/lib/` $GUI_LIB_LOC"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010757 GUI_LIB_LOC=
10758 for try in $gui_libs; do
Kelvin Leeb4716902022-04-04 17:20:01 +010010759 for libtry in "$try"/libXm.a "$try"/libXm.dll.a "$try"/libXm.so* "$try"/libXm.sl "$try"/libXm.dylib; do
Bram Moolenaar071d4272004-06-13 20:20:40 +000010760 if test -f "$libtry"; then
10761 GUI_LIB_LOC=$try
10762 fi
10763 done
10764 done
10765 if test -n "$GUI_LIB_LOC"; then
Bram Moolenaar01967f52023-04-12 16:24:03 +010010766 if test "$GUI_LIB_LOC" = /usr/lib \
10767 -o "$GUI_LIB_LOC" = /usr/lib64 \
Bram Moolenaar6324c3b2013-06-17 20:27:18 +020010768 -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
10769 -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010770 GUI_LIB_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020010771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
10772printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010773 else
10774 if test -n "$GUI_LIB_LOC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
10776printf "%s\n" "$GUI_LIB_LOC" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010777 if test "$vim_cv_uname_output" = SunOS &&
10778 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010779 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
10780 fi
10781 fi
10782 fi
10783 MOTIF_LIBNAME=-lXm
10784 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
10786printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010787 SKIP_MOTIF=YES
10788 fi
10789 fi
10790fi
10791
10792if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010793 GUITYPE=MOTIF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010794
Bram Moolenaar071d4272004-06-13 20:20:40 +000010795fi
10796
Bram Moolenaare2adcf32022-03-12 11:57:25 +000010797if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010798 if test -n "$GUI_INC_LOC"; then
10799 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
10800 fi
10801 if test -n "$GUI_LIB_LOC"; then
10802 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
10803 fi
10804
10805 ldflags_save=$LDFLAGS
10806 LDFLAGS="$X_LIBS $LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020010807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
10808printf %s "checking for XShapeQueryExtension in -lXext... " >&6; }
10809if test ${ac_cv_lib_Xext_XShapeQueryExtension+y}
10810then :
10811 printf %s "(cached) " >&6
10812else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010813 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010814LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010816/* end confdefs.h. */
10817
Bram Moolenaar446cb832008-06-24 21:56:24 +000010818/* Override any GCC internal prototype to avoid an error.
10819 Use char because int might match the return type of a GCC
10820 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010821char XShapeQueryExtension ();
10822int
Illia Bobyra96d5442023-08-30 16:30:15 +020010823main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010824{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010825return XShapeQueryExtension ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010826 ;
10827 return 0;
10828}
10829_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010830if ac_fn_c_try_link "$LINENO"
10831then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010832 ac_cv_lib_Xext_XShapeQueryExtension=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010833else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010834 ac_cv_lib_Xext_XShapeQueryExtension=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010835fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010836rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010837 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010838LIBS=$ac_check_lib_save_LIBS
10839fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010840{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
10841printf "%s\n" "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
10842if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes
10843then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010844 GUI_X_LIBS="-lXext"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010845fi
10846
Illia Bobyra96d5442023-08-30 16:30:15 +020010847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
10848printf %s "checking for wslen in -lw... " >&6; }
10849if test ${ac_cv_lib_w_wslen+y}
10850then :
10851 printf %s "(cached) " >&6
10852else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010853 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010854LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010856/* end confdefs.h. */
10857
Bram Moolenaar446cb832008-06-24 21:56:24 +000010858/* Override any GCC internal prototype to avoid an error.
10859 Use char because int might match the return type of a GCC
10860 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010861char wslen ();
10862int
Illia Bobyra96d5442023-08-30 16:30:15 +020010863main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010864{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010865return wslen ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010866 ;
10867 return 0;
10868}
10869_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010870if ac_fn_c_try_link "$LINENO"
10871then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010872 ac_cv_lib_w_wslen=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010873else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010874 ac_cv_lib_w_wslen=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010875fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010876rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010877 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010878LIBS=$ac_check_lib_save_LIBS
10879fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010880{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
10881printf "%s\n" "$ac_cv_lib_w_wslen" >&6; }
10882if test "x$ac_cv_lib_w_wslen" = xyes
10883then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010884 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010885fi
10886
Illia Bobyra96d5442023-08-30 16:30:15 +020010887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
10888printf %s "checking for dlsym in -ldl... " >&6; }
10889if test ${ac_cv_lib_dl_dlsym+y}
10890then :
10891 printf %s "(cached) " >&6
10892else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010893 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010894LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010896/* end confdefs.h. */
10897
Bram Moolenaar446cb832008-06-24 21:56:24 +000010898/* Override any GCC internal prototype to avoid an error.
10899 Use char because int might match the return type of a GCC
10900 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010901char dlsym ();
10902int
Illia Bobyra96d5442023-08-30 16:30:15 +020010903main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010904{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010905return dlsym ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010906 ;
10907 return 0;
10908}
10909_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010910if ac_fn_c_try_link "$LINENO"
10911then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010912 ac_cv_lib_dl_dlsym=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010913else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010914 ac_cv_lib_dl_dlsym=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010915fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010916rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010917 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010918LIBS=$ac_check_lib_save_LIBS
10919fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010920{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
10921printf "%s\n" "$ac_cv_lib_dl_dlsym" >&6; }
10922if test "x$ac_cv_lib_dl_dlsym" = xyes
10923then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010924 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010925fi
10926
Illia Bobyra96d5442023-08-30 16:30:15 +020010927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
10928printf %s "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
10929if test ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+y}
10930then :
10931 printf %s "(cached) " >&6
10932else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010933 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010934LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010936/* end confdefs.h. */
10937
Bram Moolenaar446cb832008-06-24 21:56:24 +000010938/* Override any GCC internal prototype to avoid an error.
10939 Use char because int might match the return type of a GCC
10940 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010941char XmuCreateStippledPixmap ();
10942int
Illia Bobyra96d5442023-08-30 16:30:15 +020010943main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010944{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010945return XmuCreateStippledPixmap ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010946 ;
10947 return 0;
10948}
10949_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010950if ac_fn_c_try_link "$LINENO"
10951then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010952 ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010953else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010954 ac_cv_lib_Xmu_XmuCreateStippledPixmap=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010955fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010956rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010957 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010958LIBS=$ac_check_lib_save_LIBS
10959fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010960{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
10961printf "%s\n" "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
10962if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes
10963then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010964 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010965fi
10966
10967 if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
10969printf %s "checking for XpEndJob in -lXp... " >&6; }
10970if test ${ac_cv_lib_Xp_XpEndJob+y}
10971then :
10972 printf %s "(cached) " >&6
10973else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010974 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010975LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010977/* end confdefs.h. */
10978
Bram Moolenaar446cb832008-06-24 21:56:24 +000010979/* Override any GCC internal prototype to avoid an error.
10980 Use char because int might match the return type of a GCC
10981 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010982char XpEndJob ();
10983int
Illia Bobyra96d5442023-08-30 16:30:15 +020010984main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010985{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010986return XpEndJob ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010987 ;
10988 return 0;
10989}
10990_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010991if ac_fn_c_try_link "$LINENO"
10992then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010993 ac_cv_lib_Xp_XpEndJob=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010994else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010995 ac_cv_lib_Xp_XpEndJob=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000010996fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010997rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010998 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010999LIBS=$ac_check_lib_save_LIBS
11000fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011001{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
11002printf "%s\n" "$ac_cv_lib_Xp_XpEndJob" >&6; }
11003if test "x$ac_cv_lib_Xp_XpEndJob" = xyes
11004then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011005 GUI_X_LIBS="-lXp $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011006fi
11007
11008 fi
11009 LDFLAGS=$ldflags_save
11010
Illia Bobyra96d5442023-08-30 16:30:15 +020011011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
11012printf %s "checking for extra X11 defines... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011013 NARROW_PROTO=
11014 rm -fr conftestdir
11015 if mkdir conftestdir; then
11016 cd conftestdir
11017 cat > Imakefile <<'EOF'
11018acfindx:
11019 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
11020EOF
11021 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11022 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11023 fi
11024 cd ..
11025 rm -fr conftestdir
11026 fi
11027 if test -z "$NARROW_PROTO"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11029printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011030 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
11032printf "%s\n" "$NARROW_PROTO" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011033 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011034
Bram Moolenaar071d4272004-06-13 20:20:40 +000011035fi
11036
11037if test "$enable_xsmp" = "yes"; then
11038 cppflags_save=$CPPFLAGS
11039 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011040 ac_fn_c_check_header_compile "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
11041if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes
11042then :
11043 printf "%s\n" "#define HAVE_X11_SM_SMLIB_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011044
11045fi
11046
Bram Moolenaar071d4272004-06-13 20:20:40 +000011047 CPPFLAGS=$cppflags_save
11048fi
11049
11050
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011051if test -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011052 cppflags_save=$CPPFLAGS
11053 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011054 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
11055if test "x$ac_cv_header_X11_xpm_h" = xyes
11056then :
11057 printf "%s\n" "#define HAVE_X11_XPM_H 1" >>confdefs.h
11058
11059fi
11060ac_fn_c_check_header_compile "$LINENO" "X11/Sunkeysym.h" "ac_cv_header_X11_Sunkeysym_h" "$ac_includes_default"
11061if test "x$ac_cv_header_X11_Sunkeysym_h" = xyes
11062then :
11063 printf "%s\n" "#define HAVE_X11_SUNKEYSYM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011064
11065fi
11066
Bram Moolenaar071d4272004-06-13 20:20:40 +000011067
11068 if test ! "$enable_xim" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
11070printf %s "checking for XIMText in X11/Xlib.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011072/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011073#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011074_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020011076 $EGREP "XIMText" >/dev/null 2>&1
11077then :
11078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11079printf "%s\n" "yes" >&6; }
11080else $as_nop
11081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
11082printf "%s\n" "no; xim has been disabled" >&6; }; enable_xim="no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011083fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011084rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011085
11086 fi
11087 CPPFLAGS=$cppflags_save
11088
Bram Moolenaar54612582019-11-21 17:13:31 +010011089 if test "$enable_xim" = "auto" -a "x$GUITYPE" != "xNONE" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
11091printf "%s\n" "X GUI selected; xim has been enabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011092 enable_xim="yes"
11093 fi
11094fi
11095
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011096if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011097 cppflags_save=$CPPFLAGS
11098 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
11100printf %s "checking for X11/Xmu/Editres.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011102/* end confdefs.h. */
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011103
11104#include <X11/Intrinsic.h>
11105#include <X11/Xmu/Editres.h>
11106int
Illia Bobyra96d5442023-08-30 16:30:15 +020011107main (void)
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011108{
11109int i; i = 0;
11110 ;
11111 return 0;
11112}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011113_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011114if ac_fn_c_try_compile "$LINENO"
11115then :
11116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11117printf "%s\n" "yes" >&6; }
11118 printf "%s\n" "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011119
Illia Bobyra96d5442023-08-30 16:30:15 +020011120else $as_nop
11121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11122printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011123fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011124rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011125 CPPFLAGS=$cppflags_save
11126fi
11127
11128if test -z "$SKIP_MOTIF"; then
11129 cppflags_save=$CPPFLAGS
11130 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaar77c19352012-06-13 19:19:41 +020011131 if test "$zOSUnix" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011132 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11133if test "x$ac_cv_header_Xm_Xm_h" = xyes
11134then :
11135 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011136
11137fi
11138
Bram Moolenaar77c19352012-06-13 19:19:41 +020011139 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011140 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11141if test "x$ac_cv_header_Xm_Xm_h" = xyes
11142then :
11143 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011144
11145fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011146ac_fn_c_check_header_compile "$LINENO" "Xm/XpmP.h" "ac_cv_header_Xm_XpmP_h" "$ac_includes_default"
11147if test "x$ac_cv_header_Xm_XpmP_h" = xyes
11148then :
11149 printf "%s\n" "#define HAVE_XM_XPMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011150
Illia Bobyra96d5442023-08-30 16:30:15 +020011151fi
11152ac_fn_c_check_header_compile "$LINENO" "Xm/JoinSideT.h" "ac_cv_header_Xm_JoinSideT_h" "$ac_includes_default"
11153if test "x$ac_cv_header_Xm_JoinSideT_h" = xyes
11154then :
11155 printf "%s\n" "#define HAVE_XM_JOINSIDET_H 1" >>confdefs.h
11156
11157fi
11158ac_fn_c_check_header_compile "$LINENO" "Xm/TraitP.h" "ac_cv_header_Xm_TraitP_h" "$ac_includes_default"
11159if test "x$ac_cv_header_Xm_TraitP_h" = xyes
11160then :
11161 printf "%s\n" "#define HAVE_XM_TRAITP_H 1" >>confdefs.h
11162
11163fi
11164ac_fn_c_check_header_compile "$LINENO" "Xm/Manager.h" "ac_cv_header_Xm_Manager_h" "$ac_includes_default"
11165if test "x$ac_cv_header_Xm_Manager_h" = xyes
11166then :
11167 printf "%s\n" "#define HAVE_XM_MANAGER_H 1" >>confdefs.h
11168
11169fi
11170ac_fn_c_check_header_compile "$LINENO" "Xm/UnhighlightT.h" "ac_cv_header_Xm_UnhighlightT_h" "$ac_includes_default"
11171if test "x$ac_cv_header_Xm_UnhighlightT_h" = xyes
11172then :
11173 printf "%s\n" "#define HAVE_XM_UNHIGHLIGHTT_H 1" >>confdefs.h
11174
11175fi
11176ac_fn_c_check_header_compile "$LINENO" "Xm/Notebook.h" "ac_cv_header_Xm_Notebook_h" "$ac_includes_default"
11177if test "x$ac_cv_header_Xm_Notebook_h" = xyes
11178then :
11179 printf "%s\n" "#define HAVE_XM_NOTEBOOK_H 1" >>confdefs.h
11180
11181fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011182
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011183 fi
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011184
Bram Moolenaar77c19352012-06-13 19:19:41 +020011185 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
11187printf %s "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011189/* end confdefs.h. */
11190#include <Xm/XpmP.h>
11191int
Illia Bobyra96d5442023-08-30 16:30:15 +020011192main (void)
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011193{
11194XpmAttributes_21 attr;
11195 ;
11196 return 0;
11197}
11198_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011199if ac_fn_c_try_compile "$LINENO"
11200then :
11201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11202printf "%s\n" "yes" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011203
Illia Bobyra96d5442023-08-30 16:30:15 +020011204else $as_nop
11205 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11206printf "%s\n" "no" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011207
11208
11209fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011210rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011211 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011212 printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011213
11214 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011215 CPPFLAGS=$cppflags_save
11216fi
11217
11218if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
11220printf "%s\n" "no GUI selected; xim has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011221 enable_xim="no"
11222fi
11223if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
11225printf "%s\n" "no GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011226 enable_fontset="no"
11227fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011228if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
11230printf "%s\n" "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011231 enable_fontset="no"
11232fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011233
Bram Moolenaarb3f74062020-02-26 16:16:53 +010011234if test -z "$SKIP_HAIKU"; then
11235 GUITYPE=HAIKUGUI
11236fi
11237
Bram Moolenaar071d4272004-06-13 20:20:40 +000011238if test -z "$SKIP_PHOTON"; then
11239 GUITYPE=PHOTONGUI
11240fi
11241
11242
11243
11244
11245
11246
11247if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010011248 as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000011249fi
11250
11251if test "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011252 printf "%s\n" "#define FEAT_XIM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011253
11254fi
11255if test "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011256 printf "%s\n" "#define FEAT_XFONTSET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011257
11258fi
11259
11260
11261
Illia Bobyra96d5442023-08-30 16:30:15 +020011262{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /proc link to executable" >&5
11263printf %s "checking for /proc link to executable... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011264if test -L "/proc/self/exe"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/exe" >&5
11266printf "%s\n" "/proc/self/exe" >&6; }
11267 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/exe\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011268
11269elif test -L "/proc/self/path/a.out"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/path/a.out" >&5
11271printf "%s\n" "/proc/self/path/a.out" >&6; }
11272 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/path/a.out\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011273
11274elif test -L "/proc/curproc/file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/curproc/file" >&5
11276printf "%s\n" "/proc/curproc/file" >&6; }
11277 printf "%s\n" "#define PROC_EXE_LINK \"/proc/curproc/file\"" >>confdefs.h
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011278
11279else
Illia Bobyra96d5442023-08-30 16:30:15 +020011280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11281printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011282fi
11283
Illia Bobyra96d5442023-08-30 16:30:15 +020011284{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
11285printf %s "checking for CYGWIN or MSYS environment... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011286case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +020011287 CYGWIN*|MSYS*) CYGWIN=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11288printf "%s\n" "yes" >&6; }
11289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
11290printf %s "checking for CYGWIN clipboard support... " >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011291 if test "x$with_x" = "xno" ; then
11292 OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
Illia Bobyra96d5442023-08-30 16:30:15 +020011293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11294printf "%s\n" "yes" >&6; }
11295 printf "%s\n" "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011296
11297 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
11299printf "%s\n" "no - using X11" >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011300 fi ;;
11301
Illia Bobyra96d5442023-08-30 16:30:15 +020011302 *) CYGWIN=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11303printf "%s\n" "no" >&6; };;
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011304esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011305
Bram Moolenaar071d4272004-06-13 20:20:40 +000011306
Illia Bobyra96d5442023-08-30 16:30:15 +020011307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
11308printf %s "checking whether toupper is broken... " >&6; }
11309if test ${vim_cv_toupper_broken+y}
11310then :
11311 printf %s "(cached) " >&6
11312else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011313
Illia Bobyra96d5442023-08-30 16:30:15 +020011314 if test "$cross_compiling" = yes
11315then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011316
Bram Moolenaar7db77842014-03-27 17:40:59 +010011317 as_fn_error $? "cross-compiling: please set 'vim_cv_toupper_broken'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000011318
Illia Bobyra96d5442023-08-30 16:30:15 +020011319else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11321/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011322
11323#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011324#include <ctype.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000011325#if STDC_HEADERS
11326# include <stdlib.h>
11327# include <stddef.h>
11328#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010011329int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011330
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011331_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011332if ac_fn_c_try_run "$LINENO"
11333then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011334
11335 vim_cv_toupper_broken=yes
11336
Illia Bobyra96d5442023-08-30 16:30:15 +020011337else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011338
11339 vim_cv_toupper_broken=no
11340
Bram Moolenaar071d4272004-06-13 20:20:40 +000011341fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11343 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011344fi
11345
Bram Moolenaar446cb832008-06-24 21:56:24 +000011346fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011347{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
11348printf "%s\n" "$vim_cv_toupper_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011349
11350if test "x$vim_cv_toupper_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011351 printf "%s\n" "#define BROKEN_TOUPPER 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000011352
11353fi
11354
Illia Bobyra96d5442023-08-30 16:30:15 +020011355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
11356printf %s "checking whether __DATE__ and __TIME__ work... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011358/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000011359#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011360int
Illia Bobyra96d5442023-08-30 16:30:15 +020011361main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011362{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011363printf("(" __DATE__ " " __TIME__ ")");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011364 ;
11365 return 0;
11366}
11367_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011368if ac_fn_c_try_compile "$LINENO"
11369then :
11370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11371printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DATE_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011372
Illia Bobyra96d5442023-08-30 16:30:15 +020011373else $as_nop
11374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11375printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011376fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011377rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011378
Illia Bobyra96d5442023-08-30 16:30:15 +020011379{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
11380printf %s "checking whether __attribute__((unused)) is allowed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011382/* end confdefs.h. */
11383#include <stdio.h>
11384int
Illia Bobyra96d5442023-08-30 16:30:15 +020011385main (void)
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011386{
11387int x __attribute__((unused));
11388 ;
11389 return 0;
11390}
11391_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011392if ac_fn_c_try_compile "$LINENO"
11393then :
11394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11395printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011396
Illia Bobyra96d5442023-08-30 16:30:15 +020011397else $as_nop
11398 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11399printf "%s\n" "no" >&6; }
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011400fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011401rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000011402
Illia Bobyra96d5442023-08-30 16:30:15 +020011403ac_fn_c_check_header_compile "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default"
11404if test "x$ac_cv_header_elf_h" = xyes
11405then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011406 HAS_ELF=1
Bram Moolenaar071d4272004-06-13 20:20:40 +000011407fi
11408
11409if test "$HAS_ELF" = 1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lelf" >&5
11411printf %s "checking for main in -lelf... " >&6; }
11412if test ${ac_cv_lib_elf_main+y}
11413then :
11414 printf %s "(cached) " >&6
11415else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011416 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011417LIBS="-lelf $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011419/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011420
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011421
11422int
Illia Bobyra96d5442023-08-30 16:30:15 +020011423main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011424{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011425return main ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011426 ;
11427 return 0;
11428}
11429_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011430if ac_fn_c_try_link "$LINENO"
11431then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011432 ac_cv_lib_elf_main=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020011433else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011434 ac_cv_lib_elf_main=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000011435fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011436rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011437 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011438LIBS=$ac_check_lib_save_LIBS
11439fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011440{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_main" >&5
11441printf "%s\n" "$ac_cv_lib_elf_main" >&6; }
11442if test "x$ac_cv_lib_elf_main" = xyes
11443then :
11444 printf "%s\n" "#define HAVE_LIBELF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011445
11446 LIBS="-lelf $LIBS"
11447
Bram Moolenaar071d4272004-06-13 20:20:40 +000011448fi
11449
11450fi
11451
11452ac_header_dirent=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011453for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011454 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11455{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
11456printf %s "checking for $ac_hdr that defines DIR... " >&6; }
11457if eval test \${$as_ac_Header+y}
11458then :
11459 printf %s "(cached) " >&6
11460else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011462/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011463#include <sys/types.h>
11464#include <$ac_hdr>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011465
11466int
Illia Bobyra96d5442023-08-30 16:30:15 +020011467main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011468{
11469if ((DIR *) 0)
11470return 0;
11471 ;
11472 return 0;
11473}
11474_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011475if ac_fn_c_try_compile "$LINENO"
11476then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011477 eval "$as_ac_Header=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +020011478else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011479 eval "$as_ac_Header=no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011480fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011481rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011482fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011483eval ac_res=\$$as_ac_Header
Illia Bobyra96d5442023-08-30 16:30:15 +020011484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11485printf "%s\n" "$ac_res" >&6; }
11486if eval test \"x\$"$as_ac_Header"\" = x"yes"
11487then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011488 cat >>confdefs.h <<_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011489#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011490_ACEOF
11491
11492ac_header_dirent=$ac_hdr; break
Bram Moolenaar071d4272004-06-13 20:20:40 +000011493fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011494
Bram Moolenaar071d4272004-06-13 20:20:40 +000011495done
11496# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11497if test $ac_header_dirent = dirent.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11499printf %s "checking for library containing opendir... " >&6; }
11500if test ${ac_cv_search_opendir+y}
11501then :
11502 printf %s "(cached) " >&6
11503else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011504 ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011506/* end confdefs.h. */
11507
Bram Moolenaar446cb832008-06-24 21:56:24 +000011508/* Override any GCC internal prototype to avoid an error.
11509 Use char because int might match the return type of a GCC
11510 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011511char opendir ();
11512int
Illia Bobyra96d5442023-08-30 16:30:15 +020011513main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011514{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011515return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011516 ;
11517 return 0;
11518}
11519_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011520for ac_lib in '' dir
11521do
Bram Moolenaar446cb832008-06-24 21:56:24 +000011522 if test -z "$ac_lib"; then
11523 ac_res="none required"
11524 else
11525 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011526 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000011527 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011528 if ac_fn_c_try_link "$LINENO"
11529then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011530 ac_cv_search_opendir=$ac_res
Bram Moolenaar071d4272004-06-13 20:20:40 +000011531fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011532rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011533 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020011534 if test ${ac_cv_search_opendir+y}
11535then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011536 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011537fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000011538done
Illia Bobyra96d5442023-08-30 16:30:15 +020011539if test ${ac_cv_search_opendir+y}
11540then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011541
Illia Bobyra96d5442023-08-30 16:30:15 +020011542else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011543 ac_cv_search_opendir=no
11544fi
11545rm conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011546LIBS=$ac_func_search_save_LIBS
11547fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11549printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011550ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020011551if test "$ac_res" != no
11552then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011553 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011554
11555fi
11556
Bram Moolenaar071d4272004-06-13 20:20:40 +000011557else
Illia Bobyra96d5442023-08-30 16:30:15 +020011558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
11559printf %s "checking for library containing opendir... " >&6; }
11560if test ${ac_cv_search_opendir+y}
11561then :
11562 printf %s "(cached) " >&6
11563else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011564 ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011566/* end confdefs.h. */
11567
Bram Moolenaar446cb832008-06-24 21:56:24 +000011568/* Override any GCC internal prototype to avoid an error.
11569 Use char because int might match the return type of a GCC
11570 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011571char opendir ();
11572int
Illia Bobyra96d5442023-08-30 16:30:15 +020011573main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011574{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011575return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011576 ;
11577 return 0;
11578}
11579_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011580for ac_lib in '' x
11581do
Bram Moolenaar446cb832008-06-24 21:56:24 +000011582 if test -z "$ac_lib"; then
11583 ac_res="none required"
11584 else
11585 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011586 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000011587 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011588 if ac_fn_c_try_link "$LINENO"
11589then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011590 ac_cv_search_opendir=$ac_res
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011591fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011592rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011593 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020011594 if test ${ac_cv_search_opendir+y}
11595then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011596 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011597fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000011598done
Illia Bobyra96d5442023-08-30 16:30:15 +020011599if test ${ac_cv_search_opendir+y}
11600then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011601
Illia Bobyra96d5442023-08-30 16:30:15 +020011602else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000011603 ac_cv_search_opendir=no
11604fi
11605rm conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011606LIBS=$ac_func_search_save_LIBS
11607fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011608{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
11609printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000011610ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020011611if test "$ac_res" != no
11612then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011613 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011614
11615fi
11616
11617fi
11618
11619
Bram Moolenaar071d4272004-06-13 20:20:40 +000011620if test $ac_cv_header_sys_wait_h = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011621 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
11622printf %s "checking for sys/wait.h that defines union wait... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011624/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011625#include <sys/wait.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011626int
Illia Bobyra96d5442023-08-30 16:30:15 +020011627main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011628{
Bram Moolenaar071d4272004-06-13 20:20:40 +000011629union wait xx, yy; xx = yy
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011630 ;
11631 return 0;
11632}
11633_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011634if ac_fn_c_try_compile "$LINENO"
11635then :
11636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11637printf "%s\n" "yes" >&6; }
11638 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011639
Illia Bobyra96d5442023-08-30 16:30:15 +020011640 printf "%s\n" "#define HAVE_UNION_WAIT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011641
Illia Bobyra96d5442023-08-30 16:30:15 +020011642else $as_nop
11643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11644printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011645fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011646rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011647fi
11648
Illia Bobyra96d5442023-08-30 16:30:15 +020011649ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
11650if test "x$ac_cv_header_stdint_h" = xyes
11651then :
11652 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
11653
11654fi
11655ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
11656if test "x$ac_cv_header_stdlib_h" = xyes
11657then :
11658 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
11659
11660fi
11661ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
11662if test "x$ac_cv_header_string_h" = xyes
11663then :
11664 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
11665
11666fi
11667ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
11668if test "x$ac_cv_header_sys_select_h" = xyes
11669then :
11670 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
11671
11672fi
11673ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
11674if test "x$ac_cv_header_sys_utsname_h" = xyes
11675then :
11676 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
11677
11678fi
11679ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default"
11680if test "x$ac_cv_header_termcap_h" = xyes
11681then :
11682 printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h
11683
11684fi
11685ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
11686if test "x$ac_cv_header_fcntl_h" = xyes
11687then :
11688 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
11689
11690fi
11691ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default"
11692if test "x$ac_cv_header_sgtty_h" = xyes
11693then :
11694 printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h
11695
11696fi
11697ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
11698if test "x$ac_cv_header_sys_ioctl_h" = xyes
11699then :
11700 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
11701
11702fi
11703ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
11704if test "x$ac_cv_header_sys_time_h" = xyes
11705then :
11706 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
11707
11708fi
11709ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
11710if test "x$ac_cv_header_sys_types_h" = xyes
11711then :
11712 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
11713
11714fi
11715ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
11716if test "x$ac_cv_header_termio_h" = xyes
11717then :
11718 printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
11719
11720fi
11721ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
11722if test "x$ac_cv_header_iconv_h" = xyes
11723then :
11724 printf "%s\n" "#define HAVE_ICONV_H 1" >>confdefs.h
11725
11726fi
11727ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
11728if test "x$ac_cv_header_inttypes_h" = xyes
11729then :
11730 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
11731
11732fi
11733ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
11734if test "x$ac_cv_header_langinfo_h" = xyes
11735then :
11736 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
11737
11738fi
11739ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
11740if test "x$ac_cv_header_math_h" = xyes
11741then :
11742 printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h
11743
11744fi
11745ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
11746if test "x$ac_cv_header_unistd_h" = xyes
11747then :
11748 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
11749
11750fi
11751ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
11752if test "x$ac_cv_header_stropts_h" = xyes
11753then :
11754 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
11755
11756fi
11757ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
11758if test "x$ac_cv_header_errno_h" = xyes
11759then :
11760 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
11761
11762fi
11763ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
11764if test "x$ac_cv_header_sys_resource_h" = xyes
11765then :
11766 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
11767
11768fi
11769ac_fn_c_check_header_compile "$LINENO" "sys/systeminfo.h" "ac_cv_header_sys_systeminfo_h" "$ac_includes_default"
11770if test "x$ac_cv_header_sys_systeminfo_h" = xyes
11771then :
11772 printf "%s\n" "#define HAVE_SYS_SYSTEMINFO_H 1" >>confdefs.h
11773
11774fi
11775ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
11776if test "x$ac_cv_header_locale_h" = xyes
11777then :
11778 printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
11779
11780fi
11781ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
11782if test "x$ac_cv_header_sys_stream_h" = xyes
11783then :
11784 printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
11785
11786fi
11787ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
11788if test "x$ac_cv_header_termios_h" = xyes
11789then :
11790 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
11791
11792fi
11793ac_fn_c_check_header_compile "$LINENO" "libc.h" "ac_cv_header_libc_h" "$ac_includes_default"
11794if test "x$ac_cv_header_libc_h" = xyes
11795then :
11796 printf "%s\n" "#define HAVE_LIBC_H 1" >>confdefs.h
11797
11798fi
11799ac_fn_c_check_header_compile "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
11800if test "x$ac_cv_header_sys_statfs_h" = xyes
11801then :
11802 printf "%s\n" "#define HAVE_SYS_STATFS_H 1" >>confdefs.h
11803
11804fi
11805ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
11806if test "x$ac_cv_header_poll_h" = xyes
11807then :
11808 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
11809
11810fi
11811ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
11812if test "x$ac_cv_header_sys_poll_h" = xyes
11813then :
11814 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
11815
11816fi
11817ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
11818if test "x$ac_cv_header_pwd_h" = xyes
11819then :
11820 printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
11821
11822fi
11823ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
11824if test "x$ac_cv_header_utime_h" = xyes
11825then :
11826 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
11827
11828fi
11829ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
11830if test "x$ac_cv_header_sys_param_h" = xyes
11831then :
11832 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
11833
11834fi
11835ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "$ac_includes_default"
11836if test "x$ac_cv_header_sys_ptms_h" = xyes
11837then :
11838 printf "%s\n" "#define HAVE_SYS_PTMS_H 1" >>confdefs.h
11839
11840fi
11841ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
11842if test "x$ac_cv_header_libintl_h" = xyes
11843then :
11844 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
11845
11846fi
11847ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
11848if test "x$ac_cv_header_libgen_h" = xyes
11849then :
11850 printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
11851
11852fi
11853ac_fn_c_check_header_compile "$LINENO" "util/debug.h" "ac_cv_header_util_debug_h" "$ac_includes_default"
11854if test "x$ac_cv_header_util_debug_h" = xyes
11855then :
11856 printf "%s\n" "#define HAVE_UTIL_DEBUG_H 1" >>confdefs.h
11857
11858fi
11859ac_fn_c_check_header_compile "$LINENO" "util/msg18n.h" "ac_cv_header_util_msg18n_h" "$ac_includes_default"
11860if test "x$ac_cv_header_util_msg18n_h" = xyes
11861then :
11862 printf "%s\n" "#define HAVE_UTIL_MSG18N_H 1" >>confdefs.h
11863
11864fi
11865ac_fn_c_check_header_compile "$LINENO" "frame.h" "ac_cv_header_frame_h" "$ac_includes_default"
11866if test "x$ac_cv_header_frame_h" = xyes
11867then :
11868 printf "%s\n" "#define HAVE_FRAME_H 1" >>confdefs.h
11869
11870fi
11871ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
11872if test "x$ac_cv_header_sys_acl_h" = xyes
11873then :
11874 printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h
11875
11876fi
11877ac_fn_c_check_header_compile "$LINENO" "sys/access.h" "ac_cv_header_sys_access_h" "$ac_includes_default"
11878if test "x$ac_cv_header_sys_access_h" = xyes
11879then :
11880 printf "%s\n" "#define HAVE_SYS_ACCESS_H 1" >>confdefs.h
11881
11882fi
11883ac_fn_c_check_header_compile "$LINENO" "sys/sysinfo.h" "ac_cv_header_sys_sysinfo_h" "$ac_includes_default"
11884if test "x$ac_cv_header_sys_sysinfo_h" = xyes
11885then :
11886 printf "%s\n" "#define HAVE_SYS_SYSINFO_H 1" >>confdefs.h
11887
11888fi
11889ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
11890if test "x$ac_cv_header_wchar_h" = xyes
11891then :
11892 printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
11893
11894fi
11895ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
11896if test "x$ac_cv_header_wctype_h" = xyes
11897then :
11898 printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011899
11900fi
11901
Bram Moolenaar071d4272004-06-13 20:20:40 +000011902
Illia Bobyra96d5442023-08-30 16:30:15 +020011903ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" "#if defined HAVE_SYS_STREAM_H
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011904# include <sys/stream.h>
11905#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011906"
Illia Bobyra96d5442023-08-30 16:30:15 +020011907if test "x$ac_cv_header_sys_ptem_h" = xyes
11908then :
11909 printf "%s\n" "#define HAVE_SYS_PTEM_H 1" >>confdefs.h
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011910
11911fi
11912
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011913
Illia Bobyra96d5442023-08-30 16:30:15 +020011914ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "#if defined HAVE_SYS_PARAM_H
Bram Moolenaar32f31b12009-05-21 13:20:59 +000011915# include <sys/param.h>
11916#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011917"
Illia Bobyra96d5442023-08-30 16:30:15 +020011918if test "x$ac_cv_header_sys_sysctl_h" = xyes
11919then :
11920 printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011921
11922fi
11923
Bram Moolenaar00ca2842008-06-26 20:14:00 +000011924
11925
Illia Bobyra96d5442023-08-30 16:30:15 +020011926{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
11927printf %s "checking for pthread_np.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011929/* end confdefs.h. */
11930
11931#include <pthread.h>
11932#include <pthread_np.h>
11933int
Illia Bobyra96d5442023-08-30 16:30:15 +020011934main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011935{
11936int i; i = 0;
11937 ;
11938 return 0;
11939}
11940_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011941if ac_fn_c_try_compile "$LINENO"
11942then :
11943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11944printf "%s\n" "yes" >&6; }
11945 printf "%s\n" "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011946
Illia Bobyra96d5442023-08-30 16:30:15 +020011947else $as_nop
11948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11949printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011950fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011951rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011952
Illia Bobyra96d5442023-08-30 16:30:15 +020011953ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
11954if test "x$ac_cv_header_strings_h" = xyes
11955then :
11956 printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011957
11958fi
11959
Bram Moolenaard0573012017-10-28 21:11:06 +020011960if test "x$MACOS_X" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011961 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar9372a112005-12-06 19:59:18 +000011962
11963else
Bram Moolenaar071d4272004-06-13 20:20:40 +000011964
Illia Bobyra96d5442023-08-30 16:30:15 +020011965{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
11966printf %s "checking if strings.h can be included after string.h... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011967cppflags_save=$CPPFLAGS
11968CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011970/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011971
11972#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
11973# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
11974 /* but don't do it on AIX 5.1 (Uribarri) */
11975#endif
11976#ifdef HAVE_XM_XM_H
11977# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
11978#endif
11979#ifdef HAVE_STRING_H
11980# include <string.h>
11981#endif
11982#if defined(HAVE_STRINGS_H)
11983# include <strings.h>
11984#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000011985
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011986int
Illia Bobyra96d5442023-08-30 16:30:15 +020011987main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011988{
11989int i; i = 0;
11990 ;
11991 return 0;
11992}
11993_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011994if ac_fn_c_try_compile "$LINENO"
11995then :
11996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11997printf "%s\n" "yes" >&6; }
11998else $as_nop
11999 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012000
Illia Bobyra96d5442023-08-30 16:30:15 +020012001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12002printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012003fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012004rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012005CPPFLAGS=$cppflags_save
Bram Moolenaar9372a112005-12-06 19:59:18 +000012006fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012007
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012008if test $ac_cv_c_compiler_gnu = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
12010printf %s "checking whether $CC needs -traditional... " >&6; }
12011if test ${ac_cv_prog_gcc_traditional+y}
12012then :
12013 printf %s "(cached) " >&6
12014else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012015 ac_pattern="Autoconf.*'x'"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012017/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012018#include <sgtty.h>
12019Autoconf TIOCGETP
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012020_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012022 $EGREP "$ac_pattern" >/dev/null 2>&1
12023then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012024 ac_cv_prog_gcc_traditional=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012025else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012026 ac_cv_prog_gcc_traditional=no
12027fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012028rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012029
12030
12031 if test $ac_cv_prog_gcc_traditional = no; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012033/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012034#include <termio.h>
12035Autoconf TCGETA
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012036_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012038 $EGREP "$ac_pattern" >/dev/null 2>&1
12039then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012040 ac_cv_prog_gcc_traditional=yes
12041fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012042rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012043
12044 fi
12045fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
12047printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012048 if test $ac_cv_prog_gcc_traditional = yes; then
12049 CC="$CC -traditional"
12050 fi
12051fi
12052
Illia Bobyra96d5442023-08-30 16:30:15 +020012053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12054printf %s "checking for an ANSI C-conforming const... " >&6; }
12055if test ${ac_cv_c_const+y}
12056then :
12057 printf %s "(cached) " >&6
12058else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012060/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012061
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012062int
Illia Bobyra96d5442023-08-30 16:30:15 +020012063main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012064{
Bram Moolenaar7db77842014-03-27 17:40:59 +010012065
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012066#ifndef __cplusplus
Bram Moolenaar7db77842014-03-27 17:40:59 +010012067 /* Ultrix mips cc rejects this sort of thing. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012068 typedef int charset[2];
Bram Moolenaar7db77842014-03-27 17:40:59 +010012069 const charset cs = { 0, 0 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012070 /* SunOS 4.1.1 cc rejects this. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012071 char const *const *pcpcc;
12072 char **ppc;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012073 /* NEC SVR4.0.2 mips cc rejects this. */
12074 struct point {int x, y;};
12075 static struct point const zero = {0,0};
Illia Bobyra96d5442023-08-30 16:30:15 +020012076 /* IBM XL C 1.02.0.0 rejects this.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012077 It does not let you subtract one const X* pointer from another in
12078 an arm of an if-expression whose if-part is not a constant
12079 expression */
12080 const char *g = "string";
Bram Moolenaar446cb832008-06-24 21:56:24 +000012081 pcpcc = &g + (g ? g-g : 0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012082 /* HPUX 7.0 cc rejects these. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012083 ++pcpcc;
12084 ppc = (char**) pcpcc;
12085 pcpcc = (char const *const *) ppc;
Bram Moolenaar7db77842014-03-27 17:40:59 +010012086 { /* SCO 3.2v4 cc rejects this sort of thing. */
12087 char tx;
12088 char *t = &tx;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012089 char const *s = 0 ? (char *) 0 : (char const *) 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012090
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012091 *t++ = 0;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012092 if (s) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012093 }
12094 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12095 int x[] = {25, 17};
12096 const int *foo = &x[0];
12097 ++foo;
12098 }
12099 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12100 typedef const int *iptr;
12101 iptr p = 0;
12102 ++p;
12103 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012104 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012105 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Bram Moolenaar7db77842014-03-27 17:40:59 +010012106 struct s { int j; const int *ap[3]; } bx;
12107 struct s *b = &bx; b->j = 5;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012108 }
12109 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12110 const int foo = 10;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012111 if (!foo) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012112 }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012113 return !cs[0] && !zero.x;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012114#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012115
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012116 ;
12117 return 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012118}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012119_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012120if ac_fn_c_try_compile "$LINENO"
12121then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012122 ac_cv_c_const=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012123else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012124 ac_cv_c_const=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012125fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012126rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012127fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012128{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12129printf "%s\n" "$ac_cv_c_const" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012130if test $ac_cv_c_const = no; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012131
Illia Bobyra96d5442023-08-30 16:30:15 +020012132printf "%s\n" "#define const /**/" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012133
12134fi
12135
Illia Bobyra96d5442023-08-30 16:30:15 +020012136{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12137printf %s "checking for working volatile... " >&6; }
12138if test ${ac_cv_c_volatile+y}
12139then :
12140 printf %s "(cached) " >&6
12141else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012143/* end confdefs.h. */
12144
12145int
Illia Bobyra96d5442023-08-30 16:30:15 +020012146main (void)
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012147{
12148
12149volatile int x;
12150int * volatile y = (int *) 0;
12151return !x && !y;
12152 ;
12153 return 0;
12154}
12155_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012156if ac_fn_c_try_compile "$LINENO"
12157then :
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012158 ac_cv_c_volatile=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012159else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012160 ac_cv_c_volatile=no
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012161fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012162rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012163fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012164{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
12165printf "%s\n" "$ac_cv_c_volatile" >&6; }
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012166if test $ac_cv_c_volatile = no; then
12167
Illia Bobyra96d5442023-08-30 16:30:15 +020012168printf "%s\n" "#define volatile /**/" >>confdefs.h
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012169
12170fi
12171
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012172ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012173if test "x$ac_cv_type_mode_t" = xyes
12174then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012175
Illia Bobyra96d5442023-08-30 16:30:15 +020012176else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012177
Illia Bobyra96d5442023-08-30 16:30:15 +020012178printf "%s\n" "#define mode_t int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012179
12180fi
12181
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012182ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012183if test "x$ac_cv_type_off_t" = xyes
12184then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012185
Illia Bobyra96d5442023-08-30 16:30:15 +020012186else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012187
Illia Bobyra96d5442023-08-30 16:30:15 +020012188printf "%s\n" "#define off_t long int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012189
12190fi
12191
Bram Moolenaar071d4272004-06-13 20:20:40 +000012192
Illia Bobyra96d5442023-08-30 16:30:15 +020012193 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
12194"
12195if test "x$ac_cv_type_pid_t" = xyes
12196then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012197
Illia Bobyra96d5442023-08-30 16:30:15 +020012198else $as_nop
12199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12200/* end confdefs.h. */
12201
12202 #if defined _WIN64 && !defined __CYGWIN__
12203 LLP64
12204 #endif
12205
12206int
12207main (void)
12208{
12209
12210 ;
12211 return 0;
12212}
12213
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012214_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012215if ac_fn_c_try_compile "$LINENO"
12216then :
12217 ac_pid_type='int'
12218else $as_nop
12219 ac_pid_type='__int64'
12220fi
12221rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12222
12223printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
12224
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012225
12226fi
12227
Illia Bobyra96d5442023-08-30 16:30:15 +020012228
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012229ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012230if test "x$ac_cv_type_size_t" = xyes
12231then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012232
Illia Bobyra96d5442023-08-30 16:30:15 +020012233else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012234
Illia Bobyra96d5442023-08-30 16:30:15 +020012235printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012236
12237fi
12238
Illia Bobyra96d5442023-08-30 16:30:15 +020012239{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
12240printf %s "checking for uid_t in sys/types.h... " >&6; }
12241if test ${ac_cv_type_uid_t+y}
12242then :
12243 printf %s "(cached) " >&6
12244else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012246/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012247#include <sys/types.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012248
12249_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012251 $EGREP "uid_t" >/dev/null 2>&1
12252then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012253 ac_cv_type_uid_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012254else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012255 ac_cv_type_uid_t=no
12256fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012257rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012258
12259fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012260{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
12261printf "%s\n" "$ac_cv_type_uid_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012262if test $ac_cv_type_uid_t = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000012263
Illia Bobyra96d5442023-08-30 16:30:15 +020012264printf "%s\n" "#define uid_t int" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012265
12266
Illia Bobyra96d5442023-08-30 16:30:15 +020012267printf "%s\n" "#define gid_t int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012268
12269fi
12270
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012271ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
12272case $ac_cv_c_uint32_t in #(
12273 no|yes) ;; #(
12274 *)
12275
Illia Bobyra96d5442023-08-30 16:30:15 +020012276printf "%s\n" "#define _UINT32_T 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012277
12278
Illia Bobyra96d5442023-08-30 16:30:15 +020012279printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012280;;
12281 esac
12282
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020012283
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012284
Illia Bobyrf39842f2023-08-27 18:21:23 +020012285
12286
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012287ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012288if test "x$ac_cv_type_ino_t" = xyes
12289then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012290
Illia Bobyra96d5442023-08-30 16:30:15 +020012291else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012292
Illia Bobyra96d5442023-08-30 16:30:15 +020012293printf "%s\n" "#define ino_t long" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012294
12295fi
12296
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012297ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012298if test "x$ac_cv_type_dev_t" = xyes
12299then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012300
Illia Bobyra96d5442023-08-30 16:30:15 +020012301else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012302
Illia Bobyra96d5442023-08-30 16:30:15 +020012303printf "%s\n" "#define dev_t unsigned" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012304
12305fi
12306
Illia Bobyra96d5442023-08-30 16:30:15 +020012307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12308printf %s "checking whether byte ordering is bigendian... " >&6; }
12309if test ${ac_cv_c_bigendian+y}
12310then :
12311 printf %s "(cached) " >&6
12312else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012313 ac_cv_c_bigendian=unknown
12314 # See if we're dealing with a universal compiler.
12315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12316/* end confdefs.h. */
12317#ifndef __APPLE_CC__
12318 not a universal capable compiler
12319 #endif
12320 typedef int dummy;
12321
12322_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012323if ac_fn_c_try_compile "$LINENO"
12324then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012325
12326 # Check for potential -arch flags. It is not universal unless
12327 # there are at least two -arch flags with different values.
12328 ac_arch=
12329 ac_prev=
12330 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12331 if test -n "$ac_prev"; then
12332 case $ac_word in
12333 i?86 | x86_64 | ppc | ppc64)
12334 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12335 ac_arch=$ac_word
12336 else
12337 ac_cv_c_bigendian=universal
12338 break
12339 fi
12340 ;;
12341 esac
12342 ac_prev=
12343 elif test "x$ac_word" = "x-arch"; then
12344 ac_prev=arch
12345 fi
12346 done
12347fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012348rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012349 if test $ac_cv_c_bigendian = unknown; then
12350 # See if sys/param.h defines the BYTE_ORDER macro.
12351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12352/* end confdefs.h. */
12353#include <sys/types.h>
12354 #include <sys/param.h>
12355
12356int
Illia Bobyra96d5442023-08-30 16:30:15 +020012357main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012358{
12359#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12360 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12361 && LITTLE_ENDIAN)
12362 bogus endian macros
12363 #endif
12364
12365 ;
12366 return 0;
12367}
12368_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012369if ac_fn_c_try_compile "$LINENO"
12370then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012371 # It does; now see whether it defined to BIG_ENDIAN or not.
12372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12373/* end confdefs.h. */
12374#include <sys/types.h>
12375 #include <sys/param.h>
12376
12377int
Illia Bobyra96d5442023-08-30 16:30:15 +020012378main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012379{
12380#if BYTE_ORDER != BIG_ENDIAN
12381 not big endian
12382 #endif
12383
12384 ;
12385 return 0;
12386}
12387_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012388if ac_fn_c_try_compile "$LINENO"
12389then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012390 ac_cv_c_bigendian=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012391else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012392 ac_cv_c_bigendian=no
12393fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012394rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012395fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012396rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012397 fi
12398 if test $ac_cv_c_bigendian = unknown; then
12399 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12401/* end confdefs.h. */
12402#include <limits.h>
12403
12404int
Illia Bobyra96d5442023-08-30 16:30:15 +020012405main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012406{
12407#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12408 bogus endian macros
12409 #endif
12410
12411 ;
12412 return 0;
12413}
12414_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012415if ac_fn_c_try_compile "$LINENO"
12416then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012417 # It does; now see whether it defined to _BIG_ENDIAN or not.
12418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12419/* end confdefs.h. */
12420#include <limits.h>
12421
12422int
Illia Bobyra96d5442023-08-30 16:30:15 +020012423main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012424{
12425#ifndef _BIG_ENDIAN
12426 not big endian
12427 #endif
12428
12429 ;
12430 return 0;
12431}
12432_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012433if ac_fn_c_try_compile "$LINENO"
12434then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012435 ac_cv_c_bigendian=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012436else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012437 ac_cv_c_bigendian=no
12438fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012439rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012440fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012441rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012442 fi
12443 if test $ac_cv_c_bigendian = unknown; then
12444 # Compile a test program.
Illia Bobyra96d5442023-08-30 16:30:15 +020012445 if test "$cross_compiling" = yes
12446then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012447 # Try to guess by grepping values from an object file.
12448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12449/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +020012450unsigned short int ascii_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012451 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012452 unsigned short int ascii_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012453 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12454 int use_ascii (int i) {
12455 return ascii_mm[i] + ascii_ii[i];
12456 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012457 unsigned short int ebcdic_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012458 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020012459 unsigned short int ebcdic_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012460 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12461 int use_ebcdic (int i) {
12462 return ebcdic_mm[i] + ebcdic_ii[i];
12463 }
12464 extern int foo;
12465
12466int
Illia Bobyra96d5442023-08-30 16:30:15 +020012467main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012468{
12469return use_ascii (foo) == use_ebcdic (foo);
12470 ;
12471 return 0;
12472}
12473_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012474if ac_fn_c_try_compile "$LINENO"
12475then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012476 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12477 ac_cv_c_bigendian=yes
12478 fi
12479 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12480 if test "$ac_cv_c_bigendian" = unknown; then
12481 ac_cv_c_bigendian=no
12482 else
12483 # finding both strings is unlikely to happen, but who knows?
12484 ac_cv_c_bigendian=unknown
12485 fi
12486 fi
12487fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012488rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12489else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12491/* end confdefs.h. */
12492$ac_includes_default
12493int
Illia Bobyra96d5442023-08-30 16:30:15 +020012494main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012495{
12496
12497 /* Are we little or big endian? From Harbison&Steele. */
12498 union
12499 {
12500 long int l;
12501 char c[sizeof (long int)];
12502 } u;
12503 u.l = 1;
12504 return u.c[sizeof (long int) - 1] == 1;
12505
12506 ;
12507 return 0;
12508}
12509_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012510if ac_fn_c_try_run "$LINENO"
12511then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012512 ac_cv_c_bigendian=no
Illia Bobyra96d5442023-08-30 16:30:15 +020012513else $as_nop
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012514 ac_cv_c_bigendian=yes
12515fi
12516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12517 conftest.$ac_objext conftest.beam conftest.$ac_ext
12518fi
12519
12520 fi
12521fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012522{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12523printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012524 case $ac_cv_c_bigendian in #(
12525 yes)
Illia Bobyra96d5442023-08-30 16:30:15 +020012526 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012527;; #(
12528 no)
12529 ;; #(
12530 universal)
12531
Illia Bobyra96d5442023-08-30 16:30:15 +020012532printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012533
12534 ;; #(
12535 *)
Bram Moolenaar7db77842014-03-27 17:40:59 +010012536 as_fn_error $? "unknown endianness
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012537 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12538 esac
12539
Illia Bobyra96d5442023-08-30 16:30:15 +020012540{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12541printf %s "checking for inline... " >&6; }
12542if test ${ac_cv_c_inline+y}
12543then :
12544 printf %s "(cached) " >&6
12545else $as_nop
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012546 ac_cv_c_inline=no
12547for ac_kw in inline __inline__ __inline; do
12548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12549/* end confdefs.h. */
12550#ifndef __cplusplus
12551typedef int foo_t;
Illia Bobyra96d5442023-08-30 16:30:15 +020012552static $ac_kw foo_t static_foo (void) {return 0; }
12553$ac_kw foo_t foo (void) {return 0; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012554#endif
12555
12556_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012557if ac_fn_c_try_compile "$LINENO"
12558then :
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012559 ac_cv_c_inline=$ac_kw
12560fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012561rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012562 test "$ac_cv_c_inline" != no && break
12563done
12564
12565fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012566{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12567printf "%s\n" "$ac_cv_c_inline" >&6; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010012568
12569case $ac_cv_c_inline in
12570 inline | yes) ;;
12571 *)
12572 case $ac_cv_c_inline in
12573 no) ac_val=;;
12574 *) ac_val=$ac_cv_c_inline;;
12575 esac
12576 cat >>confdefs.h <<_ACEOF
12577#ifndef __cplusplus
12578#define inline $ac_val
12579#endif
12580_ACEOF
12581 ;;
12582esac
12583
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012584
Illia Bobyra96d5442023-08-30 16:30:15 +020012585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
12586printf %s "checking for rlim_t... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012587if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
12589printf "%s\n" "(cached) $ac_cv_type_rlim_t" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012590else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012592/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012593
12594#include <sys/types.h>
12595#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012596# include <stdlib.h>
12597# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012598#endif
12599#ifdef HAVE_SYS_RESOURCE_H
Bram Moolenaar446cb832008-06-24 21:56:24 +000012600# include <sys/resource.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012601#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012602
12603_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012605 $EGREP "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1
12606then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012607 ac_cv_type_rlim_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012608else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012609 ac_cv_type_rlim_t=no
12610fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012611rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012612
Illia Bobyra96d5442023-08-30 16:30:15 +020012613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
12614printf "%s\n" "$ac_cv_type_rlim_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012615fi
12616if test $ac_cv_type_rlim_t = no; then
12617 cat >> confdefs.h <<\EOF
12618#define rlim_t unsigned long
12619EOF
12620fi
12621
Illia Bobyra96d5442023-08-30 16:30:15 +020012622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
12623printf %s "checking for stack_t... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012624if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
12626printf "%s\n" "(cached) $ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012627else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012629/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012630
12631#include <sys/types.h>
12632#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012633# include <stdlib.h>
12634# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012635#endif
12636#include <signal.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012637
12638_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012639if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020012640 $EGREP "stack_t" >/dev/null 2>&1
12641then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012642 ac_cv_type_stack_t=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020012643else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000012644 ac_cv_type_stack_t=no
12645fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012646rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000012647
Illia Bobyra96d5442023-08-30 16:30:15 +020012648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
12649printf "%s\n" "$ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012650fi
12651if test $ac_cv_type_stack_t = no; then
12652 cat >> confdefs.h <<\EOF
12653#define stack_t struct sigaltstack
12654EOF
12655fi
12656
Illia Bobyra96d5442023-08-30 16:30:15 +020012657{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
12658printf %s "checking whether stack_t has an ss_base field... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012660/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012661
12662#include <sys/types.h>
12663#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000012664# include <stdlib.h>
12665# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000012666#endif
12667#include <signal.h>
12668#include "confdefs.h"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012669
12670int
Illia Bobyra96d5442023-08-30 16:30:15 +020012671main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012672{
12673stack_t sigstk; sigstk.ss_base = 0;
12674 ;
12675 return 0;
12676}
12677_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012678if ac_fn_c_try_compile "$LINENO"
12679then :
12680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12681printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SS_BASE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012682
Illia Bobyra96d5442023-08-30 16:30:15 +020012683else $as_nop
12684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12685printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012686fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012687rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012688
12689olibs="$LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +020012690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
12691printf %s "checking --with-tlib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012692
Bram Moolenaar446cb832008-06-24 21:56:24 +000012693# Check whether --with-tlib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020012694if test ${with_tlib+y}
12695then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012696 withval=$with_tlib;
12697fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012698
12699if test -n "$with_tlib"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
12701printf "%s\n" "$with_tlib" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012702 LIBS="$LIBS -l$with_tlib"
Illia Bobyra96d5442023-08-30 16:30:15 +020012703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
12704printf %s "checking for linking with $with_tlib library... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012706/* end confdefs.h. */
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012707
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012708int
Illia Bobyra96d5442023-08-30 16:30:15 +020012709main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012710{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012711
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012712 ;
12713 return 0;
12714}
12715_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012716if ac_fn_c_try_link "$LINENO"
12717then :
12718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
12719printf "%s\n" "OK" >&6; }
12720else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010012721 as_fn_error $? "FAILED" "$LINENO" 5
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012722fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012723rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012724 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012725 olibs="$LIBS"
12726else
Illia Bobyra96d5442023-08-30 16:30:15 +020012727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
12728printf "%s\n" "empty: automatic terminal library selection" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000012729 case "$vim_cv_uname_output" in
Bram Moolenaar4e509b62011-02-09 17:42:57 +010012730 OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";;
12731 *) tlibs="tinfo ncurses termlib termcap curses";;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012732 esac
12733 for libname in $tlibs; do
Illia Bobyra96d5442023-08-30 16:30:15 +020012734 as_ac_Lib=`printf "%s\n" "ac_cv_lib_${libname}""_tgetent" | $as_tr_sh`
12735{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
12736printf %s "checking for tgetent in -l${libname}... " >&6; }
12737if eval test \${$as_ac_Lib+y}
12738then :
12739 printf %s "(cached) " >&6
12740else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012741 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000012742LIBS="-l${libname} $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012744/* end confdefs.h. */
12745
Bram Moolenaar446cb832008-06-24 21:56:24 +000012746/* Override any GCC internal prototype to avoid an error.
12747 Use char because int might match the return type of a GCC
12748 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012749char tgetent ();
12750int
Illia Bobyra96d5442023-08-30 16:30:15 +020012751main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012752{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012753return tgetent ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012754 ;
12755 return 0;
12756}
12757_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012758if ac_fn_c_try_link "$LINENO"
12759then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012760 eval "$as_ac_Lib=yes"
Illia Bobyra96d5442023-08-30 16:30:15 +020012761else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012762 eval "$as_ac_Lib=no"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012763fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012764rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012765 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012766LIBS=$ac_check_lib_save_LIBS
12767fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012768eval ac_res=\$$as_ac_Lib
Illia Bobyra96d5442023-08-30 16:30:15 +020012769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12770printf "%s\n" "$ac_res" >&6; }
12771if eval test \"x\$"$as_ac_Lib"\" = x"yes"
12772then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012773 cat >>confdefs.h <<_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012774#define `printf "%s\n" "HAVE_LIB${libname}" | $as_tr_cpp` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012775_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000012776
12777 LIBS="-l${libname} $LIBS"
12778
Bram Moolenaar071d4272004-06-13 20:20:40 +000012779fi
12780
12781 if test "x$olibs" != "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012782 if test "$cross_compiling" = yes
12783then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012784 res="FAIL"
Illia Bobyra96d5442023-08-30 16:30:15 +020012785else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012787/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012788
12789#ifdef HAVE_TERMCAP_H
12790# include <termcap.h>
12791#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012792#if STDC_HEADERS
12793# include <stdlib.h>
12794# include <stddef.h>
12795#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012796int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012797_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012798if ac_fn_c_try_run "$LINENO"
12799then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012800 res="OK"
Illia Bobyra96d5442023-08-30 16:30:15 +020012801else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012802 res="FAIL"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012803fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012804rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12805 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012806fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012807
Bram Moolenaar071d4272004-06-13 20:20:40 +000012808 if test "$res" = "OK"; then
12809 break
12810 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
12812printf "%s\n" "$libname library is not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012813 LIBS="$olibs"
12814 fi
12815 done
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012816 if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
12818printf "%s\n" "no terminal library found" >&6; }
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012819 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012820fi
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012821
12822if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
12824printf %s "checking for tgetent()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012826/* end confdefs.h. */
Bram Moolenaarbd7f7c12020-07-28 21:03:37 +020012827int tgetent(char *, const char *);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012828int
Illia Bobyra96d5442023-08-30 16:30:15 +020012829main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012830{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012831char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012832 ;
12833 return 0;
12834}
12835_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012836if ac_fn_c_try_link "$LINENO"
12837then :
12838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12839printf "%s\n" "yes" >&6; }
12840else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010012841 as_fn_error $? "NOT FOUND!
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012842 You need to install a terminal library; for example ncurses.
Bram Moolenaar16678eb2021-04-21 11:57:59 +020012843 On Linux that would be the libncurses-dev package.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012844 Or specify the name of the library with --with-tlib." "$LINENO" 5
12845fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012846rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012847 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000012848fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012849
Illia Bobyra96d5442023-08-30 16:30:15 +020012850{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
12851printf %s "checking whether we talk terminfo... " >&6; }
12852if test ${vim_cv_terminfo+y}
12853then :
12854 printf %s "(cached) " >&6
12855else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012856
Illia Bobyra96d5442023-08-30 16:30:15 +020012857 if test "$cross_compiling" = yes
12858then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012859
Bram Moolenaar7db77842014-03-27 17:40:59 +010012860 as_fn_error $? "cross-compiling: please set 'vim_cv_terminfo'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000012861
Illia Bobyra96d5442023-08-30 16:30:15 +020012862else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12864/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012865
Bram Moolenaar446cb832008-06-24 21:56:24 +000012866#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012867#ifdef HAVE_TERMCAP_H
12868# include <termcap.h>
12869#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012870#ifdef HAVE_STRING_H
12871# include <string.h>
12872#endif
12873#if STDC_HEADERS
12874# include <stdlib.h>
12875# include <stddef.h>
12876#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012877int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000012878{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012879
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012880_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012881if ac_fn_c_try_run "$LINENO"
12882then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012883
12884 vim_cv_terminfo=no
12885
Illia Bobyra96d5442023-08-30 16:30:15 +020012886else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012887
12888 vim_cv_terminfo=yes
12889
12890fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12892 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000012893fi
12894
12895
Bram Moolenaar446cb832008-06-24 21:56:24 +000012896fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012897{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
12898printf "%s\n" "$vim_cv_terminfo" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012899
12900if test "x$vim_cv_terminfo" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012901 printf "%s\n" "#define TERMINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012902
12903fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012904
Illia Bobyra96d5442023-08-30 16:30:15 +020012905{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
12906printf %s "checking what tgetent() returns for an unknown terminal... " >&6; }
12907if test ${vim_cv_tgetent+y}
12908then :
12909 printf %s "(cached) " >&6
12910else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012911
Illia Bobyra96d5442023-08-30 16:30:15 +020012912 if test "$cross_compiling" = yes
12913then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012914
Bram Moolenaar696cbd22017-04-28 15:45:46 +020012915 as_fn_error $? "failed to compile test program." "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000012916
Illia Bobyra96d5442023-08-30 16:30:15 +020012917else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12919/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012920
Bram Moolenaar446cb832008-06-24 21:56:24 +000012921#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012922#ifdef HAVE_TERMCAP_H
12923# include <termcap.h>
12924#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000012925#if STDC_HEADERS
12926# include <stdlib.h>
12927# include <stddef.h>
12928#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012929int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000012930{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012931
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012932_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012933if ac_fn_c_try_run "$LINENO"
12934then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012935
Bram Moolenaara88254f2017-11-02 23:04:14 +010012936 vim_cv_tgetent=zero
Bram Moolenaar071d4272004-06-13 20:20:40 +000012937
Illia Bobyra96d5442023-08-30 16:30:15 +020012938else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000012939
Bram Moolenaara88254f2017-11-02 23:04:14 +010012940 vim_cv_tgetent=non-zero
Bram Moolenaar446cb832008-06-24 21:56:24 +000012941
Bram Moolenaar071d4272004-06-13 20:20:40 +000012942fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12944 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012945fi
12946
Bram Moolenaar446cb832008-06-24 21:56:24 +000012947
Bram Moolenaar446cb832008-06-24 21:56:24 +000012948fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012949{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgetent" >&5
12950printf "%s\n" "$vim_cv_tgetent" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012951
Bram Moolenaara88254f2017-11-02 23:04:14 +010012952if test "x$vim_cv_tgetent" = "xzero" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012953 printf "%s\n" "#define TGETENT_ZERO_ERR 0" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000012954
Bram Moolenaar446cb832008-06-24 21:56:24 +000012955fi
12956
Illia Bobyra96d5442023-08-30 16:30:15 +020012957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
12958printf %s "checking whether termcap.h contains ospeed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012960/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012961
12962#ifdef HAVE_TERMCAP_H
12963# include <termcap.h>
12964#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012965
12966int
Illia Bobyra96d5442023-08-30 16:30:15 +020012967main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012968{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012969ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012970 ;
12971 return 0;
12972}
12973_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012974if ac_fn_c_try_link "$LINENO"
12975then :
12976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12977printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OSPEED 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012978
Illia Bobyra96d5442023-08-30 16:30:15 +020012979else $as_nop
12980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12981printf "%s\n" "no" >&6; }
12982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
12983printf %s "checking whether ospeed can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012985/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012986
12987#ifdef HAVE_TERMCAP_H
12988# include <termcap.h>
12989#endif
12990extern short ospeed;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012991
12992int
Illia Bobyra96d5442023-08-30 16:30:15 +020012993main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012994{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012995ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012996 ;
12997 return 0;
12998}
12999_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013000if ac_fn_c_try_link "$LINENO"
13001then :
13002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13003printf "%s\n" "yes" >&6; }; printf "%s\n" "#define OSPEED_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013004
Illia Bobyra96d5442023-08-30 16:30:15 +020013005else $as_nop
13006 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13007printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013008fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013009rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013010 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013011
13012fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013013rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013014 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013015
Illia Bobyra96d5442023-08-30 16:30:15 +020013016{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
13017printf %s "checking whether termcap.h contains UP, BC and PC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013019/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013020
13021#ifdef HAVE_TERMCAP_H
13022# include <termcap.h>
13023#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013024
13025int
Illia Bobyra96d5442023-08-30 16:30:15 +020013026main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013027{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013028if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013029 ;
13030 return 0;
13031}
13032_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013033if ac_fn_c_try_link "$LINENO"
13034then :
13035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13036printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_UP_BC_PC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013037
Illia Bobyra96d5442023-08-30 16:30:15 +020013038else $as_nop
13039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13040printf "%s\n" "no" >&6; }
13041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
13042printf %s "checking whether UP, BC and PC can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013044/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013045
13046#ifdef HAVE_TERMCAP_H
13047# include <termcap.h>
13048#endif
13049extern char *UP, *BC, PC;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013050
13051int
Illia Bobyra96d5442023-08-30 16:30:15 +020013052main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013053{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013054if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013055 ;
13056 return 0;
13057}
13058_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013059if ac_fn_c_try_link "$LINENO"
13060then :
13061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13062printf "%s\n" "yes" >&6; }; printf "%s\n" "#define UP_BC_PC_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013063
Illia Bobyra96d5442023-08-30 16:30:15 +020013064else $as_nop
13065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13066printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013067fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013068rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013069 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013070
13071fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013072rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013073 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013074
Illia Bobyra96d5442023-08-30 16:30:15 +020013075{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
13076printf %s "checking whether tputs() uses outfuntype... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013078/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013079
13080#ifdef HAVE_TERMCAP_H
13081# include <termcap.h>
13082#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013083
13084int
Illia Bobyra96d5442023-08-30 16:30:15 +020013085main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013086{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013087extern int xx(); tputs("test", 1, (outfuntype)xx)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013088 ;
13089 return 0;
13090}
13091_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013092if ac_fn_c_try_compile "$LINENO"
13093then :
13094 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13095printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013096
Illia Bobyra96d5442023-08-30 16:30:15 +020013097else $as_nop
13098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13099printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013100fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013101rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013102
Illia Bobyra96d5442023-08-30 16:30:15 +020013103{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether del_curterm() can be used" >&5
13104printf %s "checking whether del_curterm() can be used... " >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13106/* end confdefs.h. */
13107
13108#ifdef HAVE_TERMCAP_H
13109# include <termcap.h>
13110#endif
13111#include <term.h>
13112
13113int
Illia Bobyra96d5442023-08-30 16:30:15 +020013114main (void)
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013115{
13116if (cur_term) del_curterm(cur_term);
13117 ;
13118 return 0;
13119}
13120_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013121if ac_fn_c_try_link "$LINENO"
13122then :
13123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13124printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DEL_CURTERM 1" >>confdefs.h
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013125
Illia Bobyra96d5442023-08-30 16:30:15 +020013126else $as_nop
13127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13128printf "%s\n" "no" >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013129fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013130rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013131 conftest$ac_exeext conftest.$ac_ext
13132
Illia Bobyra96d5442023-08-30 16:30:15 +020013133{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13134printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013136/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013137
13138#include <sys/types.h>
13139#include <sys/time.h>
13140#include <sys/select.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013141int
Illia Bobyra96d5442023-08-30 16:30:15 +020013142main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013143{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013144
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013145 ;
13146 return 0;
13147}
13148_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013149if ac_fn_c_try_compile "$LINENO"
13150then :
13151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13152printf "%s\n" "yes" >&6; }
13153 printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013154
Illia Bobyra96d5442023-08-30 16:30:15 +020013155else $as_nop
13156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13157printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013158fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013159rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013160
Illia Bobyra96d5442023-08-30 16:30:15 +020013161{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13162printf %s "checking for /dev/ptc... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013163if test -r /dev/ptc; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013164 printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013165
Illia Bobyra96d5442023-08-30 16:30:15 +020013166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13167printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013168else
Illia Bobyra96d5442023-08-30 16:30:15 +020013169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13170printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013171fi
13172
Illia Bobyra96d5442023-08-30 16:30:15 +020013173{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
13174printf %s "checking for SVR4 ptys... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013175if test -c /dev/ptmx ; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013177/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013178
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013179// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
13180char *ptsname(int);
13181int unlockpt(int);
13182int grantpt(int);
13183
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013184int
Illia Bobyra96d5442023-08-30 16:30:15 +020013185main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013186{
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013187
13188 ptsname(0);
13189 grantpt(0);
13190 unlockpt(0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013191 ;
13192 return 0;
13193}
13194_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013195if ac_fn_c_try_link "$LINENO"
13196then :
13197 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13198printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SVR4_PTYS 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013199
Illia Bobyra96d5442023-08-30 16:30:15 +020013200else $as_nop
13201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13202printf "%s\n" "no" >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013203fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013204rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013205 conftest$ac_exeext conftest.$ac_ext
13206else
Illia Bobyra96d5442023-08-30 16:30:15 +020013207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13208printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013209fi
13210
Illia Bobyra96d5442023-08-30 16:30:15 +020013211{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
13212printf %s "checking for ptyranges... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013213if test -d /dev/ptym ; then
13214 pdir='/dev/ptym'
13215else
13216 pdir='/dev'
13217fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013219/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013220#ifdef M_UNIX
13221 yes;
13222#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013223
13224_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013225if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Illia Bobyra96d5442023-08-30 16:30:15 +020013226 $EGREP "yes" >/dev/null 2>&1
13227then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013228 ptys=`echo /dev/ptyp??`
Illia Bobyra96d5442023-08-30 16:30:15 +020013229else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000013230 ptys=`echo $pdir/pty??`
13231fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013232rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013233
13234if test "$ptys" != "$pdir/pty??" ; then
13235 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
13236 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
Illia Bobyra96d5442023-08-30 16:30:15 +020013237 printf "%s\n" "#define PTYRANGE0 \"$p0\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013238
Illia Bobyra96d5442023-08-30 16:30:15 +020013239 printf "%s\n" "#define PTYRANGE1 \"$p1\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013240
Illia Bobyra96d5442023-08-30 16:30:15 +020013241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
13242printf "%s\n" "$p0 / $p1" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013243else
Illia Bobyra96d5442023-08-30 16:30:15 +020013244 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
13245printf "%s\n" "don't know" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013246fi
13247
Bram Moolenaar446cb832008-06-24 21:56:24 +000013248
Illia Bobyra96d5442023-08-30 16:30:15 +020013249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
13250printf %s "checking for struct sigcontext... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013252/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013253
13254#include <signal.h>
Sam Jamesf8ea1062022-11-05 15:13:50 +000013255int test_sig()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013256{
13257 struct sigcontext *scont;
13258 scont = (struct sigcontext *)0;
13259 return 1;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013260}
13261int
Illia Bobyra96d5442023-08-30 16:30:15 +020013262main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013263{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013264
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013265 ;
13266 return 0;
13267}
13268_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013269if ac_fn_c_try_compile "$LINENO"
13270then :
13271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13272printf "%s\n" "yes" >&6; }
13273 printf "%s\n" "#define HAVE_SIGCONTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013274
Illia Bobyra96d5442023-08-30 16:30:15 +020013275else $as_nop
13276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13277printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013278fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013279rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013280
Illia Bobyra96d5442023-08-30 16:30:15 +020013281{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
13282printf %s "checking getcwd implementation is broken... " >&6; }
13283if test ${vim_cv_getcwd_broken+y}
13284then :
13285 printf %s "(cached) " >&6
13286else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000013287
Illia Bobyra96d5442023-08-30 16:30:15 +020013288 if test "$cross_compiling" = yes
13289then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013290
Bram Moolenaar7db77842014-03-27 17:40:59 +010013291 as_fn_error $? "cross-compiling: please set 'vim_cv_getcwd_broken'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000013292
Illia Bobyra96d5442023-08-30 16:30:15 +020013293else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13295/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013296
Bram Moolenaar446cb832008-06-24 21:56:24 +000013297#include "confdefs.h"
13298#ifdef HAVE_UNISTD_H
13299#include <unistd.h>
13300#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000013301char *dagger[] = { "IFS=pwd", 0 };
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013302int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013303{
13304 char buffer[500];
13305 extern char **environ;
13306 environ = dagger;
13307 return getcwd(buffer, 500) ? 0 : 1;
13308}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013309
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013310_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013311if ac_fn_c_try_run "$LINENO"
13312then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013313
13314 vim_cv_getcwd_broken=no
13315
Illia Bobyra96d5442023-08-30 16:30:15 +020013316else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000013317
13318 vim_cv_getcwd_broken=yes
13319
13320fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013321rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13322 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013323fi
13324
13325
Bram Moolenaar446cb832008-06-24 21:56:24 +000013326fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013327{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
13328printf "%s\n" "$vim_cv_getcwd_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013329
13330if test "x$vim_cv_getcwd_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013331 printf "%s\n" "#define BAD_GETCWD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013332
Bram Moolenaar63d25552019-05-10 21:28:38 +020013333 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
Illia Bobyra96d5442023-08-30 16:30:15 +020013334if test "x$ac_cv_func_getwd" = xyes
13335then :
13336 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
Bram Moolenaar63d25552019-05-10 21:28:38 +020013337
Bram Moolenaar071d4272004-06-13 20:20:40 +000013338fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013339
Illia Bobyra96d5442023-08-30 16:30:15 +020013340fi
13341
13342ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir"
13343if test "x$ac_cv_func_fchdir" = xyes
13344then :
13345 printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013346
Bram Moolenaar071d4272004-06-13 20:20:40 +000013347fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013348ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
13349if test "x$ac_cv_func_fchown" = xyes
13350then :
13351 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013352
Illia Bobyra96d5442023-08-30 16:30:15 +020013353fi
13354ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
13355if test "x$ac_cv_func_fchmod" = xyes
13356then :
13357 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
13358
13359fi
13360ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
13361if test "x$ac_cv_func_fsync" = xyes
13362then :
13363 printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
13364
13365fi
13366ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
13367if test "x$ac_cv_func_getcwd" = xyes
13368then :
13369 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
13370
13371fi
13372ac_fn_c_check_func "$LINENO" "getpseudotty" "ac_cv_func_getpseudotty"
13373if test "x$ac_cv_func_getpseudotty" = xyes
13374then :
13375 printf "%s\n" "#define HAVE_GETPSEUDOTTY 1" >>confdefs.h
13376
13377fi
13378ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
13379if test "x$ac_cv_func_getpwent" = xyes
13380then :
13381 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
13382
13383fi
13384ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
13385if test "x$ac_cv_func_getpwnam" = xyes
13386then :
13387 printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
13388
13389fi
13390ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid"
13391if test "x$ac_cv_func_getpwuid" = xyes
13392then :
13393 printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h
13394
13395fi
13396ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
13397if test "x$ac_cv_func_getrlimit" = xyes
13398then :
13399 printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
13400
13401fi
13402ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13403if test "x$ac_cv_func_gettimeofday" = xyes
13404then :
13405 printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
13406
13407fi
13408ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
13409if test "x$ac_cv_func_localtime_r" = xyes
13410then :
13411 printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
13412
13413fi
13414ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
13415if test "x$ac_cv_func_lstat" = xyes
13416then :
13417 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
13418
13419fi
13420ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
13421if test "x$ac_cv_func_memset" = xyes
13422then :
13423 printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h
13424
13425fi
13426ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
13427if test "x$ac_cv_func_mkdtemp" = xyes
13428then :
13429 printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h
13430
13431fi
13432ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
13433if test "x$ac_cv_func_nanosleep" = xyes
13434then :
13435 printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
13436
13437fi
13438ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
13439if test "x$ac_cv_func_opendir" = xyes
13440then :
13441 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
13442
13443fi
13444ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
13445if test "x$ac_cv_func_putenv" = xyes
13446then :
13447 printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h
13448
13449fi
13450ac_fn_c_check_func "$LINENO" "qsort" "ac_cv_func_qsort"
13451if test "x$ac_cv_func_qsort" = xyes
13452then :
13453 printf "%s\n" "#define HAVE_QSORT 1" >>confdefs.h
13454
13455fi
13456ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
13457if test "x$ac_cv_func_readlink" = xyes
13458then :
13459 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
13460
13461fi
13462ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
13463if test "x$ac_cv_func_select" = xyes
13464then :
13465 printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
13466
13467fi
13468ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
13469if test "x$ac_cv_func_setenv" = xyes
13470then :
13471 printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h
13472
13473fi
13474ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
13475if test "x$ac_cv_func_getpgid" = xyes
13476then :
13477 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
13478
13479fi
13480ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
13481if test "x$ac_cv_func_setpgid" = xyes
13482then :
13483 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
13484
13485fi
13486ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
13487if test "x$ac_cv_func_setsid" = xyes
13488then :
13489 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
13490
13491fi
13492ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
13493if test "x$ac_cv_func_sigaltstack" = xyes
13494then :
13495 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
13496
13497fi
13498ac_fn_c_check_func "$LINENO" "sigstack" "ac_cv_func_sigstack"
13499if test "x$ac_cv_func_sigstack" = xyes
13500then :
13501 printf "%s\n" "#define HAVE_SIGSTACK 1" >>confdefs.h
13502
13503fi
13504ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
13505if test "x$ac_cv_func_sigset" = xyes
13506then :
13507 printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
13508
13509fi
13510ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp"
13511if test "x$ac_cv_func_sigsetjmp" = xyes
13512then :
13513 printf "%s\n" "#define HAVE_SIGSETJMP 1" >>confdefs.h
13514
13515fi
13516ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
13517if test "x$ac_cv_func_sigaction" = xyes
13518then :
13519 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
13520
13521fi
13522ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
13523if test "x$ac_cv_func_sigprocmask" = xyes
13524then :
13525 printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
13526
13527fi
13528ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
13529if test "x$ac_cv_func_sigvec" = xyes
13530then :
13531 printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
13532
13533fi
13534ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
13535if test "x$ac_cv_func_strcasecmp" = xyes
13536then :
13537 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
13538
13539fi
13540ac_fn_c_check_func "$LINENO" "strcoll" "ac_cv_func_strcoll"
13541if test "x$ac_cv_func_strcoll" = xyes
13542then :
13543 printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
13544
13545fi
13546ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
13547if test "x$ac_cv_func_strerror" = xyes
13548then :
13549 printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
13550
13551fi
13552ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
13553if test "x$ac_cv_func_strftime" = xyes
13554then :
13555 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
13556
13557fi
13558ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp"
13559if test "x$ac_cv_func_stricmp" = xyes
13560then :
13561 printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h
13562
13563fi
13564ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
13565if test "x$ac_cv_func_strncasecmp" = xyes
13566then :
13567 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
13568
13569fi
13570ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp"
13571if test "x$ac_cv_func_strnicmp" = xyes
13572then :
13573 printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h
13574
13575fi
13576ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
13577if test "x$ac_cv_func_strpbrk" = xyes
13578then :
13579 printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
13580
13581fi
13582ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
13583if test "x$ac_cv_func_strptime" = xyes
13584then :
13585 printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
13586
13587fi
13588ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
13589if test "x$ac_cv_func_strtol" = xyes
13590then :
13591 printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
13592
13593fi
13594ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
13595if test "x$ac_cv_func_tgetent" = xyes
13596then :
13597 printf "%s\n" "#define HAVE_TGETENT 1" >>confdefs.h
13598
13599fi
13600ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
13601if test "x$ac_cv_func_towlower" = xyes
13602then :
13603 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
13604
13605fi
13606ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper"
13607if test "x$ac_cv_func_towupper" = xyes
13608then :
13609 printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h
13610
13611fi
13612ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper"
13613if test "x$ac_cv_func_iswupper" = xyes
13614then :
13615 printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h
13616
13617fi
13618ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
13619if test "x$ac_cv_func_tzset" = xyes
13620then :
13621 printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
13622
13623fi
13624ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
13625if test "x$ac_cv_func_usleep" = xyes
13626then :
13627 printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
13628
13629fi
13630ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
13631if test "x$ac_cv_func_utime" = xyes
13632then :
13633 printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
13634
13635fi
13636ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
13637if test "x$ac_cv_func_utimes" = xyes
13638then :
13639 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
13640
13641fi
13642ac_fn_c_check_func "$LINENO" "mblen" "ac_cv_func_mblen"
13643if test "x$ac_cv_func_mblen" = xyes
13644then :
13645 printf "%s\n" "#define HAVE_MBLEN 1" >>confdefs.h
13646
13647fi
13648ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
13649if test "x$ac_cv_func_ftruncate" = xyes
13650then :
13651 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
13652
13653fi
13654ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
13655if test "x$ac_cv_func_unsetenv" = xyes
13656then :
13657 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
13658
13659fi
13660ac_fn_c_check_func "$LINENO" "posix_openpt" "ac_cv_func_posix_openpt"
13661if test "x$ac_cv_func_posix_openpt" = xyes
13662then :
13663 printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h
13664
13665fi
13666ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
13667if test "x$ac_cv_func_clock_gettime" = xyes
13668then :
13669 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013670
13671fi
13672
Bram Moolenaar643b6142018-09-12 20:29:09 +020013673
Illia Bobyra96d5442023-08-30 16:30:15 +020013674
13675
13676{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
13677printf %s "checking types of arguments for select... " >&6; }
13678if test ${ac_cv_func_select_args+y}
13679then :
13680 printf %s "(cached) " >&6
13681else $as_nop
13682 ac_cv_func_select_args='int,int *,struct timeval *'
13683for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
Bram Moolenaar643b6142018-09-12 20:29:09 +020013684 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
13685 for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
13686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13687/* end confdefs.h. */
13688$ac_includes_default
13689#ifdef HAVE_SYS_SELECT_H
13690# include <sys/select.h>
13691#endif
13692#ifdef HAVE_SYS_SOCKET_H
13693# include <sys/socket.h>
13694#endif
13695
13696int
Illia Bobyra96d5442023-08-30 16:30:15 +020013697main (void)
Bram Moolenaar643b6142018-09-12 20:29:09 +020013698{
13699extern int select ($ac_arg1,
13700 $ac_arg234, $ac_arg234, $ac_arg234,
13701 $ac_arg5);
13702 ;
13703 return 0;
13704}
13705_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013706if ac_fn_c_try_compile "$LINENO"
13707then :
Bram Moolenaar643b6142018-09-12 20:29:09 +020013708 ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
13709fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013710rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar643b6142018-09-12 20:29:09 +020013711 done
13712 done
13713done
Bram Moolenaar643b6142018-09-12 20:29:09 +020013714
13715fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
13717printf "%s\n" "$ac_cv_func_select_args" >&6; }
Bram Moolenaar643b6142018-09-12 20:29:09 +020013718ac_save_IFS=$IFS; IFS=','
13719set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
13720IFS=$ac_save_IFS
13721shift
13722
Illia Bobyra96d5442023-08-30 16:30:15 +020013723printf "%s\n" "#define SELECT_TYPE_ARG1 $1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013724
13725
Illia Bobyra96d5442023-08-30 16:30:15 +020013726printf "%s\n" "#define SELECT_TYPE_ARG234 ($2)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013727
13728
Illia Bobyra96d5442023-08-30 16:30:15 +020013729printf "%s\n" "#define SELECT_TYPE_ARG5 ($3)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020013730
Illia Bobyra96d5442023-08-30 16:30:15 +020013731rm -rf conftest*
Bram Moolenaar643b6142018-09-12 20:29:09 +020013732
Illia Bobyra96d5442023-08-30 16:30:15 +020013733{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13734printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13735if test ${ac_cv_sys_largefile_source+y}
13736then :
13737 printf %s "(cached) " >&6
13738else $as_nop
Bram Moolenaar25153e12010-02-24 14:47:08 +010013739 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013741/* end confdefs.h. */
13742#include <sys/types.h> /* for off_t */
13743 #include <stdio.h>
13744int
Illia Bobyra96d5442023-08-30 16:30:15 +020013745main (void)
Bram Moolenaar25153e12010-02-24 14:47:08 +010013746{
13747int (*fp) (FILE *, off_t, int) = fseeko;
13748 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13749 ;
13750 return 0;
13751}
13752_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013753if ac_fn_c_try_link "$LINENO"
13754then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010013755 ac_cv_sys_largefile_source=no; break
Bram Moolenaar25153e12010-02-24 14:47:08 +010013756fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013757rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013758 conftest$ac_exeext conftest.$ac_ext
13759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013760/* end confdefs.h. */
13761#define _LARGEFILE_SOURCE 1
13762#include <sys/types.h> /* for off_t */
13763 #include <stdio.h>
13764int
Illia Bobyra96d5442023-08-30 16:30:15 +020013765main (void)
Bram Moolenaar25153e12010-02-24 14:47:08 +010013766{
13767int (*fp) (FILE *, off_t, int) = fseeko;
13768 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13769 ;
13770 return 0;
13771}
13772_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013773if ac_fn_c_try_link "$LINENO"
13774then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010013775 ac_cv_sys_largefile_source=1; break
Bram Moolenaar25153e12010-02-24 14:47:08 +010013776fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013777rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013778 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010013779 ac_cv_sys_largefile_source=unknown
13780 break
13781done
13782fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013783{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13784printf "%s\n" "$ac_cv_sys_largefile_source" >&6; }
Bram Moolenaar25153e12010-02-24 14:47:08 +010013785case $ac_cv_sys_largefile_source in #(
13786 no | unknown) ;;
13787 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013788printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010013789;;
13790esac
13791rm -rf conftest*
13792
13793# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13794# in glibc 2.1.3, but that breaks too many other things.
13795# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13796if test $ac_cv_sys_largefile_source != unknown; then
13797
Illia Bobyra96d5442023-08-30 16:30:15 +020013798printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010013799
13800fi
13801
Bram Moolenaar071d4272004-06-13 20:20:40 +000013802
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013803# Check whether --enable-largefile was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013804if test ${enable_largefile+y}
13805then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013806 enableval=$enable_largefile;
13807fi
13808
13809if test "$enable_largefile" != no; then
13810
Illia Bobyra96d5442023-08-30 16:30:15 +020013811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
13812printf %s "checking for special C compiler options needed for large files... " >&6; }
13813if test ${ac_cv_sys_largefile_CC+y}
13814then :
13815 printf %s "(cached) " >&6
13816else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013817 ac_cv_sys_largefile_CC=no
13818 if test "$GCC" != yes; then
13819 ac_save_CC=$CC
13820 while :; do
13821 # IRIX 6.2 and later do not support large files by default,
13822 # so use the C compiler's -n32 option if that helps.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013824/* end confdefs.h. */
13825#include <sys/types.h>
13826 /* Check that off_t can represent 2**63 - 1 correctly.
13827 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13828 since some C++ compilers masquerading as C compilers
13829 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013830#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013831 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13832 && LARGE_OFF_T % 2147483647 == 1)
13833 ? 1 : -1];
13834int
Illia Bobyra96d5442023-08-30 16:30:15 +020013835main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013836{
13837
13838 ;
13839 return 0;
13840}
13841_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013842 if ac_fn_c_try_compile "$LINENO"
13843then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013844 break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013845fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013846rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013847 CC="$CC -n32"
Illia Bobyra96d5442023-08-30 16:30:15 +020013848 if ac_fn_c_try_compile "$LINENO"
13849then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013850 ac_cv_sys_largefile_CC=' -n32'; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013851fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013852rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013853 break
13854 done
13855 CC=$ac_save_CC
13856 rm -f conftest.$ac_ext
13857 fi
13858fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013859{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
13860printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013861 if test "$ac_cv_sys_largefile_CC" != no; then
13862 CC=$CC$ac_cv_sys_largefile_CC
13863 fi
13864
Illia Bobyra96d5442023-08-30 16:30:15 +020013865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13866printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
13867if test ${ac_cv_sys_file_offset_bits+y}
13868then :
13869 printf %s "(cached) " >&6
13870else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013871 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013873/* end confdefs.h. */
13874#include <sys/types.h>
13875 /* Check that off_t can represent 2**63 - 1 correctly.
13876 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13877 since some C++ compilers masquerading as C compilers
13878 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013879#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013880 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13881 && LARGE_OFF_T % 2147483647 == 1)
13882 ? 1 : -1];
13883int
Illia Bobyra96d5442023-08-30 16:30:15 +020013884main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013885{
13886
13887 ;
13888 return 0;
13889}
13890_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013891if ac_fn_c_try_compile "$LINENO"
13892then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013893 ac_cv_sys_file_offset_bits=no; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013894fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013895rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013897/* end confdefs.h. */
13898#define _FILE_OFFSET_BITS 64
13899#include <sys/types.h>
13900 /* Check that off_t can represent 2**63 - 1 correctly.
13901 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13902 since some C++ compilers masquerading as C compilers
13903 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013904#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013905 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13906 && LARGE_OFF_T % 2147483647 == 1)
13907 ? 1 : -1];
13908int
Illia Bobyra96d5442023-08-30 16:30:15 +020013909main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013910{
13911
13912 ;
13913 return 0;
13914}
13915_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013916if ac_fn_c_try_compile "$LINENO"
13917then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013918 ac_cv_sys_file_offset_bits=64; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013919fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013920rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013921 ac_cv_sys_file_offset_bits=unknown
13922 break
13923done
13924fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013925{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
13926printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013927case $ac_cv_sys_file_offset_bits in #(
13928 no | unknown) ;;
13929 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020013930printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013931;;
13932esac
13933rm -rf conftest*
13934 if test $ac_cv_sys_file_offset_bits = unknown; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
13936printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
13937if test ${ac_cv_sys_large_files+y}
13938then :
13939 printf %s "(cached) " >&6
13940else $as_nop
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013941 while :; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013943/* end confdefs.h. */
13944#include <sys/types.h>
13945 /* Check that off_t can represent 2**63 - 1 correctly.
13946 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13947 since some C++ compilers masquerading as C compilers
13948 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013949#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013950 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13951 && LARGE_OFF_T % 2147483647 == 1)
13952 ? 1 : -1];
13953int
Illia Bobyra96d5442023-08-30 16:30:15 +020013954main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013955{
13956
13957 ;
13958 return 0;
13959}
13960_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013961if ac_fn_c_try_compile "$LINENO"
13962then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013963 ac_cv_sys_large_files=no; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013964fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013965rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013967/* end confdefs.h. */
13968#define _LARGE_FILES 1
13969#include <sys/types.h>
13970 /* Check that off_t can represent 2**63 - 1 correctly.
13971 We can't simply define LARGE_OFF_T to be 9223372036854775807,
13972 since some C++ compilers masquerading as C compilers
13973 incorrectly reject 9223372036854775807. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013974#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013975 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13976 && LARGE_OFF_T % 2147483647 == 1)
13977 ? 1 : -1];
13978int
Illia Bobyra96d5442023-08-30 16:30:15 +020013979main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013980{
13981
13982 ;
13983 return 0;
13984}
13985_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013986if ac_fn_c_try_compile "$LINENO"
13987then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013988 ac_cv_sys_large_files=1; break
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013989fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013990rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013991 ac_cv_sys_large_files=unknown
13992 break
13993done
13994fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013995{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
13996printf "%s\n" "$ac_cv_sys_large_files" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020013997case $ac_cv_sys_large_files in #(
13998 no | unknown) ;;
13999 *)
Illia Bobyra96d5442023-08-30 16:30:15 +020014000printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014001;;
14002esac
14003rm -rf conftest*
14004 fi
14005fi
14006
14007
Illia Bobyra96d5442023-08-30 16:30:15 +020014008{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
14009printf %s "checking --enable-canberra argument... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014010# Check whether --enable-canberra was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014011if test ${enable_canberra+y}
14012then :
Bram Moolenaar21606672019-06-14 20:40:58 +020014013 enableval=$enable_canberra;
Illia Bobyra96d5442023-08-30 16:30:15 +020014014else $as_nop
Bram Moolenaar21606672019-06-14 20:40:58 +020014015 enable_canberra="maybe"
14016fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014017
Bram Moolenaar21606672019-06-14 20:40:58 +020014018
14019if test "$enable_canberra" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014020 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14022printf "%s\n" "Defaulting to yes" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014023 enable_canberra="yes"
14024 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14026printf "%s\n" "Defaulting to no" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014027 enable_canberra="no"
14028 fi
14029else
Bram Moolenaar12471262022-01-18 11:11:25 +000014030 if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use sound with tiny features" >&5
14032printf "%s\n" "cannot use sound with tiny features" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014033 enable_canberra="no"
14034 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
14036printf "%s\n" "$enable_canberra" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014037 fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014038fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014039if test "$enable_canberra" = "yes"; then
14040 if test "x$PKG_CONFIG" != "xno"; then
14041 canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
14042 canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
14043 fi
14044 if test "x$canberra_lib" = "x"; then
14045 canberra_lib=-lcanberra
14046 canberra_cflags=-D_REENTRANT
14047 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
14049printf %s "checking for libcanberra... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014050 ac_save_CFLAGS="$CFLAGS"
14051 ac_save_LIBS="$LIBS"
Bram Moolenaar12471262022-01-18 11:11:25 +000014052 if `echo "$CFLAGS" | grep -v "$canberra_cflags" 2>/dev/null`; then
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020014053 CFLAGS="$CFLAGS $canberra_cflags"
14054 fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014055 LIBS="$LIBS $canberra_lib"
14056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014057/* end confdefs.h. */
14058
Bram Moolenaar21606672019-06-14 20:40:58 +020014059 # include <canberra.h>
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014060
14061int
Illia Bobyra96d5442023-08-30 16:30:15 +020014062main (void)
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014063{
14064
Bram Moolenaar21606672019-06-14 20:40:58 +020014065 ca_context *hello;
14066 ca_context_create(&hello);
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014067 ;
14068 return 0;
14069}
14070_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014071if ac_fn_c_try_link "$LINENO"
14072then :
14073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14074printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_CANBERRA 1" >>confdefs.h
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014075
Illia Bobyra96d5442023-08-30 16:30:15 +020014076else $as_nop
14077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libcanberra-dev" >&5
14078printf "%s\n" "no; try installing libcanberra-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014079fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014080rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014081 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar21606672019-06-14 20:40:58 +020014082fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014083
Illia Bobyra96d5442023-08-30 16:30:15 +020014084{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-libsodium argument" >&5
14085printf %s "checking --enable-libsodium argument... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014086# Check whether --enable-libsodium was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014087if test ${enable_libsodium+y}
14088then :
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014089 enableval=$enable_libsodium;
Illia Bobyra96d5442023-08-30 16:30:15 +020014090else $as_nop
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014091 enable_libsodium="maybe"
14092fi
14093
14094
14095if test "$enable_libsodium" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014096 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14098printf "%s\n" "Defaulting to yes" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014099 enable_libsodium="yes"
14100 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14102printf "%s\n" "Defaulting to no" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014103 enable_libsodium="no"
14104 fi
14105else
Illia Bobyra96d5442023-08-30 16:30:15 +020014106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_libsodium" >&5
14107printf "%s\n" "$enable_libsodium" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014108fi
14109if test "$enable_libsodium" = "yes"; then
14110 if test "x$PKG_CONFIG" != "xno"; then
14111 libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
14112 libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
14113 fi
14114 if test "x$libsodium_lib" = "x"; then
14115 libsodium_lib=-lsodium
14116 libsodium_cflags=
14117 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsodium" >&5
14119printf %s "checking for libsodium... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014120 ac_save_CFLAGS="$CFLAGS"
14121 ac_save_LIBS="$LIBS"
14122 CFLAGS="$CFLAGS $libsodium_cflags"
14123 LIBS="$LIBS $libsodium_lib"
14124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14125/* end confdefs.h. */
14126
14127 # include <sodium.h>
14128
14129int
Illia Bobyra96d5442023-08-30 16:30:15 +020014130main (void)
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014131{
14132
14133 printf("%d", sodium_init());
14134 ;
14135 return 0;
14136}
14137_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014138if ac_fn_c_try_link "$LINENO"
14139then :
14140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14141printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SODIUM 1" >>confdefs.h
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014142
Illia Bobyra96d5442023-08-30 16:30:15 +020014143else $as_nop
14144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libsodium-dev" >&5
14145printf "%s\n" "no; try installing libsodium-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS"
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014146fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014147rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014148 conftest$ac_exeext conftest.$ac_ext
14149fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014150
Illia Bobyra96d5442023-08-30 16:30:15 +020014151{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
14152printf %s "checking for st_blksize... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014154/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014155#include <sys/types.h>
14156#include <sys/stat.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014157int
Illia Bobyra96d5442023-08-30 16:30:15 +020014158main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014159{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014160 struct stat st;
14161 int n;
14162
14163 stat("/", &st);
14164 n = (int)st.st_blksize;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014165 ;
14166 return 0;
14167}
14168_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014169if ac_fn_c_try_compile "$LINENO"
14170then :
14171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14172printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014173
Illia Bobyra96d5442023-08-30 16:30:15 +020014174else $as_nop
14175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14176printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014177fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014178rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014179
Illia Bobyra96d5442023-08-30 16:30:15 +020014180{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create without -lrt" >&5
14181printf %s "checking for timer_create without -lrt... " >&6; }
14182if test ${vim_cv_timer_create+y}
14183then :
14184 printf %s "(cached) " >&6
14185else $as_nop
Bram Moolenaar5748b7f2022-07-28 12:09:04 +010014186
Illia Bobyra96d5442023-08-30 16:30:15 +020014187if test "$cross_compiling" = yes
14188then :
14189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create'" >&5
14190printf "%s\n" "$as_me: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create'" >&2;}
Richard Purdie509695c2022-07-24 20:48:00 +010014191
Illia Bobyra96d5442023-08-30 16:30:15 +020014192else $as_nop
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014194/* end confdefs.h. */
14195
Bram Moolenaar5748b7f2022-07-28 12:09:04 +010014196#if STDC_HEADERS
14197# include <stdlib.h>
14198# include <stddef.h>
14199#endif
14200#include <signal.h>
14201#include <time.h>
Bram Moolenaare5303952022-06-19 17:05:47 +010014202static void set_flag(union sigval sv) {}
Paul Ollis65745772022-06-05 16:55:54 +010014203
14204int
Illia Bobyra96d5442023-08-30 16:30:15 +020014205main (void)
Paul Ollis65745772022-06-05 16:55:54 +010014206{
14207
14208 struct timespec ts;
14209 struct sigevent action = {0};
14210 timer_t timer_id;
14211
14212 action.sigev_notify = SIGEV_THREAD;
14213 action.sigev_notify_function = set_flag;
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014214 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
14215 exit(1); // cannot create a monotonic timer
Paul Ollis65745772022-06-05 16:55:54 +010014216
14217 ;
14218 return 0;
14219}
14220_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014221if ac_fn_c_try_run "$LINENO"
14222then :
Richard Purdie509695c2022-07-24 20:48:00 +010014223 vim_cv_timer_create=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014224else $as_nop
Richard Purdie509695c2022-07-24 20:48:00 +010014225 vim_cv_timer_create=no
Paul Ollis65745772022-06-05 16:55:54 +010014226fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14228 conftest.$ac_objext conftest.beam conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014229fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014230
14231fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014232{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create" >&5
14233printf "%s\n" "$vim_cv_timer_create" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014234
14235if test "x$vim_cv_timer_create" = "xno" ; then
14236 save_LIBS="$LIBS"
14237 LIBS="$LIBS -lrt"
Illia Bobyra96d5442023-08-30 16:30:15 +020014238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create with -lrt" >&5
14239printf %s "checking for timer_create with -lrt... " >&6; }
14240if test ${vim_cv_timer_create_with_lrt+y}
14241then :
14242 printf %s "(cached) " >&6
14243else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014244
Illia Bobyra96d5442023-08-30 16:30:15 +020014245 if test "$cross_compiling" = yes
14246then :
14247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create_with_lrt'" >&5
14248printf "%s\n" "$as_me: WARNING: failed to build test program; if cross-compiling please set 'vim_cv_timer_create_with_lrt'" >&2;}
Bram Moolenaarefffa532022-07-28 22:39:54 +010014249
Illia Bobyra96d5442023-08-30 16:30:15 +020014250else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14252/* end confdefs.h. */
14253
14254 #if STDC_HEADERS
14255 # include <stdlib.h>
14256 # include <stddef.h>
14257 #endif
14258 #include <signal.h>
14259 #include <time.h>
14260 static void set_flag(union sigval sv) {}
14261
14262int
Illia Bobyra96d5442023-08-30 16:30:15 +020014263main (void)
Bram Moolenaarefffa532022-07-28 22:39:54 +010014264{
14265
14266 struct timespec ts;
14267 struct sigevent action = {0};
14268 timer_t timer_id;
14269
14270 action.sigev_notify = SIGEV_THREAD;
14271 action.sigev_notify_function = set_flag;
14272 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
14273 exit(1); // cannot create a monotonic timer
14274
14275 ;
14276 return 0;
14277}
14278_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014279if ac_fn_c_try_run "$LINENO"
14280then :
Bram Moolenaarefffa532022-07-28 22:39:54 +010014281 vim_cv_timer_create_with_lrt=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014282else $as_nop
Bram Moolenaarefffa532022-07-28 22:39:54 +010014283 vim_cv_timer_create_with_lrt=no
14284fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14286 conftest.$ac_objext conftest.beam conftest.$ac_ext
14287fi
14288
Richard Purdie509695c2022-07-24 20:48:00 +010014289fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014290{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_with_lrt" >&5
14291printf "%s\n" "$vim_cv_timer_create_with_lrt" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014292 LIBS="$save_LIBS"
14293else
14294 vim_cv_timer_create_with_lrt=no
14295fi
Richard Purdie509695c2022-07-24 20:48:00 +010014296
14297if test "x$vim_cv_timer_create" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014298 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014299
14300fi
Bram Moolenaarefffa532022-07-28 22:39:54 +010014301if test "x$vim_cv_timer_create_with_lrt" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014302 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010014303
Bram Moolenaarefffa532022-07-28 22:39:54 +010014304 LIBS="$LIBS -lrt"
14305fi
Richard Purdie509695c2022-07-24 20:48:00 +010014306
Illia Bobyra96d5442023-08-30 16:30:15 +020014307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
14308printf %s "checking whether stat() ignores a trailing slash... " >&6; }
14309if test ${vim_cv_stat_ignores_slash+y}
14310then :
14311 printf %s "(cached) " >&6
14312else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014313
Illia Bobyra96d5442023-08-30 16:30:15 +020014314 if test "$cross_compiling" = yes
14315then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014316
Bram Moolenaar7db77842014-03-27 17:40:59 +010014317 as_fn_error $? "cross-compiling: please set 'vim_cv_stat_ignores_slash'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000014318
Illia Bobyra96d5442023-08-30 16:30:15 +020014319else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14321/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014322
14323#include "confdefs.h"
14324#if STDC_HEADERS
14325# include <stdlib.h>
14326# include <stddef.h>
14327#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014328#include <sys/types.h>
14329#include <sys/stat.h>
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010014330int main() {struct stat st; exit(stat("configure/", &st) != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014331
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014332_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014333if ac_fn_c_try_run "$LINENO"
14334then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014335
14336 vim_cv_stat_ignores_slash=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +000014337
Illia Bobyra96d5442023-08-30 16:30:15 +020014338else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014339
14340 vim_cv_stat_ignores_slash=no
14341
Bram Moolenaar071d4272004-06-13 20:20:40 +000014342fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014343rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14344 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014345fi
14346
Bram Moolenaar446cb832008-06-24 21:56:24 +000014347
Bram Moolenaar446cb832008-06-24 21:56:24 +000014348fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
14350printf "%s\n" "$vim_cv_stat_ignores_slash" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014351
14352if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014353 printf "%s\n" "#define STAT_IGNORES_SLASH 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014354
14355fi
14356
Illia Bobyra96d5442023-08-30 16:30:15 +020014357{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanoseconds field of struct stat" >&5
14358printf %s "checking for nanoseconds field of struct stat... " >&6; }
14359if test ${ac_cv_struct_st_mtim_nsec+y}
14360then :
14361 printf %s "(cached) " >&6
14362else $as_nop
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014363 ac_save_CPPFLAGS="$CPPFLAGS"
14364 ac_cv_struct_st_mtim_nsec=no
14365 # st_mtim.tv_nsec -- the usual case
14366 # st_mtim._tv_nsec -- Solaris 2.6, if
14367 # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
14368 # && !defined __EXTENSIONS__)
14369 # st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
14370 # st_mtime_n -- AIX 5.2 and above
14371 # st_mtimespec.tv_nsec -- Darwin (Mac OSX)
14372 for ac_val in st_mtim.tv_nsec st_mtim._tv_nsec st_mtim.st__tim.tv_nsec st_mtime_n st_mtimespec.tv_nsec; do
14373 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
14374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14375/* end confdefs.h. */
14376#include <sys/types.h>
14377#include <sys/stat.h>
14378int
Illia Bobyra96d5442023-08-30 16:30:15 +020014379main (void)
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014380{
14381struct stat s; s.ST_MTIM_NSEC;
14382 ;
14383 return 0;
14384}
14385_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014386if ac_fn_c_try_compile "$LINENO"
14387then :
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014388 ac_cv_struct_st_mtim_nsec=$ac_val; break
14389fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014390rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014391 done
14392 CPPFLAGS="$ac_save_CPPFLAGS"
14393
14394fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014395{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_mtim_nsec" >&5
14396printf "%s\n" "$ac_cv_struct_st_mtim_nsec" >&6; }
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014397if test $ac_cv_struct_st_mtim_nsec != no; then
14398
Illia Bobyra96d5442023-08-30 16:30:15 +020014399printf "%s\n" "#define ST_MTIM_NSEC $ac_cv_struct_st_mtim_nsec" >>confdefs.h
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010014400
14401fi
14402
Illia Bobyra96d5442023-08-30 16:30:15 +020014403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
14404printf %s "checking for iconv_open()... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014405save_LIBS="$LIBS"
14406LIBS="$LIBS -liconv"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014408/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014409
14410#ifdef HAVE_ICONV_H
14411# include <iconv.h>
14412#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014413
14414int
Illia Bobyra96d5442023-08-30 16:30:15 +020014415main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014416{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014417iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014418 ;
14419 return 0;
14420}
14421_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014422if ac_fn_c_try_link "$LINENO"
14423then :
14424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
14425printf "%s\n" "yes; with -liconv" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014426
Illia Bobyra96d5442023-08-30 16:30:15 +020014427else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014428 LIBS="$save_LIBS"
14429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014430/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014431
14432#ifdef HAVE_ICONV_H
14433# include <iconv.h>
14434#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014435
14436int
Illia Bobyra96d5442023-08-30 16:30:15 +020014437main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014438{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014439iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014440 ;
14441 return 0;
14442}
14443_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014444if ac_fn_c_try_link "$LINENO"
14445then :
14446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14447printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014448
Illia Bobyra96d5442023-08-30 16:30:15 +020014449else $as_nop
14450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14451printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014452fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014453rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014454 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014455fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014456rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014457 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014458
14459
Illia Bobyra96d5442023-08-30 16:30:15 +020014460{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
14461printf %s "checking for nl_langinfo(CODESET)... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014463/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014464
14465#ifdef HAVE_LANGINFO_H
14466# include <langinfo.h>
14467#endif
14468
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014469int
Illia Bobyra96d5442023-08-30 16:30:15 +020014470main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014471{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014472char *cs = nl_langinfo(CODESET);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014473 ;
14474 return 0;
14475}
14476_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014477if ac_fn_c_try_link "$LINENO"
14478then :
14479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14480printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014481
Illia Bobyra96d5442023-08-30 16:30:15 +020014482else $as_nop
14483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14484printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014485fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014486rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014487 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014488
Illia Bobyra96d5442023-08-30 16:30:15 +020014489{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
14490printf %s "checking for strtod in -lm... " >&6; }
14491if test ${ac_cv_lib_m_strtod+y}
14492then :
14493 printf %s "(cached) " >&6
14494else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014495 ac_check_lib_save_LIBS=$LIBS
14496LIBS="-lm $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014498/* end confdefs.h. */
14499
14500/* Override any GCC internal prototype to avoid an error.
14501 Use char because int might match the return type of a GCC
14502 builtin and then its argument prototype would still apply. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000014503char strtod ();
14504int
Illia Bobyra96d5442023-08-30 16:30:15 +020014505main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000014506{
14507return strtod ();
14508 ;
14509 return 0;
14510}
14511_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014512if ac_fn_c_try_link "$LINENO"
14513then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014514 ac_cv_lib_m_strtod=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014515else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014516 ac_cv_lib_m_strtod=no
Bram Moolenaar446cb832008-06-24 21:56:24 +000014517fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014518rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014519 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014520LIBS=$ac_check_lib_save_LIBS
14521fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014522{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
14523printf "%s\n" "$ac_cv_lib_m_strtod" >&6; }
14524if test "x$ac_cv_lib_m_strtod" = xyes
14525then :
14526 printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000014527
14528 LIBS="-lm $LIBS"
14529
14530fi
14531
Bram Moolenaar446cb832008-06-24 21:56:24 +000014532
Illia Bobyra96d5442023-08-30 16:30:15 +020014533{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
14534printf %s "checking for isinf()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14536/* end confdefs.h. */
14537
14538#ifdef HAVE_MATH_H
14539# include <math.h>
14540#endif
14541#if STDC_HEADERS
14542# include <stdlib.h>
14543# include <stddef.h>
14544#endif
14545
14546int
Illia Bobyra96d5442023-08-30 16:30:15 +020014547main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010014548{
14549int r = isinf(1.11);
14550 ;
14551 return 0;
14552}
14553_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014554if ac_fn_c_try_link "$LINENO"
14555then :
14556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14557printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISINF 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010014558
Illia Bobyra96d5442023-08-30 16:30:15 +020014559else $as_nop
14560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14561printf "%s\n" "no" >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014562fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014563rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010014564 conftest$ac_exeext conftest.$ac_ext
14565
Illia Bobyra96d5442023-08-30 16:30:15 +020014566{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
14567printf %s "checking for isnan()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14569/* end confdefs.h. */
14570
14571#ifdef HAVE_MATH_H
14572# include <math.h>
14573#endif
14574#if STDC_HEADERS
14575# include <stdlib.h>
14576# include <stddef.h>
14577#endif
14578
14579int
Illia Bobyra96d5442023-08-30 16:30:15 +020014580main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010014581{
14582int r = isnan(1.11);
14583 ;
14584 return 0;
14585}
14586_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014587if ac_fn_c_try_link "$LINENO"
14588then :
14589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14590printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISNAN 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010014591
Illia Bobyra96d5442023-08-30 16:30:15 +020014592else $as_nop
14593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14594printf "%s\n" "no" >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010014595fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014596rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010014597 conftest$ac_exeext conftest.$ac_ext
14598
Illia Bobyra96d5442023-08-30 16:30:15 +020014599{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
14600printf %s "checking --disable-acl argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014601# Check whether --enable-acl was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014602if test ${enable_acl+y}
14603then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014604 enableval=$enable_acl;
Illia Bobyra96d5442023-08-30 16:30:15 +020014605else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014606 enable_acl="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000014607fi
14608
Bram Moolenaar071d4272004-06-13 20:20:40 +000014609if test "$enable_acl" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14611printf "%s\n" "no" >&6; }
14612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
14613printf %s "checking for acl_get_file in -lposix1e... " >&6; }
14614if test ${ac_cv_lib_posix1e_acl_get_file+y}
14615then :
14616 printf %s "(cached) " >&6
14617else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014618 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014619LIBS="-lposix1e $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014621/* end confdefs.h. */
14622
Bram Moolenaar446cb832008-06-24 21:56:24 +000014623/* Override any GCC internal prototype to avoid an error.
14624 Use char because int might match the return type of a GCC
14625 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014626char acl_get_file ();
14627int
Illia Bobyra96d5442023-08-30 16:30:15 +020014628main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014629{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014630return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014631 ;
14632 return 0;
14633}
14634_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014635if ac_fn_c_try_link "$LINENO"
14636then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014637 ac_cv_lib_posix1e_acl_get_file=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014638else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014639 ac_cv_lib_posix1e_acl_get_file=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014640fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014641rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014642 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014643LIBS=$ac_check_lib_save_LIBS
14644fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014645{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
14646printf "%s\n" "$ac_cv_lib_posix1e_acl_get_file" >&6; }
14647if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes
14648then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014649 LIBS="$LIBS -lposix1e"
Illia Bobyra96d5442023-08-30 16:30:15 +020014650else $as_nop
14651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
14652printf %s "checking for acl_get_file in -lacl... " >&6; }
14653if test ${ac_cv_lib_acl_acl_get_file+y}
14654then :
14655 printf %s "(cached) " >&6
14656else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014657 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014658LIBS="-lacl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014660/* end confdefs.h. */
14661
Bram Moolenaar446cb832008-06-24 21:56:24 +000014662/* Override any GCC internal prototype to avoid an error.
14663 Use char because int might match the return type of a GCC
14664 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014665char acl_get_file ();
14666int
Illia Bobyra96d5442023-08-30 16:30:15 +020014667main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014668{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014669return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014670 ;
14671 return 0;
14672}
14673_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014674if ac_fn_c_try_link "$LINENO"
14675then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014676 ac_cv_lib_acl_acl_get_file=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014677else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014678 ac_cv_lib_acl_acl_get_file=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014679fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014680rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014681 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014682LIBS=$ac_check_lib_save_LIBS
14683fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014684{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
14685printf "%s\n" "$ac_cv_lib_acl_acl_get_file" >&6; }
14686if test "x$ac_cv_lib_acl_acl_get_file" = xyes
14687then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014688 LIBS="$LIBS -lacl"
Illia Bobyra96d5442023-08-30 16:30:15 +020014689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
14690printf %s "checking for fgetxattr in -lattr... " >&6; }
14691if test ${ac_cv_lib_attr_fgetxattr+y}
14692then :
14693 printf %s "(cached) " >&6
14694else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014695 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000014696LIBS="-lattr $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014698/* end confdefs.h. */
14699
Bram Moolenaar446cb832008-06-24 21:56:24 +000014700/* Override any GCC internal prototype to avoid an error.
14701 Use char because int might match the return type of a GCC
14702 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014703char fgetxattr ();
14704int
Illia Bobyra96d5442023-08-30 16:30:15 +020014705main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014706{
Bram Moolenaar446cb832008-06-24 21:56:24 +000014707return fgetxattr ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014708 ;
14709 return 0;
14710}
14711_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014712if ac_fn_c_try_link "$LINENO"
14713then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014714 ac_cv_lib_attr_fgetxattr=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014715else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014716 ac_cv_lib_attr_fgetxattr=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000014717fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014718rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014719 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014720LIBS=$ac_check_lib_save_LIBS
14721fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014722{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
14723printf "%s\n" "$ac_cv_lib_attr_fgetxattr" >&6; }
14724if test "x$ac_cv_lib_attr_fgetxattr" = xyes
14725then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014726 LIBS="$LIBS -lattr"
Bram Moolenaar071d4272004-06-13 20:20:40 +000014727fi
14728
Bram Moolenaar071d4272004-06-13 20:20:40 +000014729fi
14730
14731fi
14732
14733
Illia Bobyra96d5442023-08-30 16:30:15 +020014734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
14735printf %s "checking for POSIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014737/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014738
14739#include <sys/types.h>
14740#ifdef HAVE_SYS_ACL_H
14741# include <sys/acl.h>
14742#endif
14743acl_t acl;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014744int
Illia Bobyra96d5442023-08-30 16:30:15 +020014745main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014746{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014747acl = acl_get_file("foo", ACL_TYPE_ACCESS);
14748 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
14749 acl_free(acl);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014750 ;
14751 return 0;
14752}
14753_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014754if ac_fn_c_try_link "$LINENO"
14755then :
14756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14757printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_POSIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014758
Illia Bobyra96d5442023-08-30 16:30:15 +020014759else $as_nop
14760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14761printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014762fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014763rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014764 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014765
Illia Bobyra96d5442023-08-30 16:30:15 +020014766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
14767printf %s "checking for acl_get in -lsec... " >&6; }
14768if test ${ac_cv_lib_sec_acl_get+y}
14769then :
14770 printf %s "(cached) " >&6
14771else $as_nop
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014772 ac_check_lib_save_LIBS=$LIBS
14773LIBS="-lsec $LIBS"
14774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14775/* end confdefs.h. */
14776
14777/* Override any GCC internal prototype to avoid an error.
14778 Use char because int might match the return type of a GCC
14779 builtin and then its argument prototype would still apply. */
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014780char acl_get ();
14781int
Illia Bobyra96d5442023-08-30 16:30:15 +020014782main (void)
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014783{
14784return acl_get ();
14785 ;
14786 return 0;
14787}
14788_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014789if ac_fn_c_try_link "$LINENO"
14790then :
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014791 ac_cv_lib_sec_acl_get=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014792else $as_nop
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014793 ac_cv_lib_sec_acl_get=no
14794fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014795rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014796 conftest$ac_exeext conftest.$ac_ext
14797LIBS=$ac_check_lib_save_LIBS
14798fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014799{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
14800printf "%s\n" "$ac_cv_lib_sec_acl_get" >&6; }
14801if test "x$ac_cv_lib_sec_acl_get" = xyes
14802then :
14803 LIBS="$LIBS -lsec"; printf "%s\n" "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014804
Illia Bobyra96d5442023-08-30 16:30:15 +020014805else $as_nop
14806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
14807printf %s "checking for Solaris ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014809/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014810
14811#ifdef HAVE_SYS_ACL_H
14812# include <sys/acl.h>
14813#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014814int
Illia Bobyra96d5442023-08-30 16:30:15 +020014815main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014816{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014817acl("foo", GETACLCNT, 0, NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014818
14819 ;
14820 return 0;
14821}
14822_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014823if ac_fn_c_try_link "$LINENO"
14824then :
14825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14826printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014827
Illia Bobyra96d5442023-08-30 16:30:15 +020014828else $as_nop
14829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14830printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014831fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014832rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014833 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar8d462f92012-02-05 22:51:33 +010014834fi
14835
Bram Moolenaar446cb832008-06-24 21:56:24 +000014836
Illia Bobyra96d5442023-08-30 16:30:15 +020014837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
14838printf %s "checking for AIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010014839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014840/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014841
Bram Moolenaar446cb832008-06-24 21:56:24 +000014842#if STDC_HEADERS
14843# include <stdlib.h>
14844# include <stddef.h>
14845#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000014846#ifdef HAVE_SYS_ACL_H
14847# include <sys/acl.h>
14848#endif
14849#ifdef HAVE_SYS_ACCESS_H
14850# include <sys/access.h>
14851#endif
14852#define _ALL_SOURCE
14853
14854#include <sys/stat.h>
14855
14856int aclsize;
14857struct acl *aclent;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014858int
Illia Bobyra96d5442023-08-30 16:30:15 +020014859main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014860{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014861aclsize = sizeof(struct acl);
14862 aclent = (void *)malloc(aclsize);
14863 statacl("foo", STX_NORMAL, aclent, aclsize);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014864
14865 ;
14866 return 0;
14867}
14868_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014869if ac_fn_c_try_link "$LINENO"
14870then :
14871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14872printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_AIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014873
Illia Bobyra96d5442023-08-30 16:30:15 +020014874else $as_nop
14875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14876printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014877fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014878rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014879 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000014880else
Illia Bobyra96d5442023-08-30 16:30:15 +020014881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14882printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014883fi
14884
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014885if test "x$GTK_CFLAGS" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
14887printf %s "checking for pango_shape_full... " >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014888 ac_save_CFLAGS="$CFLAGS"
14889 ac_save_LIBS="$LIBS"
14890 CFLAGS="$CFLAGS $GTK_CFLAGS"
14891 LIBS="$LIBS $GTK_LIBS"
14892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14893/* end confdefs.h. */
14894#include <gtk/gtk.h>
14895int
Illia Bobyra96d5442023-08-30 16:30:15 +020014896main (void)
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014897{
14898 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
14899 ;
14900 return 0;
14901}
14902_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014903if ac_fn_c_try_link "$LINENO"
14904then :
14905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14906printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014907
Illia Bobyra96d5442023-08-30 16:30:15 +020014908else $as_nop
14909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14910printf "%s\n" "no" >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014911fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014912rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5325b9b2015-09-09 20:27:02 +020014913 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020014914 CFLAGS="$ac_save_CFLAGS"
14915 LIBS="$ac_save_LIBS"
14916fi
14917
Illia Bobyra96d5442023-08-30 16:30:15 +020014918{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gpm argument" >&5
14919printf %s "checking --enable-gpm argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014920# Check whether --enable-gpm was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014921if test ${enable_gpm+y}
14922then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014923 enableval=$enable_gpm;
Illia Bobyra96d5442023-08-30 16:30:15 +020014924else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014925 enable_gpm="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000014926fi
14927
Bram Moolenaar071d4272004-06-13 20:20:40 +000014928
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014929if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gpm" >&5
14931printf "%s\n" "$enable_gpm" >&6; }
14932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
14933printf %s "checking for gpm... " >&6; }
14934if test ${vi_cv_have_gpm+y}
14935then :
14936 printf %s "(cached) " >&6
14937else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000014938 olibs="$LIBS" ; LIBS="-lgpm"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014940/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014941#include <gpm.h>
14942 #include <linux/keyboard.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014943int
Illia Bobyra96d5442023-08-30 16:30:15 +020014944main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014945{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014946Gpm_GetLibVersion(NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014947 ;
14948 return 0;
14949}
14950_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014951if ac_fn_c_try_link "$LINENO"
14952then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000014953 vi_cv_have_gpm=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020014954else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014955 vi_cv_have_gpm=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014956fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014957rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014958 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014959 LIBS="$olibs"
14960
14961fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014962{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
14963printf "%s\n" "$vi_cv_have_gpm" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014964 if test $vi_cv_have_gpm = yes; then
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014965 if test "$enable_gpm" = "yes"; then
14966 LIBS="$LIBS -lgpm"
14967 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014968 printf "%s\n" "#define DYNAMIC_GPM 1" >>confdefs.h
Bram Moolenaar0b40d082022-03-08 13:32:37 +000014969
14970 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014971 printf "%s\n" "#define HAVE_GPM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014972
14973 fi
14974else
Illia Bobyra96d5442023-08-30 16:30:15 +020014975 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14976printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000014977fi
14978
Illia Bobyra96d5442023-08-30 16:30:15 +020014979{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
14980printf %s "checking --disable-sysmouse argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014981# Check whether --enable-sysmouse was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014982if test ${enable_sysmouse+y}
14983then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000014984 enableval=$enable_sysmouse;
Illia Bobyra96d5442023-08-30 16:30:15 +020014985else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000014986 enable_sysmouse="yes"
14987fi
14988
14989
14990if test "$enable_sysmouse" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14992printf "%s\n" "no" >&6; }
14993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
14994printf %s "checking for sysmouse... " >&6; }
14995if test ${vi_cv_have_sysmouse+y}
14996then :
14997 printf %s "(cached) " >&6
14998else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015000/* end confdefs.h. */
15001#include <sys/consio.h>
15002 #include <signal.h>
15003 #include <sys/fbio.h>
15004int
Illia Bobyra96d5442023-08-30 16:30:15 +020015005main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000015006{
15007struct mouse_info mouse;
15008 mouse.operation = MOUSE_MODE;
15009 mouse.operation = MOUSE_SHOW;
15010 mouse.u.mode.mode = 0;
15011 mouse.u.mode.signal = SIGUSR2;
15012 ;
15013 return 0;
15014}
15015_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015016if ac_fn_c_try_link "$LINENO"
15017then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015018 vi_cv_have_sysmouse=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020015019else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015020 vi_cv_have_sysmouse=no
Bram Moolenaar446cb832008-06-24 21:56:24 +000015021fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015022rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015023 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015024
15025fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015026{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
15027printf "%s\n" "$vi_cv_have_sysmouse" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015028 if test $vi_cv_have_sysmouse = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015029 printf "%s\n" "#define HAVE_SYSMOUSE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015030
15031 fi
15032else
Illia Bobyra96d5442023-08-30 16:30:15 +020015033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15034printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015035fi
15036
Illia Bobyra96d5442023-08-30 16:30:15 +020015037{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
15038printf %s "checking for FD_CLOEXEC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015040/* end confdefs.h. */
15041#if HAVE_FCNTL_H
15042# include <fcntl.h>
15043#endif
15044int
Illia Bobyra96d5442023-08-30 16:30:15 +020015045main (void)
Bram Moolenaarf05da212009-11-17 16:13:15 +000015046{
15047 int flag = FD_CLOEXEC;
15048 ;
15049 return 0;
15050}
15051_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015052if ac_fn_c_try_compile "$LINENO"
15053then :
15054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15055printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
Bram Moolenaarf05da212009-11-17 16:13:15 +000015056
Illia Bobyra96d5442023-08-30 16:30:15 +020015057else $as_nop
15058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15059printf "%s\n" "not usable" >&6; }
Bram Moolenaarf05da212009-11-17 16:13:15 +000015060fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015061rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015062
Illia Bobyra96d5442023-08-30 16:30:15 +020015063{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
15064printf %s "checking for rename... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015066/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015067#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015068int
Illia Bobyra96d5442023-08-30 16:30:15 +020015069main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015070{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015071rename("this", "that")
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015072 ;
15073 return 0;
15074}
15075_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015076if ac_fn_c_try_link "$LINENO"
15077then :
15078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15079printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015080
Illia Bobyra96d5442023-08-30 16:30:15 +020015081else $as_nop
15082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15083printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015084fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015085rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015086 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015087
Illia Bobyra96d5442023-08-30 16:30:15 +020015088{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5
15089printf %s "checking for dirfd... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15091/* end confdefs.h. */
15092#include <sys/types.h>
15093#include <dirent.h>
15094int
Illia Bobyra96d5442023-08-30 16:30:15 +020015095main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015096{
15097DIR * dir=opendir("dirname"); dirfd(dir);
15098 ;
15099 return 0;
15100}
15101_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015102if ac_fn_c_try_link "$LINENO"
15103then :
15104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15105printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015106
Illia Bobyra96d5442023-08-30 16:30:15 +020015107else $as_nop
15108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15109printf "%s\n" "not usable" >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015110fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015111rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015112 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015113
Illia Bobyra96d5442023-08-30 16:30:15 +020015114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
15115printf %s "checking for flock... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15117/* end confdefs.h. */
15118#include <sys/file.h>
15119int
Illia Bobyra96d5442023-08-30 16:30:15 +020015120main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015121{
15122flock(10, LOCK_SH);
15123 ;
15124 return 0;
15125}
15126_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015127if ac_fn_c_try_link "$LINENO"
15128then :
15129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15130printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015131
Illia Bobyra96d5442023-08-30 16:30:15 +020015132else $as_nop
15133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15134printf "%s\n" "not usable" >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015135fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015136rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015137 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015138
Illia Bobyra96d5442023-08-30 16:30:15 +020015139{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
15140printf %s "checking for sysctl... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015142/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015143#include <sys/types.h>
15144#include <sys/sysctl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015145int
Illia Bobyra96d5442023-08-30 16:30:15 +020015146main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015147{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015148 int mib[2], r;
15149 size_t len;
15150
15151 mib[0] = CTL_HW;
15152 mib[1] = HW_USERMEM;
15153 len = sizeof(r);
15154 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015155
15156 ;
15157 return 0;
15158}
15159_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015160if ac_fn_c_try_compile "$LINENO"
15161then :
15162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15163printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015164
Illia Bobyra96d5442023-08-30 16:30:15 +020015165else $as_nop
15166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15167printf "%s\n" "not usable" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015168fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015169rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015170
Illia Bobyra96d5442023-08-30 16:30:15 +020015171{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
15172printf %s "checking for sysinfo... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015174/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015175#include <sys/types.h>
15176#include <sys/sysinfo.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015177int
Illia Bobyra96d5442023-08-30 16:30:15 +020015178main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015179{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015180 struct sysinfo sinfo;
15181 int t;
15182
15183 (void)sysinfo(&sinfo);
15184 t = sinfo.totalram;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015185
15186 ;
15187 return 0;
15188}
15189_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015190if ac_fn_c_try_link "$LINENO"
15191then :
15192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15193printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015194
Illia Bobyra96d5442023-08-30 16:30:15 +020015195else $as_nop
15196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15197printf "%s\n" "not usable" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015198fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015199rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare2982d62021-10-06 11:27:21 +010015200 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015201
Illia Bobyra96d5442023-08-30 16:30:15 +020015202{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
15203printf %s "checking for sysinfo.mem_unit... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar914572a2007-05-01 11:37:47 +000015205/* end confdefs.h. */
15206#include <sys/types.h>
15207#include <sys/sysinfo.h>
15208int
Illia Bobyra96d5442023-08-30 16:30:15 +020015209main (void)
Bram Moolenaar914572a2007-05-01 11:37:47 +000015210{
15211 struct sysinfo sinfo;
Bram Moolenaar3c7ad012013-06-11 19:53:45 +020015212 sinfo.mem_unit = 1;
Bram Moolenaar914572a2007-05-01 11:37:47 +000015213
15214 ;
15215 return 0;
15216}
15217_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015218if ac_fn_c_try_compile "$LINENO"
15219then :
15220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15221printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
Bram Moolenaar914572a2007-05-01 11:37:47 +000015222
Illia Bobyra96d5442023-08-30 16:30:15 +020015223else $as_nop
15224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15225printf "%s\n" "no" >&6; }
Bram Moolenaar914572a2007-05-01 11:37:47 +000015226fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015227rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015228
Illia Bobyra96d5442023-08-30 16:30:15 +020015229{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.uptime" >&5
15230printf %s "checking for sysinfo.uptime... " >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15232/* end confdefs.h. */
15233#include <sys/types.h>
15234#include <sys/sysinfo.h>
15235int
Illia Bobyra96d5442023-08-30 16:30:15 +020015236main (void)
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015237{
15238 struct sysinfo sinfo;
15239 long ut;
15240
15241 (void)sysinfo(&sinfo);
15242 ut = sinfo.uptime;
15243
15244 ;
15245 return 0;
15246}
15247_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015248if ac_fn_c_try_compile "$LINENO"
15249then :
15250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15251printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015252
Illia Bobyra96d5442023-08-30 16:30:15 +020015253else $as_nop
15254 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15255printf "%s\n" "no" >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015256fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015257rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf52f0602021-03-10 21:26:37 +010015258
Illia Bobyra96d5442023-08-30 16:30:15 +020015259{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
15260printf %s "checking for sysconf... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015262/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015263#include <unistd.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015264int
Illia Bobyra96d5442023-08-30 16:30:15 +020015265main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015266{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015267 (void)sysconf(_SC_PAGESIZE);
15268 (void)sysconf(_SC_PHYS_PAGES);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015269
15270 ;
15271 return 0;
15272}
15273_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015274if ac_fn_c_try_compile "$LINENO"
15275then :
15276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15277printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015278
Illia Bobyra96d5442023-08-30 16:30:15 +020015279else $as_nop
15280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15281printf "%s\n" "not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015282fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015283rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015284
Illia Bobyra96d5442023-08-30 16:30:15 +020015285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _SC_SIGSTKSZ via sysconf()" >&5
15286printf %s "checking for _SC_SIGSTKSZ via sysconf()... " >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15288/* end confdefs.h. */
15289#include <unistd.h>
15290int
Illia Bobyra96d5442023-08-30 16:30:15 +020015291main (void)
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015292{
15293 (void)sysconf(_SC_SIGSTKSZ);
15294
15295 ;
15296 return 0;
15297}
15298_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015299if ac_fn_c_try_compile "$LINENO"
15300then :
15301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15302printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF_SIGSTKSZ 1" >>confdefs.h
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015303
Illia Bobyra96d5442023-08-30 16:30:15 +020015304else $as_nop
15305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15306printf "%s\n" "not usable" >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015307fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015308rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0e62a672021-02-25 17:17:56 +010015309
Bram Moolenaar914703b2010-05-31 21:59:46 +020015310# The cast to long int works around a bug in the HP C Compiler
15311# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15312# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15313# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015314{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
15315printf %s "checking size of int... " >&6; }
15316if test ${ac_cv_sizeof_int+y}
15317then :
15318 printf %s "(cached) " >&6
15319else $as_nop
15320 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
15321then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015322
Illia Bobyra96d5442023-08-30 16:30:15 +020015323else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015324 if test "$ac_cv_type_int" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015325 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15326printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015327as_fn_error 77 "cannot compute sizeof (int)
15328See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015329 else
15330 ac_cv_sizeof_int=0
15331 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015332fi
15333
Bram Moolenaar446cb832008-06-24 21:56:24 +000015334fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015335{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
15336printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015337
15338
15339
Illia Bobyra96d5442023-08-30 16:30:15 +020015340printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015341
15342
Bram Moolenaar914703b2010-05-31 21:59:46 +020015343# The cast to long int works around a bug in the HP C Compiler
15344# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15345# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15346# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015347{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
15348printf %s "checking size of long... " >&6; }
15349if test ${ac_cv_sizeof_long+y}
15350then :
15351 printf %s "(cached) " >&6
15352else $as_nop
15353 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
15354then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015355
Illia Bobyra96d5442023-08-30 16:30:15 +020015356else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015357 if test "$ac_cv_type_long" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015358 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15359printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015360as_fn_error 77 "cannot compute sizeof (long)
15361See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015362 else
15363 ac_cv_sizeof_long=0
15364 fi
15365fi
15366
15367fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015368{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
15369printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015370
15371
15372
Illia Bobyra96d5442023-08-30 16:30:15 +020015373printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020015374
15375
15376# The cast to long int works around a bug in the HP C Compiler
15377# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15378# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15379# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015380{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
15381printf %s "checking size of time_t... " >&6; }
15382if test ${ac_cv_sizeof_time_t+y}
15383then :
15384 printf %s "(cached) " >&6
15385else $as_nop
15386 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"
15387then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015388
Illia Bobyra96d5442023-08-30 16:30:15 +020015389else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015390 if test "$ac_cv_type_time_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015391 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15392printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015393as_fn_error 77 "cannot compute sizeof (time_t)
15394See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015395 else
15396 ac_cv_sizeof_time_t=0
15397 fi
Bram Moolenaar644fdff2010-05-30 13:26:21 +020015398fi
15399
15400fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015401{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
15402printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015403
15404
15405
Illia Bobyra96d5442023-08-30 16:30:15 +020015406printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Bram Moolenaar644fdff2010-05-30 13:26:21 +020015407
15408
Bram Moolenaar914703b2010-05-31 21:59:46 +020015409# The cast to long int works around a bug in the HP C Compiler
15410# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15411# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15412# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020015413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15414printf %s "checking size of off_t... " >&6; }
15415if test ${ac_cv_sizeof_off_t+y}
15416then :
15417 printf %s "(cached) " >&6
15418else $as_nop
15419 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"
15420then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020015421
Illia Bobyra96d5442023-08-30 16:30:15 +020015422else $as_nop
Bram Moolenaar914703b2010-05-31 21:59:46 +020015423 if test "$ac_cv_type_off_t" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015424 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15425printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010015426as_fn_error 77 "cannot compute sizeof (off_t)
15427See \`config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015428 else
15429 ac_cv_sizeof_off_t=0
15430 fi
15431fi
15432
15433fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015434{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15435printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020015436
15437
15438
Illia Bobyra96d5442023-08-30 16:30:15 +020015439printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020015440
15441
15442
Illia Bobyra96d5442023-08-30 16:30:15 +020015443printf "%s\n" "#define VIM_SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010015444
Illia Bobyra96d5442023-08-30 16:30:15 +020015445printf "%s\n" "#define VIM_SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010015446
15447
Illia Bobyra96d5442023-08-30 16:30:15 +020015448{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
15449printf %s "checking uint32_t is 32 bits... " >&6; }
15450if test "$cross_compiling" = yes
15451then :
15452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check uint32_t when cross-compiling." >&5
15453printf "%s\n" "$as_me: WARNING: cannot check uint32_t when cross-compiling." >&2;}
15454else $as_nop
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15456/* end confdefs.h. */
15457
15458#ifdef HAVE_STDINT_H
15459# include <stdint.h>
15460#endif
15461#ifdef HAVE_INTTYPES_H
15462# include <inttypes.h>
15463#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015464int main() {
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015465 uint32_t nr1 = (uint32_t)-1;
15466 uint32_t nr2 = (uint32_t)0xffffffffUL;
Bram Moolenaar52897832020-07-02 22:50:37 +020015467 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
15468 return 0;
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015469}
15470_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015471if ac_fn_c_try_run "$LINENO"
15472then :
15473 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15474printf "%s\n" "ok" >&6; }
15475else $as_nop
Bram Moolenaar7db77842014-03-27 17:40:59 +010015476 as_fn_error $? "WRONG! uint32_t not defined correctly." "$LINENO" 5
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020015477fi
15478rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15479 conftest.$ac_objext conftest.beam conftest.$ac_ext
15480fi
15481
15482
Bram Moolenaar446cb832008-06-24 21:56:24 +000015483
Bram Moolenaar071d4272004-06-13 20:20:40 +000015484bcopy_test_prog='
Bram Moolenaar446cb832008-06-24 21:56:24 +000015485#include "confdefs.h"
15486#ifdef HAVE_STRING_H
15487# include <string.h>
15488#endif
15489#if STDC_HEADERS
15490# include <stdlib.h>
15491# include <stddef.h>
15492#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015493int main() {
Bram Moolenaar071d4272004-06-13 20:20:40 +000015494 char buf[10];
15495 strcpy(buf, "abcdefghi");
15496 mch_memmove(buf, buf + 2, 3);
15497 if (strncmp(buf, "ababcf", 6))
15498 exit(1);
15499 strcpy(buf, "abcdefghi");
15500 mch_memmove(buf + 2, buf, 3);
15501 if (strncmp(buf, "cdedef", 6))
15502 exit(1);
15503 exit(0); /* libc version works properly. */
15504}'
15505
Illia Bobyra96d5442023-08-30 16:30:15 +020015506{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
15507printf %s "checking whether memmove handles overlaps... " >&6; }
15508if test ${vim_cv_memmove_handles_overlap+y}
15509then :
15510 printf %s "(cached) " >&6
15511else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015512
Illia Bobyra96d5442023-08-30 16:30:15 +020015513 if test "$cross_compiling" = yes
15514then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015515
Bram Moolenaar7db77842014-03-27 17:40:59 +010015516 as_fn_error $? "cross-compiling: please set 'vim_cv_memmove_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015517
Illia Bobyra96d5442023-08-30 16:30:15 +020015518else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15520/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015521#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015522_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015523if ac_fn_c_try_run "$LINENO"
15524then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015525
15526 vim_cv_memmove_handles_overlap=yes
15527
Illia Bobyra96d5442023-08-30 16:30:15 +020015528else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015529
15530 vim_cv_memmove_handles_overlap=no
15531
15532fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15534 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015535fi
15536
15537
Bram Moolenaar446cb832008-06-24 21:56:24 +000015538fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015539{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memmove_handles_overlap" >&5
15540printf "%s\n" "$vim_cv_memmove_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015541
15542if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015543 printf "%s\n" "#define USEMEMMOVE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015544
Bram Moolenaar071d4272004-06-13 20:20:40 +000015545else
Illia Bobyra96d5442023-08-30 16:30:15 +020015546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
15547printf %s "checking whether bcopy handles overlaps... " >&6; }
15548if test ${vim_cv_bcopy_handles_overlap+y}
15549then :
15550 printf %s "(cached) " >&6
15551else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015552
Illia Bobyra96d5442023-08-30 16:30:15 +020015553 if test "$cross_compiling" = yes
15554then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015555
Bram Moolenaar7db77842014-03-27 17:40:59 +010015556 as_fn_error $? "cross-compiling: please set 'vim_cv_bcopy_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015557
Illia Bobyra96d5442023-08-30 16:30:15 +020015558else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15560/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015561#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
15562_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015563if ac_fn_c_try_run "$LINENO"
15564then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015565
15566 vim_cv_bcopy_handles_overlap=yes
15567
Illia Bobyra96d5442023-08-30 16:30:15 +020015568else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015569
15570 vim_cv_bcopy_handles_overlap=no
15571
15572fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15574 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015575fi
15576
15577
Bram Moolenaar446cb832008-06-24 21:56:24 +000015578fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015579{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
15580printf "%s\n" "$vim_cv_bcopy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015581
15582 if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015583 printf "%s\n" "#define USEBCOPY 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015584
Bram Moolenaar446cb832008-06-24 21:56:24 +000015585 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
15587printf %s "checking whether memcpy handles overlaps... " >&6; }
15588if test ${vim_cv_memcpy_handles_overlap+y}
15589then :
15590 printf %s "(cached) " >&6
15591else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015592
Illia Bobyra96d5442023-08-30 16:30:15 +020015593 if test "$cross_compiling" = yes
15594then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015595
Bram Moolenaar7db77842014-03-27 17:40:59 +010015596 as_fn_error $? "cross-compiling: please set 'vim_cv_memcpy_handles_overlap'" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000015597
Illia Bobyra96d5442023-08-30 16:30:15 +020015598else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15600/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015601#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015602_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015603if ac_fn_c_try_run "$LINENO"
15604then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015605
15606 vim_cv_memcpy_handles_overlap=yes
15607
Illia Bobyra96d5442023-08-30 16:30:15 +020015608else $as_nop
Bram Moolenaar446cb832008-06-24 21:56:24 +000015609
15610 vim_cv_memcpy_handles_overlap=no
15611
Bram Moolenaar071d4272004-06-13 20:20:40 +000015612fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15614 conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015615fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000015616
15617
Bram Moolenaar071d4272004-06-13 20:20:40 +000015618fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
15620printf "%s\n" "$vim_cv_memcpy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015621
15622 if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015623 printf "%s\n" "#define USEMEMCPY 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015624
15625 fi
15626 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015627fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000015628
Bram Moolenaar071d4272004-06-13 20:20:40 +000015629
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015630if test "x$with_x" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000015631 cflags_save=$CFLAGS
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015632 libs_save=$LIBS
15633 LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
15634 CFLAGS="$CFLAGS $X_CFLAGS"
15635
Illia Bobyra96d5442023-08-30 16:30:15 +020015636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
15637printf %s "checking whether X_LOCALE needed... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015639/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015640#include <X11/Xlocale.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015641int
Illia Bobyra96d5442023-08-30 16:30:15 +020015642main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015643{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015644
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015645 ;
15646 return 0;
15647}
15648_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015649if ac_fn_c_try_compile "$LINENO"
15650then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015652/* end confdefs.h. */
15653
Bram Moolenaar446cb832008-06-24 21:56:24 +000015654/* Override any GCC internal prototype to avoid an error.
15655 Use char because int might match the return type of a GCC
15656 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015657char _Xsetlocale ();
15658int
Illia Bobyra96d5442023-08-30 16:30:15 +020015659main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015660{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015661return _Xsetlocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015662 ;
15663 return 0;
15664}
15665_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015666if ac_fn_c_try_link "$LINENO"
15667then :
15668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15669printf "%s\n" "yes" >&6; }
15670 printf "%s\n" "#define X_LOCALE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015671
Illia Bobyra96d5442023-08-30 16:30:15 +020015672else $as_nop
15673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15674printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015675fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015676rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015677 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015678else $as_nop
15679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15680printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015681fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015682rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015683
Illia Bobyra96d5442023-08-30 16:30:15 +020015684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
15685printf %s "checking whether Xutf8SetWMProperties() can be used... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15687/* end confdefs.h. */
15688
15689/* Override any GCC internal prototype to avoid an error.
15690 Use char because int might match the return type of a GCC
15691 builtin and then its argument prototype would still apply. */
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015692char Xutf8SetWMProperties ();
15693int
Illia Bobyra96d5442023-08-30 16:30:15 +020015694main (void)
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015695{
15696return Xutf8SetWMProperties ();
15697 ;
15698 return 0;
15699}
15700_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015701if ac_fn_c_try_link "$LINENO"
15702then :
15703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15704printf "%s\n" "yes" >&6; }
15705 printf "%s\n" "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015706
Illia Bobyra96d5442023-08-30 16:30:15 +020015707else $as_nop
15708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15709printf "%s\n" "no" >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015710fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015711rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015712 conftest$ac_exeext conftest.$ac_ext
15713
Bram Moolenaar071d4272004-06-13 20:20:40 +000015714 CFLAGS=$cflags_save
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020015715 LIBS=$libs_save
Bram Moolenaar071d4272004-06-13 20:20:40 +000015716fi
15717
Illia Bobyra96d5442023-08-30 16:30:15 +020015718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
15719printf %s "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
15720if test ${ac_cv_lib_xpg4__xpg4_setrunelocale+y}
15721then :
15722 printf %s "(cached) " >&6
15723else $as_nop
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015724 ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015725LIBS="-lxpg4 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015727/* end confdefs.h. */
15728
Bram Moolenaar446cb832008-06-24 21:56:24 +000015729/* Override any GCC internal prototype to avoid an error.
15730 Use char because int might match the return type of a GCC
15731 builtin and then its argument prototype would still apply. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015732char _xpg4_setrunelocale ();
15733int
Illia Bobyra96d5442023-08-30 16:30:15 +020015734main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015735{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015736return _xpg4_setrunelocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015737 ;
15738 return 0;
15739}
15740_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015741if ac_fn_c_try_link "$LINENO"
15742then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015743 ac_cv_lib_xpg4__xpg4_setrunelocale=yes
Illia Bobyra96d5442023-08-30 16:30:15 +020015744else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015745 ac_cv_lib_xpg4__xpg4_setrunelocale=no
Bram Moolenaar071d4272004-06-13 20:20:40 +000015746fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015747rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015748 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015749LIBS=$ac_check_lib_save_LIBS
15750fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015751{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
15752printf "%s\n" "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
15753if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes
15754then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015755 LIBS="$LIBS -lxpg4"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015756fi
15757
15758
Illia Bobyra96d5442023-08-30 16:30:15 +020015759{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
15760printf %s "checking how to create tags... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015761test -f tags && mv tags tags.save
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015762if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015763 TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015764elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015765 TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020015766elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010015767 TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015768else
Bram Moolenaar0c7ce772009-05-13 12:49:39 +000015769 TAGPRG="ctags"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015770 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
15771 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
15772 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
15773 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
15774 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
15775 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
15776 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
15777fi
15778test -f tags.save && mv tags.save tags
Illia Bobyra96d5442023-08-30 16:30:15 +020015779{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
15780printf "%s\n" "$TAGPRG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015781
Illia Bobyra96d5442023-08-30 16:30:15 +020015782{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
15783printf %s "checking how to run man with a section nr... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015784MANDEF="man"
Bram Moolenaar8b131502008-02-13 09:28:19 +000015785(eval MANPAGER=cat PAGER=cat man -s 2 read) < /dev/null > /dev/null 2>&5 && MANDEF="man -s"
Illia Bobyra96d5442023-08-30 16:30:15 +020015786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
15787printf "%s\n" "$MANDEF" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015788if test "$MANDEF" = "man -s"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015789 printf "%s\n" "#define USEMAN_S 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015790
15791fi
15792
Illia Bobyra96d5442023-08-30 16:30:15 +020015793{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
15794printf %s "checking --disable-nls argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015795# Check whether --enable-nls was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015796if test ${enable_nls+y}
15797then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015798 enableval=$enable_nls;
Illia Bobyra96d5442023-08-30 16:30:15 +020015799else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015800 enable_nls="yes"
Bram Moolenaar446cb832008-06-24 21:56:24 +000015801fi
15802
Bram Moolenaar071d4272004-06-13 20:20:40 +000015803
15804if test "$enable_nls" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15806printf "%s\n" "no" >&6; }
Bram Moolenaar2389c3c2005-05-22 22:07:59 +000015807
15808 INSTALL_LANGS=install-languages
15809
15810 INSTALL_TOOL_LANGS=install-tool-languages
15811
15812
Bram Moolenaar071d4272004-06-13 20:20:40 +000015813 # Extract the first word of "msgfmt", so it can be a program name with args.
15814set dummy msgfmt; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020015815{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15816printf %s "checking for $ac_word... " >&6; }
15817if test ${ac_cv_prog_MSGFMT+y}
15818then :
15819 printf %s "(cached) " >&6
15820else $as_nop
Bram Moolenaar071d4272004-06-13 20:20:40 +000015821 if test -n "$MSGFMT"; then
15822 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
15823else
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15825for as_dir in $PATH
15826do
15827 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020015828 case $as_dir in #(((
15829 '') as_dir=./ ;;
15830 */) ;;
15831 *) as_dir=$as_dir/ ;;
15832 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015833 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020015834 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015835 ac_cv_prog_MSGFMT="msgfmt"
Illia Bobyra96d5442023-08-30 16:30:15 +020015836 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015837 break 2
15838 fi
15839done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015840 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000015841IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015842
Bram Moolenaar071d4272004-06-13 20:20:40 +000015843fi
15844fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015845MSGFMT=$ac_cv_prog_MSGFMT
Bram Moolenaar071d4272004-06-13 20:20:40 +000015846if test -n "$MSGFMT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
15848printf "%s\n" "$MSGFMT" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015849else
Illia Bobyra96d5442023-08-30 16:30:15 +020015850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15851printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015852fi
15853
Bram Moolenaar446cb832008-06-24 21:56:24 +000015854
Illia Bobyra96d5442023-08-30 16:30:15 +020015855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
15856printf %s "checking for NLS... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015857 if test -f po/Makefile; then
15858 have_gettext="no"
15859 if test -n "$MSGFMT"; then
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015860 olibs=$LIBS
15861 LIBS=""
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015863/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015864#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015865int
Illia Bobyra96d5442023-08-30 16:30:15 +020015866main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015867{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015868gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015869 ;
15870 return 0;
15871}
15872_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015873if ac_fn_c_try_link "$LINENO"
15874then :
15875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
15876printf "%s\n" "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
15877else $as_nop
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015878 LIBS="-lintl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015880/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015881#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015882int
Illia Bobyra96d5442023-08-30 16:30:15 +020015883main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015884{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015885gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015886 ;
15887 return 0;
15888}
15889_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015890if ac_fn_c_try_link "$LINENO"
15891then :
15892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
15893printf "%s\n" "gettext() works with -lintl" >&6; }; have_gettext="yes";
Bram Moolenaar49b6a572013-11-17 20:32:54 +010015894 LIBS="$olibs -lintl"
Illia Bobyra96d5442023-08-30 16:30:15 +020015895else $as_nop
15896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
15897printf "%s\n" "gettext() doesn't work" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015898 LIBS=$olibs
15899fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015900rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015901 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015902fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015903rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015904 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015905 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
15907printf "%s\n" "msgfmt not found - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015908 fi
Martin Tournoij7904fa42022-10-04 16:28:45 +010015909 if test $have_gettext = "yes" -a "x$features" != "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015910 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015911
15912 MAKEMO=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015913
Illia Bobyra96d5442023-08-30 16:30:15 +020015914 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
15915if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
15916then :
15917 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015918
Bram Moolenaar071d4272004-06-13 20:20:40 +000015919fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000015920
Illia Bobyra96d5442023-08-30 16:30:15 +020015921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
15922printf %s "checking for _nl_msg_cat_cntr... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015924/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015925#include <libintl.h>
15926 extern int _nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015927int
Illia Bobyra96d5442023-08-30 16:30:15 +020015928main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015929{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015930++_nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015931 ;
15932 return 0;
15933}
15934_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015935if ac_fn_c_try_link "$LINENO"
15936then :
15937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15938printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015939
Illia Bobyra96d5442023-08-30 16:30:15 +020015940else $as_nop
15941 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15942printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015943fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015944rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015945 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020015946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
15947printf %s "checking if msgfmt supports --desktop... " >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015948 MSGFMT_DESKTOP=
15949 if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015950 if "$MSGFMT" --version | grep '0.19.[3-7]$' >/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: broken" >&5
15952printf "%s\n" "broken" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015953 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15955printf "%s\n" "yes" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020015956 MSGFMT_DESKTOP="gvim.desktop vim.desktop"
15957 fi
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015958 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15960printf "%s\n" "no" >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020015961 fi
15962
Bram Moolenaar071d4272004-06-13 20:20:40 +000015963 fi
15964 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
15966printf "%s\n" "no \"po/Makefile\" - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000015967 fi
15968else
Illia Bobyra96d5442023-08-30 16:30:15 +020015969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15970printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015971fi
15972
Illia Bobyra96d5442023-08-30 16:30:15 +020015973ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
15974if test "x$ac_cv_header_dlfcn_h" = xyes
15975then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015976 DLL=dlfcn.h
Illia Bobyra96d5442023-08-30 16:30:15 +020015977else $as_nop
15978 ac_fn_c_check_header_compile "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
15979if test "x$ac_cv_header_dl_h" = xyes
15980then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015981 DLL=dl.h
15982fi
15983
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015984fi
15985
Bram Moolenaar071d4272004-06-13 20:20:40 +000015986if test x${DLL} = xdlfcn.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015987
Illia Bobyra96d5442023-08-30 16:30:15 +020015988printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015989
Illia Bobyra96d5442023-08-30 16:30:15 +020015990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
15991printf %s "checking for dlopen()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015993/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015994
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015995int
Illia Bobyra96d5442023-08-30 16:30:15 +020015996main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015997{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015998
15999 extern void* dlopen();
16000 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016001
16002 ;
16003 return 0;
16004}
16005_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016006if ac_fn_c_try_link "$LINENO"
16007then :
16008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16009printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016010
Illia Bobyra96d5442023-08-30 16:30:15 +020016011printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016012
Illia Bobyra96d5442023-08-30 16:30:15 +020016013else $as_nop
16014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16015printf "%s\n" "no" >&6; };
16016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
16017printf %s "checking for dlopen() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016018 olibs=$LIBS
16019 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016021/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016022
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016023int
Illia Bobyra96d5442023-08-30 16:30:15 +020016024main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016025{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016026
16027 extern void* dlopen();
16028 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016029
16030 ;
16031 return 0;
16032}
16033_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016034if ac_fn_c_try_link "$LINENO"
16035then :
16036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16037printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016038
Illia Bobyra96d5442023-08-30 16:30:15 +020016039printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016040
Illia Bobyra96d5442023-08-30 16:30:15 +020016041else $as_nop
16042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16043printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016044 LIBS=$olibs
16045fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016046rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016047 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016048fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016049rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016050 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
16052printf %s "checking for dlsym()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016054/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016055
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016056int
Illia Bobyra96d5442023-08-30 16:30:15 +020016057main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016058{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016059
16060 extern void* dlsym();
16061 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016062
16063 ;
16064 return 0;
16065}
16066_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016067if ac_fn_c_try_link "$LINENO"
16068then :
16069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16070printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016071
Illia Bobyra96d5442023-08-30 16:30:15 +020016072printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016073
Illia Bobyra96d5442023-08-30 16:30:15 +020016074else $as_nop
16075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16076printf "%s\n" "no" >&6; };
16077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
16078printf %s "checking for dlsym() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016079 olibs=$LIBS
16080 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016082/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016083
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016084int
Illia Bobyra96d5442023-08-30 16:30:15 +020016085main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016086{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016087
16088 extern void* dlsym();
16089 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016090
16091 ;
16092 return 0;
16093}
16094_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016095if ac_fn_c_try_link "$LINENO"
16096then :
16097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16098printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016099
Illia Bobyra96d5442023-08-30 16:30:15 +020016100printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016101
Illia Bobyra96d5442023-08-30 16:30:15 +020016102else $as_nop
16103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16104printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016105 LIBS=$olibs
16106fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016107rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016108 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016109fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016110rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016111 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016112elif test x${DLL} = xdl.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016113
Illia Bobyra96d5442023-08-30 16:30:15 +020016114printf "%s\n" "#define HAVE_DL_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016115
Illia Bobyra96d5442023-08-30 16:30:15 +020016116 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
16117printf %s "checking for shl_load()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016119/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016120
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016121int
Illia Bobyra96d5442023-08-30 16:30:15 +020016122main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016123{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016124
16125 extern void* shl_load();
16126 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016127
16128 ;
16129 return 0;
16130}
16131_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016132if ac_fn_c_try_link "$LINENO"
16133then :
16134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16135printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016136
Illia Bobyra96d5442023-08-30 16:30:15 +020016137printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016138
Illia Bobyra96d5442023-08-30 16:30:15 +020016139else $as_nop
16140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16141printf "%s\n" "no" >&6; };
16142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
16143printf %s "checking for shl_load() in -ldld... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016144 olibs=$LIBS
16145 LIBS="$LIBS -ldld"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016147/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016148
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016149int
Illia Bobyra96d5442023-08-30 16:30:15 +020016150main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016151{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016152
16153 extern void* shl_load();
16154 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016155
16156 ;
16157 return 0;
16158}
16159_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016160if ac_fn_c_try_link "$LINENO"
16161then :
16162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16163printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016164
Illia Bobyra96d5442023-08-30 16:30:15 +020016165printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016166
Illia Bobyra96d5442023-08-30 16:30:15 +020016167else $as_nop
16168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16169printf "%s\n" "no" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016170 LIBS=$olibs
16171fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016172rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016173 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016174fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016175rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016176 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016177fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016178ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
16179if test "x$ac_cv_header_setjmp_h" = xyes
16180then :
16181 printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016182
16183fi
16184
Bram Moolenaar071d4272004-06-13 20:20:40 +000016185
Bram Moolenaard0573012017-10-28 21:11:06 +020016186if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016187 if echo $LIBS | grep -e '-ldl' >/dev/null; then
16188 LIBS=`echo $LIBS | sed s/-ldl//`
16189 PERL_LIBS="$PERL_LIBS -ldl"
16190 fi
16191fi
16192
Bram Moolenaard0573012017-10-28 21:11:06 +020016193if test "$MACOS_X" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
16195printf %s "checking whether we need macOS frameworks... " >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +020016196 if test "$MACOS_X_DARWIN" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +020016197 if test "$features" = "tiny"; then
16198 OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
16199 OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
Illia Bobyra96d5442023-08-30 16:30:15 +020016200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
16201printf "%s\n" "yes, we need CoreServices" >&6; }
Bram Moolenaar2be7cb72019-01-12 16:10:51 +010016202 LIBS="$LIBS -framework CoreServices"
Bram Moolenaard0573012017-10-28 21:11:06 +020016203 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
16205printf "%s\n" "yes, we need AppKit" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +020016206 LIBS="$LIBS -framework AppKit"
Bram Moolenaard0573012017-10-28 21:11:06 +020016207 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016208 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16210printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016211 fi
16212fi
16213
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020016214if `echo "$CFLAGS" | grep -v D_REENTRANT >/dev/null`; then
Bram Moolenaar3ae5fc92021-09-06 18:57:30 +020016215 CFLAGS="$CFLAGS -D_REENTRANT"
16216fi
16217
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016218DEPEND_CFLAGS_FILTER=
16219if test "$GCC" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
16221printf %s "checking for GCC 3 or later... " >&6; }
Bram Moolenaar348808f2020-02-07 20:50:07 +010016222 gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9][0-9]*\)\..*$/\1/g'`
Bram Moolenaarf740b292006-02-16 22:11:02 +000016223 if test "$gccmajor" -gt "2"; then
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016224 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
Illia Bobyra96d5442023-08-30 16:30:15 +020016225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16226printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016227 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16229printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016230 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
16232printf %s "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016233 if test "$gccmajor" -gt "3"; then
Zdenek Dohnal42196982023-01-18 16:09:51 +000016234 CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
16235 CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g'`
Illia Bobyra96d5442023-08-30 16:30:15 +020016236 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16237printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016238 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16240printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000016241 fi
Bram Moolenaara5792f52005-11-23 21:25:05 +000016242fi
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000016243
Bram Moolenaar071d4272004-06-13 20:20:40 +000016244
Illia Bobyra96d5442023-08-30 16:30:15 +020016245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
16246printf %s "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
Bram Moolenaar9ce42132018-04-11 22:19:36 +020016247if echo "$CFLAGS $LUA_CFLAGS $MZSCHEME_CFLAGS $PERL_CFLAGS $PYTHON_CFLAGS $PYTHON3_CFLAGS $TCL_CFLAGS $RUBY_CFLAGS $GTK_CFLAGS" | grep -q D_FILE_OFFSET_BITS 2>/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16249printf "%s\n" "yes" >&6; }
16250 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016251
16252else
Illia Bobyra96d5442023-08-30 16:30:15 +020016253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16254printf "%s\n" "no" >&6; }
Bram Moolenaarec0557f2018-01-31 14:41:37 +010016255fi
16256
Bram Moolenaar6cd42db2020-12-04 18:09:54 +010016257LDFLAGS=`echo "$LDFLAGS" | sed -e 's/-L /-L/g'`
16258
Illia Bobyra96d5442023-08-30 16:30:15 +020016259{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
16260printf %s "checking linker --as-needed support... " >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016261LINK_AS_NEEDED=
16262# Check if linker supports --as-needed and --no-as-needed options
16263if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
Natanael Copa761ead42021-05-15 14:25:37 +020016264 if ! echo "$LDFLAGS" | grep -q -- '-Wl,[^[:space:]]*--as-needed'; then
16265 LDFLAGS="$LDFLAGS -Wl,--as-needed"
16266 fi
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016267 LINK_AS_NEEDED=yes
16268fi
16269if test "$LINK_AS_NEEDED" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16271printf "%s\n" "yes" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016272else
Illia Bobyra96d5442023-08-30 16:30:15 +020016273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16274printf "%s\n" "no" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010016275fi
16276
16277
Bram Moolenaar77c19352012-06-13 19:19:41 +020016278# IBM z/OS reset CFLAGS for config.mk
16279if test "$zOSUnix" = "yes"; then
16280 CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
16281fi
16282
Bram Moolenaar446cb832008-06-24 21:56:24 +000016283ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
16284
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016285cat >confcache <<\_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000016286# This file is a shell script that caches the results of configure
16287# tests run on this system so they can be shared between configure
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016288# scripts and configure runs, see configure's option --config-cache.
16289# It is not useful on other systems. If it contains results you don't
16290# want to keep, you may remove or edit it.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016291#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016292# config.status only pays attention to the cache file if you give it
16293# the --recheck option to rerun configure.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016294#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016295# `ac_cv_env_foo' variables (set or unset) will be overridden when
16296# loading this file, other *unset* `ac_cv_foo' will be assigned the
16297# following values.
16298
16299_ACEOF
16300
Bram Moolenaar071d4272004-06-13 20:20:40 +000016301# The following way of writing the cache mishandles newlines in values,
16302# but we know of no workaround that is simple, portable, and efficient.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016303# So, we kill variables containing newlines.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016304# Ultrix sh set writes to stderr and can't be redirected directly,
16305# and sets the high bit in the cache file unless we assign to the vars.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016306(
16307 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16308 eval ac_val=\$$ac_var
16309 case $ac_val in #(
16310 *${as_nl}*)
16311 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020016312 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16313printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016314 esac
16315 case $ac_var in #(
16316 _ | IFS | as_nl) ;; #(
16317 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016318 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016319 esac ;;
16320 esac
16321 done
16322
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016323 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +000016324 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16325 *${as_nl}ac_space=\ *)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016326 # `set' does not quote correctly, so add quotes: double-quote
16327 # substitution turns \\\\ into \\, and sed turns \\ into \.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016328 sed -n \
16329 "s/'/'\\\\''/g;
16330 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016331 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016332 *)
16333 # `set' quotes correctly as required by POSIX, so do not add quotes.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016334 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016335 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016336 esac |
16337 sort
16338) |
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016339 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +000016340 /^ac_cv_env_/b end
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016341 t clear
Bram Moolenaar446cb832008-06-24 21:56:24 +000016342 :clear
Illia Bobyra96d5442023-08-30 16:30:15 +020016343 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016344 t end
Bram Moolenaar446cb832008-06-24 21:56:24 +000016345 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16346 :end' >>confcache
16347if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16348 if test -w "$cache_file"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016349 if test "x$cache_file" != "x/dev/null"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16351printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016352 if test ! -f "$cache_file" || test -h "$cache_file"; then
16353 cat confcache >"$cache_file"
16354 else
16355 case $cache_file in #(
16356 */* | ?:*)
16357 mv -f confcache "$cache_file"$$ &&
16358 mv -f "$cache_file"$$ "$cache_file" ;; #(
16359 *)
16360 mv -f confcache "$cache_file" ;;
16361 esac
16362 fi
16363 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016364 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16366printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Bram Moolenaar071d4272004-06-13 20:20:40 +000016367 fi
16368fi
16369rm -f confcache
16370
Bram Moolenaar071d4272004-06-13 20:20:40 +000016371test "x$prefix" = xNONE && prefix=$ac_default_prefix
16372# Let make expand exec_prefix.
16373test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16374
Bram Moolenaar071d4272004-06-13 20:20:40 +000016375DEFS=-DHAVE_CONFIG_H
16376
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016377ac_libobjs=
16378ac_ltlibobjs=
Bram Moolenaar7db77842014-03-27 17:40:59 +010016379U=
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016380for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16381 # 1. Remove the extension, and $U if already installed.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016382 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Illia Bobyra96d5442023-08-30 16:30:15 +020016383 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016384 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16385 # will be set to the directory where LIBOBJS objects are built.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016386 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16387 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016388done
16389LIBOBJS=$ac_libobjs
16390
16391LTLIBOBJS=$ac_ltlibobjs
16392
16393
16394
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020016395
Bram Moolenaar7db77842014-03-27 17:40:59 +010016396: "${CONFIG_STATUS=./config.status}"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016397ac_write_fail=0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016398ac_clean_files_save=$ac_clean_files
16399ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Illia Bobyra96d5442023-08-30 16:30:15 +020016400{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16401printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016402as_write_fail=0
16403cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016404#! $SHELL
16405# Generated by $as_me.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016406# Run this file to recreate the current configuration.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016407# Compiler output produced by configure, useful for debugging
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016408# configure, is in config.log if it exists.
Bram Moolenaar071d4272004-06-13 20:20:40 +000016409
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016410debug=false
16411ac_cs_recheck=false
16412ac_cs_silent=false
Bram Moolenaar071d4272004-06-13 20:20:40 +000016413
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016414SHELL=\${CONFIG_SHELL-$SHELL}
16415export SHELL
16416_ASEOF
16417cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16418## -------------------- ##
16419## M4sh Initialization. ##
16420## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000016421
Bram Moolenaar446cb832008-06-24 21:56:24 +000016422# Be more Bourne compatible
16423DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020016424as_nop=:
16425if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
16426then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016427 emulate sh
16428 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000016429 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016430 # is contrary to our usage. Disable this feature.
16431 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016432 setopt NO_GLOB_SUBST
Illia Bobyra96d5442023-08-30 16:30:15 +020016433else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016434 case `(set -o) 2>/dev/null` in #(
16435 *posix*) :
16436 set -o posix ;; #(
16437 *) :
16438 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016439esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016440fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016441
16442
Illia Bobyra96d5442023-08-30 16:30:15 +020016443
16444# Reset variables that may have inherited troublesome values from
16445# the environment.
16446
16447# IFS needs to be set, to space, tab, and newline, in precisely that order.
16448# (If _AS_PATH_WALK were called with IFS unset, it would have the
16449# side effect of setting IFS to empty, thus disabling word splitting.)
16450# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016451as_nl='
16452'
16453export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020016454IFS=" "" $as_nl"
16455
16456PS1='$ '
16457PS2='> '
16458PS4='+ '
16459
16460# Ensure predictable behavior from utilities with locale-dependent output.
16461LC_ALL=C
16462export LC_ALL
16463LANGUAGE=C
16464export LANGUAGE
16465
16466# We cannot yet rely on "unset" to work, but we need these variables
16467# to be unset--not just set to an empty or harmless value--now, to
16468# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
16469# also avoids known problems related to "unset" and subshell syntax
16470# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
16471for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
16472do eval test \${$as_var+y} \
16473 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
16474done
16475
16476# Ensure that fds 0, 1, and 2 are open.
16477if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
16478if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
16479if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016480
16481# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020016482if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000016483 PATH_SEPARATOR=:
16484 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16485 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16486 PATH_SEPARATOR=';'
16487 }
16488fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016489
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016490
Bram Moolenaar446cb832008-06-24 21:56:24 +000016491# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016492as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016493case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000016494 *[\\/]* ) as_myself=$0 ;;
16495 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16496for as_dir in $PATH
16497do
16498 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020016499 case $as_dir in #(((
16500 '') as_dir=./ ;;
16501 */) ;;
16502 *) as_dir=$as_dir/ ;;
16503 esac
16504 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016505 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000016506IFS=$as_save_IFS
16507
16508 ;;
16509esac
16510# We did not find ourselves, most probably we were run as `sh COMMAND'
16511# in which case we are not to be found in the path.
16512if test "x$as_myself" = x; then
16513 as_myself=$0
16514fi
16515if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016516 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016517 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +000016518fi
16519
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016520
16521
Bram Moolenaar7db77842014-03-27 17:40:59 +010016522# as_fn_error STATUS ERROR [LINENO LOG_FD]
16523# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016524# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16525# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +010016526# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016527as_fn_error ()
16528{
Bram Moolenaar7db77842014-03-27 17:40:59 +010016529 as_status=$1; test $as_status -eq 0 && as_status=1
16530 if test "$4"; then
16531 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +020016532 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016533 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016534 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016535 as_fn_exit $as_status
16536} # as_fn_error
16537
16538
Illia Bobyra96d5442023-08-30 16:30:15 +020016539
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016540# as_fn_set_status STATUS
16541# -----------------------
16542# Set $? to STATUS, without forking.
16543as_fn_set_status ()
16544{
16545 return $1
16546} # as_fn_set_status
16547
16548# as_fn_exit STATUS
16549# -----------------
16550# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16551as_fn_exit ()
16552{
16553 set +e
16554 as_fn_set_status $1
16555 exit $1
16556} # as_fn_exit
16557
16558# as_fn_unset VAR
16559# ---------------
16560# Portably unset VAR.
16561as_fn_unset ()
16562{
16563 { eval $1=; unset $1;}
16564}
16565as_unset=as_fn_unset
Illia Bobyra96d5442023-08-30 16:30:15 +020016566
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016567# as_fn_append VAR VALUE
16568# ----------------------
16569# Append the text in VALUE to the end of the definition contained in VAR. Take
16570# advantage of any shell optimizations that allow amortized linear growth over
16571# repeated appends, instead of the typical quadratic growth present in naive
16572# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +020016573if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
16574then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016575 eval 'as_fn_append ()
16576 {
16577 eval $1+=\$2
16578 }'
Illia Bobyra96d5442023-08-30 16:30:15 +020016579else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016580 as_fn_append ()
16581 {
16582 eval $1=\$$1\$2
16583 }
16584fi # as_fn_append
16585
16586# as_fn_arith ARG...
16587# ------------------
16588# Perform arithmetic evaluation on the ARGs, and store the result in the
16589# global $as_val. Take advantage of shells that can avoid forks. The arguments
16590# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +020016591if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
16592then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016593 eval 'as_fn_arith ()
16594 {
16595 as_val=$(( $* ))
16596 }'
Illia Bobyra96d5442023-08-30 16:30:15 +020016597else $as_nop
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016598 as_fn_arith ()
16599 {
16600 as_val=`expr "$@" || test $? -eq 1`
16601 }
16602fi # as_fn_arith
16603
16604
Bram Moolenaar446cb832008-06-24 21:56:24 +000016605if expr a : '\(a\)' >/dev/null 2>&1 &&
16606 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016607 as_expr=expr
16608else
16609 as_expr=false
16610fi
16611
Bram Moolenaar446cb832008-06-24 21:56:24 +000016612if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016613 as_basename=basename
16614else
16615 as_basename=false
16616fi
16617
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016618if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16619 as_dirname=dirname
16620else
16621 as_dirname=false
16622fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016623
Bram Moolenaar446cb832008-06-24 21:56:24 +000016624as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016625$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16626 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000016627 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020016628printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000016629 sed '/^.*\/\([^/][^/]*\)\/*$/{
16630 s//\1/
16631 q
16632 }
16633 /^X\/\(\/\/\)$/{
16634 s//\1/
16635 q
16636 }
16637 /^X\/\(\/\).*/{
16638 s//\1/
16639 q
16640 }
16641 s/.*/./; q'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016642
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016643# Avoid depending upon Character Ranges.
16644as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16645as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16646as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16647as_cr_digits='0123456789'
16648as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016649
Illia Bobyra96d5442023-08-30 16:30:15 +020016650
16651# Determine whether it's possible to make 'echo' print without a newline.
16652# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
16653# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016654ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016655case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +000016656-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016657 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +000016658 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016659 xy) ECHO_C='\c';;
16660 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16661 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016662 esac;;
16663*)
16664 ECHO_N='-n';;
16665esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016666
Illia Bobyra96d5442023-08-30 16:30:15 +020016667# For backward compatibility with old third-party macros, we provide
16668# the shell variables $as_echo and $as_echo_n. New code should use
16669# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
16670as_echo='printf %s\n'
16671as_echo_n='printf %s'
16672
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016673rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +000016674if test -d conf$$.dir; then
16675 rm -f conf$$.dir/conf$$.file
16676else
16677 rm -f conf$$.dir
16678 mkdir conf$$.dir 2>/dev/null
16679fi
16680if (echo >conf$$.file) 2>/dev/null; then
16681 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016682 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016683 # ... but there are two gotchas:
16684 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16685 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016686 # In both cases, we have to default to `cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016687 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010016688 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +000016689 elif ln conf$$.file conf$$ 2>/dev/null; then
16690 as_ln_s=ln
16691 else
Bram Moolenaar7db77842014-03-27 17:40:59 +010016692 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016693 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016694else
Bram Moolenaar7db77842014-03-27 17:40:59 +010016695 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016696fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016697rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16698rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016699
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016700
16701# as_fn_mkdir_p
16702# -------------
16703# Create "$as_dir" as a directory, including parents if necessary.
16704as_fn_mkdir_p ()
16705{
16706
16707 case $as_dir in #(
16708 -*) as_dir=./$as_dir;;
16709 esac
16710 test -d "$as_dir" || eval $as_mkdir_p || {
16711 as_dirs=
16712 while :; do
16713 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020016714 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016715 *) as_qdir=$as_dir;;
16716 esac
16717 as_dirs="'$as_qdir' $as_dirs"
16718 as_dir=`$as_dirname -- "$as_dir" ||
16719$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16720 X"$as_dir" : 'X\(//\)[^/]' \| \
16721 X"$as_dir" : 'X\(//\)$' \| \
16722 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020016723printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016724 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16725 s//\1/
16726 q
16727 }
16728 /^X\(\/\/\)[^/].*/{
16729 s//\1/
16730 q
16731 }
16732 /^X\(\/\/\)$/{
16733 s//\1/
16734 q
16735 }
16736 /^X\(\/\).*/{
16737 s//\1/
16738 q
16739 }
16740 s/.*/./; q'`
16741 test -d "$as_dir" && break
16742 done
16743 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +010016744 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016745
16746
16747} # as_fn_mkdir_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016748if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016749 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016750else
16751 test -d ./-p && rmdir ./-p
16752 as_mkdir_p=false
16753fi
16754
Bram Moolenaar7db77842014-03-27 17:40:59 +010016755
16756# as_fn_executable_p FILE
16757# -----------------------
16758# Test if FILE is an executable regular file.
16759as_fn_executable_p ()
16760{
16761 test -f "$1" && test -x "$1"
16762} # as_fn_executable_p
16763as_test_x='test -x'
16764as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016765
16766# Sed expression to map a string onto a valid CPP name.
16767as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16768
16769# Sed expression to map a string onto a valid variable name.
16770as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16771
16772
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016773exec 6>&1
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016774## ----------------------------------- ##
16775## Main body of $CONFIG_STATUS script. ##
16776## ----------------------------------- ##
16777_ASEOF
16778test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016779
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16781# Save the log message, to keep $0 and so on meaningful, and to
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016782# report actual input values of CONFIG_FILES etc. instead of their
Bram Moolenaar446cb832008-06-24 21:56:24 +000016783# values after options handling.
16784ac_log="
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016785This file was extended by $as_me, which was
Illia Bobyra96d5442023-08-30 16:30:15 +020016786generated by GNU Autoconf 2.71. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016787
16788 CONFIG_FILES = $CONFIG_FILES
16789 CONFIG_HEADERS = $CONFIG_HEADERS
16790 CONFIG_LINKS = $CONFIG_LINKS
16791 CONFIG_COMMANDS = $CONFIG_COMMANDS
16792 $ $0 $@
16793
Bram Moolenaar446cb832008-06-24 21:56:24 +000016794on `(hostname || uname -n) 2>/dev/null | sed 1q`
16795"
16796
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016797_ACEOF
16798
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016799case $ac_config_files in *"
16800"*) set x $ac_config_files; shift; ac_config_files=$*;;
16801esac
16802
16803case $ac_config_headers in *"
16804"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16805esac
16806
16807
Bram Moolenaar446cb832008-06-24 21:56:24 +000016808cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016809# Files that config.status was made for.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016810config_files="$ac_config_files"
16811config_headers="$ac_config_headers"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016812
Bram Moolenaar446cb832008-06-24 21:56:24 +000016813_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016814
Bram Moolenaar446cb832008-06-24 21:56:24 +000016815cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016816ac_cs_usage="\
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016817\`$as_me' instantiates files and other configuration actions
16818from templates according to the current configuration. Unless the files
16819and actions are specified as TAGs, all are instantiated by default.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016820
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016821Usage: $0 [OPTION]... [TAG]...
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016822
16823 -h, --help print this help, then exit
Bram Moolenaar446cb832008-06-24 21:56:24 +000016824 -V, --version print version number and configuration settings, then exit
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016825 --config print configuration, then exit
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016826 -q, --quiet, --silent
16827 do not print progress messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016828 -d, --debug don't remove temporary files
16829 --recheck update $as_me by reconfiguring in the same conditions
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016830 --file=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000016831 instantiate the configuration file FILE
Bram Moolenaar32f31b12009-05-21 13:20:59 +000016832 --header=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000016833 instantiate the configuration header FILE
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016834
16835Configuration files:
16836$config_files
16837
16838Configuration headers:
16839$config_headers
16840
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016841Report bugs to the package provider."
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016842
Bram Moolenaar446cb832008-06-24 21:56:24 +000016843_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016844ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
16845ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000016846cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Illia Bobyra96d5442023-08-30 16:30:15 +020016847ac_cs_config='$ac_cs_config_escaped'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016848ac_cs_version="\\
16849config.status
Illia Bobyra96d5442023-08-30 16:30:15 +020016850configured by $0, generated by GNU Autoconf 2.71,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016851 with options \\"\$ac_cs_config\\"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016852
Illia Bobyra96d5442023-08-30 16:30:15 +020016853Copyright (C) 2021 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016854This config.status script is free software; the Free Software Foundation
16855gives unlimited permission to copy, distribute and modify it."
Bram Moolenaar446cb832008-06-24 21:56:24 +000016856
16857ac_pwd='$ac_pwd'
16858srcdir='$srcdir'
16859AWK='$AWK'
16860test -n "\$AWK" || AWK=awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016861_ACEOF
16862
Bram Moolenaar446cb832008-06-24 21:56:24 +000016863cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16864# The default lists apply if the user does not specify any file.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016865ac_need_defaults=:
16866while test $# != 0
16867do
16868 case $1 in
Bram Moolenaar7db77842014-03-27 17:40:59 +010016869 --*=?*)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016870 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16871 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016872 ac_shift=:
16873 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010016874 --*=)
16875 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16876 ac_optarg=
16877 ac_shift=:
16878 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016879 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016880 ac_option=$1
16881 ac_optarg=$2
16882 ac_shift=shift
16883 ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016884 esac
16885
16886 case $ac_option in
16887 # Handling of the options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016888 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16889 ac_cs_recheck=: ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016890 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Illia Bobyra96d5442023-08-30 16:30:15 +020016891 printf "%s\n" "$ac_cs_version"; exit ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016892 --config | --confi | --conf | --con | --co | --c )
Illia Bobyra96d5442023-08-30 16:30:15 +020016893 printf "%s\n" "$ac_cs_config"; exit ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016894 --debug | --debu | --deb | --de | --d | -d )
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016895 debug=: ;;
16896 --file | --fil | --fi | --f )
16897 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000016898 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020016899 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010016900 '') as_fn_error $? "missing file argument" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016901 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016902 as_fn_append CONFIG_FILES " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016903 ac_need_defaults=false;;
16904 --header | --heade | --head | --hea )
16905 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000016906 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020016907 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016908 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016909 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016910 ac_need_defaults=false;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016911 --he | --h)
16912 # Conflict between --help and --header
Bram Moolenaar7db77842014-03-27 17:40:59 +010016913 as_fn_error $? "ambiguous option: \`$1'
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016914Try \`$0 --help' for more information.";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000016915 --help | --hel | -h )
Illia Bobyra96d5442023-08-30 16:30:15 +020016916 printf "%s\n" "$ac_cs_usage"; exit ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016917 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16918 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16919 ac_cs_silent=: ;;
16920
16921 # This is an error.
Bram Moolenaar7db77842014-03-27 17:40:59 +010016922 -*) as_fn_error $? "unrecognized option: \`$1'
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016923Try \`$0 --help' for more information." ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016924
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016925 *) as_fn_append ac_config_targets " $1"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016926 ac_need_defaults=false ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016927
16928 esac
16929 shift
16930done
16931
16932ac_configure_extra_args=
16933
16934if $ac_cs_silent; then
16935 exec 6>/dev/null
16936 ac_configure_extra_args="$ac_configure_extra_args --silent"
16937fi
16938
16939_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000016940cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016941if \$ac_cs_recheck; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010016942 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Bram Moolenaar446cb832008-06-24 21:56:24 +000016943 shift
Illia Bobyra96d5442023-08-30 16:30:15 +020016944 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Bram Moolenaar446cb832008-06-24 21:56:24 +000016945 CONFIG_SHELL='$SHELL'
16946 export CONFIG_SHELL
16947 exec "\$@"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016948fi
16949
16950_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000016951cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16952exec 5>>auto/config.log
16953{
16954 echo
16955 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16956## Running $as_me. ##
16957_ASBOX
Illia Bobyra96d5442023-08-30 16:30:15 +020016958 printf "%s\n" "$ac_log"
Bram Moolenaar446cb832008-06-24 21:56:24 +000016959} >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016960
Bram Moolenaar446cb832008-06-24 21:56:24 +000016961_ACEOF
16962cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16963_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016964
Bram Moolenaar446cb832008-06-24 21:56:24 +000016965cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016966
Bram Moolenaar446cb832008-06-24 21:56:24 +000016967# Handling of arguments.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016968for ac_config_target in $ac_config_targets
16969do
Bram Moolenaar446cb832008-06-24 21:56:24 +000016970 case $ac_config_target in
16971 "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
16972 "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
16973
Bram Moolenaar7db77842014-03-27 17:40:59 +010016974 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016975 esac
16976done
16977
Bram Moolenaar446cb832008-06-24 21:56:24 +000016978
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016979# If the user did not use the arguments to specify the items to instantiate,
16980# then the envvar interface is used. Set only those that are not.
16981# We use the long form for the default assignment because of an extremely
16982# bizarre bug on SunOS 4.1.3.
16983if $ac_need_defaults; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016984 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
16985 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016986fi
16987
16988# Have a temporary directory for convenience. Make it in the build tree
Bram Moolenaar446cb832008-06-24 21:56:24 +000016989# simply because there is no reason against having it here, and in addition,
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016990# creating and moving files from /tmp can sometimes cause problems.
Bram Moolenaar446cb832008-06-24 21:56:24 +000016991# Hook for its removal unless debugging.
16992# Note that there is a small window in which the directory will not be cleaned:
16993# after its creation but before its name has been assigned to `$tmp'.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016994$debug ||
16995{
Bram Moolenaar7db77842014-03-27 17:40:59 +010016996 tmp= ac_tmp=
Bram Moolenaar446cb832008-06-24 21:56:24 +000016997 trap 'exit_status=$?
Bram Moolenaar7db77842014-03-27 17:40:59 +010016998 : "${ac_tmp:=$tmp}"
16999 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +000017000' 0
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017001 trap 'as_fn_exit 1' 1 2 13 15
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017002}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017003# Create a (secure) tmp directory for tmp files.
17004
17005{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017006 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017007 test -d "$tmp"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017008} ||
17009{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017010 tmp=./conf$$-$RANDOM
17011 (umask 077 && mkdir "$tmp")
Bram Moolenaar7db77842014-03-27 17:40:59 +010017012} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17013ac_tmp=$tmp
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017014
Bram Moolenaar446cb832008-06-24 21:56:24 +000017015# Set up the scripts for CONFIG_FILES section.
17016# No need to generate them if there are no CONFIG_FILES.
17017# This happens for instance with `./config.status config.h'.
17018if test -n "$CONFIG_FILES"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017019
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017020
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017021ac_cr=`echo X | tr X '\015'`
17022# On cygwin, bash can eat \r inside `` if the user requested igncr.
17023# But we know of no other shell where ac_cr would be empty at this
17024# point, so we can use a bashism as a fallback.
17025if test "x$ac_cr" = x; then
17026 eval ac_cr=\$\'\\r\'
17027fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017028ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17029if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017030 ac_cs_awk_cr='\\r'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017031else
Bram Moolenaar446cb832008-06-24 21:56:24 +000017032 ac_cs_awk_cr=$ac_cr
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017033fi
17034
Bram Moolenaar7db77842014-03-27 17:40:59 +010017035echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017036_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017037
Bram Moolenaar446cb832008-06-24 21:56:24 +000017038
17039{
17040 echo "cat >conf$$subs.awk <<_ACEOF" &&
17041 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17042 echo "_ACEOF"
17043} >conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017044 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17045ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017046ac_delim='%!_!# '
17047for ac_last_try in false false false false false :; do
17048 . ./conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017049 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017050
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017051 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17052 if test $ac_delim_n = $ac_delim_num; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017053 break
17054 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017055 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017056 else
17057 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17058 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017059done
Bram Moolenaar446cb832008-06-24 21:56:24 +000017060rm -f conf$$subs.sh
17061
17062cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017063cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017064_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017065sed -n '
17066h
17067s/^/S["/; s/!.*/"]=/
17068p
17069g
17070s/^[^!]*!//
17071:repl
17072t repl
17073s/'"$ac_delim"'$//
17074t delim
17075:nl
17076h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017077s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017078t more1
17079s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17080p
17081n
17082b repl
17083:more1
17084s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17085p
17086g
17087s/.\{148\}//
17088t nl
17089:delim
17090h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017091s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017092t more2
17093s/["\\]/\\&/g; s/^/"/; s/$/"/
17094p
17095b
17096:more2
17097s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17098p
17099g
17100s/.\{148\}//
17101t delim
17102' <conf$$subs.awk | sed '
17103/^[^""]/{
17104 N
17105 s/\n//
17106}
17107' >>$CONFIG_STATUS || ac_write_fail=1
17108rm -f conf$$subs.awk
17109cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17110_ACAWK
Bram Moolenaar7db77842014-03-27 17:40:59 +010017111cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Bram Moolenaar446cb832008-06-24 21:56:24 +000017112 for (key in S) S_is_set[key] = 1
17113 FS = ""
Bram Moolenaar071d4272004-06-13 20:20:40 +000017114
Bram Moolenaar446cb832008-06-24 21:56:24 +000017115}
17116{
17117 line = $ 0
17118 nfields = split(line, field, "@")
17119 substed = 0
17120 len = length(field[1])
17121 for (i = 2; i < nfields; i++) {
17122 key = field[i]
17123 keylen = length(key)
17124 if (S_is_set[key]) {
17125 value = S[key]
17126 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17127 len += length(value) + length(field[++i])
17128 substed = 1
17129 } else
17130 len += 1 + keylen
17131 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000017132
Bram Moolenaar446cb832008-06-24 21:56:24 +000017133 print line
17134}
Bram Moolenaar071d4272004-06-13 20:20:40 +000017135
Bram Moolenaar446cb832008-06-24 21:56:24 +000017136_ACAWK
17137_ACEOF
17138cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17139if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17140 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17141else
17142 cat
Bram Moolenaar7db77842014-03-27 17:40:59 +010017143fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17144 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017145_ACEOF
17146
Bram Moolenaar7db77842014-03-27 17:40:59 +010017147# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17148# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Bram Moolenaar446cb832008-06-24 21:56:24 +000017149# trailing colons and then remove the whole line if VPATH becomes empty
17150# (actually we leave an empty line to preserve line numbers).
17151if test "x$srcdir" = x.; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017152 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17153h
17154s///
17155s/^/:/
17156s/[ ]*$/:/
17157s/:\$(srcdir):/:/g
17158s/:\${srcdir}:/:/g
17159s/:@srcdir@:/:/g
17160s/^:*//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017161s/:*$//
Bram Moolenaar7db77842014-03-27 17:40:59 +010017162x
17163s/\(=[ ]*\).*/\1/
17164G
17165s/\n//
Bram Moolenaar446cb832008-06-24 21:56:24 +000017166s/^[^=]*=[ ]*$//
17167}'
17168fi
17169
17170cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17171fi # test -n "$CONFIG_FILES"
17172
17173# Set up the scripts for CONFIG_HEADERS section.
17174# No need to generate them if there are no CONFIG_HEADERS.
17175# This happens for instance with `./config.status Makefile'.
17176if test -n "$CONFIG_HEADERS"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017177cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Bram Moolenaar446cb832008-06-24 21:56:24 +000017178BEGIN {
17179_ACEOF
17180
17181# Transform confdefs.h into an awk script `defines.awk', embedded as
17182# here-document in config.status, that substitutes the proper values into
17183# config.h.in to produce config.h.
17184
17185# Create a delimiter string that does not exist in confdefs.h, to ease
17186# handling of long lines.
17187ac_delim='%!_!# '
17188for ac_last_try in false false :; do
Bram Moolenaar7db77842014-03-27 17:40:59 +010017189 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17190 if test -z "$ac_tt"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017191 break
17192 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017193 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017194 else
17195 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17196 fi
17197done
17198
17199# For the awk script, D is an array of macro values keyed by name,
17200# likewise P contains macro parameters if any. Preserve backslash
17201# newline sequences.
17202
17203ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17204sed -n '
17205s/.\{148\}/&'"$ac_delim"'/g
17206t rset
17207:rset
17208s/^[ ]*#[ ]*define[ ][ ]*/ /
17209t def
17210d
17211:def
17212s/\\$//
17213t bsnl
17214s/["\\]/\\&/g
17215s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17216D["\1"]=" \3"/p
17217s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17218d
17219:bsnl
17220s/["\\]/\\&/g
17221s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17222D["\1"]=" \3\\\\\\n"\\/p
17223t cont
17224s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17225t cont
17226d
17227:cont
17228n
17229s/.\{148\}/&'"$ac_delim"'/g
17230t clear
17231:clear
17232s/\\$//
17233t bsnlc
17234s/["\\]/\\&/g; s/^/"/; s/$/"/p
17235d
17236:bsnlc
17237s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17238b cont
17239' <confdefs.h | sed '
17240s/'"$ac_delim"'/"\\\
17241"/g' >>$CONFIG_STATUS || ac_write_fail=1
17242
17243cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17244 for (key in D) D_is_set[key] = 1
17245 FS = ""
17246}
17247/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17248 line = \$ 0
17249 split(line, arg, " ")
17250 if (arg[1] == "#") {
17251 defundef = arg[2]
17252 mac1 = arg[3]
17253 } else {
17254 defundef = substr(arg[1], 2)
17255 mac1 = arg[2]
17256 }
17257 split(mac1, mac2, "(") #)
17258 macro = mac2[1]
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017259 prefix = substr(line, 1, index(line, defundef) - 1)
Bram Moolenaar446cb832008-06-24 21:56:24 +000017260 if (D_is_set[macro]) {
17261 # Preserve the white space surrounding the "#".
Bram Moolenaar446cb832008-06-24 21:56:24 +000017262 print prefix "define", macro P[macro] D[macro]
17263 next
17264 } else {
17265 # Replace #undef with comments. This is necessary, for example,
17266 # in the case of _POSIX_SOURCE, which is predefined and required
17267 # on some systems where configure will not decide to define it.
17268 if (defundef == "undef") {
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017269 print "/*", prefix defundef, macro, "*/"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017270 next
17271 }
17272 }
17273}
17274{ print }
17275_ACAWK
17276_ACEOF
17277cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017278 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017279fi # test -n "$CONFIG_HEADERS"
17280
17281
17282eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17283shift
17284for ac_tag
17285do
17286 case $ac_tag in
17287 :[FHLC]) ac_mode=$ac_tag; continue;;
17288 esac
17289 case $ac_mode$ac_tag in
17290 :[FHL]*:*);;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017291 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017292 :[FH]-) ac_tag=-:-;;
17293 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17294 esac
17295 ac_save_IFS=$IFS
17296 IFS=:
17297 set x $ac_tag
17298 IFS=$ac_save_IFS
17299 shift
17300 ac_file=$1
17301 shift
17302
17303 case $ac_mode in
17304 :L) ac_source=$1;;
17305 :[FH])
17306 ac_file_inputs=
17307 for ac_f
17308 do
17309 case $ac_f in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017310 -) ac_f="$ac_tmp/stdin";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017311 *) # Look for the file first in the build tree, then in the source tree
17312 # (if the path is not absolute). The absolute path cannot be DOS-style,
17313 # because $ac_f cannot contain `:'.
17314 test -f "$ac_f" ||
17315 case $ac_f in
17316 [\\/$]*) false;;
17317 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17318 esac ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017319 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017320 esac
Illia Bobyra96d5442023-08-30 16:30:15 +020017321 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017322 as_fn_append ac_file_inputs " '$ac_f'"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017323 done
17324
17325 # Let's still pretend it is `configure' which instantiates (i.e., don't
17326 # use $as_me), people would be surprised to read:
17327 # /* config.h. Generated by config.status. */
17328 configure_input='Generated from '`
Illia Bobyra96d5442023-08-30 16:30:15 +020017329 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017330 `' by configure.'
17331 if test x"$ac_file" != x-; then
17332 configure_input="$ac_file. $configure_input"
Illia Bobyra96d5442023-08-30 16:30:15 +020017333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17334printf "%s\n" "$as_me: creating $ac_file" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017335 fi
17336 # Neutralize special characters interpreted by sed in replacement strings.
17337 case $configure_input in #(
17338 *\&* | *\|* | *\\* )
Illia Bobyra96d5442023-08-30 16:30:15 +020017339 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017340 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17341 *) ac_sed_conf_input=$configure_input;;
17342 esac
17343
17344 case $ac_tag in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017345 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17346 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017347 esac
17348 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000017349 esac
17350
Bram Moolenaar446cb832008-06-24 21:56:24 +000017351 ac_dir=`$as_dirname -- "$ac_file" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017352$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17353 X"$ac_file" : 'X\(//\)[^/]' \| \
17354 X"$ac_file" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000017355 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017356printf "%s\n" X"$ac_file" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017357 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17358 s//\1/
17359 q
17360 }
17361 /^X\(\/\/\)[^/].*/{
17362 s//\1/
17363 q
17364 }
17365 /^X\(\/\/\)$/{
17366 s//\1/
17367 q
17368 }
17369 /^X\(\/\).*/{
17370 s//\1/
17371 q
17372 }
17373 s/.*/./; q'`
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017374 as_dir="$ac_dir"; as_fn_mkdir_p
Bram Moolenaar446cb832008-06-24 21:56:24 +000017375 ac_builddir=.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017376
Bram Moolenaar446cb832008-06-24 21:56:24 +000017377case "$ac_dir" in
17378.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17379*)
Illia Bobyra96d5442023-08-30 16:30:15 +020017380 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017381 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +020017382 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017383 case $ac_top_builddir_sub in
17384 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17385 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17386 esac ;;
17387esac
17388ac_abs_top_builddir=$ac_pwd
17389ac_abs_builddir=$ac_pwd$ac_dir_suffix
17390# for backward compatibility:
17391ac_top_builddir=$ac_top_build_prefix
17392
17393case $srcdir in
17394 .) # We are building in place.
17395 ac_srcdir=.
17396 ac_top_srcdir=$ac_top_builddir_sub
17397 ac_abs_top_srcdir=$ac_pwd ;;
17398 [\\/]* | ?:[\\/]* ) # Absolute name.
17399 ac_srcdir=$srcdir$ac_dir_suffix;
17400 ac_top_srcdir=$srcdir
17401 ac_abs_top_srcdir=$srcdir ;;
17402 *) # Relative name.
17403 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17404 ac_top_srcdir=$ac_top_build_prefix$srcdir
17405 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
17406esac
17407ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
17408
17409
17410 case $ac_mode in
17411 :F)
17412 #
17413 # CONFIG_FILE
17414 #
17415
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017416_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017417
Bram Moolenaar446cb832008-06-24 21:56:24 +000017418cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17419# If the template does not know about datarootdir, expand it.
17420# FIXME: This hack should be removed a few years after 2.60.
17421ac_datarootdir_hack=; ac_datarootdir_seen=
Bram Moolenaar446cb832008-06-24 21:56:24 +000017422ac_sed_dataroot='
17423/datarootdir/ {
17424 p
17425 q
17426}
17427/@datadir@/p
17428/@docdir@/p
17429/@infodir@/p
17430/@localedir@/p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017431/@mandir@/p'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017432case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
17433*datarootdir*) ac_datarootdir_seen=yes;;
17434*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Illia Bobyra96d5442023-08-30 16:30:15 +020017435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17436printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017437_ACEOF
17438cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17439 ac_datarootdir_hack='
17440 s&@datadir@&$datadir&g
17441 s&@docdir@&$docdir&g
17442 s&@infodir@&$infodir&g
17443 s&@localedir@&$localedir&g
17444 s&@mandir@&$mandir&g
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017445 s&\\\${datarootdir}&$datarootdir&g' ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017446esac
17447_ACEOF
17448
17449# Neutralize VPATH when `$srcdir' = `.'.
17450# Shell code in configure.ac might set extrasub.
17451# FIXME: do we really want to maintain this feature?
17452cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17453ac_sed_extra="$ac_vpsub
17454$extrasub
17455_ACEOF
17456cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17457:t
17458/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17459s|@configure_input@|$ac_sed_conf_input|;t t
17460s&@top_builddir@&$ac_top_builddir_sub&;t t
17461s&@top_build_prefix@&$ac_top_build_prefix&;t t
17462s&@srcdir@&$ac_srcdir&;t t
17463s&@abs_srcdir@&$ac_abs_srcdir&;t t
17464s&@top_srcdir@&$ac_top_srcdir&;t t
17465s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17466s&@builddir@&$ac_builddir&;t t
17467s&@abs_builddir@&$ac_abs_builddir&;t t
17468s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17469$ac_datarootdir_hack
17470"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017471eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17472 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017473
17474test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017475 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17476 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17477 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Illia Bobyra96d5442023-08-30 16:30:15 +020017478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Bram Moolenaar7db77842014-03-27 17:40:59 +010017479which seems to be undefined. Please make sure it is defined" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020017480printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Bram Moolenaar7db77842014-03-27 17:40:59 +010017481which seems to be undefined. Please make sure it is defined" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017482
Bram Moolenaar7db77842014-03-27 17:40:59 +010017483 rm -f "$ac_tmp/stdin"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017484 case $ac_file in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017485 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17486 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017487 esac \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017488 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017489 ;;
17490 :H)
17491 #
17492 # CONFIG_HEADER
17493 #
17494 if test x"$ac_file" != x-; then
17495 {
Illia Bobyra96d5442023-08-30 16:30:15 +020017496 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017497 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17498 } >"$ac_tmp/config.h" \
17499 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17500 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17502printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017503 else
17504 rm -f "$ac_file"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017505 mv "$ac_tmp/config.h" "$ac_file" \
17506 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017507 fi
17508 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017509 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010017510 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17511 || as_fn_error $? "could not create -" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017512 fi
17513 ;;
17514
17515
17516 esac
17517
17518done # for ac_tag
17519
Bram Moolenaar071d4272004-06-13 20:20:40 +000017520
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017521as_fn_exit 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017522_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017523ac_clean_files=$ac_clean_files_save
17524
Bram Moolenaar446cb832008-06-24 21:56:24 +000017525test $ac_write_fail = 0 ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017526 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017527
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017528
17529# configure is writing to config.log, and then calls config.status.
17530# config.status does its own redirection, appending to config.log.
17531# Unfortunately, on DOS this fails, as config.log is still kept open
17532# by configure, so config.status won't be able to write to it; its
17533# output is simply discarded. So we exec the FD to /dev/null,
17534# effectively closing config.log, so it can be properly (re)opened and
17535# appended to by config.status. When coming back to configure, we
17536# need to make the FD available again.
17537if test "$no_create" != yes; then
17538 ac_cs_success=:
17539 ac_config_status_args=
17540 test "$silent" = yes &&
17541 ac_config_status_args="$ac_config_status_args --quiet"
17542 exec 5>/dev/null
17543 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Bram Moolenaarc7453f52006-02-10 23:20:28 +000017544 exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017545 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17546 # would make configure fail if this is the last instruction.
Bram Moolenaar7db77842014-03-27 17:40:59 +010017547 $ac_cs_success || as_fn_exit 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017548fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017549if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17551printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000017552fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017553
17554
Illia Bobyra96d5442023-08-30 16:30:15 +020017555