blob: b72d4edca5c4cd1ba2f21c79ae6098e00a81d6be [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.
Christian Brabandt9670f612025-05-07 21:44:33 +02003# Generated by GNU Autoconf 2.72.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004#
Bram Moolenaar071d4272004-06-13 20:20:40 +00005#
Christian Brabandt9670f612025-05-07 21:44:33 +02006# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
Illia Bobyra96d5442023-08-30 16:30:15 +02007# 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 +020018if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
19then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000020 emulate sh
21 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000025 setopt NO_GLOB_SUBST
Christian Brabandt9670f612025-05-07 21:44:33 +020026else case e in #(
27 e) case `(set -o) 2>/dev/null` in #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020028 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020032esac ;;
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
Christian Brabandt9670f612025-05-07 21:44:33 +0200104# We did not find ourselves, most probably we were run as 'sh COMMAND'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000105# 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
Christian Brabandt9670f612025-05-07 21:44:33 +0200134# 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
Christian Brabandt9670f612025-05-07 21:44:33 +0200141 as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +0200142then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200143 emulate sh
144 NULLCMD=:
145 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
146 # is contrary to our usage. Disable this feature.
147 alias -g '\${1+\"\$@\"}'='\"\$@\"'
148 setopt NO_GLOB_SUBST
Christian Brabandt9670f612025-05-07 21:44:33 +0200149else case e in #(
150 e) case \`(set -o) 2>/dev/null\` in #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200151 *posix*) :
152 set -o posix ;; #(
153 *) :
154 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +0200155esac ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200156esac
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
Christian Brabandt9670f612025-05-07 21:44:33 +0200173else case e in #(
174 e) exitcode=1; echo positional parameters were not saved. ;;
175esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200176fi
Bram Moolenaar7db77842014-03-27 17:40:59 +0100177test x\$exitcode = x0 || exit 1
Illia Bobyra96d5442023-08-30 16:30:15 +0200178blah=\$(echo \$(echo blah))
179test x\"\$blah\" = xblah || exit 1
Bram Moolenaar7db77842014-03-27 17:40:59 +0100180test -x / || exit 1"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200181 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
182 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
183 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
184 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
185test \$(( 1 + 1 )) = 2 || exit 1"
Illia Bobyra96d5442023-08-30 16:30:15 +0200186 if (eval "$as_required") 2>/dev/null
187then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200188 as_have_required=yes
Christian Brabandt9670f612025-05-07 21:44:33 +0200189else case e in #(
190 e) as_have_required=no ;;
191esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200192fi
Illia Bobyra96d5442023-08-30 16:30:15 +0200193 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
194then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200195
Christian Brabandt9670f612025-05-07 21:44:33 +0200196else case e in #(
197 e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200198as_found=false
199for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
200do
201 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +0200202 case $as_dir in #(((
203 '') as_dir=./ ;;
204 */) ;;
205 *) as_dir=$as_dir/ ;;
206 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200207 as_found=:
208 case $as_dir in #(
209 /*)
210 for as_base in sh bash ksh sh5; do
211 # Try only shells that exist, to save several forks.
Illia Bobyra96d5442023-08-30 16:30:15 +0200212 as_shell=$as_dir$as_base
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200213 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
Illia Bobyra96d5442023-08-30 16:30:15 +0200214 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
215then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200216 CONFIG_SHELL=$as_shell as_have_required=yes
Illia Bobyra96d5442023-08-30 16:30:15 +0200217 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
218then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200219 break 2
220fi
221fi
222 done;;
223 esac
224 as_found=false
225done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200226IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +0200227if $as_found
228then :
229
Christian Brabandt9670f612025-05-07 21:44:33 +0200230else case e in #(
231 e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
Illia Bobyra96d5442023-08-30 16:30:15 +0200232 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
233then :
234 CONFIG_SHELL=$SHELL as_have_required=yes
Christian Brabandt9670f612025-05-07 21:44:33 +0200235fi ;;
236esac
Illia Bobyra96d5442023-08-30 16:30:15 +0200237fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200238
239
Illia Bobyra96d5442023-08-30 16:30:15 +0200240 if test "x$CONFIG_SHELL" != x
241then :
Bram Moolenaar7db77842014-03-27 17:40:59 +0100242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
Christian Brabandt9670f612025-05-07 21:44:33 +0200258# out after a failed 'exec'.
Illia Bobyra96d5442023-08-30 16:30:15 +0200259printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
Bram Moolenaar7db77842014-03-27 17:40:59 +0100260exit 255
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200261fi
262
Illia Bobyra96d5442023-08-30 16:30:15 +0200263 if test x$as_have_required = xno
264then :
265 printf "%s\n" "$0: This script requires a shell more modern than all"
266 printf "%s\n" "$0: the shells that I found on your system."
267 if test ${ZSH_VERSION+y} ; then
268 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200270 else
Illia Bobyra96d5442023-08-30 16:30:15 +0200271 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200272$0: including any error possibly output before this
273$0: message. Then install a modern shell, or manually run
274$0: the script under such a shell if you do have one."
275 fi
276 exit 1
Christian Brabandt9670f612025-05-07 21:44:33 +0200277fi ;;
278esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200279fi
280fi
281SHELL=${CONFIG_SHELL-/bin/sh}
282export SHELL
283# Unset more variables known to interfere with behavior of common tools.
284CLICOLOR_FORCE= GREP_OPTIONS=
285unset CLICOLOR_FORCE GREP_OPTIONS
286
287## --------------------- ##
288## M4sh Shell Functions. ##
289## --------------------- ##
290# as_fn_unset VAR
291# ---------------
292# Portably unset VAR.
293as_fn_unset ()
294{
295 { eval $1=; unset $1;}
296}
297as_unset=as_fn_unset
298
Illia Bobyra96d5442023-08-30 16:30:15 +0200299
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200300# as_fn_set_status STATUS
301# -----------------------
302# Set $? to STATUS, without forking.
303as_fn_set_status ()
304{
305 return $1
306} # as_fn_set_status
307
308# as_fn_exit STATUS
309# -----------------
310# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
311as_fn_exit ()
312{
313 set +e
314 as_fn_set_status $1
315 exit $1
316} # as_fn_exit
317
318# as_fn_mkdir_p
319# -------------
320# Create "$as_dir" as a directory, including parents if necessary.
321as_fn_mkdir_p ()
322{
323
324 case $as_dir in #(
325 -*) as_dir=./$as_dir;;
326 esac
327 test -d "$as_dir" || eval $as_mkdir_p || {
328 as_dirs=
329 while :; do
330 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +0200331 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200332 *) as_qdir=$as_dir;;
333 esac
334 as_dirs="'$as_qdir' $as_dirs"
335 as_dir=`$as_dirname -- "$as_dir" ||
336$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
337 X"$as_dir" : 'X\(//\)[^/]' \| \
338 X"$as_dir" : 'X\(//\)$' \| \
339 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200340printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200341 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
342 s//\1/
343 q
344 }
345 /^X\(\/\/\)[^/].*/{
346 s//\1/
347 q
348 }
349 /^X\(\/\/\)$/{
350 s//\1/
351 q
352 }
353 /^X\(\/\).*/{
354 s//\1/
355 q
356 }
357 s/.*/./; q'`
358 test -d "$as_dir" && break
359 done
360 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +0100361 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200362
363
364} # as_fn_mkdir_p
Bram Moolenaar7db77842014-03-27 17:40:59 +0100365
366# as_fn_executable_p FILE
367# -----------------------
368# Test if FILE is an executable regular file.
369as_fn_executable_p ()
370{
371 test -f "$1" && test -x "$1"
372} # as_fn_executable_p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200373# as_fn_append VAR VALUE
374# ----------------------
375# Append the text in VALUE to the end of the definition contained in VAR. Take
376# advantage of any shell optimizations that allow amortized linear growth over
377# repeated appends, instead of the typical quadratic growth present in naive
378# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +0200379if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
380then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200381 eval 'as_fn_append ()
382 {
383 eval $1+=\$2
384 }'
Christian Brabandt9670f612025-05-07 21:44:33 +0200385else case e in #(
386 e) as_fn_append ()
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200387 {
388 eval $1=\$$1\$2
Christian Brabandt9670f612025-05-07 21:44:33 +0200389 } ;;
390esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200391fi # as_fn_append
392
393# as_fn_arith ARG...
394# ------------------
395# Perform arithmetic evaluation on the ARGs, and store the result in the
396# global $as_val. Take advantage of shells that can avoid forks. The arguments
397# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +0200398if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
399then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200400 eval 'as_fn_arith ()
401 {
402 as_val=$(( $* ))
403 }'
Christian Brabandt9670f612025-05-07 21:44:33 +0200404else case e in #(
405 e) as_fn_arith ()
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200406 {
407 as_val=`expr "$@" || test $? -eq 1`
Christian Brabandt9670f612025-05-07 21:44:33 +0200408 } ;;
409esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200410fi # as_fn_arith
411
412
Bram Moolenaar7db77842014-03-27 17:40:59 +0100413# as_fn_error STATUS ERROR [LINENO LOG_FD]
414# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200415# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
416# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +0100417# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200418as_fn_error ()
419{
Bram Moolenaar7db77842014-03-27 17:40:59 +0100420 as_status=$1; test $as_status -eq 0 && as_status=1
421 if test "$4"; then
422 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +0200423 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200424 fi
Illia Bobyra96d5442023-08-30 16:30:15 +0200425 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200426 as_fn_exit $as_status
427} # as_fn_error
428
Bram Moolenaar446cb832008-06-24 21:56:24 +0000429if expr a : '\(a\)' >/dev/null 2>&1 &&
430 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000431 as_expr=expr
432else
433 as_expr=false
434fi
435
Bram Moolenaar446cb832008-06-24 21:56:24 +0000436if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000437 as_basename=basename
438else
439 as_basename=false
440fi
441
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200442if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
443 as_dirname=dirname
444else
445 as_dirname=false
446fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000447
Bram Moolenaar446cb832008-06-24 21:56:24 +0000448as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000449$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
450 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +0000451 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200452printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +0000453 sed '/^.*\/\([^/][^/]*\)\/*$/{
454 s//\1/
455 q
456 }
457 /^X\/\(\/\/\)$/{
458 s//\1/
459 q
460 }
461 /^X\/\(\/\).*/{
462 s//\1/
463 q
464 }
465 s/.*/./; q'`
466
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200467# Avoid depending upon Character Ranges.
468as_cr_letters='abcdefghijklmnopqrstuvwxyz'
469as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
470as_cr_Letters=$as_cr_letters$as_cr_LETTERS
471as_cr_digits='0123456789'
472as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000473
474
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200475 as_lineno_1=$LINENO as_lineno_1a=$LINENO
476 as_lineno_2=$LINENO as_lineno_2a=$LINENO
477 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
478 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
479 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Bram Moolenaar446cb832008-06-24 21:56:24 +0000480 sed -n '
481 p
482 /[$]LINENO/=
483 ' <$as_myself |
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000484 sed '
Christian Brabandt9670f612025-05-07 21:44:33 +0200485 t clear
486 :clear
Bram Moolenaar446cb832008-06-24 21:56:24 +0000487 s/[$]LINENO.*/&-/
488 t lineno
489 b
490 :lineno
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000491 N
Bram Moolenaar446cb832008-06-24 21:56:24 +0000492 :loop
493 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000494 t loop
Bram Moolenaar446cb832008-06-24 21:56:24 +0000495 s/-\n.*//
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000496 ' >$as_me.lineno &&
Bram Moolenaar446cb832008-06-24 21:56:24 +0000497 chmod +x "$as_me.lineno" ||
Illia Bobyra96d5442023-08-30 16:30:15 +0200498 { 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 +0000499
Bram Moolenaar7db77842014-03-27 17:40:59 +0100500 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
501 # already done that, so ensure we don't try to do so again and fall
502 # in an infinite loop. This has already happened in practice.
503 _as_can_reexec=no; export _as_can_reexec
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000504 # Don't try to exec as it changes $[0], causing all sort of problems
505 # (the dirname of $[0] is not the place where we might find the
Bram Moolenaar446cb832008-06-24 21:56:24 +0000506 # original and so on. Autoconf is especially sensitive to this).
507 . "./$as_me.lineno"
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000508 # Exit status is that of the last command.
509 exit
510}
511
Illia Bobyra96d5442023-08-30 16:30:15 +0200512
513# Determine whether it's possible to make 'echo' print without a newline.
514# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
515# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000516ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200517case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +0000518-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200519 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +0000520 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200521 xy) ECHO_C='\c';;
522 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
523 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +0000524 esac;;
525*)
526 ECHO_N='-n';;
527esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000528
Illia Bobyra96d5442023-08-30 16:30:15 +0200529# For backward compatibility with old third-party macros, we provide
530# the shell variables $as_echo and $as_echo_n. New code should use
531# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
532as_echo='printf %s\n'
533as_echo_n='printf %s'
534
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000535rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +0000536if test -d conf$$.dir; then
537 rm -f conf$$.dir/conf$$.file
538else
539 rm -f conf$$.dir
540 mkdir conf$$.dir 2>/dev/null
541fi
542if (echo >conf$$.file) 2>/dev/null; then
543 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000544 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000545 # ... but there are two gotchas:
Christian Brabandt9670f612025-05-07 21:44:33 +0200546 # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
547 # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
548 # In both cases, we have to default to 'cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000549 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +0100550 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +0000551 elif ln conf$$.file conf$$ 2>/dev/null; then
552 as_ln_s=ln
553 else
Bram Moolenaar7db77842014-03-27 17:40:59 +0100554 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000555 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000556else
Bram Moolenaar7db77842014-03-27 17:40:59 +0100557 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000558fi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000559rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
560rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000561
562if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200563 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000564else
565 test -d ./-p && rmdir ./-p
566 as_mkdir_p=false
567fi
568
Bram Moolenaar7db77842014-03-27 17:40:59 +0100569as_test_x='test -x'
570as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000571
572# Sed expression to map a string onto a valid CPP name.
Christian Brabandt9670f612025-05-07 21:44:33 +0200573as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
574as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000575
576# Sed expression to map a string onto a valid variable name.
Christian Brabandt9670f612025-05-07 21:44:33 +0200577as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
578as_tr_sh="eval sed '$as_sed_sh'" # deprecated
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000579
580
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200581test -n "$DJDIR" || exec 7<&0 </dev/null
582exec 6>&1
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000583
584# Name of the host.
Bram Moolenaar7db77842014-03-27 17:40:59 +0100585# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000586# so uname gets run too.
587ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
588
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000589#
590# Initializations.
591#
Bram Moolenaar071d4272004-06-13 20:20:40 +0000592ac_default_prefix=/usr/local
Bram Moolenaar446cb832008-06-24 21:56:24 +0000593ac_clean_files=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000594ac_config_libobj_dir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +0000595LIBOBJS=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000596cross_compiling=no
597subdirs=
598MFLAGS=
599MAKEFLAGS=
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000600
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000601# Identity of this package.
Illia Bobyra96d5442023-08-30 16:30:15 +0200602PACKAGE_NAME=''
603PACKAGE_TARNAME=''
604PACKAGE_VERSION=''
605PACKAGE_STRING=''
606PACKAGE_BUGREPORT=''
607PACKAGE_URL=''
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000608
609ac_unique_file="vim.h"
610# Factoring default headers for most tests.
611ac_includes_default="\
Illia Bobyra96d5442023-08-30 16:30:15 +0200612#include <stddef.h>
613#ifdef HAVE_STDIO_H
614# include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000615#endif
Illia Bobyra96d5442023-08-30 16:30:15 +0200616#ifdef HAVE_STDLIB_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000617# include <stdlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000618#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000619#ifdef HAVE_STRING_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000620# include <string.h>
621#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000622#ifdef HAVE_INTTYPES_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000623# include <inttypes.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000624#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000625#ifdef HAVE_STDINT_H
626# include <stdint.h>
627#endif
Illia Bobyra96d5442023-08-30 16:30:15 +0200628#ifdef HAVE_STRINGS_H
629# include <strings.h>
630#endif
631#ifdef HAVE_SYS_TYPES_H
632# include <sys/types.h>
633#endif
634#ifdef HAVE_SYS_STAT_H
635# include <sys/stat.h>
636#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +0000637#ifdef HAVE_UNISTD_H
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000638# include <unistd.h>
639#endif"
640
Illia Bobyra96d5442023-08-30 16:30:15 +0200641ac_header_c_list=
Christian Brabandt9670f612025-05-07 21:44:33 +0200642enable_year2038=no
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000643ac_subst_vars='LTLIBOBJS
Bram Moolenaar446cb832008-06-24 21:56:24 +0000644LIBOBJS
Bram Moolenaar22e193d2010-11-03 22:32:24 +0100645LINK_AS_NEEDED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000646DEPEND_CFLAGS_FILTER
RestorerZe498caf2024-03-12 22:11:36 +0100647MSGFMTCMD
Bram Moolenaar26096cc2019-04-11 15:25:40 +0200648MSGFMT_DESKTOP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000649MAKEMO
650MSGFMT
651INSTALL_TOOL_LANGS
652INSTALL_LANGS
653TAGPRG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000654GUI_X_LIBS
655GUITYPE
656GUI_LIB_LOC
657GUI_INC_LOC
658NARROW_PROTO
659MOTIF_LIBNAME
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100660GRESOURCE_OBJ
661GRESOURCE_SRC
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200662UPDATE_DESKTOP_DATABASE
663GTK_UPDATE_ICON_CACHE
Bram Moolenaar36e294c2015-12-29 18:55:46 +0100664GLIB_COMPILE_RESOURCES
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000665GNOME_INCLUDEDIR
666GNOME_LIBDIR
667GNOME_LIBS
668GTK_LIBNAME
669GTK_LIBS
670GTK_CFLAGS
671PKG_CONFIG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000672X_LIB
673X_EXTRA_LIBS
674X_LIBS
675X_PRE_LIBS
676X_CFLAGS
677XMKMF
678xmkmfpath
Foxe Chenb90c2392025-06-27 21:10:35 +0200679WAYLAND_OBJ
680WAYLAND_SRC
681WAYLAND_LIBS
Bram Moolenaar823edd12019-10-23 22:35:36 +0200682TERM_TEST
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200683TERM_OBJ
684TERM_SRC
Bram Moolenaare0874f82016-01-24 20:36:41 +0100685CHANNEL_OBJ
686CHANNEL_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000687NETBEANS_OBJ
688NETBEANS_SRC
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000689RUBY_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000690RUBY_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000691RUBY_CFLAGS
692RUBY_PRO
693RUBY_OBJ
694RUBY_SRC
695vi_cv_path_ruby
696TCL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000697TCL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000698TCL_CFLAGS
699TCL_PRO
700TCL_OBJ
701TCL_SRC
702vi_cv_path_tcl
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200703PYTHON3_OBJ
704PYTHON3_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000705PYTHON3_CFLAGS_EXTRA
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200706PYTHON3_CFLAGS
707PYTHON3_LIBS
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200708vi_cv_var_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200709vi_cv_path_python3
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000710PYTHON_OBJ
711PYTHON_SRC
ichizok8bb3fe42021-12-28 15:51:45 +0000712PYTHON_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000713PYTHON_CFLAGS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000714PYTHON_LIBS
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000715vi_cv_path_python
716PERL_LIBS
ichizok8bb3fe42021-12-28 15:51:45 +0000717PERL_CFLAGS_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000718PERL_CFLAGS
719PERL_PRO
720PERL_OBJ
721PERL_SRC
722shrpenv
Bram Moolenaard5f62b12014-08-17 17:05:44 +0200723vi_cv_perl_xsubpp
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000724vi_cv_perllib
725vi_cv_path_perl
Bram Moolenaar9e70cf12009-05-26 20:59:55 +0000726MZSCHEME_MZC
727MZSCHEME_EXTRA
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000728MZSCHEME_CFLAGS
729MZSCHEME_LIBS
730MZSCHEME_PRO
731MZSCHEME_OBJ
732MZSCHEME_SRC
733vi_cv_path_mzscheme
ichizok8bb3fe42021-12-28 15:51:45 +0000734LUA_CFLAGS_EXTRA
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200735LUA_CFLAGS
736LUA_LIBS
737LUA_PRO
738LUA_OBJ
739LUA_SRC
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200740vi_cv_path_plain_lua
741vi_cv_path_luajit
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200742vi_cv_path_lua
Bram Moolenaar67ffb412022-01-08 13:36:57 +0000743XDIFF_OBJS_USED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000744compiledby
745dogvimdiff
746dovimdiff
Bram Moolenaar2c704a72010-06-03 21:17:25 +0200747QUOTESED
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000748line_break
749VIEWNAME
750EXNAME
751VIMNAME
752OS_EXTRA_OBJ
753OS_EXTRA_SRC
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100754XCODE_SELECT
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000755CPP_MM
Bram Moolenaar839e9542016-04-14 16:46:02 +0200756CROSS_COMPILING
Bram Moolenaar8f1dde52020-06-05 23:16:29 +0200757BUILD_DATE_MSG
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000758STRIP
759AWK
Bram Moolenaar2bcaec32014-03-27 18:51:11 +0100760FGREP
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000761EGREP
762GREP
763CPP
764OBJEXT
765EXEEXT
766ac_ct_CC
767CPPFLAGS
768LDFLAGS
769CFLAGS
770CC
771SET_MAKE
772target_alias
773host_alias
774build_alias
775LIBS
776ECHO_T
777ECHO_N
778ECHO_C
779DEFS
780mandir
781localedir
782libdir
783psdir
784pdfdir
785dvidir
786htmldir
787infodir
788docdir
789oldincludedir
790includedir
Illia Bobyrf39842f2023-08-27 18:21:23 +0200791runstatedir
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000792localstatedir
793sharedstatedir
794sysconfdir
795datadir
796datarootdir
797libexecdir
798sbindir
799bindir
800program_transform_name
801prefix
802exec_prefix
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +0200803PACKAGE_URL
Bram Moolenaar32f31b12009-05-21 13:20:59 +0000804PACKAGE_BUGREPORT
805PACKAGE_STRING
806PACKAGE_VERSION
807PACKAGE_TARNAME
808PACKAGE_NAME
809PATH_SEPARATOR
810SHELL'
Bram Moolenaar495de9c2005-01-25 22:03:25 +0000811ac_subst_files=''
Bram Moolenaar446cb832008-06-24 21:56:24 +0000812ac_user_opts='
813enable_option_checking
Bram Moolenaarf788a062011-12-14 20:51:25 +0100814enable_fail_if_missing
Bram Moolenaar446cb832008-06-24 21:56:24 +0000815enable_darwin
816with_mac_arch
Bram Moolenaar595a7be2010-03-10 16:28:12 +0100817with_developer_dir
Bram Moolenaarc236c162008-07-13 17:41:49 +0000818with_local_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000819with_vim_name
820with_ex_name
821with_view_name
822with_global_runtime
823with_modified_by
Bram Moolenaar5bd32f42014-04-02 14:05:38 +0200824enable_smack
Bram Moolenaar446cb832008-06-24 21:56:24 +0000825enable_selinux
Christian Brabandte085dfd2023-09-30 12:49:18 +0200826enable_xattr
Bram Moolenaar446cb832008-06-24 21:56:24 +0000827with_features
828with_compiledby
829enable_xsmp
830enable_xsmp_interact
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200831enable_luainterp
832with_lua_prefix
Bram Moolenaare855ccf2013-07-28 13:32:15 +0200833with_luajit
Bram Moolenaar446cb832008-06-24 21:56:24 +0000834enable_mzschemeinterp
835with_plthome
836enable_perlinterp
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +0100837with_xsubpp
Bram Moolenaar446cb832008-06-24 21:56:24 +0000838enable_pythoninterp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200839with_python_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000840with_python_config_dir
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200841enable_python3interp
Bram Moolenaare1a32312018-04-15 16:03:25 +0200842with_python3_command
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +0200843with_python3_stable_abi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +0200844with_python3_config_dir
Bram Moolenaar446cb832008-06-24 21:56:24 +0000845enable_tclinterp
846with_tclsh
847enable_rubyinterp
Bram Moolenaar165641d2010-02-17 16:23:09 +0100848with_ruby_command
Bram Moolenaar446cb832008-06-24 21:56:24 +0000849enable_cscope
Bram Moolenaar446cb832008-06-24 21:56:24 +0000850enable_netbeans
Bram Moolenaare0874f82016-01-24 20:36:41 +0100851enable_channel
Bram Moolenaare4f25e42017-07-07 11:54:15 +0200852enable_terminal
Bram Moolenaare42a6d22017-11-12 19:21:51 +0100853enable_autoservername
Bram Moolenaar446cb832008-06-24 21:56:24 +0000854enable_multibyte
Bram Moolenaar5c5697f2018-12-12 20:34:09 +0100855enable_rightleft
856enable_arabic
857enable_farsi
Bram Moolenaar446cb832008-06-24 21:56:24 +0000858enable_xim
859enable_fontset
Foxe Chenb90c2392025-06-27 21:10:35 +0200860with_wayland
Bram Moolenaar446cb832008-06-24 21:56:24 +0000861with_x
862enable_gui
Bram Moolenaar446cb832008-06-24 21:56:24 +0000863enable_gtk2_check
864enable_gnome_check
Bram Moolenaar98921892016-02-23 17:14:37 +0100865enable_gtk3_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000866enable_motif_check
Bram Moolenaar446cb832008-06-24 21:56:24 +0000867enable_gtktest
868with_gnome_includes
869with_gnome_libs
870with_gnome
Bram Moolenaar4adfaab2016-04-21 18:20:11 +0200871enable_icon_cache_update
872enable_desktop_database_update
Bram Moolenaar446cb832008-06-24 21:56:24 +0000873with_motif_lib
874with_tlib
Bram Moolenaar317fd3a2010-05-07 16:05:55 +0200875enable_largefile
Bram Moolenaar21606672019-06-14 20:40:58 +0200876enable_canberra
Christian Brabandtf573c6e2021-06-20 14:02:16 +0200877enable_libsodium
Bram Moolenaar446cb832008-06-24 21:56:24 +0000878enable_acl
879enable_gpm
880enable_sysmouse
881enable_nls
Christian Brabandt9670f612025-05-07 21:44:33 +0200882enable_year2038
Bram Moolenaar446cb832008-06-24 21:56:24 +0000883'
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 &&
Christian Brabandt9670f612025-05-07 21:44:33 +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 &&
Christian Brabandt9670f612025-05-07 21:44:33 +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 &&
Christian Brabandt9670f612025-05-07 21:44:33 +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 &&
Christian Brabandt9670f612025-05-07 21:44:33 +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
Christian Brabandt9670f612025-05-07 21:44:33 +02001287 -*) 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]* )
Christian Brabandt9670f612025-05-07 21:44:33 +02001296 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
Christian Brabandt9670f612025-05-07 21:44:33 +02001346# There might be people who depend on the old broken behavior: '$host'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001347# 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
Christian Brabandt9670f612025-05-07 21:44:33 +02001414ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
Bram Moolenaar446cb832008-06-24 21:56:24 +00001415ac_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
Christian Brabandt9670f612025-05-07 21:44:33 +02001442'configure' configures this package to adapt to many kinds of systems.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001443
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
Christian Brabandt9670f612025-05-07 21:44:33 +02001456 -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]
Christian Brabandt9670f612025-05-07 21:44:33 +02001458 -C, --config-cache alias for '--cache-file=config.cache'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001459 -n, --no-create do not create output files
Christian Brabandt9670f612025-05-07 21:44:33 +02001460 --srcdir=DIR find the sources in DIR [configure dir or '..']
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001461
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
Christian Brabandt9670f612025-05-07 21:44:33 +02001468By 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'.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001472
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()).
Christian Brabandt9670f612025-05-07 21:44:33 +02001555 --enable-year2038 support timestamps after 2038
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001556
1557Optional Packages:
1558 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1559 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Bram Moolenaar899dddf2006-03-26 21:06:50 +00001560 --with-mac-arch=ARCH current, intel, ppc or both
Bram Moolenaar595a7be2010-03-10 16:28:12 +01001561 --with-developer-dir=PATH use PATH as location for Xcode developer tools
Bram Moolenaarc236c162008-07-13 17:41:49 +00001562 --with-local-dir=PATH search PATH instead of /usr/local for local libraries.
1563 --without-local-dir do not search /usr/local for local libraries.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001564 --with-vim-name=NAME what to call the Vim executable
1565 --with-ex-name=NAME what to call the Ex executable
1566 --with-view-name=NAME what to call the View executable
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01001567 --with-global-runtime=DIR global runtime directory in 'runtimepath', comma-separated for multiple directories
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001568 --with-modified-by=NAME name of who modified a release version
Martin Tournoij25f3a142022-10-08 19:26:41 +01001569 --with-features=TYPE tiny, normal or huge (default: huge)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001570 --with-compiledby=NAME name to show in :version message
Bram Moolenaar0ba04292010-07-14 23:23:17 +02001571 --with-lua-prefix=PFX Prefix where Lua is installed.
Bram Moolenaare855ccf2013-07-28 13:32:15 +02001572 --with-luajit Link with LuaJIT instead of Lua.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001573 --with-plthome=PLTHOME Use PLTHOME.
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +01001574 --with-xsubpp=PATH path to the xsubpp command
Bram Moolenaare1a32312018-04-15 16:03:25 +02001575 --with-python-command=NAME name of the Python 2 command (default: python2 or python)
1576 --with-python-config-dir=PATH Python's config directory (deprecated)
1577 --with-python3-command=NAME name of the Python 3 command (default: python3 or python)
Ken Takata1c032e32024-08-11 18:41:41 +02001578 --with-python3-stable-abi=VERSION stable ABI version to target (default: 3.8)
Bram Moolenaare1a32312018-04-15 16:03:25 +02001579 --with-python3-config-dir=PATH Python's config directory (deprecated)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001580 --with-tclsh=PATH which tclsh to use (default: tclsh8.0)
Bram Moolenaar165641d2010-02-17 16:23:09 +01001581 --with-ruby-command=RUBY name of the Ruby command (default: ruby)
Foxe Chenb90c2392025-06-27 21:10:35 +02001582 --with-wayland Include support for the Wayland protocol.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001583 --with-x use the X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001584 --with-gnome-includes=DIR Specify location of GNOME headers
1585 --with-gnome-libs=DIR Specify location of GNOME libs
1586 --with-gnome Specify prefix for GNOME files
Bram Moolenaar8008b632017-07-18 21:33:20 +02001587 --with-motif-lib=STRING Library for Motif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001588 --with-tlib=library terminal library to be used
1589
1590Some influential environment variables:
1591 CC C compiler command
1592 CFLAGS C compiler flags
1593 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1594 nonstandard directory <lib dir>
Bram Moolenaar446cb832008-06-24 21:56:24 +00001595 LIBS libraries to pass to the linker, e.g. -l<library>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001596 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Bram Moolenaar446cb832008-06-24 21:56:24 +00001597 you have headers in a nonstandard directory <include dir>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001598 CPP C preprocessor
Bram Moolenaar446cb832008-06-24 21:56:24 +00001599 XMKMF Path to xmkmf, Makefile generator for X Window System
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001600
Christian Brabandt9670f612025-05-07 21:44:33 +02001601Use these variables to override the choices made by 'configure' or to help
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001602it to find libraries and programs with nonstandard names/locations.
1603
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001604Report bugs to the package provider.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001605_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001606ac_status=$?
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001607fi
1608
1609if test "$ac_init_help" = "recursive"; then
1610 # If there are subdirs, report their specific --help.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001611 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00001612 test -d "$ac_dir" ||
1613 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1614 continue
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001615 ac_builddir=.
1616
Bram Moolenaar446cb832008-06-24 21:56:24 +00001617case "$ac_dir" in
1618.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1619*)
Illia Bobyra96d5442023-08-30 16:30:15 +02001620 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001621 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +02001622 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +00001623 case $ac_top_builddir_sub in
1624 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1625 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1626 esac ;;
1627esac
1628ac_abs_top_builddir=$ac_pwd
1629ac_abs_builddir=$ac_pwd$ac_dir_suffix
1630# for backward compatibility:
1631ac_top_builddir=$ac_top_build_prefix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001632
1633case $srcdir in
Bram Moolenaar446cb832008-06-24 21:56:24 +00001634 .) # We are building in place.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001635 ac_srcdir=.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001636 ac_top_srcdir=$ac_top_builddir_sub
1637 ac_abs_top_srcdir=$ac_pwd ;;
1638 [\\/]* | ?:[\\/]* ) # Absolute name.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001639 ac_srcdir=$srcdir$ac_dir_suffix;
Bram Moolenaar446cb832008-06-24 21:56:24 +00001640 ac_top_srcdir=$srcdir
1641 ac_abs_top_srcdir=$srcdir ;;
1642 *) # Relative name.
1643 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1644 ac_top_srcdir=$ac_top_build_prefix$srcdir
1645 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001646esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00001647ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001648
Bram Moolenaar446cb832008-06-24 21:56:24 +00001649 cd "$ac_dir" || { ac_status=$?; continue; }
Illia Bobyra96d5442023-08-30 16:30:15 +02001650 # Check for configure.gnu first; this name is used for a wrapper for
1651 # Metaconfig's "Configure" on case-insensitive file systems.
Bram Moolenaar446cb832008-06-24 21:56:24 +00001652 if test -f "$ac_srcdir/configure.gnu"; then
1653 echo &&
1654 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1655 elif test -f "$ac_srcdir/configure"; then
1656 echo &&
1657 $SHELL "$ac_srcdir/configure" --help=recursive
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001658 else
Illia Bobyra96d5442023-08-30 16:30:15 +02001659 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Bram Moolenaar446cb832008-06-24 21:56:24 +00001660 fi || ac_status=$?
1661 cd "$ac_pwd" || { ac_status=$?; break; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001662 done
1663fi
1664
Bram Moolenaar446cb832008-06-24 21:56:24 +00001665test -n "$ac_init_help" && exit $ac_status
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001666if $ac_init_version; then
1667 cat <<\_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001668configure
Christian Brabandt9670f612025-05-07 21:44:33 +02001669generated by GNU Autoconf 2.72
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001670
Christian Brabandt9670f612025-05-07 21:44:33 +02001671Copyright (C) 2023 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001672This configure script is free software; the Free Software Foundation
1673gives unlimited permission to copy, distribute and modify it.
1674_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00001675 exit
Bram Moolenaar495de9c2005-01-25 22:03:25 +00001676fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001677
1678## ------------------------ ##
1679## Autoconf initialization. ##
1680## ------------------------ ##
1681
1682# ac_fn_c_try_compile LINENO
1683# --------------------------
1684# Try to compile conftest.$ac_ext, and return whether this succeeded.
1685ac_fn_c_try_compile ()
1686{
1687 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001688 rm -f conftest.$ac_objext conftest.beam
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001689 if { { ac_try="$ac_compile"
1690case "(($ac_try" in
1691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1692 *) ac_try_echo=$ac_try;;
1693esac
1694eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001695printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001696 (eval "$ac_compile") 2>conftest.err
1697 ac_status=$?
1698 if test -s conftest.err; then
1699 grep -v '^ *+' conftest.err >conftest.er1
1700 cat conftest.er1 >&5
1701 mv -f conftest.er1 conftest.err
1702 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001703 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001704 test $ac_status = 0; } && {
1705 test -z "$ac_c_werror_flag" ||
1706 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001707 } && test -s conftest.$ac_objext
1708then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001709 ac_retval=0
Christian Brabandt9670f612025-05-07 21:44:33 +02001710else case e in #(
1711 e) printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001712sed 's/^/| /' conftest.$ac_ext >&5
1713
Christian Brabandt9670f612025-05-07 21:44:33 +02001714 ac_retval=1 ;;
1715esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001716fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001717 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001718 as_fn_set_status $ac_retval
1719
1720} # ac_fn_c_try_compile
1721
1722# ac_fn_c_try_cpp LINENO
1723# ----------------------
1724# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1725ac_fn_c_try_cpp ()
1726{
1727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728 if { { ac_try="$ac_cpp conftest.$ac_ext"
1729case "(($ac_try" in
1730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1731 *) ac_try_echo=$ac_try;;
1732esac
1733eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001734printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001735 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1736 ac_status=$?
1737 if test -s conftest.err; then
1738 grep -v '^ *+' conftest.err >conftest.er1
1739 cat conftest.er1 >&5
1740 mv -f conftest.er1 conftest.err
1741 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001742 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01001743 test $ac_status = 0; } > conftest.i && {
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001744 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1745 test ! -s conftest.err
Illia Bobyra96d5442023-08-30 16:30:15 +02001746 }
1747then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001748 ac_retval=0
Christian Brabandt9670f612025-05-07 21:44:33 +02001749else case e in #(
1750 e) printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001751sed 's/^/| /' conftest.$ac_ext >&5
1752
Christian Brabandt9670f612025-05-07 21:44:33 +02001753 ac_retval=1 ;;
1754esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001755fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01001756 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001757 as_fn_set_status $ac_retval
1758
1759} # ac_fn_c_try_cpp
1760
1761# ac_fn_c_try_link LINENO
1762# -----------------------
1763# Try to link conftest.$ac_ext, and return whether this succeeded.
1764ac_fn_c_try_link ()
1765{
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001767 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001768 if { { ac_try="$ac_link"
1769case "(($ac_try" in
1770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1771 *) ac_try_echo=$ac_try;;
1772esac
1773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001774printf "%s\n" "$ac_try_echo"; } >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001775 (eval "$ac_link") 2>conftest.err
1776 ac_status=$?
1777 if test -s conftest.err; then
1778 grep -v '^ *+' conftest.err >conftest.er1
1779 cat conftest.er1 >&5
1780 mv -f conftest.er1 conftest.err
1781 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001782 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001783 test $ac_status = 0; } && {
1784 test -z "$ac_c_werror_flag" ||
1785 test ! -s conftest.err
1786 } && test -s conftest$ac_exeext && {
1787 test "$cross_compiling" = yes ||
Bram Moolenaar7db77842014-03-27 17:40:59 +01001788 test -x conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +02001789 }
1790then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001791 ac_retval=0
Christian Brabandt9670f612025-05-07 21:44:33 +02001792else case e in #(
1793 e) printf "%s\n" "$as_me: failed program was:" >&5
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001794sed 's/^/| /' conftest.$ac_ext >&5
1795
Christian Brabandt9670f612025-05-07 21:44:33 +02001796 ac_retval=1 ;;
1797esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001798fi
1799 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1800 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1801 # interfere with the next link command; also delete a directory that is
1802 # left behind by Apple's compiler. We do this before executing the actions.
1803 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Bram Moolenaar7db77842014-03-27 17:40:59 +01001804 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001805 as_fn_set_status $ac_retval
1806
1807} # ac_fn_c_try_link
1808
Illia Bobyr0e82b592023-08-29 21:16:29 +02001809# ac_fn_c_try_run LINENO
1810# ----------------------
Illia Bobyra96d5442023-08-30 16:30:15 +02001811# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1812# executables *can* be run.
Illia Bobyr0e82b592023-08-29 21:16:29 +02001813ac_fn_c_try_run ()
1814{
1815 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1816 if { { ac_try="$ac_link"
1817case "(($ac_try" in
1818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1819 *) ac_try_echo=$ac_try;;
1820esac
1821eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001822printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001823 (eval "$ac_link") 2>&5
1824 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001825 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001826 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1827 { { case "(($ac_try" in
1828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1829 *) ac_try_echo=$ac_try;;
1830esac
1831eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
Illia Bobyra96d5442023-08-30 16:30:15 +02001832printf "%s\n" "$ac_try_echo"; } >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001833 (eval "$ac_try") 2>&5
1834 ac_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02001835 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1836 test $ac_status = 0; }; }
1837then :
Illia Bobyr0e82b592023-08-29 21:16:29 +02001838 ac_retval=0
Christian Brabandt9670f612025-05-07 21:44:33 +02001839else case e in #(
1840 e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02001841 printf "%s\n" "$as_me: failed program was:" >&5
Illia Bobyr0e82b592023-08-29 21:16:29 +02001842sed 's/^/| /' conftest.$ac_ext >&5
1843
Christian Brabandt9670f612025-05-07 21:44:33 +02001844 ac_retval=$ac_status ;;
1845esac
Illia Bobyr0e82b592023-08-29 21:16:29 +02001846fi
1847 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1848 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1849 as_fn_set_status $ac_retval
1850
1851} # ac_fn_c_try_run
1852
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001853# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1854# -------------------------------------------------------
1855# Tests whether HEADER exists and can be compiled using the include files in
1856# INCLUDES, setting the cache variable VAR accordingly.
1857ac_fn_c_check_header_compile ()
1858{
1859 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1861printf %s "checking for $2... " >&6; }
1862if eval test \${$3+y}
1863then :
1864 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02001865else case e in #(
1866 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001867/* end confdefs.h. */
1868$4
1869#include <$2>
1870_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001871if ac_fn_c_try_compile "$LINENO"
1872then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001873 eval "$3=yes"
Christian Brabandt9670f612025-05-07 21:44:33 +02001874else case e in #(
1875 e) eval "$3=no" ;;
1876esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001877fi
Christian Brabandt9670f612025-05-07 21:44:33 +02001878rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
1879esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001880fi
1881eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1883printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001884 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001885
1886} # ac_fn_c_check_header_compile
1887
1888# ac_fn_c_check_func LINENO FUNC VAR
1889# ----------------------------------
1890# Tests whether FUNC exists, setting the cache variable VAR accordingly
1891ac_fn_c_check_func ()
1892{
1893 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02001894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1895printf %s "checking for $2... " >&6; }
1896if eval test \${$3+y}
1897then :
1898 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02001899else case e in #(
1900 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001901/* end confdefs.h. */
1902/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1903 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1904#define $2 innocuous_$2
1905
1906/* System header to define __stub macros and hopefully few prototypes,
Christian Brabandt9670f612025-05-07 21:44:33 +02001907 which can conflict with char $2 (void); below. */
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001908
Illia Bobyra96d5442023-08-30 16:30:15 +02001909#include <limits.h>
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001910#undef $2
1911
1912/* Override any GCC internal prototype to avoid an error.
1913 Use char because int might match the return type of a GCC
1914 builtin and then its argument prototype would still apply. */
1915#ifdef __cplusplus
1916extern "C"
1917#endif
Christian Brabandt9670f612025-05-07 21:44:33 +02001918char $2 (void);
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001919/* The GNU C library defines this for functions which it implements
1920 to always fail with ENOSYS. Some functions are actually named
1921 something starting with __ and the normal name is an alias. */
1922#if defined __stub_$2 || defined __stub___$2
1923choke me
1924#endif
1925
1926int
Illia Bobyra96d5442023-08-30 16:30:15 +02001927main (void)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001928{
1929return $2 ();
1930 ;
1931 return 0;
1932}
1933_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001934if ac_fn_c_try_link "$LINENO"
1935then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001936 eval "$3=yes"
Christian Brabandt9670f612025-05-07 21:44:33 +02001937else case e in #(
1938 e) eval "$3=no" ;;
1939esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001940fi
Illia Bobyra96d5442023-08-30 16:30:15 +02001941rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +02001942 conftest$ac_exeext conftest.$ac_ext ;;
1943esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001944fi
1945eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02001946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1947printf "%s\n" "$ac_res" >&6; }
Bram Moolenaar7db77842014-03-27 17:40:59 +01001948 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02001949
1950} # ac_fn_c_check_func
1951
Bram Moolenaar914703b2010-05-31 21:59:46 +02001952# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1953# --------------------------------------------
1954# Tries to find the compile-time value of EXPR in a program that includes
1955# INCLUDES, setting VAR accordingly. Returns whether the value could be
1956# computed
1957ac_fn_c_compute_int ()
1958{
1959 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1960 if test "$cross_compiling" = yes; then
1961 # Depending upon the size, compute the lo and hi bounds.
1962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1963/* end confdefs.h. */
1964$4
1965int
Illia Bobyra96d5442023-08-30 16:30:15 +02001966main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001967{
1968static int test_array [1 - 2 * !(($2) >= 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001969test_array [0] = 0;
1970return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001971
1972 ;
1973 return 0;
1974}
1975_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001976if ac_fn_c_try_compile "$LINENO"
1977then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001978 ac_lo=0 ac_mid=0
1979 while :; do
1980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1981/* end confdefs.h. */
1982$4
1983int
Illia Bobyra96d5442023-08-30 16:30:15 +02001984main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02001985{
1986static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01001987test_array [0] = 0;
1988return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02001989
1990 ;
1991 return 0;
1992}
1993_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02001994if ac_fn_c_try_compile "$LINENO"
1995then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02001996 ac_hi=$ac_mid; break
Christian Brabandt9670f612025-05-07 21:44:33 +02001997else case e in #(
1998 e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val
Bram Moolenaar914703b2010-05-31 21:59:46 +02001999 if test $ac_lo -le $ac_mid; then
2000 ac_lo= ac_hi=
2001 break
2002 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02002003 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;;
2004esac
Bram Moolenaar914703b2010-05-31 21:59:46 +02002005fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002006rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002007 done
Christian Brabandt9670f612025-05-07 21:44:33 +02002008else case e in #(
2009 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002010/* end confdefs.h. */
2011$4
2012int
Illia Bobyra96d5442023-08-30 16:30:15 +02002013main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002014{
2015static int test_array [1 - 2 * !(($2) < 0)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002016test_array [0] = 0;
2017return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002018
2019 ;
2020 return 0;
2021}
2022_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002023if ac_fn_c_try_compile "$LINENO"
2024then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002025 ac_hi=-1 ac_mid=-1
2026 while :; do
2027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028/* end confdefs.h. */
2029$4
2030int
Illia Bobyra96d5442023-08-30 16:30:15 +02002031main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002032{
2033static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002034test_array [0] = 0;
2035return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002036
2037 ;
2038 return 0;
2039}
2040_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002041if ac_fn_c_try_compile "$LINENO"
2042then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002043 ac_lo=$ac_mid; break
Christian Brabandt9670f612025-05-07 21:44:33 +02002044else case e in #(
2045 e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
Bram Moolenaar914703b2010-05-31 21:59:46 +02002046 if test $ac_mid -le $ac_hi; then
2047 ac_lo= ac_hi=
2048 break
2049 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02002050 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;;
2051esac
Bram Moolenaar914703b2010-05-31 21:59:46 +02002052fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002053rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002054 done
Christian Brabandt9670f612025-05-07 21:44:33 +02002055else case e in #(
2056 e) ac_lo= ac_hi= ;;
2057esac
Bram Moolenaar914703b2010-05-31 21:59:46 +02002058fi
Christian Brabandt9670f612025-05-07 21:44:33 +02002059rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
2060esac
Bram Moolenaar914703b2010-05-31 21:59:46 +02002061fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002062rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002063# Binary search between lo and hi bounds.
2064while test "x$ac_lo" != "x$ac_hi"; do
2065 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h. */
2068$4
2069int
Illia Bobyra96d5442023-08-30 16:30:15 +02002070main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002071{
2072static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Bram Moolenaar7db77842014-03-27 17:40:59 +01002073test_array [0] = 0;
2074return test_array [0];
Bram Moolenaar914703b2010-05-31 21:59:46 +02002075
2076 ;
2077 return 0;
2078}
2079_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002080if ac_fn_c_try_compile "$LINENO"
2081then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002082 ac_hi=$ac_mid
Christian Brabandt9670f612025-05-07 21:44:33 +02002083else case e in #(
2084 e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;;
2085esac
Bram Moolenaar914703b2010-05-31 21:59:46 +02002086fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002087rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar914703b2010-05-31 21:59:46 +02002088done
2089case $ac_lo in #((
2090?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2091'') ac_retval=1 ;;
2092esac
2093 else
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
Illia Bobyra96d5442023-08-30 16:30:15 +02002097static long int longval (void) { return $2; }
2098static unsigned long int ulongval (void) { return $2; }
Bram Moolenaar914703b2010-05-31 21:59:46 +02002099#include <stdio.h>
2100#include <stdlib.h>
2101int
Illia Bobyra96d5442023-08-30 16:30:15 +02002102main (void)
Bram Moolenaar914703b2010-05-31 21:59:46 +02002103{
2104
2105 FILE *f = fopen ("conftest.val", "w");
2106 if (! f)
2107 return 1;
2108 if (($2) < 0)
2109 {
2110 long int i = longval ();
2111 if (i != ($2))
2112 return 1;
2113 fprintf (f, "%ld", i);
2114 }
2115 else
2116 {
2117 unsigned long int i = ulongval ();
2118 if (i != ($2))
2119 return 1;
2120 fprintf (f, "%lu", i);
2121 }
2122 /* Do not output a trailing newline, as this causes \r\n confusion
2123 on some platforms. */
2124 return ferror (f) || fclose (f) != 0;
2125
2126 ;
2127 return 0;
2128}
2129_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002130if ac_fn_c_try_run "$LINENO"
2131then :
Bram Moolenaar914703b2010-05-31 21:59:46 +02002132 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
Christian Brabandt9670f612025-05-07 21:44:33 +02002133else case e in #(
2134 e) ac_retval=1 ;;
2135esac
Bram Moolenaar914703b2010-05-31 21:59:46 +02002136fi
2137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2138 conftest.$ac_objext conftest.beam conftest.$ac_ext
2139rm -f conftest.val
2140
2141 fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01002142 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Bram Moolenaar914703b2010-05-31 21:59:46 +02002143 as_fn_set_status $ac_retval
2144
2145} # ac_fn_c_compute_int
Mike Gilberta055b442023-08-20 19:01:41 +02002146
2147# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2148# -------------------------------------------
2149# Tests whether TYPE exists after having included INCLUDES, setting cache
2150# variable VAR accordingly.
2151ac_fn_c_check_type ()
2152{
2153 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2155printf %s "checking for $2... " >&6; }
2156if eval test \${$3+y}
2157then :
2158 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02002159else case e in #(
2160 e) eval "$3=no"
Mike Gilberta055b442023-08-20 19:01:41 +02002161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162/* end confdefs.h. */
2163$4
2164int
Illia Bobyra96d5442023-08-30 16:30:15 +02002165main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002166{
2167if (sizeof ($2))
2168 return 0;
2169 ;
2170 return 0;
2171}
2172_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002173if ac_fn_c_try_compile "$LINENO"
2174then :
Mike Gilberta055b442023-08-20 19:01:41 +02002175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2176/* end confdefs.h. */
2177$4
2178int
Illia Bobyra96d5442023-08-30 16:30:15 +02002179main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002180{
2181if (sizeof (($2)))
2182 return 0;
2183 ;
2184 return 0;
2185}
2186_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002187if ac_fn_c_try_compile "$LINENO"
2188then :
Mike Gilberta055b442023-08-20 19:01:41 +02002189
Christian Brabandt9670f612025-05-07 21:44:33 +02002190else case e in #(
2191 e) eval "$3=yes" ;;
2192esac
Mike Gilberta055b442023-08-20 19:01:41 +02002193fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002194rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Mike Gilberta055b442023-08-20 19:01:41 +02002195fi
Christian Brabandt9670f612025-05-07 21:44:33 +02002196rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
2197esac
Mike Gilberta055b442023-08-20 19:01:41 +02002198fi
2199eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2201printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002202 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2203
2204} # ac_fn_c_check_type
2205
2206# ac_fn_c_find_uintX_t LINENO BITS VAR
2207# ------------------------------------
2208# Finds an unsigned integer type with width BITS, setting cache variable VAR
2209# accordingly.
2210ac_fn_c_find_uintX_t ()
2211{
2212 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +02002213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
2214printf %s "checking for uint$2_t... " >&6; }
2215if eval test \${$3+y}
2216then :
2217 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02002218else case e in #(
2219 e) eval "$3=no"
Mike Gilberta055b442023-08-20 19:01:41 +02002220 # Order is important - never check a type that is potentially smaller
2221 # than half of the expected target width.
2222 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
2223 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
2224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2225/* end confdefs.h. */
2226$ac_includes_default
2227int
Illia Bobyra96d5442023-08-30 16:30:15 +02002228main (void)
Mike Gilberta055b442023-08-20 19:01:41 +02002229{
2230static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
2231test_array [0] = 0;
2232return test_array [0];
2233
2234 ;
2235 return 0;
2236}
2237_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002238if ac_fn_c_try_compile "$LINENO"
2239then :
Mike Gilberta055b442023-08-20 19:01:41 +02002240 case $ac_type in #(
2241 uint$2_t) :
2242 eval "$3=yes" ;; #(
2243 *) :
2244 eval "$3=\$ac_type" ;;
2245esac
2246fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002247rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2248 if eval test \"x\$"$3"\" = x"no"
2249then :
Mike Gilberta055b442023-08-20 19:01:41 +02002250
Christian Brabandt9670f612025-05-07 21:44:33 +02002251else case e in #(
2252 e) break ;;
2253esac
Mike Gilberta055b442023-08-20 19:01:41 +02002254fi
Christian Brabandt9670f612025-05-07 21:44:33 +02002255 done ;;
2256esac
Mike Gilberta055b442023-08-20 19:01:41 +02002257fi
2258eval ac_res=\$$3
Illia Bobyra96d5442023-08-30 16:30:15 +02002259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2260printf "%s\n" "$ac_res" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +02002261 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2262
2263} # ac_fn_c_find_uintX_t
Illia Bobyra96d5442023-08-30 16:30:15 +02002264ac_configure_args_raw=
2265for ac_arg
2266do
2267 case $ac_arg in
2268 *\'*)
2269 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2270 esac
2271 as_fn_append ac_configure_args_raw " '$ac_arg'"
2272done
2273
2274case $ac_configure_args_raw in
2275 *$as_nl*)
2276 ac_safe_unquote= ;;
2277 *)
2278 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2279 ac_unsafe_a="$ac_unsafe_z#~"
2280 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2281 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2282esac
2283
Bram Moolenaar446cb832008-06-24 21:56:24 +00002284cat >auto/config.log <<_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002285This file contains any messages produced by compilers while
2286running configure, to aid debugging if configure makes a mistake.
2287
2288It was created by $as_me, which was
Christian Brabandt9670f612025-05-07 21:44:33 +02002289generated by GNU Autoconf 2.72. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002290
Illia Bobyra96d5442023-08-30 16:30:15 +02002291 $ $0$ac_configure_args_raw
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002292
2293_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00002294exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002295{
2296cat <<_ASUNAME
2297## --------- ##
2298## Platform. ##
2299## --------- ##
2300
2301hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2302uname -m = `(uname -m) 2>/dev/null || echo unknown`
2303uname -r = `(uname -r) 2>/dev/null || echo unknown`
2304uname -s = `(uname -s) 2>/dev/null || echo unknown`
2305uname -v = `(uname -v) 2>/dev/null || echo unknown`
2306
2307/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2308/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2309
2310/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2311/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2312/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Bram Moolenaar446cb832008-06-24 21:56:24 +00002313/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002314/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2315/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2316/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2317
2318_ASUNAME
2319
2320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2321for as_dir in $PATH
2322do
2323 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02002324 case $as_dir in #(((
2325 '') as_dir=./ ;;
2326 */) ;;
2327 *) as_dir=$as_dir/ ;;
2328 esac
2329 printf "%s\n" "PATH: $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002330 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00002331IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002332
2333} >&5
2334
2335cat >&5 <<_ACEOF
2336
2337
2338## ----------- ##
2339## Core tests. ##
2340## ----------- ##
2341
2342_ACEOF
2343
2344
2345# Keep a trace of the command line.
2346# Strip out --no-create and --no-recursion so they do not pile up.
2347# Strip out --silent because we don't want to record it for future runs.
2348# Also quote any args containing shell meta-characters.
2349# Make two passes to allow for proper duplicate-argument suppression.
2350ac_configure_args=
2351ac_configure_args0=
2352ac_configure_args1=
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002353ac_must_keep_next=false
2354for ac_pass in 1 2
2355do
2356 for ac_arg
2357 do
2358 case $ac_arg in
2359 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2360 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2361 | -silent | --silent | --silen | --sile | --sil)
2362 continue ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002363 *\'*)
Illia Bobyra96d5442023-08-30 16:30:15 +02002364 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002365 esac
2366 case $ac_pass in
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002367 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002368 2)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002369 as_fn_append ac_configure_args1 " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002370 if test $ac_must_keep_next = true; then
2371 ac_must_keep_next=false # Got value, back to normal.
2372 else
2373 case $ac_arg in
2374 *=* | --config-cache | -C | -disable-* | --disable-* \
2375 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2376 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2377 | -with-* | --with-* | -without-* | --without-* | --x)
2378 case "$ac_configure_args0 " in
2379 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2380 esac
2381 ;;
2382 -* ) ac_must_keep_next=true ;;
2383 esac
2384 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002385 as_fn_append ac_configure_args " '$ac_arg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002386 ;;
2387 esac
2388 done
2389done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002390{ ac_configure_args0=; unset ac_configure_args0;}
2391{ ac_configure_args1=; unset ac_configure_args1;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002392
2393# When interrupted or exit'd, cleanup temporary files, and complete
2394# config.log. We remove comments because anyway the quotes in there
2395# would cause problems or look ugly.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002396# WARNING: Use '\'' to represent an apostrophe within the trap.
2397# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002398trap 'exit_status=$?
Illia Bobyra96d5442023-08-30 16:30:15 +02002399 # Sanitize IFS.
2400 IFS=" "" $as_nl"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002401 # Save into config.log some information that might help in debugging.
2402 {
2403 echo
2404
Illia Bobyra96d5442023-08-30 16:30:15 +02002405 printf "%s\n" "## ---------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002406## Cache variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002407## ---------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002408 echo
2409 # The following way of writing the cache mishandles newlines in values,
Bram Moolenaar446cb832008-06-24 21:56:24 +00002410(
2411 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2412 eval ac_val=\$$ac_var
2413 case $ac_val in #(
2414 *${as_nl}*)
2415 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02002416 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2417printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002418 esac
2419 case $ac_var in #(
2420 _ | IFS | as_nl) ;; #(
2421 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002422 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002423 esac ;;
2424 esac
2425 done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002426 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +00002427 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2428 *${as_nl}ac_space=\ *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002429 sed -n \
Bram Moolenaar446cb832008-06-24 21:56:24 +00002430 "s/'\''/'\''\\\\'\'''\''/g;
2431 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2432 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002433 *)
Bram Moolenaar446cb832008-06-24 21:56:24 +00002434 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002435 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002436 esac |
2437 sort
2438)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002439 echo
2440
Illia Bobyra96d5442023-08-30 16:30:15 +02002441 printf "%s\n" "## ----------------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002442## Output variables. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002443## ----------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002444 echo
2445 for ac_var in $ac_subst_vars
2446 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002447 eval ac_val=\$$ac_var
2448 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002449 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002450 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002451 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002452 done | sort
2453 echo
2454
2455 if test -n "$ac_subst_files"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002456 printf "%s\n" "## ------------------- ##
Bram Moolenaar446cb832008-06-24 21:56:24 +00002457## File substitutions. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002458## ------------------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002459 echo
2460 for ac_var in $ac_subst_files
2461 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00002462 eval ac_val=\$$ac_var
2463 case $ac_val in
Illia Bobyra96d5442023-08-30 16:30:15 +02002464 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00002465 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002466 printf "%s\n" "$ac_var='\''$ac_val'\''"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002467 done | sort
2468 echo
2469 fi
2470
2471 if test -s confdefs.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002472 printf "%s\n" "## ----------- ##
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002473## confdefs.h. ##
Bram Moolenaar7db77842014-03-27 17:40:59 +01002474## ----------- ##"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002475 echo
Bram Moolenaar446cb832008-06-24 21:56:24 +00002476 cat confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002477 echo
2478 fi
2479 test "$ac_signal" != 0 &&
Illia Bobyra96d5442023-08-30 16:30:15 +02002480 printf "%s\n" "$as_me: caught signal $ac_signal"
2481 printf "%s\n" "$as_me: exit $exit_status"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002482 } >&5
Bram Moolenaar446cb832008-06-24 21:56:24 +00002483 rm -f core *.core core.conftest.* &&
2484 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002485 exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +00002486' 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002487for ac_signal in 1 2 13 15; do
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002488 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002489done
2490ac_signal=0
2491
2492# confdefs.h avoids OS command line length limits that DEFS can exceed.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002493rm -f -r conftest* confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002494
Illia Bobyra96d5442023-08-30 16:30:15 +02002495printf "%s\n" "/* confdefs.h */" > confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002496
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002497# Predefined preprocessor variables.
2498
Illia Bobyra96d5442023-08-30 16:30:15 +02002499printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002500
Illia Bobyra96d5442023-08-30 16:30:15 +02002501printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002502
Illia Bobyra96d5442023-08-30 16:30:15 +02002503printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002504
Illia Bobyra96d5442023-08-30 16:30:15 +02002505printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002506
Illia Bobyra96d5442023-08-30 16:30:15 +02002507printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002508
Illia Bobyra96d5442023-08-30 16:30:15 +02002509printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002510
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002511
2512# Let the site file select an alternate cache file if it wants to.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002513# Prefer an explicitly selected file to automatically selected ones.
Bram Moolenaar446cb832008-06-24 21:56:24 +00002514if test -n "$CONFIG_SITE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002515 ac_site_files="$CONFIG_SITE"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002516elif test "x$prefix" != xNONE; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002517 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
Bram Moolenaar446cb832008-06-24 21:56:24 +00002518else
Illia Bobyra96d5442023-08-30 16:30:15 +02002519 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002520fi
Illia Bobyra96d5442023-08-30 16:30:15 +02002521
2522for ac_site_file in $ac_site_files
Bram Moolenaar446cb832008-06-24 21:56:24 +00002523do
Illia Bobyra96d5442023-08-30 16:30:15 +02002524 case $ac_site_file in #(
2525 */*) :
2526 ;; #(
2527 *) :
2528 ac_site_file=./$ac_site_file ;;
2529esac
2530 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2532printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002533 sed 's/^/| /' "$ac_site_file" >&5
Bram Moolenaar7db77842014-03-27 17:40:59 +01002534 . "$ac_site_file" \
Christian Brabandt9670f612025-05-07 21:44:33 +02002535 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
2536printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01002537as_fn_error $? "failed to load site script $ac_site_file
Christian Brabandt9670f612025-05-07 21:44:33 +02002538See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00002539 fi
2540done
2541
2542if test -r "$cache_file"; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02002543 # Some versions of bash will fail to source /dev/null (special files
2544 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2545 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02002546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2547printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002548 case $cache_file in
Bram Moolenaar446cb832008-06-24 21:56:24 +00002549 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2550 *) . "./$cache_file";;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002551 esac
2552 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00002553else
Illia Bobyra96d5442023-08-30 16:30:15 +02002554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2555printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002556 >$cache_file
2557fi
2558
Illia Bobyra96d5442023-08-30 16:30:15 +02002559# Test code for whether the C compiler supports C89 (global declarations)
2560ac_c_conftest_c89_globals='
2561/* Does the compiler advertise C89 conformance?
2562 Do not test the value of __STDC__, because some compilers set it to 0
2563 while being otherwise adequately conformant. */
2564#if !defined __STDC__
2565# error "Compiler does not advertise C89 conformance"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002566#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +00002567
Illia Bobyra96d5442023-08-30 16:30:15 +02002568#include <stddef.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002569#include <stdarg.h>
Bram Moolenaar7db77842014-03-27 17:40:59 +01002570struct stat;
Illia Bobyra96d5442023-08-30 16:30:15 +02002571/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002572struct buf { int x; };
Illia Bobyra96d5442023-08-30 16:30:15 +02002573struct buf * (*rcsopen) (struct buf *, struct stat *, int);
Christian Brabandt9670f612025-05-07 21:44:33 +02002574static char *e (char **p, int i)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002575{
2576 return p[i];
2577}
2578static char *f (char * (*g) (char **, int), char **p, ...)
2579{
2580 char *s;
2581 va_list v;
2582 va_start (v,p);
2583 s = g (p, va_arg (v,int));
2584 va_end (v);
2585 return s;
2586}
2587
Christian Brabandt9670f612025-05-07 21:44:33 +02002588/* C89 style stringification. */
2589#define noexpand_stringify(a) #a
2590const char *stringified = noexpand_stringify(arbitrary+token=sequence);
2591
2592/* C89 style token pasting. Exercises some of the corner cases that
2593 e.g. old MSVC gets wrong, but not very hard. */
2594#define noexpand_concat(a,b) a##b
2595#define expand_concat(a,b) noexpand_concat(a,b)
2596extern int vA;
2597extern int vbee;
2598#define aye A
2599#define bee B
2600int *pvA = &expand_concat(v,aye);
2601int *pvbee = &noexpand_concat(v,bee);
2602
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002603/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
Illia Bobyra96d5442023-08-30 16:30:15 +02002604 function prototypes and stuff, but not \xHH hex character constants.
2605 These do not provoke an error unfortunately, instead are silently treated
2606 as an "x". The following induces an error, until -std is added to get
2607 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2608 array size at least. It is necessary to write \x00 == 0 to get something
2609 that is true only with -std. */
2610int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002611
Bram Moolenaar446cb832008-06-24 21:56:24 +00002612/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2613 inside strings and character constants. */
Illia Bobyra96d5442023-08-30 16:30:15 +02002614#define FOO(x) '\''x'\''
2615int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
Bram Moolenaar446cb832008-06-24 21:56:24 +00002616
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002617int test (int i, double x);
2618struct s1 {int (*f) (int a);};
2619struct s2 {int (*f) (double a);};
Illia Bobyra96d5442023-08-30 16:30:15 +02002620int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2621 int, int);'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002622
Illia Bobyra96d5442023-08-30 16:30:15 +02002623# Test code for whether the C compiler supports C89 (body of main).
2624ac_c_conftest_c89_main='
2625ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2626'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002627
Illia Bobyra96d5442023-08-30 16:30:15 +02002628# Test code for whether the C compiler supports C99 (global declarations)
2629ac_c_conftest_c99_globals='
Christian Brabandt9670f612025-05-07 21:44:33 +02002630/* Does the compiler advertise C99 conformance? */
Illia Bobyra96d5442023-08-30 16:30:15 +02002631#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2632# error "Compiler does not advertise C99 conformance"
2633#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +00002634
Christian Brabandt9670f612025-05-07 21:44:33 +02002635// See if C++-style comments work.
2636
Bram Moolenaar22640082018-04-19 20:39:41 +02002637#include <stdbool.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02002638extern int puts (const char *);
2639extern int printf (const char *, ...);
2640extern int dprintf (int, const char *, ...);
2641extern void *malloc (size_t);
Christian Brabandt9670f612025-05-07 21:44:33 +02002642extern void free (void *);
Bram Moolenaar22640082018-04-19 20:39:41 +02002643
2644// Check varargs macros. These examples are taken from C99 6.10.3.5.
Illia Bobyra96d5442023-08-30 16:30:15 +02002645// dprintf is used instead of fprintf to avoid needing to declare
2646// FILE and stderr.
2647#define debug(...) dprintf (2, __VA_ARGS__)
Bram Moolenaar22640082018-04-19 20:39:41 +02002648#define showlist(...) puts (#__VA_ARGS__)
2649#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2650static void
2651test_varargs_macros (void)
Bram Moolenaar2e324952018-04-14 14:37:07 +02002652{
Bram Moolenaar22640082018-04-19 20:39:41 +02002653 int x = 1234;
2654 int y = 5678;
2655 debug ("Flag");
2656 debug ("X = %d\n", x);
2657 showlist (The first, second, and third items.);
2658 report (x>y, "x is %d but y is %d", x, y);
Bram Moolenaar2e324952018-04-14 14:37:07 +02002659}
2660
Bram Moolenaar22640082018-04-19 20:39:41 +02002661// Check long long types.
2662#define BIG64 18446744073709551615ull
2663#define BIG32 4294967295ul
2664#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2665#if !BIG_OK
Illia Bobyra96d5442023-08-30 16:30:15 +02002666 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002667#endif
2668#if BIG_OK
2669#else
Illia Bobyra96d5442023-08-30 16:30:15 +02002670 #error "your preprocessor is broken"
Bram Moolenaar22640082018-04-19 20:39:41 +02002671#endif
2672static long long int bignum = -9223372036854775807LL;
2673static unsigned long long int ubignum = BIG64;
Bram Moolenaar2e324952018-04-14 14:37:07 +02002674
Bram Moolenaar22640082018-04-19 20:39:41 +02002675struct incomplete_array
2676{
2677 int datasize;
2678 double data[];
2679};
Bram Moolenaar2e324952018-04-14 14:37:07 +02002680
Bram Moolenaar22640082018-04-19 20:39:41 +02002681struct named_init {
2682 int number;
2683 const wchar_t *name;
2684 double average;
2685};
2686
2687typedef const char *ccp;
2688
2689static inline int
2690test_restrict (ccp restrict text)
2691{
Bram Moolenaar22640082018-04-19 20:39:41 +02002692 // Iterate through items via the restricted pointer.
2693 // Also check for declarations in for loops.
Illia Bobyra96d5442023-08-30 16:30:15 +02002694 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
Bram Moolenaar22640082018-04-19 20:39:41 +02002695 continue;
2696 return 0;
2697}
2698
2699// Check varargs and va_copy.
Illia Bobyra96d5442023-08-30 16:30:15 +02002700static bool
Bram Moolenaar22640082018-04-19 20:39:41 +02002701test_varargs (const char *format, ...)
2702{
2703 va_list args;
2704 va_start (args, format);
2705 va_list args_copy;
2706 va_copy (args_copy, args);
2707
Illia Bobyra96d5442023-08-30 16:30:15 +02002708 const char *str = "";
2709 int number = 0;
2710 float fnumber = 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02002711
2712 while (*format)
2713 {
2714 switch (*format++)
2715 {
Illia Bobyra96d5442023-08-30 16:30:15 +02002716 case '\''s'\'': // string
Bram Moolenaar22640082018-04-19 20:39:41 +02002717 str = va_arg (args_copy, const char *);
2718 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002719 case '\''d'\'': // int
Bram Moolenaar22640082018-04-19 20:39:41 +02002720 number = va_arg (args_copy, int);
2721 break;
Illia Bobyra96d5442023-08-30 16:30:15 +02002722 case '\''f'\'': // float
Bram Moolenaar22640082018-04-19 20:39:41 +02002723 fnumber = va_arg (args_copy, double);
2724 break;
2725 default:
2726 break;
2727 }
2728 }
2729 va_end (args_copy);
2730 va_end (args);
Illia Bobyra96d5442023-08-30 16:30:15 +02002731
2732 return *str && number && fnumber;
Bram Moolenaar22640082018-04-19 20:39:41 +02002733}
Illia Bobyra96d5442023-08-30 16:30:15 +02002734'
Bram Moolenaar22640082018-04-19 20:39:41 +02002735
Illia Bobyra96d5442023-08-30 16:30:15 +02002736# Test code for whether the C compiler supports C99 (body of main).
2737ac_c_conftest_c99_main='
Bram Moolenaar22640082018-04-19 20:39:41 +02002738 // Check bool.
2739 _Bool success = false;
Illia Bobyra96d5442023-08-30 16:30:15 +02002740 success |= (argc != 0);
Bram Moolenaar22640082018-04-19 20:39:41 +02002741
2742 // Check restrict.
2743 if (test_restrict ("String literal") == 0)
2744 success = true;
2745 char *restrict newvar = "Another string";
2746
2747 // Check varargs.
Illia Bobyra96d5442023-08-30 16:30:15 +02002748 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
Bram Moolenaar22640082018-04-19 20:39:41 +02002749 test_varargs_macros ();
2750
2751 // Check flexible array members.
2752 struct incomplete_array *ia =
2753 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2754 ia->datasize = 10;
2755 for (int i = 0; i < ia->datasize; ++i)
2756 ia->data[i] = i * 1.234;
Christian Brabandt9670f612025-05-07 21:44:33 +02002757 // Work around memory leak warnings.
2758 free (ia);
Bram Moolenaar22640082018-04-19 20:39:41 +02002759
2760 // Check named initializers.
2761 struct named_init ni = {
2762 .number = 34,
2763 .name = L"Test wide string",
2764 .average = 543.34343,
2765 };
2766
2767 ni.number = 58;
2768
2769 int dynamic_array[ni.number];
Illia Bobyra96d5442023-08-30 16:30:15 +02002770 dynamic_array[0] = argv[0][0];
Bram Moolenaar22640082018-04-19 20:39:41 +02002771 dynamic_array[ni.number - 1] = 543;
2772
2773 // work around unused variable warnings
Illia Bobyra96d5442023-08-30 16:30:15 +02002774 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2775 || dynamic_array[ni.number - 1] != 543);
2776'
2777
2778# Test code for whether the C compiler supports C11 (global declarations)
2779ac_c_conftest_c11_globals='
Christian Brabandt9670f612025-05-07 21:44:33 +02002780/* Does the compiler advertise C11 conformance? */
Illia Bobyra96d5442023-08-30 16:30:15 +02002781#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2782# error "Compiler does not advertise C11 conformance"
2783#endif
2784
2785// Check _Alignas.
2786char _Alignas (double) aligned_as_double;
2787char _Alignas (0) no_special_alignment;
2788extern char aligned_as_int;
2789char _Alignas (0) _Alignas (int) aligned_as_int;
2790
2791// Check _Alignof.
2792enum
2793{
2794 int_alignment = _Alignof (int),
2795 int_array_alignment = _Alignof (int[100]),
2796 char_alignment = _Alignof (char)
2797};
2798_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2799
2800// Check _Noreturn.
2801int _Noreturn does_not_return (void) { for (;;) continue; }
2802
2803// Check _Static_assert.
2804struct test_static_assert
2805{
2806 int x;
2807 _Static_assert (sizeof (int) <= sizeof (long int),
2808 "_Static_assert does not work in struct");
2809 long int y;
2810};
2811
2812// Check UTF-8 literals.
2813#define u8 syntax error!
2814char const utf8_literal[] = u8"happens to be ASCII" "another string";
2815
2816// Check duplicate typedefs.
2817typedef long *long_ptr;
2818typedef long int *long_ptr;
2819typedef long_ptr long_ptr;
2820
2821// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2822struct anonymous
2823{
2824 union {
2825 struct { int i; int j; };
2826 struct { int k; long int l; } w;
2827 };
2828 int m;
2829} v1;
2830'
2831
2832# Test code for whether the C compiler supports C11 (body of main).
2833ac_c_conftest_c11_main='
2834 _Static_assert ((offsetof (struct anonymous, i)
2835 == offsetof (struct anonymous, w.k)),
2836 "Anonymous union alignment botch");
2837 v1.i = 2;
2838 v1.w.k = 5;
2839 ok |= v1.i != 5;
2840'
2841
2842# Test code for whether the C compiler supports C11 (complete).
2843ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2844${ac_c_conftest_c99_globals}
2845${ac_c_conftest_c11_globals}
2846
2847int
2848main (int argc, char **argv)
2849{
2850 int ok = 0;
2851 ${ac_c_conftest_c89_main}
2852 ${ac_c_conftest_c99_main}
2853 ${ac_c_conftest_c11_main}
2854 return ok;
2855}
2856"
2857
2858# Test code for whether the C compiler supports C99 (complete).
2859ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2860${ac_c_conftest_c99_globals}
2861
2862int
2863main (int argc, char **argv)
2864{
2865 int ok = 0;
2866 ${ac_c_conftest_c89_main}
2867 ${ac_c_conftest_c99_main}
2868 return ok;
2869}
2870"
2871
2872# Test code for whether the C compiler supports C89 (complete).
2873ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2874
2875int
2876main (int argc, char **argv)
2877{
2878 int ok = 0;
2879 ${ac_c_conftest_c89_main}
2880 return ok;
2881}
2882"
2883
2884as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2885as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2886as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2887as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2888as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2889as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2890as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2891as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2892as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2893as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
2894as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
2895as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
2896# Check that the precious variables saved in the cache have kept the same
2897# value.
2898ac_cache_corrupted=false
2899for ac_var in $ac_precious_vars; do
2900 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2901 eval ac_new_set=\$ac_env_${ac_var}_set
2902 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2903 eval ac_new_val=\$ac_env_${ac_var}_value
2904 case $ac_old_set,$ac_new_set in
2905 set,)
Christian Brabandt9670f612025-05-07 21:44:33 +02002906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5
2907printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02002908 ac_cache_corrupted=: ;;
2909 ,set)
Christian Brabandt9670f612025-05-07 21:44:33 +02002910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5
2911printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02002912 ac_cache_corrupted=: ;;
2913 ,);;
2914 *)
2915 if test "x$ac_old_val" != "x$ac_new_val"; then
2916 # differences in whitespace do not lead to failure.
2917 ac_old_val_w=`echo x $ac_old_val`
2918 ac_new_val_w=`echo x $ac_new_val`
2919 if test "$ac_old_val_w" != "$ac_new_val_w"; then
Christian Brabandt9670f612025-05-07 21:44:33 +02002920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5
2921printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02002922 ac_cache_corrupted=:
2923 else
Christian Brabandt9670f612025-05-07 21:44:33 +02002924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5
2925printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02002926 eval $ac_var=\$ac_old_val
2927 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02002928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5
2929printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;}
2930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5
2931printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02002932 fi;;
2933 esac
2934 # Pass precious variables to config.status.
2935 if test "$ac_new_set" = set; then
2936 case $ac_new_val in
2937 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2938 *) ac_arg=$ac_var=$ac_new_val ;;
2939 esac
2940 case " $ac_configure_args " in
2941 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2942 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2943 esac
2944 fi
2945done
2946if $ac_cache_corrupted; then
Christian Brabandt9670f612025-05-07 21:44:33 +02002947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
2948printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02002949 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2950printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
Christian Brabandt9670f612025-05-07 21:44:33 +02002951 as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file'
Illia Bobyra96d5442023-08-30 16:30:15 +02002952 and start over" "$LINENO" 5
2953fi
2954## -------------------- ##
2955## Main body of script. ##
2956## -------------------- ##
2957
2958ac_ext=c
2959ac_cpp='$CPP $CPPFLAGS'
2960ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2961ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2962ac_compiler_gnu=$ac_cv_c_compiler_gnu
2963
2964
2965
2966ac_config_headers="$ac_config_headers auto/config.h:config.h.in"
2967
2968
2969printf "%s\n" "#define UNIX 1" >>confdefs.h
2970
2971{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2972printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2973set x ${MAKE-make}
2974ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2975if eval test \${ac_cv_prog_make_${ac_make}_set+y}
2976then :
2977 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02002978else case e in #(
2979 e) cat >conftest.make <<\_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02002980SHELL = /bin/sh
2981all:
2982 @echo '@@@%%%=$(MAKE)=@@@%%%'
2983_ACEOF
2984# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2985case `${MAKE-make} -f conftest.make 2>/dev/null` in
2986 *@@@%%%=?*=@@@%%%*)
2987 eval ac_cv_prog_make_${ac_make}_set=yes;;
2988 *)
2989 eval ac_cv_prog_make_${ac_make}_set=no;;
2990esac
Christian Brabandt9670f612025-05-07 21:44:33 +02002991rm -f conftest.make ;;
2992esac
Illia Bobyra96d5442023-08-30 16:30:15 +02002993fi
2994if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2996printf "%s\n" "yes" >&6; }
2997 SET_MAKE=
2998else
2999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3000printf "%s\n" "no" >&6; }
3001 SET_MAKE="MAKE=${MAKE-make}"
3002fi
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014ac_ext=c
3015ac_cpp='$CPP $CPPFLAGS'
3016ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3017ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3018ac_compiler_gnu=$ac_cv_c_compiler_gnu
3019if test -n "$ac_tool_prefix"; then
3020 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3021set dummy ${ac_tool_prefix}gcc; ac_word=$2
3022{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3023printf %s "checking for $ac_word... " >&6; }
3024if test ${ac_cv_prog_CC+y}
3025then :
3026 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003027else case e in #(
3028 e) if test -n "$CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003029 ac_cv_prog_CC="$CC" # Let the user override the test.
3030else
3031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3032for as_dir in $PATH
3033do
3034 IFS=$as_save_IFS
3035 case $as_dir in #(((
3036 '') as_dir=./ ;;
3037 */) ;;
3038 *) as_dir=$as_dir/ ;;
3039 esac
3040 for ac_exec_ext in '' $ac_executable_extensions; do
3041 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3042 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3043 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3044 break 2
3045 fi
3046done
3047 done
3048IFS=$as_save_IFS
3049
Christian Brabandt9670f612025-05-07 21:44:33 +02003050fi ;;
3051esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003052fi
3053CC=$ac_cv_prog_CC
3054if test -n "$CC"; then
3055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3056printf "%s\n" "$CC" >&6; }
3057else
3058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3059printf "%s\n" "no" >&6; }
3060fi
3061
3062
3063fi
3064if test -z "$ac_cv_prog_CC"; then
3065 ac_ct_CC=$CC
3066 # Extract the first word of "gcc", so it can be a program name with args.
3067set dummy gcc; ac_word=$2
3068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3069printf %s "checking for $ac_word... " >&6; }
3070if test ${ac_cv_prog_ac_ct_CC+y}
3071then :
3072 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003073else case e in #(
3074 e) if test -n "$ac_ct_CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003075 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3076else
3077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3078for as_dir in $PATH
3079do
3080 IFS=$as_save_IFS
3081 case $as_dir in #(((
3082 '') as_dir=./ ;;
3083 */) ;;
3084 *) as_dir=$as_dir/ ;;
3085 esac
3086 for ac_exec_ext in '' $ac_executable_extensions; do
3087 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3088 ac_cv_prog_ac_ct_CC="gcc"
3089 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3090 break 2
3091 fi
3092done
3093 done
3094IFS=$as_save_IFS
3095
Christian Brabandt9670f612025-05-07 21:44:33 +02003096fi ;;
3097esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003098fi
3099ac_ct_CC=$ac_cv_prog_ac_ct_CC
3100if test -n "$ac_ct_CC"; then
3101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3102printf "%s\n" "$ac_ct_CC" >&6; }
3103else
3104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3105printf "%s\n" "no" >&6; }
3106fi
3107
3108 if test "x$ac_ct_CC" = x; then
3109 CC=""
3110 else
3111 case $cross_compiling:$ac_tool_warned in
3112yes:)
3113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3114printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3115ac_tool_warned=yes ;;
3116esac
3117 CC=$ac_ct_CC
3118 fi
3119else
3120 CC="$ac_cv_prog_CC"
3121fi
3122
3123if test -z "$CC"; then
3124 if test -n "$ac_tool_prefix"; then
3125 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3126set dummy ${ac_tool_prefix}cc; ac_word=$2
3127{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3128printf %s "checking for $ac_word... " >&6; }
3129if test ${ac_cv_prog_CC+y}
3130then :
3131 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003132else case e in #(
3133 e) if test -n "$CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003134 ac_cv_prog_CC="$CC" # Let the user override the test.
3135else
3136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3137for as_dir in $PATH
3138do
3139 IFS=$as_save_IFS
3140 case $as_dir in #(((
3141 '') as_dir=./ ;;
3142 */) ;;
3143 *) as_dir=$as_dir/ ;;
3144 esac
3145 for ac_exec_ext in '' $ac_executable_extensions; do
3146 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3147 ac_cv_prog_CC="${ac_tool_prefix}cc"
3148 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3149 break 2
3150 fi
3151done
3152 done
3153IFS=$as_save_IFS
3154
Christian Brabandt9670f612025-05-07 21:44:33 +02003155fi ;;
3156esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003157fi
3158CC=$ac_cv_prog_CC
3159if test -n "$CC"; then
3160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3161printf "%s\n" "$CC" >&6; }
3162else
3163 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3164printf "%s\n" "no" >&6; }
3165fi
3166
3167
3168 fi
3169fi
3170if test -z "$CC"; then
3171 # Extract the first word of "cc", so it can be a program name with args.
3172set dummy cc; ac_word=$2
3173{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3174printf %s "checking for $ac_word... " >&6; }
3175if test ${ac_cv_prog_CC+y}
3176then :
3177 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003178else case e in #(
3179 e) if test -n "$CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003180 ac_cv_prog_CC="$CC" # Let the user override the test.
3181else
3182 ac_prog_rejected=no
3183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3184for as_dir in $PATH
3185do
3186 IFS=$as_save_IFS
3187 case $as_dir in #(((
3188 '') as_dir=./ ;;
3189 */) ;;
3190 *) as_dir=$as_dir/ ;;
3191 esac
3192 for ac_exec_ext in '' $ac_executable_extensions; do
3193 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3194 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3195 ac_prog_rejected=yes
3196 continue
3197 fi
3198 ac_cv_prog_CC="cc"
3199 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3200 break 2
3201 fi
3202done
3203 done
3204IFS=$as_save_IFS
3205
3206if test $ac_prog_rejected = yes; then
3207 # We found a bogon in the path, so make sure we never use it.
3208 set dummy $ac_cv_prog_CC
3209 shift
3210 if test $# != 0; then
3211 # We chose a different compiler from the bogus one.
3212 # However, it has the same basename, so the bogon will be chosen
3213 # first if we set CC to just the basename; use the full file name.
3214 shift
3215 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3216 fi
3217fi
Christian Brabandt9670f612025-05-07 21:44:33 +02003218fi ;;
3219esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003220fi
3221CC=$ac_cv_prog_CC
3222if test -n "$CC"; then
3223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3224printf "%s\n" "$CC" >&6; }
3225else
3226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3227printf "%s\n" "no" >&6; }
3228fi
3229
3230
3231fi
3232if test -z "$CC"; then
3233 if test -n "$ac_tool_prefix"; then
3234 for ac_prog in cl.exe
3235 do
3236 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3237set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3238{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3239printf %s "checking for $ac_word... " >&6; }
3240if test ${ac_cv_prog_CC+y}
3241then :
3242 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003243else case e in #(
3244 e) if test -n "$CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003245 ac_cv_prog_CC="$CC" # Let the user override the test.
3246else
3247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3248for as_dir in $PATH
3249do
3250 IFS=$as_save_IFS
3251 case $as_dir in #(((
3252 '') as_dir=./ ;;
3253 */) ;;
3254 *) as_dir=$as_dir/ ;;
3255 esac
3256 for ac_exec_ext in '' $ac_executable_extensions; do
3257 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3258 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3259 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3260 break 2
3261 fi
3262done
3263 done
3264IFS=$as_save_IFS
3265
Christian Brabandt9670f612025-05-07 21:44:33 +02003266fi ;;
3267esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003268fi
3269CC=$ac_cv_prog_CC
3270if test -n "$CC"; then
3271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3272printf "%s\n" "$CC" >&6; }
3273else
3274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3275printf "%s\n" "no" >&6; }
3276fi
3277
3278
3279 test -n "$CC" && break
3280 done
3281fi
3282if test -z "$CC"; then
3283 ac_ct_CC=$CC
3284 for ac_prog in cl.exe
3285do
3286 # Extract the first word of "$ac_prog", so it can be a program name with args.
3287set dummy $ac_prog; ac_word=$2
3288{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3289printf %s "checking for $ac_word... " >&6; }
3290if test ${ac_cv_prog_ac_ct_CC+y}
3291then :
3292 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003293else case e in #(
3294 e) if test -n "$ac_ct_CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003295 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3296else
3297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3298for as_dir in $PATH
3299do
3300 IFS=$as_save_IFS
3301 case $as_dir in #(((
3302 '') as_dir=./ ;;
3303 */) ;;
3304 *) as_dir=$as_dir/ ;;
3305 esac
3306 for ac_exec_ext in '' $ac_executable_extensions; do
3307 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3308 ac_cv_prog_ac_ct_CC="$ac_prog"
3309 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3310 break 2
3311 fi
3312done
3313 done
3314IFS=$as_save_IFS
3315
Christian Brabandt9670f612025-05-07 21:44:33 +02003316fi ;;
3317esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003318fi
3319ac_ct_CC=$ac_cv_prog_ac_ct_CC
3320if test -n "$ac_ct_CC"; then
3321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3322printf "%s\n" "$ac_ct_CC" >&6; }
3323else
3324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3325printf "%s\n" "no" >&6; }
3326fi
3327
3328
3329 test -n "$ac_ct_CC" && break
3330done
3331
3332 if test "x$ac_ct_CC" = x; then
3333 CC=""
3334 else
3335 case $cross_compiling:$ac_tool_warned in
3336yes:)
3337{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3338printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3339ac_tool_warned=yes ;;
3340esac
3341 CC=$ac_ct_CC
3342 fi
3343fi
3344
3345fi
3346if test -z "$CC"; then
3347 if test -n "$ac_tool_prefix"; then
3348 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3349set dummy ${ac_tool_prefix}clang; ac_word=$2
3350{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3351printf %s "checking for $ac_word... " >&6; }
3352if test ${ac_cv_prog_CC+y}
3353then :
3354 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003355else case e in #(
3356 e) if test -n "$CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003357 ac_cv_prog_CC="$CC" # Let the user override the test.
3358else
3359as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3360for as_dir in $PATH
3361do
3362 IFS=$as_save_IFS
3363 case $as_dir in #(((
3364 '') as_dir=./ ;;
3365 */) ;;
3366 *) as_dir=$as_dir/ ;;
3367 esac
3368 for ac_exec_ext in '' $ac_executable_extensions; do
3369 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3370 ac_cv_prog_CC="${ac_tool_prefix}clang"
3371 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3372 break 2
3373 fi
3374done
3375 done
3376IFS=$as_save_IFS
3377
Christian Brabandt9670f612025-05-07 21:44:33 +02003378fi ;;
3379esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003380fi
3381CC=$ac_cv_prog_CC
3382if test -n "$CC"; then
3383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3384printf "%s\n" "$CC" >&6; }
3385else
3386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3387printf "%s\n" "no" >&6; }
3388fi
3389
3390
3391fi
3392if test -z "$ac_cv_prog_CC"; then
3393 ac_ct_CC=$CC
3394 # Extract the first word of "clang", so it can be a program name with args.
3395set dummy clang; ac_word=$2
3396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3397printf %s "checking for $ac_word... " >&6; }
3398if test ${ac_cv_prog_ac_ct_CC+y}
3399then :
3400 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003401else case e in #(
3402 e) if test -n "$ac_ct_CC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02003403 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3404else
3405as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3406for as_dir in $PATH
3407do
3408 IFS=$as_save_IFS
3409 case $as_dir in #(((
3410 '') as_dir=./ ;;
3411 */) ;;
3412 *) as_dir=$as_dir/ ;;
3413 esac
3414 for ac_exec_ext in '' $ac_executable_extensions; do
3415 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3416 ac_cv_prog_ac_ct_CC="clang"
3417 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3418 break 2
3419 fi
3420done
3421 done
3422IFS=$as_save_IFS
3423
Christian Brabandt9670f612025-05-07 21:44:33 +02003424fi ;;
3425esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003426fi
3427ac_ct_CC=$ac_cv_prog_ac_ct_CC
3428if test -n "$ac_ct_CC"; then
3429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3430printf "%s\n" "$ac_ct_CC" >&6; }
3431else
3432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3433printf "%s\n" "no" >&6; }
3434fi
3435
3436 if test "x$ac_ct_CC" = x; then
3437 CC=""
3438 else
3439 case $cross_compiling:$ac_tool_warned in
3440yes:)
3441{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3442printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3443ac_tool_warned=yes ;;
3444esac
3445 CC=$ac_ct_CC
3446 fi
3447else
3448 CC="$ac_cv_prog_CC"
3449fi
3450
3451fi
3452
3453
Christian Brabandt9670f612025-05-07 21:44:33 +02003454test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3455printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02003456as_fn_error $? "no acceptable C compiler found in \$PATH
Christian Brabandt9670f612025-05-07 21:44:33 +02003457See 'config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02003458
3459# Provide some information about the compiler.
3460printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3461set X $ac_compile
3462ac_compiler=$2
3463for ac_option in --version -v -V -qversion -version; do
3464 { { ac_try="$ac_compiler $ac_option >&5"
3465case "(($ac_try" in
3466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3467 *) ac_try_echo=$ac_try;;
3468esac
3469eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3470printf "%s\n" "$ac_try_echo"; } >&5
3471 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3472 ac_status=$?
3473 if test -s conftest.err; then
3474 sed '10a\
3475... rest of stderr output deleted ...
3476 10q' conftest.err >conftest.er1
3477 cat conftest.er1 >&5
3478 fi
3479 rm -f conftest.er1 conftest.err
3480 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3481 test $ac_status = 0; }
3482done
3483
3484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3485/* end confdefs.h. */
3486
3487int
3488main (void)
3489{
Bram Moolenaar22640082018-04-19 20:39:41 +02003490
Bram Moolenaar2e324952018-04-14 14:37:07 +02003491 ;
3492 return 0;
3493}
3494_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02003495ac_clean_files_save=$ac_clean_files
3496ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3497# Try to create an executable without -o first, disregard a.out.
3498# It will help us diagnose broken compilers, and finding out an intuition
3499# of exeext.
3500{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3501printf %s "checking whether the C compiler works... " >&6; }
3502ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3503
3504# The possible output files:
3505ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3506
3507ac_rmfiles=
3508for ac_file in $ac_files
3509do
3510 case $ac_file in
3511 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3512 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3513 esac
3514done
3515rm -f $ac_rmfiles
3516
3517if { { ac_try="$ac_link_default"
3518case "(($ac_try" in
3519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3520 *) ac_try_echo=$ac_try;;
3521esac
3522eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3523printf "%s\n" "$ac_try_echo"; } >&5
3524 (eval "$ac_link_default") 2>&5
3525 ac_status=$?
3526 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3527 test $ac_status = 0; }
3528then :
Christian Brabandt9670f612025-05-07 21:44:33 +02003529 # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.
3530# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no'
Illia Bobyra96d5442023-08-30 16:30:15 +02003531# in a Makefile. We should not override ac_cv_exeext if it was cached,
3532# so that the user can short-circuit this test for compilers unknown to
3533# Autoconf.
3534for ac_file in $ac_files ''
3535do
3536 test -f "$ac_file" || continue
3537 case $ac_file in
3538 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3539 ;;
3540 [ab].out )
3541 # We found the default executable, but exeext='' is most
3542 # certainly right.
3543 break;;
3544 *.* )
3545 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3546 then :; else
3547 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3548 fi
3549 # We set ac_cv_exeext here because the later test for it is not
Christian Brabandt9670f612025-05-07 21:44:33 +02003550 # safe: cross compilers may not add the suffix if given an '-o'
Illia Bobyra96d5442023-08-30 16:30:15 +02003551 # argument, so we may need to know it at that point already.
3552 # Even if this section looks crufty: it has the advantage of
3553 # actually working.
3554 break;;
3555 * )
3556 break;;
3557 esac
3558done
3559test "$ac_cv_exeext" = no && ac_cv_exeext=
3560
Christian Brabandt9670f612025-05-07 21:44:33 +02003561else case e in #(
3562 e) ac_file='' ;;
3563esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003564fi
3565if test -z "$ac_file"
3566then :
3567 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3568printf "%s\n" "no" >&6; }
3569printf "%s\n" "$as_me: failed program was:" >&5
3570sed 's/^/| /' conftest.$ac_ext >&5
3571
Christian Brabandt9670f612025-05-07 21:44:33 +02003572{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3573printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02003574as_fn_error 77 "C compiler cannot create executables
Christian Brabandt9670f612025-05-07 21:44:33 +02003575See 'config.log' for more details" "$LINENO" 5; }
3576else case e in #(
3577 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3578printf "%s\n" "yes" >&6; } ;;
3579esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003580fi
3581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3582printf %s "checking for C compiler default output file name... " >&6; }
3583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3584printf "%s\n" "$ac_file" >&6; }
3585ac_exeext=$ac_cv_exeext
3586
3587rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3588ac_clean_files=$ac_clean_files_save
3589{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3590printf %s "checking for suffix of executables... " >&6; }
3591if { { ac_try="$ac_link"
3592case "(($ac_try" in
3593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3594 *) ac_try_echo=$ac_try;;
3595esac
3596eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3597printf "%s\n" "$ac_try_echo"; } >&5
3598 (eval "$ac_link") 2>&5
3599 ac_status=$?
3600 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3601 test $ac_status = 0; }
3602then :
Christian Brabandt9670f612025-05-07 21:44:33 +02003603 # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)
3604# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will
3605# work properly (i.e., refer to 'conftest.exe'), while it won't with
3606# 'rm'.
Illia Bobyra96d5442023-08-30 16:30:15 +02003607for ac_file in conftest.exe conftest conftest.*; do
3608 test -f "$ac_file" || continue
3609 case $ac_file in
3610 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3611 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3612 break;;
3613 * ) break;;
3614 esac
3615done
Christian Brabandt9670f612025-05-07 21:44:33 +02003616else case e in #(
3617 e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3618printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02003619as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Christian Brabandt9670f612025-05-07 21:44:33 +02003620See 'config.log' for more details" "$LINENO" 5; } ;;
3621esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003622fi
3623rm -f conftest conftest$ac_cv_exeext
3624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3625printf "%s\n" "$ac_cv_exeext" >&6; }
3626
3627rm -f conftest.$ac_ext
3628EXEEXT=$ac_cv_exeext
3629ac_exeext=$EXEEXT
3630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3631/* end confdefs.h. */
3632#include <stdio.h>
3633int
3634main (void)
3635{
3636FILE *f = fopen ("conftest.out", "w");
Christian Brabandt9670f612025-05-07 21:44:33 +02003637 if (!f)
3638 return 1;
Illia Bobyra96d5442023-08-30 16:30:15 +02003639 return ferror (f) || fclose (f) != 0;
3640
3641 ;
3642 return 0;
3643}
3644_ACEOF
3645ac_clean_files="$ac_clean_files conftest.out"
3646# Check that the compiler produces executables we can run. If not, either
3647# the compiler is broken, or we cross compile.
3648{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3649printf %s "checking whether we are cross compiling... " >&6; }
3650if test "$cross_compiling" != yes; then
3651 { { ac_try="$ac_link"
3652case "(($ac_try" in
3653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3654 *) ac_try_echo=$ac_try;;
3655esac
3656eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3657printf "%s\n" "$ac_try_echo"; } >&5
3658 (eval "$ac_link") 2>&5
3659 ac_status=$?
3660 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3661 test $ac_status = 0; }
3662 if { ac_try='./conftest$ac_cv_exeext'
3663 { { case "(($ac_try" in
3664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3665 *) ac_try_echo=$ac_try;;
3666esac
3667eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3668printf "%s\n" "$ac_try_echo"; } >&5
3669 (eval "$ac_try") 2>&5
3670 ac_status=$?
3671 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3672 test $ac_status = 0; }; }; then
3673 cross_compiling=no
3674 else
3675 if test "$cross_compiling" = maybe; then
3676 cross_compiling=yes
3677 else
Christian Brabandt9670f612025-05-07 21:44:33 +02003678 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3679printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02003680as_fn_error 77 "cannot run C compiled programs.
Christian Brabandt9670f612025-05-07 21:44:33 +02003681If you meant to cross compile, use '--host'.
3682See 'config.log' for more details" "$LINENO" 5; }
Illia Bobyra96d5442023-08-30 16:30:15 +02003683 fi
3684 fi
3685fi
3686{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3687printf "%s\n" "$cross_compiling" >&6; }
3688
Christian Brabandt9670f612025-05-07 21:44:33 +02003689rm -f conftest.$ac_ext conftest$ac_cv_exeext \
3690 conftest.o conftest.obj conftest.out
Illia Bobyra96d5442023-08-30 16:30:15 +02003691ac_clean_files=$ac_clean_files_save
3692{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3693printf %s "checking for suffix of object files... " >&6; }
3694if test ${ac_cv_objext+y}
3695then :
3696 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003697else case e in #(
3698 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02003699/* end confdefs.h. */
3700
3701int
3702main (void)
3703{
3704
3705 ;
3706 return 0;
3707}
3708_ACEOF
3709rm -f conftest.o conftest.obj
3710if { { ac_try="$ac_compile"
3711case "(($ac_try" in
3712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3713 *) ac_try_echo=$ac_try;;
3714esac
3715eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3716printf "%s\n" "$ac_try_echo"; } >&5
3717 (eval "$ac_compile") 2>&5
3718 ac_status=$?
3719 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3720 test $ac_status = 0; }
3721then :
3722 for ac_file in conftest.o conftest.obj conftest.*; do
3723 test -f "$ac_file" || continue;
3724 case $ac_file in
3725 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3726 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3727 break;;
3728 esac
3729done
Christian Brabandt9670f612025-05-07 21:44:33 +02003730else case e in #(
3731 e) printf "%s\n" "$as_me: failed program was:" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02003732sed 's/^/| /' conftest.$ac_ext >&5
3733
Christian Brabandt9670f612025-05-07 21:44:33 +02003734{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3735printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Illia Bobyra96d5442023-08-30 16:30:15 +02003736as_fn_error $? "cannot compute suffix of object files: cannot compile
Christian Brabandt9670f612025-05-07 21:44:33 +02003737See 'config.log' for more details" "$LINENO" 5; } ;;
3738esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003739fi
Christian Brabandt9670f612025-05-07 21:44:33 +02003740rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;
3741esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003742fi
3743{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3744printf "%s\n" "$ac_cv_objext" >&6; }
3745OBJEXT=$ac_cv_objext
3746ac_objext=$OBJEXT
3747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
3748printf %s "checking whether the compiler supports GNU C... " >&6; }
3749if test ${ac_cv_c_compiler_gnu+y}
3750then :
3751 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003752else case e in #(
3753 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02003754/* end confdefs.h. */
3755
3756int
3757main (void)
3758{
3759#ifndef __GNUC__
3760 choke me
3761#endif
3762
3763 ;
3764 return 0;
3765}
3766_ACEOF
3767if ac_fn_c_try_compile "$LINENO"
3768then :
3769 ac_compiler_gnu=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02003770else case e in #(
3771 e) ac_compiler_gnu=no ;;
3772esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003773fi
3774rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3775ac_cv_c_compiler_gnu=$ac_compiler_gnu
Christian Brabandt9670f612025-05-07 21:44:33 +02003776 ;;
3777esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003778fi
3779{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3780printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
3781ac_compiler_gnu=$ac_cv_c_compiler_gnu
3782
3783if test $ac_compiler_gnu = yes; then
3784 GCC=yes
3785else
3786 GCC=
3787fi
3788ac_test_CFLAGS=${CFLAGS+y}
3789ac_save_CFLAGS=$CFLAGS
3790{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3791printf %s "checking whether $CC accepts -g... " >&6; }
3792if test ${ac_cv_prog_cc_g+y}
3793then :
3794 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003795else case e in #(
3796 e) ac_save_c_werror_flag=$ac_c_werror_flag
Illia Bobyra96d5442023-08-30 16:30:15 +02003797 ac_c_werror_flag=yes
3798 ac_cv_prog_cc_g=no
3799 CFLAGS="-g"
3800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3801/* end confdefs.h. */
3802
3803int
3804main (void)
3805{
3806
3807 ;
3808 return 0;
3809}
3810_ACEOF
3811if ac_fn_c_try_compile "$LINENO"
3812then :
3813 ac_cv_prog_cc_g=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02003814else case e in #(
3815 e) CFLAGS=""
Illia Bobyra96d5442023-08-30 16:30:15 +02003816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3817/* end confdefs.h. */
3818
3819int
3820main (void)
3821{
3822
3823 ;
3824 return 0;
3825}
3826_ACEOF
3827if ac_fn_c_try_compile "$LINENO"
3828then :
3829
Christian Brabandt9670f612025-05-07 21:44:33 +02003830else case e in #(
3831 e) ac_c_werror_flag=$ac_save_c_werror_flag
Illia Bobyra96d5442023-08-30 16:30:15 +02003832 CFLAGS="-g"
3833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3834/* end confdefs.h. */
3835
3836int
3837main (void)
3838{
3839
3840 ;
3841 return 0;
3842}
3843_ACEOF
3844if ac_fn_c_try_compile "$LINENO"
3845then :
3846 ac_cv_prog_cc_g=yes
3847fi
Christian Brabandt9670f612025-05-07 21:44:33 +02003848rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3849esac
3850fi
3851rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
3852esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003853fi
3854rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02003855 ac_c_werror_flag=$ac_save_c_werror_flag ;;
3856esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003857fi
3858{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3859printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
3860if test $ac_test_CFLAGS; then
3861 CFLAGS=$ac_save_CFLAGS
3862elif test $ac_cv_prog_cc_g = yes; then
3863 if test "$GCC" = yes; then
3864 CFLAGS="-g -O2"
3865 else
3866 CFLAGS="-g"
3867 fi
3868else
3869 if test "$GCC" = yes; then
3870 CFLAGS="-O2"
3871 else
3872 CFLAGS=
3873 fi
3874fi
3875ac_prog_cc_stdc=no
3876if test x$ac_prog_cc_stdc = xno
3877then :
3878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
3879printf %s "checking for $CC option to enable C11 features... " >&6; }
3880if test ${ac_cv_prog_cc_c11+y}
3881then :
3882 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003883else case e in #(
3884 e) ac_cv_prog_cc_c11=no
Illia Bobyra96d5442023-08-30 16:30:15 +02003885ac_save_CC=$CC
3886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3887/* end confdefs.h. */
3888$ac_c_conftest_c11_program
3889_ACEOF
3890for ac_arg in '' -std=gnu11
Bram Moolenaar2e324952018-04-14 14:37:07 +02003891do
3892 CC="$ac_save_CC $ac_arg"
Illia Bobyra96d5442023-08-30 16:30:15 +02003893 if ac_fn_c_try_compile "$LINENO"
3894then :
3895 ac_cv_prog_cc_c11=$ac_arg
3896fi
3897rm -f core conftest.err conftest.$ac_objext conftest.beam
3898 test "x$ac_cv_prog_cc_c11" != "xno" && break
3899done
3900rm -f conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02003901CC=$ac_save_CC ;;
3902esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003903fi
3904
3905if test "x$ac_cv_prog_cc_c11" = xno
3906then :
3907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3908printf "%s\n" "unsupported" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02003909else case e in #(
3910 e) if test "x$ac_cv_prog_cc_c11" = x
Illia Bobyra96d5442023-08-30 16:30:15 +02003911then :
3912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3913printf "%s\n" "none needed" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02003914else case e in #(
3915 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02003916printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02003917 CC="$CC $ac_cv_prog_cc_c11" ;;
3918esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003919fi
3920 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
Christian Brabandt9670f612025-05-07 21:44:33 +02003921 ac_prog_cc_stdc=c11 ;;
3922esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003923fi
3924fi
3925if test x$ac_prog_cc_stdc = xno
3926then :
3927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
3928printf %s "checking for $CC option to enable C99 features... " >&6; }
3929if test ${ac_cv_prog_cc_c99+y}
3930then :
3931 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003932else case e in #(
3933 e) ac_cv_prog_cc_c99=no
Illia Bobyra96d5442023-08-30 16:30:15 +02003934ac_save_CC=$CC
3935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3936/* end confdefs.h. */
3937$ac_c_conftest_c99_program
3938_ACEOF
3939for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
3940do
3941 CC="$ac_save_CC $ac_arg"
3942 if ac_fn_c_try_compile "$LINENO"
3943then :
Bram Moolenaar22640082018-04-19 20:39:41 +02003944 ac_cv_prog_cc_c99=$ac_arg
Bram Moolenaar2e324952018-04-14 14:37:07 +02003945fi
Illia Bobyra96d5442023-08-30 16:30:15 +02003946rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar22640082018-04-19 20:39:41 +02003947 test "x$ac_cv_prog_cc_c99" != "xno" && break
Bram Moolenaar2e324952018-04-14 14:37:07 +02003948done
3949rm -f conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02003950CC=$ac_save_CC ;;
3951esac
Bram Moolenaar2e324952018-04-14 14:37:07 +02003952fi
3953
Illia Bobyra96d5442023-08-30 16:30:15 +02003954if test "x$ac_cv_prog_cc_c99" = xno
3955then :
3956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3957printf "%s\n" "unsupported" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02003958else case e in #(
3959 e) if test "x$ac_cv_prog_cc_c99" = x
Illia Bobyra96d5442023-08-30 16:30:15 +02003960then :
3961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3962printf "%s\n" "none needed" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02003963else case e in #(
3964 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02003965printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02003966 CC="$CC $ac_cv_prog_cc_c99" ;;
3967esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003968fi
3969 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
Christian Brabandt9670f612025-05-07 21:44:33 +02003970 ac_prog_cc_stdc=c99 ;;
3971esac
Illia Bobyra96d5442023-08-30 16:30:15 +02003972fi
3973fi
3974if test x$ac_prog_cc_stdc = xno
3975then :
3976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
3977printf %s "checking for $CC option to enable C89 features... " >&6; }
3978if test ${ac_cv_prog_cc_c89+y}
3979then :
3980 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02003981else case e in #(
3982 e) ac_cv_prog_cc_c89=no
Illia Bobyra96d5442023-08-30 16:30:15 +02003983ac_save_CC=$CC
3984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3985/* end confdefs.h. */
3986$ac_c_conftest_c89_program
3987_ACEOF
3988for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3989do
3990 CC="$ac_save_CC $ac_arg"
3991 if ac_fn_c_try_compile "$LINENO"
3992then :
3993 ac_cv_prog_cc_c89=$ac_arg
3994fi
3995rm -f core conftest.err conftest.$ac_objext conftest.beam
3996 test "x$ac_cv_prog_cc_c89" != "xno" && break
3997done
3998rm -f conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02003999CC=$ac_save_CC ;;
4000esac
Illia Bobyra96d5442023-08-30 16:30:15 +02004001fi
4002
4003if test "x$ac_cv_prog_cc_c89" = xno
4004then :
4005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4006printf "%s\n" "unsupported" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02004007else case e in #(
4008 e) if test "x$ac_cv_prog_cc_c89" = x
Illia Bobyra96d5442023-08-30 16:30:15 +02004009then :
4010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4011printf "%s\n" "none needed" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02004012else case e in #(
4013 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02004014printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02004015 CC="$CC $ac_cv_prog_cc_c89" ;;
4016esac
Illia Bobyra96d5442023-08-30 16:30:15 +02004017fi
4018 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
Christian Brabandt9670f612025-05-07 21:44:33 +02004019 ac_prog_cc_stdc=c89 ;;
4020esac
Illia Bobyra96d5442023-08-30 16:30:15 +02004021fi
4022fi
4023
4024ac_ext=c
4025ac_cpp='$CPP $CPPFLAGS'
4026ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4027ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4028ac_compiler_gnu=$ac_cv_c_compiler_gnu
Bram Moolenaarc0394412017-04-20 20:20:23 +02004029 ac_ext=c
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004030ac_cpp='$CPP $CPPFLAGS'
4031ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4032ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4033ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02004034{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4035printf %s "checking how to run the C preprocessor... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004036# On Suns, sometimes $CPP names a directory.
4037if test -n "$CPP" && test -d "$CPP"; then
4038 CPP=
4039fi
4040if test -z "$CPP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004041 if test ${ac_cv_prog_CPP+y}
4042then :
4043 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004044else case e in #(
4045 e) # Double quotes because $CC needs to be expanded
Illia Bobyra96d5442023-08-30 16:30:15 +02004046 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004047 do
4048 ac_preproc_ok=false
4049for ac_c_preproc_warn_flag in '' yes
4050do
4051 # Use a header file that comes with gcc, so configuring glibc
4052 # with a fresh cross-compiler works.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004053 # On the NeXT, cc -E runs the code through the compiler's parser,
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004054 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004056/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02004057#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004058 Syntax error
4059_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004060if ac_fn_c_try_cpp "$LINENO"
4061then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004062
Christian Brabandt9670f612025-05-07 21:44:33 +02004063else case e in #(
4064 e) # Broken: fails on valid input.
4065continue ;;
4066esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004067fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004068rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004069
Bram Moolenaar446cb832008-06-24 21:56:24 +00004070 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004071 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004073/* end confdefs.h. */
4074#include <ac_nonexistent.h>
4075_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004076if ac_fn_c_try_cpp "$LINENO"
4077then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004078 # Broken: success on invalid input.
4079continue
Christian Brabandt9670f612025-05-07 21:44:33 +02004080else case e in #(
4081 e) # Passes both tests.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004082ac_preproc_ok=:
Christian Brabandt9670f612025-05-07 21:44:33 +02004083break ;;
4084esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004085fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004086rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004087
4088done
Christian Brabandt9670f612025-05-07 21:44:33 +02004089# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004090rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004091if $ac_preproc_ok
4092then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004093 break
4094fi
4095
4096 done
4097 ac_cv_prog_CPP=$CPP
Christian Brabandt9670f612025-05-07 21:44:33 +02004098 ;;
4099esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004100fi
4101 CPP=$ac_cv_prog_CPP
4102else
4103 ac_cv_prog_CPP=$CPP
4104fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4106printf "%s\n" "$CPP" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004107ac_preproc_ok=false
4108for ac_c_preproc_warn_flag in '' yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00004109do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004110 # Use a header file that comes with gcc, so configuring glibc
4111 # with a fresh cross-compiler works.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004112 # On the NeXT, cc -E runs the code through the compiler's parser,
4113 # not just through cpp. "Syntax error" is here to catch this case.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004115/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +02004116#include <limits.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004117 Syntax error
4118_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004119if ac_fn_c_try_cpp "$LINENO"
4120then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004121
Christian Brabandt9670f612025-05-07 21:44:33 +02004122else case e in #(
4123 e) # Broken: fails on valid input.
4124continue ;;
4125esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004126fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004127rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004128
Bram Moolenaar446cb832008-06-24 21:56:24 +00004129 # OK, works on sane cases. Now check whether nonexistent headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004130 # can be detected and how.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004132/* end confdefs.h. */
4133#include <ac_nonexistent.h>
4134_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004135if ac_fn_c_try_cpp "$LINENO"
4136then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004137 # Broken: success on invalid input.
4138continue
Christian Brabandt9670f612025-05-07 21:44:33 +02004139else case e in #(
4140 e) # Passes both tests.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004141ac_preproc_ok=:
Christian Brabandt9670f612025-05-07 21:44:33 +02004142break ;;
4143esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004144fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01004145rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004146
4147done
Christian Brabandt9670f612025-05-07 21:44:33 +02004148# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Bram Moolenaar7db77842014-03-27 17:40:59 +01004149rm -f conftest.i conftest.err conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +02004150if $ac_preproc_ok
4151then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004152
Christian Brabandt9670f612025-05-07 21:44:33 +02004153else case e in #(
4154 e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4155printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01004156as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Christian Brabandt9670f612025-05-07 21:44:33 +02004157See 'config.log' for more details" "$LINENO" 5; } ;;
4158esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004159fi
4160
4161ac_ext=c
4162ac_cpp='$CPP $CPPFLAGS'
4163ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4164ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4165ac_compiler_gnu=$ac_cv_c_compiler_gnu
Illia Bobyra96d5442023-08-30 16:30:15 +02004166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4167printf %s "checking for grep that handles long lines and -e... " >&6; }
4168if test ${ac_cv_path_GREP+y}
4169then :
4170 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004171else case e in #(
4172 e) if test -z "$GREP"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00004173 ac_path_GREP_found=false
4174 # Loop through the user's path and test for each of PROGNAME-LIST
4175 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4176for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4177do
4178 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004179 case $as_dir in #(((
4180 '') as_dir=./ ;;
4181 */) ;;
4182 *) as_dir=$as_dir/ ;;
4183 esac
4184 for ac_prog in grep ggrep
4185 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004186 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004187 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004188 as_fn_executable_p "$ac_path_GREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004189# Check for GNU ac_path_GREP and select it if it is found.
4190 # Check for GNU $ac_path_GREP
Christian Brabandt9670f612025-05-07 21:44:33 +02004191case `"$ac_path_GREP" --version 2>&1` in #(
Bram Moolenaar446cb832008-06-24 21:56:24 +00004192*GNU*)
4193 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
Christian Brabandt9670f612025-05-07 21:44:33 +02004194#(
Bram Moolenaar446cb832008-06-24 21:56:24 +00004195*)
4196 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004197 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004198 while :
4199 do
4200 cat "conftest.in" "conftest.in" >"conftest.tmp"
4201 mv "conftest.tmp" "conftest.in"
4202 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004203 printf "%s\n" 'GREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004204 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4205 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004206 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004207 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4208 # Best one so far, save it but keep looking for a better one
4209 ac_cv_path_GREP="$ac_path_GREP"
4210 ac_path_GREP_max=$ac_count
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004211 fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00004212 # 10*(2^10) chars as input seems more than enough
4213 test $ac_count -gt 10 && break
4214 done
4215 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4216esac
4217
4218 $ac_path_GREP_found && break 3
4219 done
4220 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004221 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004222IFS=$as_save_IFS
4223 if test -z "$ac_cv_path_GREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004224 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 +00004225 fi
4226else
4227 ac_cv_path_GREP=$GREP
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004228fi
Christian Brabandt9670f612025-05-07 21:44:33 +02004229 ;;
4230esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00004231fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004232{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4233printf "%s\n" "$ac_cv_path_GREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004234 GREP="$ac_cv_path_GREP"
4235
4236
Illia Bobyra96d5442023-08-30 16:30:15 +02004237{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4238printf %s "checking for egrep... " >&6; }
4239if test ${ac_cv_path_EGREP+y}
4240then :
4241 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004242else case e in #(
4243 e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
Bram Moolenaar446cb832008-06-24 21:56:24 +00004244 then ac_cv_path_EGREP="$GREP -E"
4245 else
4246 if test -z "$EGREP"; then
4247 ac_path_EGREP_found=false
4248 # Loop through the user's path and test for each of PROGNAME-LIST
4249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4250for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4251do
4252 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004253 case $as_dir in #(((
4254 '') as_dir=./ ;;
4255 */) ;;
4256 *) as_dir=$as_dir/ ;;
4257 esac
4258 for ac_prog in egrep
4259 do
Bram Moolenaar446cb832008-06-24 21:56:24 +00004260 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004261 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar7db77842014-03-27 17:40:59 +01004262 as_fn_executable_p "$ac_path_EGREP" || continue
Bram Moolenaar446cb832008-06-24 21:56:24 +00004263# Check for GNU ac_path_EGREP and select it if it is found.
4264 # Check for GNU $ac_path_EGREP
Christian Brabandt9670f612025-05-07 21:44:33 +02004265case `"$ac_path_EGREP" --version 2>&1` in #(
Bram Moolenaar446cb832008-06-24 21:56:24 +00004266*GNU*)
4267 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
Christian Brabandt9670f612025-05-07 21:44:33 +02004268#(
Bram Moolenaar446cb832008-06-24 21:56:24 +00004269*)
4270 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004271 printf %s 0123456789 >"conftest.in"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004272 while :
4273 do
4274 cat "conftest.in" "conftest.in" >"conftest.tmp"
4275 mv "conftest.tmp" "conftest.in"
4276 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004277 printf "%s\n" 'EGREP' >> "conftest.nl"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004278 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4279 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004280 as_fn_arith $ac_count + 1 && ac_count=$as_val
Bram Moolenaar446cb832008-06-24 21:56:24 +00004281 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4282 # Best one so far, save it but keep looking for a better one
4283 ac_cv_path_EGREP="$ac_path_EGREP"
4284 ac_path_EGREP_max=$ac_count
4285 fi
4286 # 10*(2^10) chars as input seems more than enough
4287 test $ac_count -gt 10 && break
4288 done
4289 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4290esac
4291
4292 $ac_path_EGREP_found && break 3
4293 done
4294 done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004295 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004296IFS=$as_save_IFS
4297 if test -z "$ac_cv_path_EGREP"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01004298 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 +00004299 fi
4300else
4301 ac_cv_path_EGREP=$EGREP
4302fi
4303
Christian Brabandt9670f612025-05-07 21:44:33 +02004304 fi ;;
4305esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00004306fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4308printf "%s\n" "$ac_cv_path_EGREP" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004309 EGREP="$ac_cv_path_EGREP"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004310
Christian Brabandt9670f612025-05-07 21:44:33 +02004311 EGREP_TRADITIONAL=$EGREP
4312 ac_cv_path_EGREP_TRADITIONAL=$EGREP
Illia Bobyra96d5442023-08-30 16:30:15 +02004313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
4314printf %s "checking for fgrep... " >&6; }
4315if test ${ac_cv_path_FGREP+y}
4316then :
4317 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004318else case e in #(
4319 e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004320 then ac_cv_path_FGREP="$GREP -F"
4321 else
4322 if test -z "$FGREP"; then
4323 ac_path_FGREP_found=false
4324 # Loop through the user's path and test for each of PROGNAME-LIST
4325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4326for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4327do
4328 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004329 case $as_dir in #(((
4330 '') as_dir=./ ;;
4331 */) ;;
4332 *) as_dir=$as_dir/ ;;
4333 esac
4334 for ac_prog in fgrep
4335 do
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004336 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004337 ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004338 as_fn_executable_p "$ac_path_FGREP" || continue
4339# Check for GNU ac_path_FGREP and select it if it is found.
4340 # Check for GNU $ac_path_FGREP
Christian Brabandt9670f612025-05-07 21:44:33 +02004341case `"$ac_path_FGREP" --version 2>&1` in #(
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004342*GNU*)
4343 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
Christian Brabandt9670f612025-05-07 21:44:33 +02004344#(
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004345*)
4346 ac_count=0
Illia Bobyra96d5442023-08-30 16:30:15 +02004347 printf %s 0123456789 >"conftest.in"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004348 while :
4349 do
4350 cat "conftest.in" "conftest.in" >"conftest.tmp"
4351 mv "conftest.tmp" "conftest.in"
4352 cp "conftest.in" "conftest.nl"
Illia Bobyra96d5442023-08-30 16:30:15 +02004353 printf "%s\n" 'FGREP' >> "conftest.nl"
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004354 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
4355 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4356 as_fn_arith $ac_count + 1 && ac_count=$as_val
4357 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
4358 # Best one so far, save it but keep looking for a better one
4359 ac_cv_path_FGREP="$ac_path_FGREP"
4360 ac_path_FGREP_max=$ac_count
4361 fi
4362 # 10*(2^10) chars as input seems more than enough
4363 test $ac_count -gt 10 && break
4364 done
4365 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4366esac
4367
4368 $ac_path_FGREP_found && break 3
4369 done
4370 done
4371 done
4372IFS=$as_save_IFS
4373 if test -z "$ac_cv_path_FGREP"; then
4374 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4375 fi
4376else
4377 ac_cv_path_FGREP=$FGREP
4378fi
4379
Christian Brabandt9670f612025-05-07 21:44:33 +02004380 fi ;;
4381esac
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004382fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004383{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
4384printf "%s\n" "$ac_cv_path_FGREP" >&6; }
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01004385 FGREP="$ac_cv_path_FGREP"
4386
Bram Moolenaarc0394412017-04-20 20:20:23 +02004387 for ac_prog in gawk mawk nawk awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004388do
4389 # Extract the first word of "$ac_prog", so it can be a program name with args.
Bram Moolenaar071d4272004-06-13 20:20:40 +00004390set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004391{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4392printf %s "checking for $ac_word... " >&6; }
4393if test ${ac_cv_prog_AWK+y}
4394then :
4395 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004396else case e in #(
4397 e) if test -n "$AWK"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00004398 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4399else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004400as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4401for as_dir in $PATH
4402do
4403 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004404 case $as_dir in #(((
4405 '') as_dir=./ ;;
4406 */) ;;
4407 *) as_dir=$as_dir/ ;;
4408 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004409 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004410 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004411 ac_cv_prog_AWK="$ac_prog"
Illia Bobyra96d5442023-08-30 16:30:15 +02004412 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004413 break 2
4414 fi
4415done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004416 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004417IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004418
Christian Brabandt9670f612025-05-07 21:44:33 +02004419fi ;;
4420esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00004421fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004422AWK=$ac_cv_prog_AWK
Bram Moolenaar071d4272004-06-13 20:20:40 +00004423if test -n "$AWK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4425printf "%s\n" "$AWK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004426else
Illia Bobyra96d5442023-08-30 16:30:15 +02004427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4428printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004429fi
4430
Bram Moolenaar446cb832008-06-24 21:56:24 +00004431
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004432 test -n "$AWK" && break
Bram Moolenaar071d4272004-06-13 20:20:40 +00004433done
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004434
Bram Moolenaar071d4272004-06-13 20:20:40 +00004435# Extract the first word of "strip", so it can be a program name with args.
4436set dummy strip; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004437{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4438printf %s "checking for $ac_word... " >&6; }
4439if test ${ac_cv_prog_STRIP+y}
4440then :
4441 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004442else case e in #(
4443 e) if test -n "$STRIP"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00004444 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4445else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4447for as_dir in $PATH
4448do
4449 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004450 case $as_dir in #(((
4451 '') as_dir=./ ;;
4452 */) ;;
4453 *) as_dir=$as_dir/ ;;
4454 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004455 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004456 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004457 ac_cv_prog_STRIP="strip"
Illia Bobyra96d5442023-08-30 16:30:15 +02004458 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004459 break 2
4460 fi
4461done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004462 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00004463IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004464
Bram Moolenaar071d4272004-06-13 20:20:40 +00004465 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
Christian Brabandt9670f612025-05-07 21:44:33 +02004466fi ;;
4467esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00004468fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00004469STRIP=$ac_cv_prog_STRIP
Bram Moolenaar071d4272004-06-13 20:20:40 +00004470if test -n "$STRIP"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4472printf "%s\n" "$STRIP" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004473else
Illia Bobyra96d5442023-08-30 16:30:15 +02004474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4475printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00004476fi
4477
4478
Bram Moolenaar071d4272004-06-13 20:20:40 +00004479
4480
Bram Moolenaar071d4272004-06-13 20:20:40 +00004481
Illia Bobyrf39842f2023-08-27 18:21:23 +02004482
Illia Bobyra96d5442023-08-30 16:30:15 +02004483{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
4484printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
4485if test ${ac_cv_header_sys_wait_h+y}
4486then :
4487 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004488else case e in #(
4489 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00004490/* end confdefs.h. */
4491#include <sys/types.h>
4492#include <sys/wait.h>
4493#ifndef WEXITSTATUS
4494# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
4495#endif
4496#ifndef WIFEXITED
4497# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4498#endif
4499
4500int
Illia Bobyra96d5442023-08-30 16:30:15 +02004501main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00004502{
4503 int s;
4504 wait (&s);
4505 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4506 ;
4507 return 0;
4508}
4509_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004510if ac_fn_c_try_compile "$LINENO"
4511then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004512 ac_cv_header_sys_wait_h=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02004513else case e in #(
4514 e) ac_cv_header_sys_wait_h=no ;;
4515esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00004516fi
Christian Brabandt9670f612025-05-07 21:44:33 +02004517rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4518esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00004519fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004520{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
4521printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004522if test $ac_cv_header_sys_wait_h = yes; then
4523
Illia Bobyra96d5442023-08-30 16:30:15 +02004524printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +00004525
4526fi
4527
4528
Bram Moolenaar22640082018-04-19 20:39:41 +02004529if test x"$ac_cv_prog_cc_c99" != xno; then
4530
4531
Illia Bobyra96d5442023-08-30 16:30:15 +02004532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
4533printf %s "checking for unsigned long long int... " >&6; }
4534if test ${ac_cv_type_unsigned_long_long_int+y}
4535then :
4536 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004537else case e in #(
4538 e) ac_cv_type_unsigned_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004539 case $ac_prog_cc_stdc in
4540 no | c89) ;;
4541 *)
4542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004543/* end confdefs.h. */
Bram Moolenaar22640082018-04-19 20:39:41 +02004544
4545 /* For now, do not test the preprocessor; as of 2007 there are too many
4546 implementations with broken preprocessors. Perhaps this can
4547 be revisited in 2012. In the meantime, code should not expect
4548 #if to work with literals wider than 32 bits. */
4549 /* Test literals. */
4550 long long int ll = 9223372036854775807ll;
4551 long long int nll = -9223372036854775807LL;
4552 unsigned long long int ull = 18446744073709551615ULL;
4553 /* Test constant expressions. */
4554 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
4555 ? 1 : -1)];
4556 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
4557 ? 1 : -1)];
4558 int i = 63;
4559int
Illia Bobyra96d5442023-08-30 16:30:15 +02004560main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004561{
4562/* Test availability of runtime routines for shift and division. */
4563 long long int llmax = 9223372036854775807ll;
4564 unsigned long long int ullmax = 18446744073709551615ull;
4565 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
4566 | (llmax / ll) | (llmax % ll)
4567 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
4568 | (ullmax / ull) | (ullmax % ull));
4569 ;
4570 return 0;
4571}
4572
4573_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004574if ac_fn_c_try_link "$LINENO"
4575then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004576
Christian Brabandt9670f612025-05-07 21:44:33 +02004577else case e in #(
4578 e) ac_cv_type_unsigned_long_long_int=no ;;
4579esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004580fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004581rm -f core conftest.err conftest.$ac_objext conftest.beam \
4582 conftest$ac_exeext conftest.$ac_ext;;
Christian Brabandt9670f612025-05-07 21:44:33 +02004583 esac ;;
4584esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004585fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004586{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
4587printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004588 if test $ac_cv_type_unsigned_long_long_int = yes; then
4589
Illia Bobyra96d5442023-08-30 16:30:15 +02004590printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004591
4592 fi
4593
4594
4595
Illia Bobyra96d5442023-08-30 16:30:15 +02004596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
4597printf %s "checking for long long int... " >&6; }
4598if test ${ac_cv_type_long_long_int+y}
4599then :
4600 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004601else case e in #(
4602 e) ac_cv_type_long_long_int=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02004603 case $ac_prog_cc_stdc in
4604 no | c89) ;;
4605 *)
4606 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
4607 if test $ac_cv_type_long_long_int = yes; then
4608 if test "$cross_compiling" = yes
4609then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004610 :
Christian Brabandt9670f612025-05-07 21:44:33 +02004611else case e in #(
4612 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004613/* end confdefs.h. */
4614#include <limits.h>
Illia Bobyra96d5442023-08-30 16:30:15 +02004615 #ifndef LLONG_MAX
Christian Brabandt9670f612025-05-07 21:44:33 +02004616 # define HALF \\
Illia Bobyra96d5442023-08-30 16:30:15 +02004617 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
4618 # define LLONG_MAX (HALF - 1 + HALF)
4619 #endif
Bram Moolenaar22640082018-04-19 20:39:41 +02004620int
Illia Bobyra96d5442023-08-30 16:30:15 +02004621main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004622{
4623long long int n = 1;
Illia Bobyra96d5442023-08-30 16:30:15 +02004624 int i;
4625 for (i = 0; ; i++)
4626 {
4627 long long int m = n << i;
4628 if (m >> i != n)
4629 return 1;
4630 if (LLONG_MAX / 2 < m)
4631 break;
4632 }
4633 return 0;
Bram Moolenaar22640082018-04-19 20:39:41 +02004634 ;
4635 return 0;
4636}
4637_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004638if ac_fn_c_try_run "$LINENO"
4639then :
Bram Moolenaar22640082018-04-19 20:39:41 +02004640
Christian Brabandt9670f612025-05-07 21:44:33 +02004641else case e in #(
4642 e) ac_cv_type_long_long_int=no ;;
4643esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004644fi
4645rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +02004646 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4647esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004648fi
4649
Illia Bobyra96d5442023-08-30 16:30:15 +02004650 fi;;
Christian Brabandt9670f612025-05-07 21:44:33 +02004651 esac ;;
4652esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004653fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
4655printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004656 if test $ac_cv_type_long_long_int = yes; then
4657
Illia Bobyra96d5442023-08-30 16:30:15 +02004658printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
Bram Moolenaar22640082018-04-19 20:39:41 +02004659
4660 fi
4661
4662 if test "$ac_cv_type_long_long_int" = no; then
Christian Brabandt9670f612025-05-07 21:44:33 +02004663 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4664printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004665as_fn_error $? "Compiler does not support long long int
Christian Brabandt9670f612025-05-07 21:44:33 +02004666See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004667 fi
4668
Illia Bobyra96d5442023-08-30 16:30:15 +02004669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports trailing commas" >&5
4670printf %s "checking if the compiler supports trailing commas... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004671 trailing_commas=no
4672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4673/* end confdefs.h. */
4674
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004675int
Illia Bobyra96d5442023-08-30 16:30:15 +02004676main (void)
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004677{
4678
Bram Moolenaar22640082018-04-19 20:39:41 +02004679 enum {
4680 one,
4681 };
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004682 ;
4683 return 0;
4684}
4685_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004686if ac_fn_c_try_compile "$LINENO"
4687then :
4688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4689printf "%s\n" "yes" >&6; }; trailing_commas=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02004690else case e in #(
4691 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4692printf "%s\n" "no" >&6; } ;;
4693esac
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004694fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004695rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004696 if test "$trailing_commas" = no; then
Christian Brabandt9670f612025-05-07 21:44:33 +02004697 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4698printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004699as_fn_error $? "Compiler does not support trailing comma in enum
Christian Brabandt9670f612025-05-07 21:44:33 +02004700See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004701 fi
4702
Illia Bobyra96d5442023-08-30 16:30:15 +02004703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler supports C++ comments" >&5
4704printf %s "checking if the compiler supports C++ comments... " >&6; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004705 slash_comments=no
4706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4707/* end confdefs.h. */
4708
4709int
Illia Bobyra96d5442023-08-30 16:30:15 +02004710main (void)
Bram Moolenaar22640082018-04-19 20:39:41 +02004711{
4712// C++ comments?
4713 ;
4714 return 0;
4715}
4716_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02004717if ac_fn_c_try_compile "$LINENO"
4718then :
4719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4720printf "%s\n" "yes" >&6; }; slash_comments=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02004721else case e in #(
4722 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4723printf "%s\n" "no" >&6; } ;;
4724esac
Bram Moolenaar22640082018-04-19 20:39:41 +02004725fi
Illia Bobyra96d5442023-08-30 16:30:15 +02004726rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar22640082018-04-19 20:39:41 +02004727 if test "$slash_comments" = no; then
Christian Brabandt9670f612025-05-07 21:44:33 +02004728 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
4729printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar22640082018-04-19 20:39:41 +02004730as_fn_error $? "Compiler does not support C++ comments
Christian Brabandt9670f612025-05-07 21:44:33 +02004731See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar22640082018-04-19 20:39:41 +02004732 fi
4733fi
Bram Moolenaar561f8a52018-04-17 22:02:45 +02004734
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004735if test -n "$SOURCE_DATE_EPOCH"; then
4736 DATE_FMT="%b %d %Y %H:%M:%S"
4737 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 +02004738 printf "%s\n" "#define BUILD_DATE \"$BUILD_DATE\"" >>confdefs.h
Bram Moolenaar8f1dde52020-06-05 23:16:29 +02004739
4740 BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='"
4741
4742fi
4743
Bram Moolenaarf788a062011-12-14 20:51:25 +01004744
Illia Bobyra96d5442023-08-30 16:30:15 +02004745{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
4746printf %s "checking --enable-fail-if-missing argument... " >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004747# Check whether --enable-fail_if_missing was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004748if test ${enable_fail_if_missing+y}
4749then :
Bram Moolenaarf788a062011-12-14 20:51:25 +01004750 enableval=$enable_fail_if_missing; fail_if_missing="yes"
Christian Brabandt9670f612025-05-07 21:44:33 +02004751else case e in #(
4752 e) fail_if_missing="no" ;;
4753esac
Bram Moolenaarf788a062011-12-14 20:51:25 +01004754fi
4755
Illia Bobyra96d5442023-08-30 16:30:15 +02004756{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $fail_if_missing" >&5
4757printf "%s\n" "$fail_if_missing" >&6; }
Bram Moolenaarf788a062011-12-14 20:51:25 +01004758
Bram Moolenaard2a05492018-07-27 22:35:15 +02004759with_x_arg="$with_x"
4760
Bram Moolenaar446cb832008-06-24 21:56:24 +00004761if test -z "$CFLAGS"; then
4762 CFLAGS="-O"
Bram Moolenaar4d8479b2021-01-31 14:36:06 +01004763 test "$GCC" = yes && CFLAGS="-O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004764fi
Rose00d07e72023-05-06 18:07:14 +01004765
Bram Moolenaar446cb832008-06-24 21:56:24 +00004766if test "$GCC" = yes; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004767 gccversion=`$CC -dumpversion`
Bram Moolenaar446cb832008-06-24 21:56:24 +00004768 if test "x$gccversion" = "x"; then
Bram Moolenaarc8836f72014-04-12 13:12:24 +02004769 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 +00004770 fi
Rose00d07e72023-05-06 18:07:14 +01004771
4772 if test "$gccversion" = "3.0.1" -o "$gccversion" = "3.0.2" -o "$gccversion" = "4.0.1"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00004773 echo 'GCC [34].0.[12] has a bug in the optimizer, disabling "-O#"'
4774 CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-O/'`
4775 else
4776 if test "$gccversion" = "3.1" -o "$gccversion" = "3.2" -o "$gccversion" = "3.2.1" && `echo "$CFLAGS" | grep -v fno-strength-reduce >/dev/null`; then
4777 echo 'GCC 3.1 and 3.2 have a bug in the optimizer, adding "-fno-strength-reduce"'
4778 CFLAGS="$CFLAGS -fno-strength-reduce"
4779 fi
4780 fi
4781fi
4782
Illia Bobyra96d5442023-08-30 16:30:15 +02004783{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clang version" >&5
4784printf %s "checking for clang version... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004785CLANG_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 +02004786if test x"$CLANG_VERSION_STRING" != x"" ; then
4787 CLANG_MAJOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*/\1/p'`
4788 CLANG_MINOR=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/p'`
4789 CLANG_REVISION=`echo "$CLANG_VERSION_STRING" | sed -n -e 's/[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\)/\1/p'`
4790 CLANG_VERSION=`expr $CLANG_MAJOR '*' 1000000 '+' $CLANG_MINOR '*' 1000 '+' $CLANG_REVISION`
Illia Bobyra96d5442023-08-30 16:30:15 +02004791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CLANG_VERSION" >&5
4792printf "%s\n" "$CLANG_VERSION" >&6; }
4793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if clang supports -fno-strength-reduce" >&5
4794printf %s "checking if clang supports -fno-strength-reduce... " >&6; }
Bram Moolenaarebd211c2021-01-30 19:33:36 +01004795 if test "$CLANG_MAJOR" -ge 10 -o "$CLANG_VERSION" -ge 500002075 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4797printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +01004798 CFLAGS=`echo "$CFLAGS" | sed -e 's/-fno-strength-reduce/ /'`
4799 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4801printf "%s\n" "yes" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004802 fi
4803else
Illia Bobyra96d5442023-08-30 16:30:15 +02004804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: N/A" >&5
4805printf "%s\n" "N/A" >&6; }
Bram Moolenaar0c6ccfd2013-10-02 18:23:07 +02004806fi
4807
Bram Moolenaar839e9542016-04-14 16:46:02 +02004808CROSS_COMPILING=
Bram Moolenaar446cb832008-06-24 21:56:24 +00004809if test "$cross_compiling" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&5
4811printf "%s\n" "cannot compile a simple program; if not cross compiling check CC and CFLAGS" >&6; }
Bram Moolenaar839e9542016-04-14 16:46:02 +02004812 CROSS_COMPILING=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00004813fi
4814
Bram Moolenaar839e9542016-04-14 16:46:02 +02004815
Bram Moolenaar446cb832008-06-24 21:56:24 +00004816test "$GCC" = yes && CPP_MM=M;
4817
4818if test -f ./toolcheck; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for buggy tools" >&5
4820printf %s "checking for buggy tools... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004821 sh ./toolcheck 1>&6
4822fi
4823
4824OS_EXTRA_SRC=""; OS_EXTRA_OBJ=""
4825
Illia Bobyra96d5442023-08-30 16:30:15 +02004826{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname" >&5
4827printf %s "checking uname... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004828if test "x$vim_cv_uname_output" = "x" ; then
4829 vim_cv_uname_output=`(uname) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output" >&5
4831printf "%s\n" "$vim_cv_uname_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004832else
Illia Bobyra96d5442023-08-30 16:30:15 +02004833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_output (cached)" >&5
4834printf "%s\n" "$vim_cv_uname_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004835fi
4836
Illia Bobyra96d5442023-08-30 16:30:15 +02004837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -r" >&5
4838printf %s "checking uname -r... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004839if test "x$vim_cv_uname_r_output" = "x" ; then
4840 vim_cv_uname_r_output=`(uname -r) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output" >&5
4842printf "%s\n" "$vim_cv_uname_r_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004843else
Illia Bobyra96d5442023-08-30 16:30:15 +02004844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_r_output (cached)" >&5
4845printf "%s\n" "$vim_cv_uname_r_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004846fi
4847
Illia Bobyra96d5442023-08-30 16:30:15 +02004848{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uname -m" >&5
4849printf %s "checking uname -m... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004850if test "x$vim_cv_uname_m_output" = "x" ; then
4851 vim_cv_uname_m_output=`(uname -m) 2>/dev/null`
Illia Bobyra96d5442023-08-30 16:30:15 +02004852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output" >&5
4853printf "%s\n" "$vim_cv_uname_m_output" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004854else
Illia Bobyra96d5442023-08-30 16:30:15 +02004855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_uname_m_output (cached)" >&5
4856printf "%s\n" "$vim_cv_uname_m_output (cached)" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004857fi
4858
Illia Bobyra96d5442023-08-30 16:30:15 +02004859{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5
4860printf %s "checking for Haiku... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004861case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +02004862 Haiku) HAIKU=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4863printf "%s\n" "yes" >&6; };;
4864 *) HAIKU=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4865printf "%s\n" "no" >&6; };;
Bram Moolenaarb3f74062020-02-26 16:16:53 +01004866esac
4867
Illia Bobyra96d5442023-08-30 16:30:15 +02004868{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5
4869printf %s "checking for QNX... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004870case $vim_cv_uname_output in
Bram Moolenaar446cb832008-06-24 21:56:24 +00004871 QNX) OS_EXTRA_SRC=os_qnx.c; OS_EXTRA_OBJ=objects/os_qnx.o
4872 test -z "$with_x" && with_x=no
Illia Bobyra96d5442023-08-30 16:30:15 +02004873 QNX=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4874printf "%s\n" "yes" >&6; };;
4875 *) QNX=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4876printf "%s\n" "no" >&6; };;
Bram Moolenaar446cb832008-06-24 21:56:24 +00004877esac
4878
Illia Bobyra96d5442023-08-30 16:30:15 +02004879{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Darwin (Mac OS X)" >&5
4880printf %s "checking for Darwin (Mac OS X)... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00004881if test "$vim_cv_uname_output" = Darwin; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4883printf "%s\n" "yes" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02004884 MACOS_X=yes
Bram Moolenaar52ecaaa2018-05-12 21:38:13 +02004885 CPPFLAGS="$CPPFLAGS -DMACOS_X"
Bram Moolenaar446cb832008-06-24 21:56:24 +00004886
Illia Bobyra96d5442023-08-30 16:30:15 +02004887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-darwin argument" >&5
4888printf %s "checking --disable-darwin argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004889 # Check whether --enable-darwin was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004890if test ${enable_darwin+y}
4891then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00004892 enableval=$enable_darwin;
Christian Brabandt9670f612025-05-07 21:44:33 +02004893else case e in #(
4894 e) enable_darwin="yes" ;;
4895esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00004896fi
4897
4898 if test "$enable_darwin" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4900printf "%s\n" "no" >&6; }
4901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Darwin files are there" >&5
4902printf %s "checking if Darwin files are there... " >&6; }
Bram Moolenaar164fca32010-07-14 13:58:07 +02004903 if test -f os_macosx.m; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4905printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004906 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, Darwin support disabled" >&5
4908printf "%s\n" "no, Darwin support disabled" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004909 enable_darwin=no
4910 fi
4911 else
Illia Bobyra96d5442023-08-30 16:30:15 +02004912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, Darwin support excluded" >&5
4913printf "%s\n" "yes, Darwin support excluded" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004914 fi
4915
Illia Bobyra96d5442023-08-30 16:30:15 +02004916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-mac-arch argument" >&5
4917printf %s "checking --with-mac-arch argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00004918
4919# Check whether --with-mac-arch was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004920if test ${with_mac_arch+y}
4921then :
4922 withval=$with_mac_arch; MACARCH="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MACARCH" >&5
4923printf "%s\n" "$MACARCH" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02004924else case e in #(
4925 e) MACARCH="current"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $MACARCH" >&5
4926printf "%s\n" "defaulting to $MACARCH" >&6; } ;;
4927esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00004928fi
4929
4930
Illia Bobyra96d5442023-08-30 16:30:15 +02004931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-developer-dir argument" >&5
4932printf %s "checking --with-developer-dir argument... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004933
4934# Check whether --with-developer-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02004935if test ${with_developer_dir+y}
4936then :
4937 withval=$with_developer_dir; DEVELOPER_DIR="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4938printf "%s\n" "$DEVELOPER_DIR" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02004939else case e in #(
4940 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not present" >&5
4941printf "%s\n" "not present" >&6; } ;;
4942esac
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004943fi
4944
4945
4946 if test "x$DEVELOPER_DIR" = "x"; then
4947 # Extract the first word of "xcode-select", so it can be a program name with args.
4948set dummy xcode-select; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02004949{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4950printf %s "checking for $ac_word... " >&6; }
4951if test ${ac_cv_path_XCODE_SELECT+y}
4952then :
4953 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02004954else case e in #(
4955 e) case $XCODE_SELECT in
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004956 [\\/]* | ?:[\\/]*)
4957 ac_cv_path_XCODE_SELECT="$XCODE_SELECT" # Let the user override the test with a path.
4958 ;;
4959 *)
4960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4961for as_dir in $PATH
4962do
4963 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02004964 case $as_dir in #(((
4965 '') as_dir=./ ;;
4966 */) ;;
4967 *) as_dir=$as_dir/ ;;
4968 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004969 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02004970 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4971 ac_cv_path_XCODE_SELECT="$as_dir$ac_word$ac_exec_ext"
4972 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004973 break 2
4974 fi
4975done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02004976 done
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004977IFS=$as_save_IFS
4978
4979 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02004980esac ;;
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004981esac
4982fi
4983XCODE_SELECT=$ac_cv_path_XCODE_SELECT
4984if test -n "$XCODE_SELECT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XCODE_SELECT" >&5
4986printf "%s\n" "$XCODE_SELECT" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004987else
Illia Bobyra96d5442023-08-30 16:30:15 +02004988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4989printf "%s\n" "no" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004990fi
4991
4992
4993 if test "x$XCODE_SELECT" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02004994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for developer dir using xcode-select" >&5
4995printf %s "checking for developer dir using xcode-select... " >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004996 DEVELOPER_DIR=`$XCODE_SELECT -print-path`
Illia Bobyra96d5442023-08-30 16:30:15 +02004997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEVELOPER_DIR" >&5
4998printf "%s\n" "$DEVELOPER_DIR" >&6; }
Bram Moolenaar595a7be2010-03-10 16:28:12 +01004999 else
5000 DEVELOPER_DIR=/Developer
5001 fi
5002 fi
5003
Bram Moolenaar446cb832008-06-24 21:56:24 +00005004 if test "x$MACARCH" = "xboth"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 10.4 universal SDK" >&5
5006printf %s "checking for 10.4 universal SDK... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005007 save_cppflags="$CPPFLAGS"
5008 save_cflags="$CFLAGS"
5009 save_ldflags="$LDFLAGS"
Bram Moolenaar595a7be2010-03-10 16:28:12 +01005010 CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00005012/* end confdefs.h. */
5013
5014int
Illia Bobyra96d5442023-08-30 16:30:15 +02005015main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00005016{
5017
5018 ;
5019 return 0;
5020}
5021_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005022if ac_fn_c_try_link "$LINENO"
5023then :
5024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
5025printf "%s\n" "found" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005026else case e in #(
5027 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02005028printf "%s\n" "not found" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005029 CFLAGS="$save_cflags"
Illia Bobyra96d5442023-08-30 16:30:15 +02005030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Intel architecture is supported" >&5
5031printf %s "checking if Intel architecture is supported... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005032 CPPFLAGS="$CPPFLAGS -arch i386"
5033 LDFLAGS="$save_ldflags -arch i386"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00005035/* end confdefs.h. */
5036
5037int
Illia Bobyra96d5442023-08-30 16:30:15 +02005038main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +00005039{
5040
5041 ;
5042 return 0;
5043}
5044_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005045if ac_fn_c_try_link "$LINENO"
5046then :
5047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5048printf "%s\n" "yes" >&6; }; MACARCH="intel"
Christian Brabandt9670f612025-05-07 21:44:33 +02005049else case e in #(
5050 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02005051printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005052 MACARCH="ppc"
5053 CPPFLAGS="$save_cppflags -arch ppc"
Christian Brabandt9670f612025-05-07 21:44:33 +02005054 LDFLAGS="$save_ldflags -arch ppc" ;;
5055esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005056fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005057rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +02005058 conftest$ac_exeext conftest.$ac_ext ;;
5059esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005060fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005061rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005062 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00005063 elif test "x$MACARCH" = "xintel"; then
5064 CPPFLAGS="$CPPFLAGS -arch intel"
5065 LDFLAGS="$LDFLAGS -arch intel"
5066 elif test "x$MACARCH" = "xppc"; then
5067 CPPFLAGS="$CPPFLAGS -arch ppc"
5068 LDFLAGS="$LDFLAGS -arch ppc"
5069 fi
5070
5071 if test "$enable_darwin" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02005072 MACOS_X_DARWIN=yes
Bram Moolenaar164fca32010-07-14 13:58:07 +02005073 OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
Bram Moolenaar446cb832008-06-24 21:56:24 +00005074 OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
Illia Bobyra96d5442023-08-30 16:30:15 +02005075 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Bram Moolenaare5303952022-06-19 17:05:47 +01005076
Bram Moolenaard0573012017-10-28 21:11:06 +02005077 CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN"
Bram Moolenaar040f9752020-08-11 23:08:48 +02005078
Bram Moolenaar0b40d082022-03-08 13:32:37 +00005079 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 +02005080 with_x=no
5081 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02005082 fi
Bram Moolenaar097148e2020-08-11 21:58:20 +02005083else
Illia Bobyra96d5442023-08-30 16:30:15 +02005084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5085printf "%s\n" "no" >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +02005086fi
5087
Illia Bobyra96d5442023-08-30 16:30:15 +02005088ac_header= ac_cache=
5089for ac_item in $ac_header_c_list
5090do
5091 if test $ac_cache; then
5092 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
5093 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
5094 printf "%s\n" "#define $ac_item 1" >> confdefs.h
5095 fi
5096 ac_header= ac_cache=
5097 elif test $ac_header; then
5098 ac_cache=$ac_item
5099 else
5100 ac_header=$ac_item
5101 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005102done
5103
5104
Illia Bobyra96d5442023-08-30 16:30:15 +02005105
5106
5107
5108
5109
5110
5111if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
5112then :
5113
5114printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
Bram Moolenaar18e54692013-11-03 20:26:31 +01005115
Bram Moolenaar39766a72013-11-03 00:41:00 +01005116fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005117ac_fn_c_check_header_compile "$LINENO" "AvailabilityMacros.h" "ac_cv_header_AvailabilityMacros_h" "$ac_includes_default"
5118if test "x$ac_cv_header_AvailabilityMacros_h" = xyes
5119then :
5120 printf "%s\n" "#define HAVE_AVAILABILITYMACROS_H 1" >>confdefs.h
Bram Moolenaar39766a72013-11-03 00:41:00 +01005121
Illia Bobyra96d5442023-08-30 16:30:15 +02005122fi
Bram Moolenaar39766a72013-11-03 00:41:00 +01005123
Evan Miller25448072022-12-30 10:42:23 +00005124# 10.5 and earlier lack dispatch
Illia Bobyra96d5442023-08-30 16:30:15 +02005125ac_fn_c_check_header_compile "$LINENO" "dispatch/dispatch.h" "ac_cv_header_dispatch_dispatch_h" "$ac_includes_default"
5126if test "x$ac_cv_header_dispatch_dispatch_h" = xyes
5127then :
5128 printf "%s\n" "#define HAVE_DISPATCH_DISPATCH_H 1" >>confdefs.h
Evan Miller25448072022-12-30 10:42:23 +00005129
5130fi
5131
Bram Moolenaar39766a72013-11-03 00:41:00 +01005132
Bram Moolenaar071d4272004-06-13 20:20:40 +00005133
5134
5135
Bram Moolenaar446cb832008-06-24 21:56:24 +00005136if test "$cross_compiling" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-local-dir argument" >&5
5138printf %s "checking --with-local-dir argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005139 have_local_include=''
5140 have_local_lib=''
Bram Moolenaarc236c162008-07-13 17:41:49 +00005141
5142# Check whether --with-local-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005143if test ${with_local_dir+y}
5144then :
Bram Moolenaarc236c162008-07-13 17:41:49 +00005145 withval=$with_local_dir;
5146 local_dir="$withval"
5147 case "$withval" in
5148 */*) ;;
5149 no)
5150 # avoid adding local dir to LDFLAGS and CPPFLAGS
Bram Moolenaare06c1882010-07-21 22:05:20 +02005151 have_local_include=yes
Bram Moolenaarc236c162008-07-13 17:41:49 +00005152 have_local_lib=yes
5153 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +01005154 *) as_fn_error $? "must pass path argument to --with-local-dir" "$LINENO" 5 ;;
Bram Moolenaarc236c162008-07-13 17:41:49 +00005155 esac
Illia Bobyra96d5442023-08-30 16:30:15 +02005156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $local_dir" >&5
5157printf "%s\n" "$local_dir" >&6; }
Bram Moolenaarc236c162008-07-13 17:41:49 +00005158
Christian Brabandt9670f612025-05-07 21:44:33 +02005159else case e in #(
5160 e)
Bram Moolenaarc236c162008-07-13 17:41:49 +00005161 local_dir=/usr/local
Illia Bobyra96d5442023-08-30 16:30:15 +02005162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $local_dir" >&5
5163printf "%s\n" "Defaulting to $local_dir" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005164 ;;
5165esac
Bram Moolenaarc236c162008-07-13 17:41:49 +00005166fi
5167
5168 if test "$GCC" = yes -a "$local_dir" != no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00005169 echo 'void f(){}' > conftest.c
Bram Moolenaar0958e0f2013-11-04 04:57:50 +01005170 have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
Bram Moolenaarc236c162008-07-13 17:41:49 +00005171 have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
Bram Moolenaar446cb832008-06-24 21:56:24 +00005172 rm -f conftest.c conftest.o
Bram Moolenaar071d4272004-06-13 20:20:40 +00005173 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005174 if test -z "$have_local_lib" -a -d "${local_dir}/lib"; then
5175 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 +00005176 if test "$tt" = "$LDFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005177 LDFLAGS="$LDFLAGS -L${local_dir}/lib"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005178 fi
5179 fi
Bram Moolenaarc236c162008-07-13 17:41:49 +00005180 if test -z "$have_local_include" -a -d "${local_dir}/include"; then
5181 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 +00005182 if test "$tt" = "$CPPFLAGS"; then
Bram Moolenaarc236c162008-07-13 17:41:49 +00005183 CPPFLAGS="$CPPFLAGS -I${local_dir}/include"
Bram Moolenaar446cb832008-06-24 21:56:24 +00005184 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005185 fi
5186fi
5187
Illia Bobyra96d5442023-08-30 16:30:15 +02005188{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-vim-name argument" >&5
5189printf %s "checking --with-vim-name argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005190
Bram Moolenaar446cb832008-06-24 21:56:24 +00005191# Check whether --with-vim-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005192if test ${with_vim_name+y}
5193then :
5194 withval=$with_vim_name; VIMNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIMNAME" >&5
5195printf "%s\n" "$VIMNAME" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005196else case e in #(
5197 e) VIMNAME="vim"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to $VIMNAME" >&5
5198printf "%s\n" "Defaulting to $VIMNAME" >&6; } ;;
5199esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005200fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005201
5202
Illia Bobyra96d5442023-08-30 16:30:15 +02005203{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ex-name argument" >&5
5204printf %s "checking --with-ex-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005205
5206# Check whether --with-ex-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005207if test ${with_ex_name+y}
5208then :
5209 withval=$with_ex_name; EXNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXNAME" >&5
5210printf "%s\n" "$EXNAME" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005211else case e in #(
5212 e) EXNAME="ex"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to ex" >&5
5213printf "%s\n" "Defaulting to ex" >&6; } ;;
5214esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005215fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005216
5217
Illia Bobyra96d5442023-08-30 16:30:15 +02005218{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-view-name argument" >&5
5219printf %s "checking --with-view-name argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005220
5221# Check whether --with-view-name was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005222if test ${with_view_name+y}
5223then :
5224 withval=$with_view_name; VIEWNAME="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $VIEWNAME" >&5
5225printf "%s\n" "$VIEWNAME" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005226else case e in #(
5227 e) VIEWNAME="view"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to view" >&5
5228printf "%s\n" "Defaulting to view" >&6; } ;;
5229esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005230fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005231
5232
5233
Illia Bobyra96d5442023-08-30 16:30:15 +02005234{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-global-runtime argument" >&5
5235printf %s "checking --with-global-runtime argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005236
5237# Check whether --with-global-runtime was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005238if test ${with_global_runtime+y}
5239then :
5240 withval=$with_global_runtime; RUNTIME_GLOBAL="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5241printf "%s\n" "$withval" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005242else case e in #(
5243 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5244printf "%s\n" "no" >&6; } ;;
5245esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005246fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005247
5248
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005249if test "X$RUNTIME_GLOBAL" != "X"; then
5250 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 +02005251 printf "%s\n" "#define RUNTIME_GLOBAL \"$RUNTIME_GLOBAL\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005252
Illia Bobyra96d5442023-08-30 16:30:15 +02005253 printf "%s\n" "#define RUNTIME_GLOBAL_AFTER \"$RUNTIME_GLOBAL_AFTER\"" >>confdefs.h
Bram Moolenaar9d302ad2018-12-21 11:48:51 +01005254
5255fi
5256
Illia Bobyra96d5442023-08-30 16:30:15 +02005257{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-modified-by argument" >&5
5258printf %s "checking --with-modified-by argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005259
5260# Check whether --with-modified-by was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005261if test ${with_modified_by+y}
5262then :
5263 withval=$with_modified_by; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5264printf "%s\n" "$withval" >&6; }; printf "%s\n" "#define MODIFIED_BY \"$withval\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005265
Christian Brabandt9670f612025-05-07 21:44:33 +02005266else case e in #(
5267 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5268printf "%s\n" "no" >&6; } ;;
5269esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005270fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005271
Bram Moolenaar446cb832008-06-24 21:56:24 +00005272
Illia Bobyra96d5442023-08-30 16:30:15 +02005273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if character set is EBCDIC" >&5
5274printf %s "checking if character set is EBCDIC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005276/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00005277
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005278int
Illia Bobyra96d5442023-08-30 16:30:15 +02005279main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005280{
Bram Moolenaar071d4272004-06-13 20:20:40 +00005281 /* TryCompile function for CharSet.
5282 Treat any failure as ASCII for compatibility with existing art.
5283 Use compile-time rather than run-time tests for cross-compiler
5284 tolerance. */
5285#if '0'!=240
5286make an error "Character set is not EBCDIC"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005287#endif
5288 ;
5289 return 0;
5290}
5291_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005292if ac_fn_c_try_compile "$LINENO"
5293then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00005294 # TryCompile action if true
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005295cf_cv_ebcdic=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02005296else case e in #(
5297 e) # TryCompile action if false
5298cf_cv_ebcdic=no ;;
5299esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00005300fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005301rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00005302# end of TryCompile ])
5303# end of CacheVal CvEbcdic
Illia Bobyra96d5442023-08-30 16:30:15 +02005304{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cf_cv_ebcdic" >&5
5305printf "%s\n" "$cf_cv_ebcdic" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005306case "$cf_cv_ebcdic" in #(vi
Illia Bobyra96d5442023-08-30 16:30:15 +02005307 yes) printf "%s\n" "#define EBCDIC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005308
5309 line_break='"\\n"'
5310 ;;
5311 *) line_break='"\\012"';;
5312esac
5313
5314
5315if test "$cf_cv_ebcdic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005316{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for z/OS Unix" >&5
5317printf %s "checking for z/OS Unix... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00005318case $vim_cv_uname_output in
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005319 OS/390) zOSUnix="yes";
Bram Moolenaar071d4272004-06-13 20:20:40 +00005320 if test "$CC" = "cc"; then
5321 ccm="$_CC_CCMODE"
5322 ccn="CC"
5323 else
5324 if test "$CC" = "c89"; then
5325 ccm="$_CC_C89MODE"
5326 ccn="C89"
5327 else
5328 ccm=1
5329 fi
5330 fi
5331 if test "$ccm" != "1"; then
5332 echo ""
5333 echo "------------------------------------------"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005334 echo " On z/OS Unix, the environment variable"
Bram Moolenaar77c19352012-06-13 19:19:41 +02005335 echo " _CC_${ccn}MODE must be set to \"1\"!"
Bram Moolenaar071d4272004-06-13 20:20:40 +00005336 echo " Do:"
5337 echo " export _CC_${ccn}MODE=1"
5338 echo " and then call configure again."
5339 echo "------------------------------------------"
5340 exit 1
5341 fi
Bram Moolenaar77c19352012-06-13 19:19:41 +02005342 # Set CFLAGS for configure process.
5343 # This will be reset later for config.mk.
5344 # Use haltonmsg to force error for missing H files.
5345 CFLAGS="$CFLAGS -D_ALL_SOURCE -Wc,float(ieee),haltonmsg(3296)";
5346 LDFLAGS="$LDFLAGS -Wl,EDIT=NO"
Illia Bobyra96d5442023-08-30 16:30:15 +02005347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5348printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005349 ;;
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005350 *) zOSUnix="no";
Illia Bobyra96d5442023-08-30 16:30:15 +02005351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5352printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005353 ;;
5354esac
5355fi
5356
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005357if test "$zOSUnix" = "yes"; then
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005358 QUOTESED="sed -e 's/[\\\\\"]/\\\\\\\\&/g' -e 's/\\\\\\\\\"/\"/' -e 's/\\\\\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005359else
Bram Moolenaarabcbb0e2020-12-23 12:33:42 +01005360 QUOTESED="sed -e 's/[\\\\\"]/\\\\&/g' -e 's/\\\\\"/\"/' -e 's/\\\\\";\$\$/\";/' -e 's/ */ /g'"
Bram Moolenaar2c704a72010-06-03 21:17:25 +02005361fi
5362
5363
5364
Illia Bobyra96d5442023-08-30 16:30:15 +02005365{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-smack argument" >&5
5366printf %s "checking --disable-smack argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005367# Check whether --enable-smack was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005368if test ${enable_smack+y}
5369then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005370 enableval=$enable_smack;
Christian Brabandt9670f612025-05-07 21:44:33 +02005371else case e in #(
5372 e) enable_smack="yes" ;;
5373esac
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005374fi
5375
5376if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005377 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5378printf "%s\n" "no" >&6; }
5379 ac_fn_c_check_header_compile "$LINENO" "linux/xattr.h" "ac_cv_header_linux_xattr_h" "$ac_includes_default"
5380if test "x$ac_cv_header_linux_xattr_h" = xyes
5381then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005382 true
Christian Brabandt9670f612025-05-07 21:44:33 +02005383else case e in #(
5384 e) enable_smack="no" ;;
5385esac
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005386fi
5387
Bram Moolenaar4ed89cd2014-04-05 12:02:25 +02005388else
Illia Bobyra96d5442023-08-30 16:30:15 +02005389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5390printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005391fi
5392if test "$enable_smack" = "yes"; then
Illia Bobyr8c358e02023-09-30 22:57:19 +02005393 ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
5394if test "x$ac_cv_header_sys_xattr_h" = xyes
Illia Bobyra96d5442023-08-30 16:30:15 +02005395then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005396 true
Christian Brabandt9670f612025-05-07 21:44:33 +02005397else case e in #(
5398 e) enable_smack="no" ;;
5399esac
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005400fi
5401
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005402fi
5403if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XATTR_NAME_SMACKEXEC in linux/xattr.h" >&5
5405printf %s "checking for XATTR_NAME_SMACKEXEC in linux/xattr.h... " >&6; }
5406
Christian Brabandt9670f612025-05-07 21:44:33 +02005407{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5
5408printf %s "checking for egrep -e... " >&6; }
5409if test ${ac_cv_path_EGREP_TRADITIONAL+y}
5410then :
5411 printf %s "(cached) " >&6
5412else case e in #(
5413 e) if test -z "$EGREP_TRADITIONAL"; then
5414 ac_path_EGREP_TRADITIONAL_found=false
5415 # Loop through the user's path and test for each of PROGNAME-LIST
5416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5417for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5418do
5419 IFS=$as_save_IFS
5420 case $as_dir in #(((
5421 '') as_dir=./ ;;
5422 */) ;;
5423 *) as_dir=$as_dir/ ;;
5424 esac
5425 for ac_prog in grep ggrep
5426 do
5427 for ac_exec_ext in '' $ac_executable_extensions; do
5428 ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
5429 as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
5430# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
5431 # Check for GNU $ac_path_EGREP_TRADITIONAL
5432case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
5433*GNU*)
5434 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
5435#(
5436*)
5437 ac_count=0
5438 printf %s 0123456789 >"conftest.in"
5439 while :
5440 do
5441 cat "conftest.in" "conftest.in" >"conftest.tmp"
5442 mv "conftest.tmp" "conftest.in"
5443 cp "conftest.in" "conftest.nl"
5444 printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
5445 "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5446 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5447 as_fn_arith $ac_count + 1 && ac_count=$as_val
5448 if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
5449 # Best one so far, save it but keep looking for a better one
5450 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
5451 ac_path_EGREP_TRADITIONAL_max=$ac_count
5452 fi
5453 # 10*(2^10) chars as input seems more than enough
5454 test $ac_count -gt 10 && break
5455 done
5456 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5457esac
5458
5459 $ac_path_EGREP_TRADITIONAL_found && break 3
5460 done
5461 done
5462 done
5463IFS=$as_save_IFS
5464 if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
5465 :
5466 fi
5467else
5468 ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
5469fi
5470
5471 if test "$ac_cv_path_EGREP_TRADITIONAL"
5472then :
5473 ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E"
5474else case e in #(
5475 e) if test -z "$EGREP_TRADITIONAL"; then
5476 ac_path_EGREP_TRADITIONAL_found=false
5477 # Loop through the user's path and test for each of PROGNAME-LIST
5478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5479for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5480do
5481 IFS=$as_save_IFS
5482 case $as_dir in #(((
5483 '') as_dir=./ ;;
5484 */) ;;
5485 *) as_dir=$as_dir/ ;;
5486 esac
5487 for ac_prog in egrep
5488 do
5489 for ac_exec_ext in '' $ac_executable_extensions; do
5490 ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
5491 as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
5492# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
5493 # Check for GNU $ac_path_EGREP_TRADITIONAL
5494case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
5495*GNU*)
5496 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
5497#(
5498*)
5499 ac_count=0
5500 printf %s 0123456789 >"conftest.in"
5501 while :
5502 do
5503 cat "conftest.in" "conftest.in" >"conftest.tmp"
5504 mv "conftest.tmp" "conftest.in"
5505 cp "conftest.in" "conftest.nl"
5506 printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
5507 "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5508 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5509 as_fn_arith $ac_count + 1 && ac_count=$as_val
5510 if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
5511 # Best one so far, save it but keep looking for a better one
5512 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
5513 ac_path_EGREP_TRADITIONAL_max=$ac_count
5514 fi
5515 # 10*(2^10) chars as input seems more than enough
5516 test $ac_count -gt 10 && break
5517 done
5518 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5519esac
5520
5521 $ac_path_EGREP_TRADITIONAL_found && break 3
5522 done
5523 done
5524 done
5525IFS=$as_save_IFS
5526 if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
5527 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5528 fi
5529else
5530 ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
5531fi
5532 ;;
5533esac
5534fi ;;
5535esac
5536fi
5537{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5
5538printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; }
5539 EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL
5540
Illia Bobyra96d5442023-08-30 16:30:15 +02005541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005542/* end confdefs.h. */
5543#include <linux/xattr.h>
5544_ACEOF
5545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +02005546 $EGREP_TRADITIONAL "XATTR_NAME_SMACKEXEC" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +02005547then :
5548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5549printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005550else case e in #(
5551 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5552printf "%s\n" "no" >&6; }; enable_smack="no" ;;
5553esac
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005554fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005555rm -rf conftest*
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005556
5557fi
5558if test "$enable_smack" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for setxattr in -lattr" >&5
5560printf %s "checking for setxattr in -lattr... " >&6; }
5561if test ${ac_cv_lib_attr_setxattr+y}
5562then :
5563 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02005564else case e in #(
5565 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005566LIBS="-lattr $LIBS"
5567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5568/* end confdefs.h. */
5569
5570/* Override any GCC internal prototype to avoid an error.
5571 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02005572 builtin and then its argument prototype would still apply.
5573 The 'extern "C"' is for builds by C++ compilers;
5574 although this is not generally supported in C code supporting it here
5575 has little cost and some practical benefit (sr 110532). */
5576#ifdef __cplusplus
5577extern "C"
5578#endif
5579char setxattr (void);
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005580int
Illia Bobyra96d5442023-08-30 16:30:15 +02005581main (void)
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005582{
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005583return setxattr ();
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005584 ;
5585 return 0;
5586}
5587_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005588if ac_fn_c_try_link "$LINENO"
5589then :
Bram Moolenaarc09551a2014-04-10 11:09:17 +02005590 ac_cv_lib_attr_setxattr=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02005591else case e in #(
5592 e) ac_cv_lib_attr_setxattr=no ;;
5593esac
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005594fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005595rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005596 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02005597LIBS=$ac_check_lib_save_LIBS ;;
5598esac
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005599fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005600{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_setxattr" >&5
5601printf "%s\n" "$ac_cv_lib_attr_setxattr" >&6; }
5602if test "x$ac_cv_lib_attr_setxattr" = xyes
5603then :
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005604 LIBS="$LIBS -lattr"
5605 found_smack="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02005606 printf "%s\n" "#define HAVE_SMACK 1" >>confdefs.h
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005607
5608fi
5609
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005610fi
5611
5612if test "x$found_smack" = "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-selinux argument" >&5
5614printf %s "checking --disable-selinux argument... " >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005615 # Check whether --enable-selinux was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005616if test ${enable_selinux+y}
5617then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005618 enableval=$enable_selinux;
Christian Brabandt9670f612025-05-07 21:44:33 +02005619else case e in #(
5620 e) enable_selinux="yes" ;;
5621esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005622fi
5623
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005624 if test "$enable_selinux" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5626printf "%s\n" "no" >&6; }
5627 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for is_selinux_enabled in -lselinux" >&5
5628printf %s "checking for is_selinux_enabled in -lselinux... " >&6; }
5629if test ${ac_cv_lib_selinux_is_selinux_enabled+y}
5630then :
5631 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02005632else case e in #(
5633 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005634LIBS="-lselinux $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005636/* end confdefs.h. */
5637
Bram Moolenaar446cb832008-06-24 21:56:24 +00005638/* Override any GCC internal prototype to avoid an error.
5639 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02005640 builtin and then its argument prototype would still apply.
5641 The 'extern "C"' is for builds by C++ compilers;
5642 although this is not generally supported in C code supporting it here
5643 has little cost and some practical benefit (sr 110532). */
5644#ifdef __cplusplus
5645extern "C"
5646#endif
5647char is_selinux_enabled (void);
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005648int
Illia Bobyra96d5442023-08-30 16:30:15 +02005649main (void)
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005650{
Bram Moolenaar446cb832008-06-24 21:56:24 +00005651return is_selinux_enabled ();
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005652 ;
5653 return 0;
5654}
5655_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02005656if ac_fn_c_try_link "$LINENO"
5657then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005658 ac_cv_lib_selinux_is_selinux_enabled=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02005659else case e in #(
5660 e) ac_cv_lib_selinux_is_selinux_enabled=no ;;
5661esac
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005662fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005663rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02005664 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02005665LIBS=$ac_check_lib_save_LIBS ;;
5666esac
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005667fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005668{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
5669printf "%s\n" "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
5670if test "x$ac_cv_lib_selinux_is_selinux_enabled" = xyes
5671then :
5672 ac_fn_c_check_header_compile "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
5673if test "x$ac_cv_header_selinux_selinux_h" = xyes
5674then :
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005675 LIBS="$LIBS -lselinux"
Illia Bobyra96d5442023-08-30 16:30:15 +02005676 printf "%s\n" "#define HAVE_SELINUX 1" >>confdefs.h
Bram Moolenaare4b78e22017-12-07 22:29:11 +01005677
5678fi
5679
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005680fi
5681
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005682 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5684printf "%s\n" "yes" >&6; }
Bram Moolenaar5bd32f42014-04-02 14:05:38 +02005685 fi
Bram Moolenaar588ebeb2008-05-07 17:09:24 +00005686fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005687
Christian Brabandte085dfd2023-09-30 12:49:18 +02005688{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xattr argument" >&5
5689printf %s "checking --enable-xattr argument... " >&6; }
5690# Check whether --enable-xattr was given.
5691if test ${enable_xattr+y}
5692then :
5693 enableval=$enable_xattr;
Christian Brabandt9670f612025-05-07 21:44:33 +02005694else case e in #(
5695 e) enable_xattr="yes" ;;
5696esac
Christian Brabandte085dfd2023-09-30 12:49:18 +02005697fi
5698
5699if test "$enable_xattr" = "yes"; then
5700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5701printf "%s\n" "yes" >&6; }
Illia Bobyr8c358e02023-09-30 22:57:19 +02005702 ac_fn_c_check_header_compile "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
5703if test "x$ac_cv_header_sys_xattr_h" = xyes
Christian Brabandte085dfd2023-09-30 12:49:18 +02005704then :
5705 printf "%s\n" "#define HAVE_XATTR 1" >>confdefs.h
5706
5707fi
5708
5709else
5710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5711printf "%s\n" "no" >&6; }
5712fi
5713
5714
Illia Bobyra96d5442023-08-30 16:30:15 +02005715{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-features argument" >&5
5716printf %s "checking --with-features argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005717
Bram Moolenaar446cb832008-06-24 21:56:24 +00005718# Check whether --with-features was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005719if test ${with_features+y}
5720then :
5721 withval=$with_features; features="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $features" >&5
5722printf "%s\n" "$features" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005723else case e in #(
5724 e) features="huge"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to huge" >&5
5725printf "%s\n" "Defaulting to huge" >&6; } ;;
5726esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005727fi
5728
Bram Moolenaar071d4272004-06-13 20:20:40 +00005729
Martin Tournoij7904fa42022-10-04 16:28:45 +01005730case "$features" in
Martin Tournoij25f3a142022-10-08 19:26:41 +01005731 small) features="tiny" ;;
5732 big) features="normal" ;;
Martin Tournoij7904fa42022-10-04 16:28:45 +01005733esac
5734
Bram Moolenaar071d4272004-06-13 20:20:40 +00005735dovimdiff=""
5736dogvimdiff=""
5737case "$features" in
Illia Bobyra96d5442023-08-30 16:30:15 +02005738 tiny) printf "%s\n" "#define FEAT_TINY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005739 ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005740 normal) printf "%s\n" "#define FEAT_NORMAL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005741 dovimdiff="installvimdiff";
5742 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005743 huge) printf "%s\n" "#define FEAT_HUGE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005744 dovimdiff="installvimdiff";
5745 dogvimdiff="installgvimdiff" ;;
Illia Bobyra96d5442023-08-30 16:30:15 +02005746 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $features is not supported" >&5
5747printf "%s\n" "Sorry, $features is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00005748esac
5749
5750
5751
5752
Martin Tournoij7904fa42022-10-04 16:28:45 +01005753if test "x$features" = "xtiny"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005754 has_eval=no
5755else
5756 has_eval=yes
5757fi
5758
Illia Bobyra96d5442023-08-30 16:30:15 +02005759{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-compiledby argument" >&5
5760printf %s "checking --with-compiledby argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00005761
Bram Moolenaar446cb832008-06-24 21:56:24 +00005762# Check whether --with-compiledby was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005763if test ${with_compiledby+y}
5764then :
5765 withval=$with_compiledby; compiledby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
5766printf "%s\n" "$withval" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005767else case e in #(
5768 e) compiledby=""; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5769printf "%s\n" "no" >&6; } ;;
5770esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005771fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00005772
5773
Bram Moolenaar446cb832008-06-24 21:56:24 +00005774
Illia Bobyra96d5442023-08-30 16:30:15 +02005775{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp argument" >&5
5776printf %s "checking --disable-xsmp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005777# Check whether --enable-xsmp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005778if test ${enable_xsmp+y}
5779then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005780 enableval=$enable_xsmp;
Christian Brabandt9670f612025-05-07 21:44:33 +02005781else case e in #(
5782 e) enable_xsmp="yes" ;;
5783esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005784fi
5785
Bram Moolenaar071d4272004-06-13 20:20:40 +00005786
5787if test "$enable_xsmp" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5789printf "%s\n" "no" >&6; }
5790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-xsmp-interact argument" >&5
5791printf %s "checking --disable-xsmp-interact argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00005792 # Check whether --enable-xsmp-interact was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005793if test ${enable_xsmp_interact+y}
5794then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00005795 enableval=$enable_xsmp_interact;
Christian Brabandt9670f612025-05-07 21:44:33 +02005796else case e in #(
5797 e) enable_xsmp_interact="yes" ;;
5798esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00005799fi
5800
Bram Moolenaar071d4272004-06-13 20:20:40 +00005801 if test "$enable_xsmp_interact" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5803printf "%s\n" "no" >&6; }
5804 printf "%s\n" "#define USE_XSMP_INTERACT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00005805
5806 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5808printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005809 fi
5810else
Illia Bobyra96d5442023-08-30 16:30:15 +02005811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5812printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00005813fi
5814
Illia Bobyra96d5442023-08-30 16:30:15 +02005815{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking diff feature" >&5
5816printf %s "checking diff feature... " >&6; }
Martin Tournoij7904fa42022-10-04 16:28:45 +01005817if test "x$features" = "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled in $features version" >&5
5819printf "%s\n" "disabled in $features version" >&6; }
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005820else
Illia Bobyra96d5442023-08-30 16:30:15 +02005821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
5822printf "%s\n" "enabled" >&6; }
5823 printf "%s\n" "#define FEAT_DIFF 1" >>confdefs.h
Bram Moolenaar67ffb412022-01-08 13:36:57 +00005824
5825 XDIFF_OBJS_USED="\$(XDIFF_OBJS)"
5826
5827fi
5828
Illia Bobyra96d5442023-08-30 16:30:15 +02005829{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-luainterp argument" >&5
5830printf %s "checking --enable-luainterp argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005831# Check whether --enable-luainterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005832if test ${enable_luainterp+y}
5833then :
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005834 enableval=$enable_luainterp;
Christian Brabandt9670f612025-05-07 21:44:33 +02005835else case e in #(
5836 e) enable_luainterp="no" ;;
5837esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005838fi
5839
Illia Bobyra96d5442023-08-30 16:30:15 +02005840{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_luainterp" >&5
5841printf "%s\n" "$enable_luainterp" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005842
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02005843if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00005844 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01005845 as_fn_error $? "cannot use Lua with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01005846 fi
5847
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005848
5849
Illia Bobyra96d5442023-08-30 16:30:15 +02005850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-lua-prefix argument" >&5
5851printf %s "checking --with-lua-prefix argument... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005852
5853# Check whether --with-lua_prefix was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005854if test ${with_lua_prefix+y}
5855then :
5856 withval=$with_lua_prefix; with_lua_prefix="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_lua_prefix" >&5
5857printf "%s\n" "$with_lua_prefix" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02005858else case e in #(
5859 e) with_lua_prefix="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5860printf "%s\n" "no" >&6; } ;;
5861esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005862fi
5863
5864
5865 if test "X$with_lua_prefix" != "X"; then
5866 vi_cv_path_lua_pfx="$with_lua_prefix"
5867 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LUA_PREFIX environment var" >&5
5869printf %s "checking LUA_PREFIX environment var... " >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005870 if test "X$LUA_PREFIX" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$LUA_PREFIX\"" >&5
5872printf "%s\n" "\"$LUA_PREFIX\"" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005873 vi_cv_path_lua_pfx="$LUA_PREFIX"
5874 else
Illia Bobyra96d5442023-08-30 16:30:15 +02005875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set, default to /usr" >&5
5876printf "%s\n" "not set, default to /usr" >&6; }
Bram Moolenaar0d2e4fc2010-07-18 12:35:47 +02005877 vi_cv_path_lua_pfx="/usr"
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005878 fi
5879 fi
5880
Illia Bobyra96d5442023-08-30 16:30:15 +02005881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-luajit" >&5
5882printf %s "checking --with-luajit... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005883
5884# Check whether --with-luajit was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02005885if test ${with_luajit+y}
5886then :
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005887 withval=$with_luajit; vi_cv_with_luajit="$withval"
Christian Brabandt9670f612025-05-07 21:44:33 +02005888else case e in #(
5889 e) vi_cv_with_luajit="no" ;;
5890esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005891fi
5892
Illia Bobyra96d5442023-08-30 16:30:15 +02005893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_with_luajit" >&5
5894printf "%s\n" "$vi_cv_with_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005895
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005896 LUA_INC=
5897 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005898 if test "x$vi_cv_with_luajit" != "xno"; then
5899 # Extract the first word of "luajit", so it can be a program name with args.
5900set dummy luajit; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005901{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5902printf %s "checking for $ac_word... " >&6; }
5903if test ${ac_cv_path_vi_cv_path_luajit+y}
5904then :
5905 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02005906else case e in #(
5907 e) case $vi_cv_path_luajit in
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005908 [\\/]* | ?:[\\/]*)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005909 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 +02005910 ;;
5911 *)
5912 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5913for as_dir in $PATH
5914do
5915 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005916 case $as_dir in #(((
5917 '') as_dir=./ ;;
5918 */) ;;
5919 *) as_dir=$as_dir/ ;;
5920 esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005921 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005922 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5923 ac_cv_path_vi_cv_path_luajit="$as_dir$ac_word$ac_exec_ext"
5924 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005925 break 2
5926 fi
5927done
5928 done
5929IFS=$as_save_IFS
5930
5931 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02005932esac ;;
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005933esac
5934fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005935vi_cv_path_luajit=$ac_cv_path_vi_cv_path_luajit
5936if test -n "$vi_cv_path_luajit"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_luajit" >&5
5938printf "%s\n" "$vi_cv_path_luajit" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005939else
Illia Bobyra96d5442023-08-30 16:30:15 +02005940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5941printf "%s\n" "no" >&6; }
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005942fi
5943
5944
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005945 if test "X$vi_cv_path_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02005946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LuaJIT version" >&5
5947printf %s "checking LuaJIT version... " >&6; }
5948if test ${vi_cv_version_luajit+y}
5949then :
5950 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02005951else case e in #(
5952 e) vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([0-9.]*\)\.[0-9]\(-*[a-z0-9]*\)* .*/\1/'` ;;
5953esac
Bram Moolenaar0ba04292010-07-14 23:23:17 +02005954fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005955{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_luajit" >&5
5956printf "%s\n" "$vi_cv_version_luajit" >&6; }
5957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version of LuaJIT" >&5
5958printf %s "checking Lua version of LuaJIT... " >&6; }
5959if test ${vi_cv_version_lua_luajit+y}
5960then :
5961 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02005962else case e in #(
5963 e) vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'` ;;
5964esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005965fi
Illia Bobyra96d5442023-08-30 16:30:15 +02005966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_lua_luajit" >&5
5967printf "%s\n" "$vi_cv_version_lua_luajit" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005968 vi_cv_path_lua="$vi_cv_path_luajit"
5969 vi_cv_version_lua="$vi_cv_version_lua_luajit"
5970 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02005971 else
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005972 # Extract the first word of "lua", so it can be a program name with args.
5973set dummy lua; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02005974{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5975printf %s "checking for $ac_word... " >&6; }
5976if test ${ac_cv_path_vi_cv_path_plain_lua+y}
5977then :
5978 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02005979else case e in #(
5980 e) case $vi_cv_path_plain_lua in
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005981 [\\/]* | ?:[\\/]*)
5982 ac_cv_path_vi_cv_path_plain_lua="$vi_cv_path_plain_lua" # Let the user override the test with a path.
5983 ;;
5984 *)
5985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5986for as_dir in $PATH
5987do
5988 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02005989 case $as_dir in #(((
5990 '') as_dir=./ ;;
5991 */) ;;
5992 *) as_dir=$as_dir/ ;;
5993 esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005994 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02005995 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5996 ac_cv_path_vi_cv_path_plain_lua="$as_dir$ac_word$ac_exec_ext"
5997 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaare855ccf2013-07-28 13:32:15 +02005998 break 2
5999 fi
6000done
6001 done
6002IFS=$as_save_IFS
6003
6004 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02006005esac ;;
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006006esac
6007fi
6008vi_cv_path_plain_lua=$ac_cv_path_vi_cv_path_plain_lua
6009if test -n "$vi_cv_path_plain_lua"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_plain_lua" >&5
6011printf "%s\n" "$vi_cv_path_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006012else
Illia Bobyra96d5442023-08-30 16:30:15 +02006013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6014printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006015fi
6016
6017
6018 if test "X$vi_cv_path_plain_lua" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
6020printf %s "checking Lua version... " >&6; }
6021if test ${vi_cv_version_plain_lua+y}
6022then :
6023 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02006024else case e in #(
6025 e) vi_cv_version_plain_lua=`${vi_cv_path_plain_lua} -e "print(_VERSION)" | sed 's/.* //'` ;;
6026esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006027fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006028{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_version_plain_lua" >&5
6029printf "%s\n" "$vi_cv_version_plain_lua" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006030 fi
6031 vi_cv_path_lua="$vi_cv_path_plain_lua"
6032 vi_cv_version_lua="$vi_cv_version_plain_lua"
6033 fi
6034 if test "x$vi_cv_with_luajit" != "xno" && test "X$vi_cv_version_luajit" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006035 { 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
6036printf %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 +01006037 if test -f "$vi_cv_path_lua_pfx/include/luajit-$vi_cv_version_luajit/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6039printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006040 LUA_INC=/luajit-$vi_cv_version_luajit
6041 fi
6042 fi
6043 if test "X$LUA_INC" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $vi_cv_path_lua_pfx/include" >&5
6045printf %s "checking if lua.h can be found in $vi_cv_path_lua_pfx/include... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01006046 if test -f "$vi_cv_path_lua_pfx/include/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6048printf "%s\n" "yes" >&6; }
Bram Moolenaar1e91f262012-10-03 14:48:08 +02006049 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6051printf "%s\n" "no" >&6; }
6052 { 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
6053printf %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 +01006054 if test -f "$vi_cv_path_lua_pfx/include/lua$vi_cv_version_lua/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6056printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006057 LUA_INC=/lua$vi_cv_version_lua
6058 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006059 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6060printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02006061
6062 # Detect moonjit:
6063 # https://groups.google.com/forum/#!topic/vim_use/O0vek60WuTk
6064 lua_suf=/moonjit-2.3
6065 inc_path="$vi_cv_path_lua_pfx/include"
Bram Moolenaarad4dc832020-04-20 16:21:53 +02006066 for dir in "$inc_path"/moonjit-[0-9]* ; do
Bram Moolenaarf49e5642020-04-19 17:46:53 +02006067 if test -d "$dir" ; then
Bram Moolenaara79a8942020-12-17 20:50:25 +01006068 lua_suf=`basename "$dir"`
Bram Moolenaarf49e5642020-04-19 17:46:53 +02006069 lua_suf="/$lua_suf"
6070 break
6071 fi
6072 done
Illia Bobyra96d5442023-08-30 16:30:15 +02006073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if lua.h can be found in $inc_path$lua_suf" >&5
6074printf %s "checking if lua.h can be found in $inc_path$lua_suf... " >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02006075 if test -f "$inc_path$lua_suf/lua.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6077printf "%s\n" "yes" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02006078 LUA_INC=$lua_suf
6079 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6081printf "%s\n" "no" >&6; }
Bram Moolenaarf49e5642020-04-19 17:46:53 +02006082 vi_cv_path_lua_pfx=
6083 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006084 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02006085 fi
6086 fi
6087 fi
6088
6089 if test "X$vi_cv_path_lua_pfx" != "X"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006090 if test "x$vi_cv_with_luajit" != "xno"; then
6091 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
6092 if test "X$multiarch" != "X"; then
6093 lib_multiarch="lib/${multiarch}"
6094 else
6095 lib_multiarch="lib"
6096 fi
6097 if test "X$vi_cv_version_lua" = "X"; then
6098 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit"
6099 else
6100 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${lib_multiarch} -lluajit-$vi_cv_version_lua"
6101 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02006102 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01006103 if test -d "${vi_cv_path_lua_pfx}/lib/lua$vi_cv_version_lua"; then
6104 LUALIBDIR="lib/lua$vi_cv_version_lua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006105 else
Bram Moolenaar869113f2023-03-31 21:29:00 +01006106 LUALIBDIR=lib
6107 fi
6108 if test "X$LUA_INC" != "X"; then
6109 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua$vi_cv_version_lua"
6110 else
6111 LUA_LIBS="-L${vi_cv_path_lua_pfx}/${LUALIBDIR} -llua"
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006112 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02006113 fi
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02006114 if test "$enable_luainterp" = "dynamic"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006115 lua_ok="yes"
6116 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if link with ${LUA_LIBS} is sane" >&5
6118printf %s "checking if link with ${LUA_LIBS} is sane... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006119 libs_save=$LIBS
6120 LIBS="$LIBS $LUA_LIBS"
6121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6122/* end confdefs.h. */
6123
6124int
Illia Bobyra96d5442023-08-30 16:30:15 +02006125main (void)
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006126{
6127
6128 ;
6129 return 0;
6130}
6131_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006132if ac_fn_c_try_link "$LINENO"
6133then :
6134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6135printf "%s\n" "yes" >&6; }; lua_ok="yes"
Christian Brabandt9670f612025-05-07 21:44:33 +02006136else case e in #(
6137 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6138printf "%s\n" "no" >&6; }; lua_ok="no"; LUA_LIBS="" ;;
6139esac
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006140fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006141rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006142 conftest$ac_exeext conftest.$ac_ext
6143 LIBS=$libs_save
6144 fi
6145 if test "x$lua_ok" = "xyes"; then
6146 LUA_CFLAGS="-I${vi_cv_path_lua_pfx}/include${LUA_INC}"
6147 LUA_SRC="if_lua.c"
6148 LUA_OBJ="objects/if_lua.o"
6149 LUA_PRO="if_lua.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006150 printf "%s\n" "#define FEAT_LUA 1" >>confdefs.h
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006151
6152 fi
6153 if test "$enable_luainterp" = "dynamic"; then
6154 if test "x$vi_cv_with_luajit" != "xno"; then
6155 luajit="jit"
6156 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02006157 if test -f "${vi_cv_path_lua_pfx}/bin/cyglua-${vi_cv_version_lua}.dll"; then
6158 vi_cv_dll_name_lua="cyglua-${vi_cv_version_lua}.dll"
6159 else
Bram Moolenaard0573012017-10-28 21:11:06 +02006160 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006161 ext="dylib"
6162 indexes=""
6163 else
6164 ext="so"
6165 indexes=".0 .1 .2 .3 .4 .5 .6 .7 .8 .9"
6166 multiarch=`dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null`
6167 if test "X$multiarch" != "X"; then
6168 lib_multiarch="lib/${multiarch}"
6169 fi
Bram Moolenaar768baac2013-04-15 14:44:57 +02006170 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx" >&5
6172printf %s "checking if liblua${luajit}*.${ext}* can be found in $vi_cv_path_lua_pfx... " >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006173 for subdir in "${lib_multiarch}" lib64 lib; do
Bram Moolenaar768baac2013-04-15 14:44:57 +02006174 if test -z "$subdir"; then
6175 continue
6176 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006177 for sover in "${vi_cv_version_lua}.${ext}" "-${vi_cv_version_lua}.${ext}" \
6178 ".${vi_cv_version_lua}.${ext}" ".${ext}.${vi_cv_version_lua}"; do
6179 for i in $indexes ""; do
6180 if test -f "${vi_cv_path_lua_pfx}/${subdir}/liblua${luajit}${sover}$i"; then
Bram Moolenaar768baac2013-04-15 14:44:57 +02006181 sover2="$i"
6182 break 3
6183 fi
6184 done
Bram Moolenaar07e1da62013-02-06 19:49:43 +01006185 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006186 sover=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02006187 done
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006188 if test "X$sover" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6190printf "%s\n" "no" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006191 lua_ok="no"
6192 vi_cv_dll_name_lua="liblua${luajit}.${ext}"
6193 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6195printf "%s\n" "yes" >&6; }
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006196 lua_ok="yes"
6197 vi_cv_dll_name_lua="liblua${luajit}${sover}$sover2"
6198 fi
Bram Moolenaar1e91f262012-10-03 14:48:08 +02006199 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006200 printf "%s\n" "#define DYNAMIC_LUA 1" >>confdefs.h
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02006201
6202 LUA_LIBS=""
Bram Moolenaar1e91f262012-10-03 14:48:08 +02006203 LUA_CFLAGS="-DDYNAMIC_LUA_DLL=\\\"${vi_cv_dll_name_lua}\\\" $LUA_CFLAGS"
Bram Moolenaar2334b6d2010-07-22 21:32:16 +02006204 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006205 if test "X$LUA_CFLAGS$LUA_LIBS" != "X" && \
Bram Moolenaard0573012017-10-28 21:11:06 +02006206 test "x$MACOS_X" = "xyes" && test "x$vi_cv_with_luajit" != "xno" && \
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006207 test "$vim_cv_uname_m_output" = "x86_64"; then
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006208 LUA_LIBS="-pagezero_size 10000 -image_base 100000000 $LUA_LIBS"
6209 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02006210 fi
Bram Moolenaare855ccf2013-07-28 13:32:15 +02006211 if test "$fail_if_missing" = "yes" -a "$lua_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006212 as_fn_error $? "could not configure lua" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006213 fi
Bram Moolenaar0ba04292010-07-14 23:23:17 +02006214
6215
6216
6217
6218
ichizok8bb3fe42021-12-28 15:51:45 +00006219
Bram Moolenaar0ba04292010-07-14 23:23:17 +02006220fi
6221
6222
Illia Bobyra96d5442023-08-30 16:30:15 +02006223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-mzschemeinterp argument" >&5
6224printf %s "checking --enable-mzschemeinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006225# Check whether --enable-mzschemeinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006226if test ${enable_mzschemeinterp+y}
6227then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006228 enableval=$enable_mzschemeinterp;
Christian Brabandt9670f612025-05-07 21:44:33 +02006229else case e in #(
6230 e) enable_mzschemeinterp="no" ;;
6231esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00006232fi
6233
Illia Bobyra96d5442023-08-30 16:30:15 +02006234{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_mzschemeinterp" >&5
6235printf "%s\n" "$enable_mzschemeinterp" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006236
6237if test "$enable_mzschemeinterp" = "yes"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006238
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006239
Illia Bobyra96d5442023-08-30 16:30:15 +02006240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-plthome argument" >&5
6241printf %s "checking --with-plthome argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006242
Bram Moolenaar446cb832008-06-24 21:56:24 +00006243# Check whether --with-plthome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006244if test ${with_plthome+y}
6245then :
6246 withval=$with_plthome; with_plthome="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_plthome" >&5
6247printf "%s\n" "$with_plthome" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02006248else case e in #(
6249 e) with_plthome="";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
6250printf "%s\n" "\"no\"" >&6; } ;;
6251esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00006252fi
6253
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006254
6255 if test "X$with_plthome" != "X"; then
6256 vi_cv_path_mzscheme_pfx="$with_plthome"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006257 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006258 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PLTHOME environment var" >&5
6260printf %s "checking PLTHOME environment var... " >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006261 if test "X$PLTHOME" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$PLTHOME\"" >&5
6263printf "%s\n" "\"$PLTHOME\"" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006264 vi_cv_path_mzscheme_pfx="$PLTHOME"
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006265 vi_cv_path_mzscheme="${vi_cv_path_mzscheme_pfx}/bin/mzscheme"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006266 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
6268printf "%s\n" "not set" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006269 # Extract the first word of "mzscheme", so it can be a program name with args.
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006270set dummy mzscheme; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006271{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6272printf %s "checking for $ac_word... " >&6; }
6273if test ${ac_cv_path_vi_cv_path_mzscheme+y}
6274then :
6275 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02006276else case e in #(
6277 e) case $vi_cv_path_mzscheme in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006278 [\\/]* | ?:[\\/]*)
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006279 ac_cv_path_vi_cv_path_mzscheme="$vi_cv_path_mzscheme" # Let the user override the test with a path.
6280 ;;
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006281 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6283for as_dir in $PATH
6284do
6285 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006286 case $as_dir in #(((
6287 '') as_dir=./ ;;
6288 */) ;;
6289 *) as_dir=$as_dir/ ;;
6290 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006291 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006292 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6293 ac_cv_path_vi_cv_path_mzscheme="$as_dir$ac_word$ac_exec_ext"
6294 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006295 break 2
6296 fi
6297done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006298 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006299IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006300
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006301 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02006302esac ;;
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006303esac
6304fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006305vi_cv_path_mzscheme=$ac_cv_path_vi_cv_path_mzscheme
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006306if test -n "$vi_cv_path_mzscheme"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme" >&5
6308printf "%s\n" "$vi_cv_path_mzscheme" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006309else
Illia Bobyra96d5442023-08-30 16:30:15 +02006310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6311printf "%s\n" "no" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006312fi
6313
6314
Bram Moolenaar446cb832008-06-24 21:56:24 +00006315
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006316 if test "X$vi_cv_path_mzscheme" != "X"; then
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006317 lsout=`ls -l $vi_cv_path_mzscheme`
6318 if echo "$lsout" | grep -e '->' >/dev/null 2>/dev/null; then
6319 vi_cv_path_mzscheme=`echo "$lsout" | sed 's/.*-> \(.*\)/\1/'`
6320 fi
6321 fi
6322
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006323 if test "X$vi_cv_path_mzscheme" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking MzScheme install prefix" >&5
6325printf %s "checking MzScheme install prefix... " >&6; }
6326if test ${vi_cv_path_mzscheme_pfx+y}
6327then :
6328 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02006329else case e in #(
6330 e) echo "(display (simplify-path \
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006331 (build-path (call-with-values \
6332 (lambda () (split-path (find-system-path (quote exec-file)))) \
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006333 (lambda (base name must-be-dir?) base)) (quote up))))" > mzdirs.scm
6334 vi_cv_path_mzscheme_pfx=`${vi_cv_path_mzscheme} -r mzdirs.scm | \
Christian Brabandt9670f612025-05-07 21:44:33 +02006335 sed -e 's+/$++'` ;;
6336esac
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006337fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006338{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_mzscheme_pfx" >&5
6339printf "%s\n" "$vi_cv_path_mzscheme_pfx" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006340 rm -f mzdirs.scm
Bram Moolenaarc9b4b052006-04-30 18:54:39 +00006341 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006342 fi
6343 fi
6344
6345 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket include directory" >&5
6347printf %s "checking for racket include directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006348 SCHEME_INC=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-include-dir))) (when (path? p) (display p)))'`
6349 if test "X$SCHEME_INC" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_INC}" >&5
6351printf "%s\n" "${SCHEME_INC}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006352 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6354printf "%s\n" "not found" >&6; }
6355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include" >&5
6356printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006357 if test -f "$vi_cv_path_mzscheme_pfx/include/scheme.h"; then
6358 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include
Illia Bobyra96d5442023-08-30 16:30:15 +02006359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6360printf "%s\n" "yes" >&6; }
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006361 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6363printf "%s\n" "no" >&6; }
6364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt" >&5
6365printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/plt... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006366 if test -f "$vi_cv_path_mzscheme_pfx/include/plt/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6368printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006369 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/plt
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006370 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6372printf "%s\n" "no" >&6; }
6373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket" >&5
6374printf %s "checking if scheme.h can be found in $vi_cv_path_mzscheme_pfx/include/racket... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006375 if test -f "$vi_cv_path_mzscheme_pfx/include/racket/scheme.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6377printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006378 SCHEME_INC=${vi_cv_path_mzscheme_pfx}/include/racket
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006379 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6381printf "%s\n" "no" >&6; }
6382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/plt/" >&5
6383printf %s "checking if scheme.h can be found in /usr/include/plt/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006384 if test -f /usr/include/plt/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6386printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006387 SCHEME_INC=/usr/include/plt
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006388 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6390printf "%s\n" "no" >&6; }
6391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if scheme.h can be found in /usr/include/racket/" >&5
6392printf %s "checking if scheme.h can be found in /usr/include/racket/... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006393 if test -f /usr/include/racket/scheme.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6395printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006396 SCHEME_INC=/usr/include/racket
6397 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006398 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6399printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006400 vi_cv_path_mzscheme_pfx=
6401 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006402 fi
6403 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006404 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006405 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006406 fi
6407 fi
6408
6409 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006410
Illia Bobyra96d5442023-08-30 16:30:15 +02006411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket lib directory" >&5
6412printf %s "checking for racket lib directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006413 SCHEME_LIB=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-lib-dir))) (when (path? p) (display p)))'`
6414 if test "X$SCHEME_LIB" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_LIB}" >&5
6416printf "%s\n" "${SCHEME_LIB}" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006417 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6419printf "%s\n" "not found" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006420 fi
6421
6422 for path in "${vi_cv_path_mzscheme_pfx}/lib" "${SCHEME_LIB}"; do
6423 if test "X$path" != "X"; then
Bram Moolenaard0573012017-10-28 21:11:06 +02006424 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006425 MZSCHEME_LIBS="-framework Racket"
6426 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6427 elif test -f "${path}/libmzscheme3m.a"; then
6428 MZSCHEME_LIBS="${path}/libmzscheme3m.a"
6429 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6430 elif test -f "${path}/libracket3m.a"; then
6431 MZSCHEME_LIBS="${path}/libracket3m.a"
Bram Moolenaar588d2412020-10-03 14:24:19 +02006432 if test -f "${path}/librktio.a"; then
6433 MZSCHEME_LIBS="${MZSCHEME_LIBS} ${path}/librktio.a"
6434 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006435 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6436 elif test -f "${path}/libracket.a"; then
6437 MZSCHEME_LIBS="${path}/libracket.a ${path}/libmzgc.a"
6438 elif test -f "${path}/libmzscheme.a"; then
6439 MZSCHEME_LIBS="${path}/libmzscheme.a ${path}/libmzgc.a"
6440 else
6441 if test -f "${path}/libmzscheme3m.so"; then
6442 MZSCHEME_LIBS="-L${path} -lmzscheme3m"
6443 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6444 elif test -f "${path}/libracket3m.so"; then
6445 MZSCHEME_LIBS="-L${path} -lracket3m"
6446 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
6447 elif test -f "${path}/libracket.so"; then
6448 MZSCHEME_LIBS="-L${path} -lracket -lmzgc"
6449 else
6450 if test "$path" != "$SCHEME_LIB"; then
6451 continue
6452 fi
6453 MZSCHEME_LIBS="-L${path} -lmzscheme -lmzgc"
6454 fi
6455 if test "$GCC" = yes; then
6456 MZSCHEME_LIBS="${MZSCHEME_LIBS} -Wl,-rpath -Wl,${path}"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00006457 elif test "$vim_cv_uname_output" = SunOS &&
6458 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006459 MZSCHEME_LIBS="${MZSCHEME_LIBS} -R ${path}"
6460 fi
6461 fi
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006462 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006463 if test "X$MZSCHEME_LIBS" != "X"; then
6464 break
Bram Moolenaar2df6dcc2004-07-12 15:53:54 +00006465 fi
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006466 done
6467
Illia Bobyra96d5442023-08-30 16:30:15 +02006468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if racket requires -pthread" >&5
6469printf %s "checking if racket requires -pthread... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006470 if test "X$SCHEME_LIB" != "X" && $FGREP -e -pthread "$SCHEME_LIB/buildinfo" >/dev/null ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6472printf "%s\n" "yes" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006473 MZSCHEME_LIBS="${MZSCHEME_LIBS} -pthread"
6474 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -pthread"
6475 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6477printf "%s\n" "no" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006478 fi
6479
Illia Bobyra96d5442023-08-30 16:30:15 +02006480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket config directory" >&5
6481printf %s "checking for racket config directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006482 SCHEME_CONFIGDIR=`${vi_cv_path_mzscheme} -e '(require setup/dirs)(let ((p (find-config-dir))) (when (path? p) (display p)))'`
6483 if test "X$SCHEME_CONFIGDIR" != "X"; then
6484 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DMZSCHEME_CONFIGDIR='\"${SCHEME_CONFIGDIR}\"'"
Illia Bobyra96d5442023-08-30 16:30:15 +02006485 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_CONFIGDIR}" >&5
6486printf "%s\n" "${SCHEME_CONFIGDIR}" >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006487 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6489printf "%s\n" "not found" >&6; }
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006490 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006491
Illia Bobyra96d5442023-08-30 16:30:15 +02006492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for racket collects directory" >&5
6493printf %s "checking for racket collects directory... " >&6; }
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006494 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))))'`
6495 if test "X$SCHEME_COLLECTS" = "X"; then
6496 if test -d "$vi_cv_path_mzscheme_pfx/lib/plt/collects"; then
6497 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/plt/
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006498 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006499 if test -d "$vi_cv_path_mzscheme_pfx/lib/racket/collects"; then
6500 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/lib/racket/
Bram Moolenaar75676462013-01-30 14:55:42 +01006501 else
Bram Moolenaar4e640bd2016-01-16 16:20:38 +01006502 if test -d "$vi_cv_path_mzscheme_pfx/share/racket/collects"; then
6503 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/share/racket/
6504 else
6505 if test -d "$vi_cv_path_mzscheme_pfx/collects"; then
6506 SCHEME_COLLECTS=$vi_cv_path_mzscheme_pfx/
6507 fi
Bram Moolenaar75676462013-01-30 14:55:42 +01006508 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006509 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006510 fi
Bram Moolenaarff4a37e2007-05-06 13:18:29 +00006511 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006512 if test "X$SCHEME_COLLECTS" != "X" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006513 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${SCHEME_COLLECTS}" >&5
6514printf "%s\n" "${SCHEME_COLLECTS}" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006515 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6517printf "%s\n" "not found" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006518 fi
6519
Illia Bobyra96d5442023-08-30 16:30:15 +02006520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mzscheme_base.c" >&5
6521printf %s "checking for mzscheme_base.c... " >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006522 if test -f "${SCHEME_COLLECTS}collects/scheme/base.ss" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006523 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006524 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6525 MZSCHEME_MOD="++lib scheme/base"
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006526 else
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006527 if test -f "${SCHEME_COLLECTS}collects/scheme/base.rkt" ; then
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006528 MZSCHEME_EXTRA="mzscheme_base.c"
Bram Moolenaara2aa31a2014-02-23 22:52:40 +01006529 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/mzc"
6530 MZSCHEME_MOD="++lib scheme/base"
6531 else
6532 if test -f "${SCHEME_COLLECTS}collects/racket/base.rkt" ; then
6533 MZSCHEME_EXTRA="mzscheme_base.c"
6534 MZSCHEME_MZC="${vi_cv_path_mzscheme_pfx}/bin/raco ctool"
6535 MZSCHEME_MOD=""
6536 fi
Bram Moolenaar2d0860d2010-11-03 21:59:30 +01006537 fi
6538 fi
6539 if test "X$MZSCHEME_EXTRA" != "X" ; then
6540 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -DINCLUDE_MZSCHEME_BASE"
Illia Bobyra96d5442023-08-30 16:30:15 +02006541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: needed" >&5
6542printf "%s\n" "needed" >&6; }
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006543 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not needed" >&5
6545printf "%s\n" "not needed" >&6; }
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006546 fi
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006547
Illia Bobyra96d5442023-08-30 16:30:15 +02006548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ffi_type_void in -lffi" >&5
6549printf %s "checking for ffi_type_void in -lffi... " >&6; }
6550if test ${ac_cv_lib_ffi_ffi_type_void+y}
6551then :
6552 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02006553else case e in #(
6554 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar9e902192013-07-17 18:58:11 +02006555LIBS="-lffi $LIBS"
6556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6557/* end confdefs.h. */
6558
6559/* Override any GCC internal prototype to avoid an error.
6560 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02006561 builtin and then its argument prototype would still apply.
6562 The 'extern "C"' is for builds by C++ compilers;
6563 although this is not generally supported in C code supporting it here
6564 has little cost and some practical benefit (sr 110532). */
6565#ifdef __cplusplus
6566extern "C"
6567#endif
6568char ffi_type_void (void);
Bram Moolenaar9e902192013-07-17 18:58:11 +02006569int
Illia Bobyra96d5442023-08-30 16:30:15 +02006570main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006571{
6572return ffi_type_void ();
6573 ;
6574 return 0;
6575}
6576_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006577if ac_fn_c_try_link "$LINENO"
6578then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006579 ac_cv_lib_ffi_ffi_type_void=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02006580else case e in #(
6581 e) ac_cv_lib_ffi_ffi_type_void=no ;;
6582esac
Bram Moolenaar9e902192013-07-17 18:58:11 +02006583fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006584rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006585 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02006586LIBS=$ac_check_lib_save_LIBS ;;
6587esac
Bram Moolenaar9e902192013-07-17 18:58:11 +02006588fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006589{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_type_void" >&5
6590printf "%s\n" "$ac_cv_lib_ffi_ffi_type_void" >&6; }
6591if test "x$ac_cv_lib_ffi_ffi_type_void" = xyes
6592then :
Bram Moolenaar9e902192013-07-17 18:58:11 +02006593 MZSCHEME_LIBS="$MZSCHEME_LIBS -lffi"
6594fi
6595
6596
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006597 MZSCHEME_CFLAGS="${MZSCHEME_CFLAGS} -I${SCHEME_INC} \
Bram Moolenaarfe9fb922012-11-23 21:54:48 +01006598 -DMZSCHEME_COLLECTS='\"${SCHEME_COLLECTS}collects\"'"
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006599
Illia Bobyra96d5442023-08-30 16:30:15 +02006600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for MzScheme are sane" >&5
6601printf %s "checking if compile and link flags for MzScheme are sane... " >&6; }
Bram Moolenaar9e902192013-07-17 18:58:11 +02006602 cflags_save=$CFLAGS
6603 libs_save=$LIBS
6604 CFLAGS="$CFLAGS $MZSCHEME_CFLAGS"
6605 LIBS="$LIBS $MZSCHEME_LIBS"
6606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6607/* end confdefs.h. */
6608
6609int
Illia Bobyra96d5442023-08-30 16:30:15 +02006610main (void)
Bram Moolenaar9e902192013-07-17 18:58:11 +02006611{
6612
6613 ;
6614 return 0;
6615}
6616_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006617if ac_fn_c_try_link "$LINENO"
6618then :
6619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6620printf "%s\n" "yes" >&6; }; mzs_ok=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02006621else case e in #(
6622 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: MZSCHEME DISABLED" >&5
6623printf "%s\n" "no: MZSCHEME DISABLED" >&6; }; mzs_ok=no ;;
6624esac
Bram Moolenaar9e902192013-07-17 18:58:11 +02006625fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006626rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9e902192013-07-17 18:58:11 +02006627 conftest$ac_exeext conftest.$ac_ext
6628 CFLAGS=$cflags_save
6629 LIBS=$libs_save
6630 if test $mzs_ok = yes; then
6631 MZSCHEME_SRC="if_mzsch.c"
6632 MZSCHEME_OBJ="objects/if_mzsch.o"
6633 MZSCHEME_PRO="if_mzsch.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006634 printf "%s\n" "#define FEAT_MZSCHEME 1" >>confdefs.h
Bram Moolenaar9e902192013-07-17 18:58:11 +02006635
6636 else
6637 MZSCHEME_CFLAGS=
6638 MZSCHEME_LIBS=
6639 MZSCHEME_EXTRA=
6640 MZSCHEME_MZC=
6641 fi
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006642 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006643
6644
6645
6646
6647
Bram Moolenaar9e70cf12009-05-26 20:59:55 +00006648
6649
Bram Moolenaar325b7a22004-07-05 15:58:32 +00006650fi
6651
6652
Illia Bobyra96d5442023-08-30 16:30:15 +02006653{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-perlinterp argument" >&5
6654printf %s "checking --enable-perlinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006655# Check whether --enable-perlinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006656if test ${enable_perlinterp+y}
6657then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006658 enableval=$enable_perlinterp;
Christian Brabandt9670f612025-05-07 21:44:33 +02006659else case e in #(
6660 e) enable_perlinterp="no" ;;
6661esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00006662fi
6663
Illia Bobyra96d5442023-08-30 16:30:15 +02006664{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_perlinterp" >&5
6665printf "%s\n" "$enable_perlinterp" >&6; }
Bram Moolenaare06c1882010-07-21 22:05:20 +02006666if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006667 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006668 as_fn_error $? "cannot use Perl with tiny features" "$LINENO" 5
Bram Moolenaar3c124e32016-01-31 14:36:58 +01006669 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006670
Bram Moolenaar071d4272004-06-13 20:20:40 +00006671 # Extract the first word of "perl", so it can be a program name with args.
6672set dummy perl; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006673{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6674printf %s "checking for $ac_word... " >&6; }
6675if test ${ac_cv_path_vi_cv_path_perl+y}
6676then :
6677 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02006678else case e in #(
6679 e) case $vi_cv_path_perl in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006680 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006681 ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path.
6682 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006683 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6685for as_dir in $PATH
6686do
6687 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006688 case $as_dir in #(((
6689 '') as_dir=./ ;;
6690 */) ;;
6691 *) as_dir=$as_dir/ ;;
6692 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006693 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006694 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6695 ac_cv_path_vi_cv_path_perl="$as_dir$ac_word$ac_exec_ext"
6696 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006697 break 2
6698 fi
6699done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006700 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006701IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006702
Bram Moolenaar071d4272004-06-13 20:20:40 +00006703 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02006704esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006705esac
6706fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006707vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl
Bram Moolenaar071d4272004-06-13 20:20:40 +00006708if test -n "$vi_cv_path_perl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_perl" >&5
6710printf "%s\n" "$vi_cv_path_perl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006711else
Illia Bobyra96d5442023-08-30 16:30:15 +02006712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6713printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006714fi
6715
Bram Moolenaar446cb832008-06-24 21:56:24 +00006716
Bram Moolenaar071d4272004-06-13 20:20:40 +00006717 if test "X$vi_cv_path_perl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Perl version" >&5
6719printf %s "checking Perl version... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006720 if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
6721 eval `$vi_cv_path_perl -V:usethreads`
Bram Moolenaare06c1882010-07-21 22:05:20 +02006722 eval `$vi_cv_path_perl -V:libperl`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006723 if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
6724 badthreads=no
6725 else
6726 if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
6727 eval `$vi_cv_path_perl -V:use5005threads`
6728 if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
6729 badthreads=no
6730 else
6731 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&5
6733printf "%s\n" ">>> Perl > 5.6 with 5.5 threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006734 fi
6735 else
6736 badthreads=yes
Illia Bobyra96d5442023-08-30 16:30:15 +02006737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> Perl 5.5 with threads cannot be used <<<" >&5
6738printf "%s\n" ">>> Perl 5.5 with threads cannot be used <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006739 fi
6740 fi
6741 if test $badthreads = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
6743printf "%s\n" "OK" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006744 eval `$vi_cv_path_perl -V:shrpenv`
6745 if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
6746 shrpenv=""
6747 fi
6748 vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006749
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006750 vi_cv_perl_extutils=unknown_perl_extutils_path
Zdenek Dohnal1b1c9f22023-11-02 20:19:06 +01006751
6752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-xsubpp path" >&5
6753printf %s "checking --with-xsubpp path... " >&6; }
6754 vi_cv_perl_xsubpp=
6755
6756# Check whether --with-xsubpp was given.
6757if test ${with_xsubpp+y}
6758then :
6759 withval=$with_xsubpp;
6760 if test -f "$withval"
6761 then
6762 vi_cv_perl_xsubpp="$withval"
6763 fi
6764
6765fi
6766
6767
6768 if test "x$vi_cv_perl_xsubpp" = "x"
6769 then
6770 for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
6771 xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
6772 if test -f "$xsubpp_path"; then
6773 vi_cv_perl_xsubpp="$xsubpp_path"
6774 fi
6775 done
6776 fi
6777
6778 if test "x$vi_cv_perl_xsubpp" = "x"
6779 then
6780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty" >&5
6781printf "%s\n" "empty" >&6; }
6782 else
6783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_perl_xsubpp" >&5
6784printf "%s\n" "$vi_cv_perl_xsubpp" >&6; }
6785 fi
6786
Bram Moolenaard5f62b12014-08-17 17:05:44 +02006787
Christian Brabandt2f9aef42024-02-12 23:12:26 +01006788 perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
Bram Moolenaare8ff56b2017-09-14 23:06:23 +02006789 -e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
6790 -e 's/-fdebug-prefix-map[^ ]*//g' \
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006791 -e 's/-pipe //' \
Christian Brabandt2f9aef42024-02-12 23:12:26 +01006792 -e 's/-flto\(=auto\)\? //' \
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006793 -e 's/-W[^ ]*//g' \
Bram Moolenaar92021622017-10-12 12:33:43 +02006794 -e 's/-D_FORTIFY_SOURCE=.//g'`
Christian Brabandt9c0ff472024-05-11 20:18:21 +02006795 perllibs=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed -e 'ldopts' | \
Bram Moolenaar071d4272004-06-13 20:20:40 +00006796 sed -e '/Warning/d' -e '/Note (probably harmless)/d' \
Christian Brabandt9c0ff472024-05-11 20:18:21 +02006797 -e 's/-specs=[^ ]*//g' \
Bram Moolenaar071d4272004-06-13 20:20:40 +00006798 -e 's/-bE:perl.exp//' -e 's/-lc //'`
Christian Brabandt9c0ff472024-05-11 20:18:21 +02006799 perlldflags=`cd $srcdir; $vi_cv_path_perl -MExtUtils::Embed \
6800 -e 'ccdlflags' | sed -e 's/-bE:perl.exp//' \
6801 -e 's/-specs=[^ ]*//g' `
Bram Moolenaar071d4272004-06-13 20:20:40 +00006802
Illia Bobyra96d5442023-08-30 16:30:15 +02006803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Perl are sane" >&5
6804printf %s "checking if compile and link flags for Perl are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006805 cflags_save=$CFLAGS
6806 libs_save=$LIBS
6807 ldflags_save=$LDFLAGS
6808 CFLAGS="$CFLAGS $perlcppflags"
6809 LIBS="$LIBS $perllibs"
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006810 perlldflags=`echo "$perlldflags" | sed -e 's/^ *//g'`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006811 LDFLAGS="$perlldflags $LDFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006813/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00006814
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006815int
Illia Bobyra96d5442023-08-30 16:30:15 +02006816main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006817{
6818
6819 ;
6820 return 0;
6821}
6822_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02006823if ac_fn_c_try_link "$LINENO"
6824then :
6825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6826printf "%s\n" "yes" >&6; }; perl_ok=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02006827else case e in #(
6828 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PERL DISABLED" >&5
6829printf "%s\n" "no: PERL DISABLED" >&6; }; perl_ok=no ;;
6830esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00006831fi
Illia Bobyra96d5442023-08-30 16:30:15 +02006832rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006833 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00006834 CFLAGS=$cflags_save
6835 LIBS=$libs_save
6836 LDFLAGS=$ldflags_save
6837 if test $perl_ok = yes; then
6838 if test "X$perlcppflags" != "X"; then
Bram Moolenaar1ec96c92017-09-27 21:42:08 +02006839 PERL_CFLAGS=$perlcppflags
Bram Moolenaar071d4272004-06-13 20:20:40 +00006840 fi
6841 if test "X$perlldflags" != "X"; then
Bram Moolenaar2bcaec32014-03-27 18:51:11 +01006842 if test "X`echo \"$LDFLAGS\" | $FGREP -e \"$perlldflags\"`" = "X"; then
Bram Moolenaara6cc0312013-06-18 23:31:55 +02006843 LDFLAGS="$perlldflags $LDFLAGS"
6844 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006845 fi
6846 PERL_LIBS=$perllibs
6847 PERL_SRC="auto/if_perl.c if_perlsfio.c"
6848 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o"
6849 PERL_PRO="if_perl.pro if_perlsfio.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02006850 printf "%s\n" "#define FEAT_PERL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00006851
6852 fi
6853 fi
6854 else
Illia Bobyra96d5442023-08-30 16:30:15 +02006855 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: >>> too old; need Perl version 5.003_01 or later <<<" >&5
6856printf "%s\n" ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006857 fi
6858 fi
6859
Bram Moolenaard0573012017-10-28 21:11:06 +02006860 if test "x$MACOS_X" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00006861 dir=/System/Library/Perl
6862 darwindir=$dir/darwin
6863 if test -d $darwindir; then
6864 PERL=/usr/bin/perl
6865 else
6866 dir=/System/Library/Perl/5.8.1
6867 darwindir=$dir/darwin-thread-multi-2level
6868 if test -d $darwindir; then
6869 PERL=/usr/bin/perl
6870 fi
6871 fi
6872 if test -n "$PERL"; then
6873 PERL_DIR="$dir"
6874 PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
6875 PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
6876 PERL_LIBS="-L$darwindir/CORE -lperl"
6877 fi
Bram Moolenaar5dff57d2010-07-24 16:19:44 +02006878 PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
6879 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 +00006880 fi
Bram Moolenaare06c1882010-07-21 22:05:20 +02006881 if test "$enable_perlinterp" = "dynamic"; then
6882 if test "$perl_ok" = "yes" -a "X$libperl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006883 printf "%s\n" "#define DYNAMIC_PERL 1" >>confdefs.h
Bram Moolenaare06c1882010-07-21 22:05:20 +02006884
6885 PERL_CFLAGS="-DDYNAMIC_PERL_DLL=\\\"$libperl\\\" $PERL_CFLAGS"
Christian Brabandt55460da2023-08-29 21:31:28 +02006886 PERL_LIBS=""
Bram Moolenaare06c1882010-07-21 22:05:20 +02006887 fi
6888 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01006889
6890 if test "$fail_if_missing" = "yes" -a "$perl_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01006891 as_fn_error $? "could not configure perl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01006892 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006893fi
6894
6895
6896
6897
6898
6899
6900
ichizok8bb3fe42021-12-28 15:51:45 +00006901
Illia Bobyra96d5442023-08-30 16:30:15 +02006902{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-pythoninterp argument" >&5
6903printf %s "checking --enable-pythoninterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00006904# Check whether --enable-pythoninterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006905if test ${enable_pythoninterp+y}
6906then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00006907 enableval=$enable_pythoninterp;
Christian Brabandt9670f612025-05-07 21:44:33 +02006908else case e in #(
6909 e) enable_pythoninterp="no" ;;
6910esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00006911fi
6912
Illia Bobyra96d5442023-08-30 16:30:15 +02006913{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_pythoninterp" >&5
6914printf "%s\n" "$enable_pythoninterp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02006915if test "$enable_pythoninterp" = "yes" -o "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00006916 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01006917 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01006918 fi
6919
Illia Bobyra96d5442023-08-30 16:30:15 +02006920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python-command argument" >&5
6921printf %s "checking --with-python-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02006922
6923
6924# Check whether --with-python-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02006925if test ${with_python_command+y}
6926then :
6927 withval=$with_python_command; vi_cv_path_python="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6928printf "%s\n" "$vi_cv_path_python" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02006929else case e in #(
6930 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6931printf "%s\n" "no" >&6; } ;;
6932esac
Bram Moolenaare1a32312018-04-15 16:03:25 +02006933fi
6934
6935
6936 if test "X$vi_cv_path_python" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006937 for ac_prog in python2 python
6938do
6939 # Extract the first word of "$ac_prog", so it can be a program name with args.
6940set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02006941{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6942printf %s "checking for $ac_word... " >&6; }
6943if test ${ac_cv_path_vi_cv_path_python+y}
6944then :
6945 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02006946else case e in #(
6947 e) case $vi_cv_path_python in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006948 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00006949 ac_cv_path_vi_cv_path_python="$vi_cv_path_python" # Let the user override the test with a path.
6950 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006951 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6953for as_dir in $PATH
6954do
6955 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02006956 case $as_dir in #(((
6957 '') as_dir=./ ;;
6958 */) ;;
6959 *) as_dir=$as_dir/ ;;
6960 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006961 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02006962 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6963 ac_cv_path_vi_cv_path_python="$as_dir$ac_word$ac_exec_ext"
6964 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006965 break 2
6966 fi
6967done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02006968 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00006969IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006970
Bram Moolenaar071d4272004-06-13 20:20:40 +00006971 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02006972esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00006973esac
6974fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00006975vi_cv_path_python=$ac_cv_path_vi_cv_path_python
Bram Moolenaar071d4272004-06-13 20:20:40 +00006976if test -n "$vi_cv_path_python"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02006977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python" >&5
6978printf "%s\n" "$vi_cv_path_python" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006979else
Illia Bobyra96d5442023-08-30 16:30:15 +02006980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6981printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00006982fi
6983
Bram Moolenaar446cb832008-06-24 21:56:24 +00006984
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01006985 test -n "$vi_cv_path_python" && break
6986done
6987
Bram Moolenaare1a32312018-04-15 16:03:25 +02006988 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00006989 if test "X$vi_cv_path_python" != "X"; then
6990
Illia Bobyra96d5442023-08-30 16:30:15 +02006991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
6992printf %s "checking Python version... " >&6; }
6993if test ${vi_cv_var_python_version+y}
6994then :
6995 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02006996else case e in #(
6997 e) vi_cv_var_python_version=`
Bram Moolenaar071d4272004-06-13 20:20:40 +00006998 ${vi_cv_path_python} -c 'import sys; print sys.version[:3]'`
Christian Brabandt9670f612025-05-07 21:44:33 +02006999 ;;
7000esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00007001fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007002{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python_version" >&5
7003printf "%s\n" "$vi_cv_var_python_version" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007004
Illia Bobyra96d5442023-08-30 16:30:15 +02007005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 2.3 or better" >&5
7006printf %s "checking Python is 2.3 or better... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007007 if ${vi_cv_path_python} -c \
Bram Moolenaarc09a6d62013-06-10 21:27:29 +02007008 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007009 then
Illia Bobyra96d5442023-08-30 16:30:15 +02007010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
7011printf "%s\n" "yep" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007012
Illia Bobyra96d5442023-08-30 16:30:15 +02007013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
7014printf %s "checking Python's install prefix... " >&6; }
7015if test ${vi_cv_path_python_pfx+y}
7016then :
7017 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007018else case e in #(
7019 e) vi_cv_path_python_pfx=`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007020 ${vi_cv_path_python} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007021 "import sys; print sys.prefix"` ;;
7022esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00007023fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007024{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_pfx" >&5
7025printf "%s\n" "$vi_cv_path_python_pfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007026
Illia Bobyra96d5442023-08-30 16:30:15 +02007027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
7028printf %s "checking Python's execution prefix... " >&6; }
7029if test ${vi_cv_path_python_epfx+y}
7030then :
7031 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007032else case e in #(
7033 e) vi_cv_path_python_epfx=`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007034 ${vi_cv_path_python} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007035 "import sys; print sys.exec_prefix"` ;;
7036esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00007037fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007038{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_epfx" >&5
7039printf "%s\n" "$vi_cv_path_python_epfx" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007040
Bram Moolenaar071d4272004-06-13 20:20:40 +00007041
Illia Bobyra96d5442023-08-30 16:30:15 +02007042 if test ${vi_cv_path_pythonpath+y}
7043then :
7044 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007045else case e in #(
7046 e) vi_cv_path_pythonpath=`
Bram Moolenaar071d4272004-06-13 20:20:40 +00007047 unset PYTHONPATH;
7048 ${vi_cv_path_python} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007049 "import sys, string; print string.join(sys.path,':')"` ;;
7050esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00007051fi
7052
7053
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007054
7055
Bram Moolenaar446cb832008-06-24 21:56:24 +00007056# Check whether --with-python-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007057if test ${with_python_config_dir+y}
7058then :
Bram Moolenaard0882402018-04-10 18:13:05 +02007059 withval=$with_python_config_dir; vi_cv_path_python_conf="${withval}"; have_python_config_dir=1
Bram Moolenaar446cb832008-06-24 21:56:24 +00007060fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007061
Bram Moolenaar446cb832008-06-24 21:56:24 +00007062
Illia Bobyra96d5442023-08-30 16:30:15 +02007063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
7064printf %s "checking Python's configuration directory... " >&6; }
7065if test ${vi_cv_path_python_conf+y}
7066then :
7067 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007068else case e in #(
7069 e)
Bram Moolenaar071d4272004-06-13 20:20:40 +00007070 vi_cv_path_python_conf=
Bram Moolenaarac499e32013-06-02 19:14:17 +02007071 d=`${vi_cv_path_python} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
7072 if test -d "$d" && test -f "$d/config.c"; then
7073 vi_cv_path_python_conf="$d"
7074 else
7075 for path in "${vi_cv_path_python_pfx}" "${vi_cv_path_python_epfx}"; do
7076 for subdir in lib64 lib share; do
7077 d="${path}/${subdir}/python${vi_cv_var_python_version}/config"
7078 if test -d "$d" && test -f "$d/config.c"; then
7079 vi_cv_path_python_conf="$d"
7080 fi
7081 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00007082 done
Bram Moolenaarac499e32013-06-02 19:14:17 +02007083 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02007084 ;;
7085esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007086fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007087{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python_conf" >&5
7088printf "%s\n" "$vi_cv_path_python_conf" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007089
7090 PYTHON_CONFDIR="${vi_cv_path_python_conf}"
7091
7092 if test "X$PYTHON_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
7094printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007095 else
7096
Illia Bobyra96d5442023-08-30 16:30:15 +02007097 if test ${vi_cv_path_python_plibs+y}
7098then :
7099 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007100else case e in #(
7101 e)
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00007102 pwd=`pwd`
7103 tmp_mkf="$pwd/config-PyMake$$"
7104 cat -- "${PYTHON_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007105__:
Bram Moolenaar218116c2010-05-20 21:46:00 +02007106 @echo "python_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007107 @echo "python_LIBS='$(LIBS)'"
7108 @echo "python_SYSLIBS='$(SYSLIBS)'"
7109 @echo "python_LINKFORSHARED='$(LINKFORSHARED)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02007110 @echo "python_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02007111 @echo "python_INSTSONAME='$(INSTSONAME)'"
Bram Moolenaar6c927552015-03-24 12:21:33 +01007112 @echo "python_PYTHONFRAMEWORK='$(PYTHONFRAMEWORK)'"
7113 @echo "python_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
7114 @echo "python_PYTHONFRAMEWORKINSTALLDIR='$(PYTHONFRAMEWORKINSTALLDIR)'"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007115eof
Bram Moolenaar01dd60c2008-07-24 14:24:48 +00007116 eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
7117 rm -f -- "${tmp_mkf}"
Bram Moolenaard0573012017-10-28 21:11:06 +02007118 if test "x$MACOS_X" = "xyes" && test -n "${python_PYTHONFRAMEWORK}" && ${vi_cv_path_python} -c \
Bram Moolenaar071d4272004-06-13 20:20:40 +00007119 "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
7120 vi_cv_path_python_plibs="-framework Python"
Bram Moolenaar6c927552015-03-24 12:21:33 +01007121 if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
7122 vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
7123 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007124 else
Bram Moolenaar9ce42132018-04-11 22:19:36 +02007125 vi_cv_path_python_plibs="-L${PYTHON_CONFDIR} -lpython${vi_cv_var_python_version}"
Bram Moolenaara161e262015-03-24 15:14:27 +01007126 if test -n "${python_LINKFORSHARED}" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
Bram Moolenaar6c927552015-03-24 12:21:33 +01007127 python_link_symbol=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t].*/\1/'`
7128 python_link_path=`echo ${python_LINKFORSHARED} | sed 's/\([^ \t][^ \t]*[ \t][ \t]*[^ \t][^ \t]*\)[ \t][ \t]*\(.*\)/\2/'`
7129 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
7130 python_link_path="${python_PYTHONFRAMEWORKPREFIX}/${python_link_path}"
7131 if test -n "${python_link_path}" && ! test -x "${python_link_path}"; then
7132 python_link_path="${python_PYTHONFRAMEWORKINSTALLDIR}/Versions/${vi_cv_var_python_version}/${python_PYTHONFRAMEWORK}"
7133 fi
7134 python_LINKFORSHARED="${python_link_symbol} ${python_link_path}"
7135 fi
7136 fi
Bram Moolenaar218116c2010-05-20 21:46:00 +02007137 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 +00007138 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
7139 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02007140 ;;
7141esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00007142fi
7143
Illia Bobyra96d5442023-08-30 16:30:15 +02007144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's dll name" >&5
7145printf %s "checking Python's dll name... " >&6; }
7146if test ${vi_cv_dll_name_python+y}
7147then :
7148 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007149else case e in #(
7150 e)
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007151 if test "X$python_DLLLIBRARY" != "X"; then
7152 vi_cv_dll_name_python="$python_DLLLIBRARY"
7153 else
7154 vi_cv_dll_name_python="$python_INSTSONAME"
7155 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02007156 ;;
7157esac
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007158fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007159{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python" >&5
7160printf "%s\n" "$vi_cv_dll_name_python" >&6; }
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007161
Bram Moolenaar071d4272004-06-13 20:20:40 +00007162 PYTHON_LIBS="${vi_cv_path_python_plibs}"
7163 if test "${vi_cv_path_python_pfx}" = "${vi_cv_path_python_epfx}"; then
Bram Moolenaar04249582018-04-10 13:29:34 +02007164 PYTHON_CFLAGS="-I${vi_cv_path_python_pfx}/include/python${vi_cv_var_python_version}"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007165 else
Bram Moolenaar04249582018-04-10 13:29:34 +02007166 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 +00007167 fi
Bram Moolenaar3a21d9c2018-04-10 20:26:20 +02007168 if test "X$have_python_config_dir" = "X1" -a "$enable_pythoninterp" = "dynamic"; then
Bram Moolenaard0882402018-04-10 18:13:05 +02007169 PYTHON_CFLAGS="${PYTHON_CFLAGS} -DPYTHON_HOME='\"${vi_cv_path_python_pfx}\"'"
7170
7171 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007172 PYTHON_SRC="if_python.c"
Bram Moolenaar9bdb9a02012-07-25 16:32:08 +02007173 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007174
Illia Bobyra96d5442023-08-30 16:30:15 +02007175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
7176printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007177 threadsafe_flag=
7178 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007179 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007180 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007181 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007182 threadsafe_flag="-D_THREAD_SAFE"
7183 thread_lib="-pthread"
7184 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007185 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007186 threadsafe_flag="-pthreads"
7187 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007188 fi
7189 libs_save_old=$LIBS
7190 if test -n "$threadsafe_flag"; then
7191 cflags_save=$CFLAGS
7192 CFLAGS="$CFLAGS $threadsafe_flag"
7193 LIBS="$LIBS $thread_lib"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007195/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00007196
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007197int
Illia Bobyra96d5442023-08-30 16:30:15 +02007198main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007199{
7200
7201 ;
7202 return 0;
7203}
7204_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007205if ac_fn_c_try_link "$LINENO"
7206then :
7207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7208printf "%s\n" "yes" >&6; }; PYTHON_CFLAGS="$PYTHON_CFLAGS $threadsafe_flag"
Christian Brabandt9670f612025-05-07 21:44:33 +02007209else case e in #(
7210 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02007211printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Christian Brabandt9670f612025-05-07 21:44:33 +02007212 ;;
7213esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00007214fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007215rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007216 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00007217 CFLAGS=$cflags_save
7218 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7220printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007221 fi
7222
Illia Bobyra96d5442023-08-30 16:30:15 +02007223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
7224printf %s "checking if compile and link flags for Python are sane... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007225 cflags_save=$CFLAGS
7226 libs_save=$LIBS
Bram Moolenaar69f787a2010-07-11 20:52:58 +02007227 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00007228 LIBS="$LIBS $PYTHON_LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007230/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00007231
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007232int
Illia Bobyra96d5442023-08-30 16:30:15 +02007233main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007234{
7235
7236 ;
7237 return 0;
7238}
7239_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007240if ac_fn_c_try_link "$LINENO"
7241then :
7242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7243printf "%s\n" "yes" >&6; }; python_ok=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02007244else case e in #(
7245 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON DISABLED" >&5
7246printf "%s\n" "no: PYTHON DISABLED" >&6; }; python_ok=no ;;
7247esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00007248fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007249rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02007250 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +00007251 CFLAGS=$cflags_save
7252 LIBS=$libs_save
7253 if test $python_ok = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007254 printf "%s\n" "#define FEAT_PYTHON 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00007255
7256 else
7257 LIBS=$libs_save_old
7258 PYTHON_SRC=
7259 PYTHON_OBJ=
7260 PYTHON_LIBS=
7261 PYTHON_CFLAGS=
7262 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007263 fi
7264 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
7266printf "%s\n" "too old" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007267 fi
7268 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01007269
7270 if test "$fail_if_missing" = "yes" -a "$python_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01007271 as_fn_error $? "could not configure python" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01007272 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00007273fi
7274
7275
7276
7277
7278
7279
7280
ichizok8bb3fe42021-12-28 15:51:45 +00007281
Illia Bobyra96d5442023-08-30 16:30:15 +02007282{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5
7283printf %s "checking --enable-python3interp argument... " >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007284# Check whether --enable-python3interp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007285if test ${enable_python3interp+y}
7286then :
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007287 enableval=$enable_python3interp;
Christian Brabandt9670f612025-05-07 21:44:33 +02007288else case e in #(
7289 e) enable_python3interp="no" ;;
7290esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007291fi
7292
Illia Bobyra96d5442023-08-30 16:30:15 +02007293{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
7294printf "%s\n" "$enable_python3interp" >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007295if test "$enable_python3interp" = "yes" -o "$enable_python3interp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00007296 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01007297 as_fn_error $? "cannot use Python with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01007298 fi
7299
Illia Bobyra96d5442023-08-30 16:30:15 +02007300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-command argument" >&5
7301printf %s "checking --with-python3-command argument... " >&6; }
Bram Moolenaare1a32312018-04-15 16:03:25 +02007302
7303
7304# Check whether --with-python3-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007305if test ${with_python3_command+y}
7306then :
7307 withval=$with_python3_command; vi_cv_path_python3="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
7308printf "%s\n" "$vi_cv_path_python3" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02007309else case e in #(
7310 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7311printf "%s\n" "no" >&6; } ;;
7312esac
Bram Moolenaare1a32312018-04-15 16:03:25 +02007313fi
7314
7315
7316 if test "X$vi_cv_path_python3" = "X"; then
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01007317 for ac_prog in python3 python
7318do
7319 # Extract the first word of "$ac_prog", so it can be a program name with args.
7320set dummy $ac_prog; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02007321{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7322printf %s "checking for $ac_word... " >&6; }
7323if test ${ac_cv_path_vi_cv_path_python3+y}
7324then :
7325 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007326else case e in #(
7327 e) case $vi_cv_path_python3 in
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007328 [\\/]* | ?:[\\/]*)
7329 ac_cv_path_vi_cv_path_python3="$vi_cv_path_python3" # Let the user override the test with a path.
7330 ;;
7331 *)
7332 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7333for as_dir in $PATH
7334do
7335 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02007336 case $as_dir in #(((
7337 '') as_dir=./ ;;
7338 */) ;;
7339 *) as_dir=$as_dir/ ;;
7340 esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007341 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02007342 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7343 ac_cv_path_vi_cv_path_python3="$as_dir$ac_word$ac_exec_ext"
7344 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007345 break 2
7346 fi
7347done
7348 done
7349IFS=$as_save_IFS
7350
7351 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02007352esac ;;
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007353esac
7354fi
7355vi_cv_path_python3=$ac_cv_path_vi_cv_path_python3
7356if test -n "$vi_cv_path_python3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
7358printf "%s\n" "$vi_cv_path_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007359else
Illia Bobyra96d5442023-08-30 16:30:15 +02007360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7361printf "%s\n" "no" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007362fi
7363
7364
Bram Moolenaar09ba6d72012-12-12 14:25:05 +01007365 test -n "$vi_cv_path_python3" && break
7366done
7367
Bram Moolenaare1a32312018-04-15 16:03:25 +02007368 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007369 if test "X$vi_cv_path_python3" != "X"; then
7370
Illia Bobyra96d5442023-08-30 16:30:15 +02007371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
7372printf %s "checking Python version... " >&6; }
7373if test ${vi_cv_var_python3_version+y}
7374then :
7375 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007376else case e in #(
7377 e) vi_cv_var_python3_version=`
Bram Moolenaar23c01922021-05-21 11:43:58 +02007378 ${vi_cv_path_python3} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'`
Christian Brabandt9670f612025-05-07 21:44:33 +02007379 ;;
7380esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007381fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007382{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
7383printf "%s\n" "$vi_cv_var_python3_version" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007384
Illia Bobyra96d5442023-08-30 16:30:15 +02007385 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python is 3.0 or better" >&5
7386printf %s "checking Python is 3.0 or better... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007387 if ${vi_cv_path_python3} -c \
7388 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.0)"
7389 then
Illia Bobyra96d5442023-08-30 16:30:15 +02007390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yep" >&5
7391printf "%s\n" "yep" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007392
Ken Takata1c032e32024-08-11 18:41:41 +02007393 python3_stable_abi_default=3.8
7394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-python3-stable-abi argument" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02007395printf %s "checking --with-python3-stable-abi argument... " >&6; }
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007396
7397
7398# Check whether --with-python3-stable-abi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007399if test ${with_python3_stable_abi+y}
7400then :
Ken Takata1c032e32024-08-11 18:41:41 +02007401 withval=$with_python3_stable_abi;
Christian Brabandt3f7024c2024-08-23 18:39:08 +02007402 if test "X$withval" = "Xyes"; then
7403 vi_cv_var_python3_stable_abi=$python3_stable_abi_default
7404 else
7405 vi_cv_var_python3_stable_abi="$withval"
7406 fi
7407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_stable_abi" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02007408printf "%s\n" "$vi_cv_var_python3_stable_abi" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02007409else case e in #(
7410 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7411printf "%s\n" "no" >&6; } ;;
7412esac
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007413fi
7414
Christian Brabandt3f7024c2024-08-23 18:39:08 +02007415 if test "X$vi_cv_var_python3_stable_abi" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007416 if test ${vi_cv_var_python3_stable_abi_hex+y}
7417then :
7418 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007419else case e in #(
7420 e)
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007421 vi_cv_var_python3_stable_abi_hex=`
7422 ${vi_cv_path_python3} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007423 "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) ))"` ;;
7424esac
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007425fi
7426
Yee Cheng Chine7d79eb2023-09-16 13:38:26 +02007427 if test "X$vi_cv_var_python3_stable_abi_hex" = "X"; then
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007428 as_fn_error $? "can't parse Python 3 stable ABI version. It should be \"<major>.<minor>\"" "$LINENO" 5
7429 fi
7430 fi
7431
Illia Bobyra96d5442023-08-30 16:30:15 +02007432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's abiflags" >&5
7433printf %s "checking Python's abiflags... " >&6; }
7434if test ${vi_cv_var_python3_abiflags+y}
7435then :
7436 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007437else case e in #(
7438 e)
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007439 vi_cv_var_python3_abiflags=
7440 if ${vi_cv_path_python3} -c \
7441 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)"
7442 then
7443 vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \
7444 "import sys; print(sys.abiflags)"`
Christian Brabandt9670f612025-05-07 21:44:33 +02007445 fi ;;
7446esac
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007447fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007448{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_abiflags" >&5
7449printf "%s\n" "$vi_cv_var_python3_abiflags" >&6; }
Bram Moolenaar456f2bb2011-06-12 21:37:13 +02007450
Illia Bobyra96d5442023-08-30 16:30:15 +02007451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
7452printf %s "checking Python's install prefix... " >&6; }
7453if test ${vi_cv_path_python3_pfx+y}
7454then :
7455 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007456else case e in #(
7457 e) vi_cv_path_python3_pfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007458 ${vi_cv_path_python3} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007459 "import sys; print(sys.prefix)"` ;;
7460esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007461fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007462{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
7463printf "%s\n" "$vi_cv_path_python3_pfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007464
Illia Bobyra96d5442023-08-30 16:30:15 +02007465 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
7466printf %s "checking Python's execution prefix... " >&6; }
7467if test ${vi_cv_path_python3_epfx+y}
7468then :
7469 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007470else case e in #(
7471 e) vi_cv_path_python3_epfx=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007472 ${vi_cv_path_python3} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007473 "import sys; print(sys.exec_prefix)"` ;;
7474esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007475fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007476{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
7477printf "%s\n" "$vi_cv_path_python3_epfx" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007478
Illia Bobyra96d5442023-08-30 16:30:15 +02007479 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7480printf %s "checking Python's include path... " >&6; }
7481if test ${vi_cv_path_python3_include+y}
7482then :
7483 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007484else case e in #(
7485 e) vi_cv_path_python3_include=`
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007486 ${vi_cv_path_python3} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007487 "import sysconfig; print(sysconfig.get_path(\"include\"))"` ;;
7488esac
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007489fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007490{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_include" >&5
7491printf "%s\n" "$vi_cv_path_python3_include" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007492
Illia Bobyra96d5442023-08-30 16:30:15 +02007493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's include path" >&5
7494printf %s "checking Python's include path... " >&6; }
7495if test ${vi_cv_path_python3_platinclude+y}
7496then :
7497 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007498else case e in #(
7499 e) vi_cv_path_python3_platinclude=`
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007500 ${vi_cv_path_python3} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007501 "import sysconfig; print(sysconfig.get_path(\"platinclude\"))"` ;;
7502esac
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007503fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007504{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_platinclude" >&5
7505printf "%s\n" "$vi_cv_path_python3_platinclude" >&6; }
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007506
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007507
Illia Bobyra96d5442023-08-30 16:30:15 +02007508 if test ${vi_cv_path_python3path+y}
7509then :
7510 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007511else case e in #(
7512 e) vi_cv_path_python3path=`
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007513 unset PYTHONPATH;
7514 ${vi_cv_path_python3} -c \
Christian Brabandt9670f612025-05-07 21:44:33 +02007515 "import sys, string; print(':'.join(sys.path))"` ;;
7516esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007517fi
7518
7519
7520
7521
7522# Check whether --with-python3-config-dir was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007523if test ${with_python3_config_dir+y}
7524then :
Bram Moolenaard0882402018-04-10 18:13:05 +02007525 withval=$with_python3_config_dir; vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007526fi
7527
7528
Illia Bobyra96d5442023-08-30 16:30:15 +02007529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
7530printf %s "checking Python's configuration directory... " >&6; }
7531if test ${vi_cv_path_python3_conf+y}
7532then :
7533 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007534else case e in #(
7535 e)
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007536 vi_cv_path_python3_conf=
Bram Moolenaarfee496d2013-07-12 20:07:24 +02007537 config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}"
Zdenek Dohnal31e299c2021-06-10 18:50:55 +02007538 d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null`
7539 if test "x$d" = "x"; then
7540 d=`${vi_cv_path_python3} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBPL'))"`
7541 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007542 if test -d "$d" && test -f "$d/config.c"; then
7543 vi_cv_path_python3_conf="$d"
7544 else
7545 for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
7546 for subdir in lib64 lib share; do
7547 d="${path}/${subdir}/python${vi_cv_var_python3_version}/${config_dir}"
7548 if test -d "$d" && test -f "$d/config.c"; then
7549 vi_cv_path_python3_conf="$d"
7550 fi
7551 done
7552 done
7553 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02007554 ;;
7555esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007556fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007557{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
7558printf "%s\n" "$vi_cv_path_python3_conf" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007559
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007560 PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007561
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007562 if test "X$PYTHON3_CONFDIR" = "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
7564printf "%s\n" "can't find it!" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007565 else
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007566
Illia Bobyra96d5442023-08-30 16:30:15 +02007567 if test ${vi_cv_path_python3_plibs+y}
7568then :
7569 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007570else case e in #(
7571 e)
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007572 pwd=`pwd`
7573 tmp_mkf="$pwd/config-PyMake$$"
7574 cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007575__:
Bram Moolenaar3804aeb2010-07-19 21:18:54 +02007576 @echo "python3_BASEMODLIBS='$(BASEMODLIBS)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007577 @echo "python3_LIBS='$(LIBS)'"
7578 @echo "python3_SYSLIBS='$(SYSLIBS)'"
Bram Moolenaarf94a13c2012-09-21 13:26:49 +02007579 @echo "python3_DLLLIBRARY='$(DLLLIBRARY)'"
Bram Moolenaar2a7e2a62010-07-24 15:19:11 +02007580 @echo "python3_INSTSONAME='$(INSTSONAME)'"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007581 @echo "python3_PYTHONFRAMEWORKPREFIX='$(PYTHONFRAMEWORKPREFIX)'"
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007582eof
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007583 eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
7584 rm -f -- "${tmp_mkf}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007585 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 +02007586 vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_BASEMODLIBS} ${python3_LIBS} ${python3_SYSLIBS}"
7587 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
7588 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
Christian Brabandt9670f612025-05-07 21:44:33 +02007589 ;;
7590esac
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007591fi
7592
Illia Bobyra96d5442023-08-30 16:30:15 +02007593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Python3's dll name" >&5
7594printf %s "checking Python3's dll name... " >&6; }
7595if test ${vi_cv_dll_name_python3+y}
7596then :
7597 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02007598else case e in #(
7599 e)
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007600 if test "X$python3_DLLLIBRARY" != "X"; then
7601 vi_cv_dll_name_python3="$python3_DLLLIBRARY"
Yee Cheng Chinb6ebe5a2023-04-05 18:24:50 +01007602 elif test "X$python3_PYTHONFRAMEWORKPREFIX" != "X"; then
7603 vi_cv_dll_name_python3="${python3_PYTHONFRAMEWORKPREFIX}/${python3_INSTSONAME}"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007604 else
7605 vi_cv_dll_name_python3="$python3_INSTSONAME"
7606 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02007607 ;;
7608esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007609fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007610{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_dll_name_python3" >&5
7611printf "%s\n" "$vi_cv_dll_name_python3" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007612
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007613 PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007614 if test "${vi_cv_path_python3_include}" = "${vi_cv_path_python3_platinclude}"; then
7615 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007616 else
Illia Bobyr74e1dad2023-08-27 18:26:54 +02007617 PYTHON3_CFLAGS="-I${vi_cv_path_python3_include} -I${vi_cv_path_python3_platinclude}"
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007618 fi
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007619 if test "X$have_python3_config_dir" = "X1" -a "$enable_python3interp" = "dynamic"; then
7620 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'"
7621 fi
7622 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
7623 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPy_LIMITED_API=${vi_cv_var_python3_stable_abi_hex}"
7624 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007625 PYTHON3_SRC="if_python3.c"
7626 PYTHON3_OBJ="objects/if_python3.o"
7627
Illia Bobyra96d5442023-08-30 16:30:15 +02007628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
7629printf %s "checking if -pthread should be used... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007630 threadsafe_flag=
7631 thread_lib=
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007632 if test "$vim_cv_uname_output" != Darwin; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007633 test "$GCC" = yes && threadsafe_flag="-pthread"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007634 if test "$vim_cv_uname_output" = FreeBSD; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007635 threadsafe_flag="-D_THREAD_SAFE"
7636 thread_lib="-pthread"
7637 fi
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00007638 if test "$vim_cv_uname_output" = SunOS; then
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007639 threadsafe_flag="-pthreads"
7640 fi
7641 fi
7642 libs_save_old=$LIBS
7643 if test -n "$threadsafe_flag"; then
7644 cflags_save=$CFLAGS
7645 CFLAGS="$CFLAGS $threadsafe_flag"
7646 LIBS="$LIBS $thread_lib"
7647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007648/* end confdefs.h. */
7649
7650int
Illia Bobyra96d5442023-08-30 16:30:15 +02007651main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007652{
7653
7654 ;
7655 return 0;
7656}
7657_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007658if ac_fn_c_try_link "$LINENO"
7659then :
7660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7661printf "%s\n" "yes" >&6; }; PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag"
Christian Brabandt9670f612025-05-07 21:44:33 +02007662else case e in #(
7663 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02007664printf "%s\n" "no" >&6; }; LIBS=$libs_save_old
Christian Brabandt9670f612025-05-07 21:44:33 +02007665 ;;
7666esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007667fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007668rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007669 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007670 CFLAGS=$cflags_save
7671 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7673printf "%s\n" "no" >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007674 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007675
Illia Bobyra96d5442023-08-30 16:30:15 +02007676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python 3 are sane" >&5
7677printf %s "checking if compile and link flags for Python 3 are sane... " >&6; }
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007678 cflags_save=$CFLAGS
7679 libs_save=$LIBS
7680 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
7681 LIBS="$LIBS $PYTHON3_LIBS"
7682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007683/* end confdefs.h. */
7684
7685int
Illia Bobyra96d5442023-08-30 16:30:15 +02007686main (void)
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007687{
7688
7689 ;
7690 return 0;
7691}
7692_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007693if ac_fn_c_try_link "$LINENO"
7694then :
7695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7696printf "%s\n" "yes" >&6; }; python3_ok=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02007697else case e in #(
7698 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: PYTHON3 DISABLED" >&5
7699printf "%s\n" "no: PYTHON3 DISABLED" >&6; }; python3_ok=no ;;
7700esac
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007701fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007702rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007703 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007704 CFLAGS=$cflags_save
7705 LIBS=$libs_save
7706 if test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007707 printf "%s\n" "#define FEAT_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007708
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007709 else
7710 LIBS=$libs_save_old
7711 PYTHON3_SRC=
7712 PYTHON3_OBJ=
7713 PYTHON3_LIBS=
7714 PYTHON3_CFLAGS=
7715 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007716 fi
Bram Moolenaar3c7ad012013-06-11 19:53:45 +02007717 else
Illia Bobyra96d5442023-08-30 16:30:15 +02007718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old" >&5
7719printf "%s\n" "too old" >&6; }
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007720 fi
7721 fi
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007722 if test "$fail_if_missing" = "yes" -a "$python3_ok" != "yes"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01007723 as_fn_error $? "could not configure python3" "$LINENO" 5
Bram Moolenaar1612b1a2013-06-14 21:22:39 +02007724 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007725fi
7726
7727
7728
7729
7730
7731
ichizok8bb3fe42021-12-28 15:51:45 +00007732
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007733if test "$python_ok" = yes && test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007734 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007735
Illia Bobyra96d5442023-08-30 16:30:15 +02007736 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007737
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007738 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007739 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007740
7741 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python" >&5
7743printf %s "checking whether we can do without RTLD_GLOBAL for Python... " >&6; }
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007744 cflags_save=$CFLAGS
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007745 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007746 libs_save=$LIBS
7747 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007748 if test "$cross_compiling" = yes
7749then :
Christian Brabandt9670f612025-05-07 21:44:33 +02007750 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
7751printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007752as_fn_error $? "cannot run test program while cross compiling
Christian Brabandt9670f612025-05-07 21:44:33 +02007753See 'config.log' for more details" "$LINENO" 5; }
7754else case e in #(
7755 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007756/* end confdefs.h. */
7757
7758 #include <dlfcn.h>
7759 /* If this program fails, then RTLD_GLOBAL is needed.
7760 * RTLD_GLOBAL will be used and then it is not possible to
7761 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007762 * Only the first python version used will be switched on.
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007763 */
7764
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007765 static int no_rtl_global_needed_for(char *python_instsoname, char *prefix)
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007766 {
7767 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007768 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007769 if (pylib != 0)
7770 {
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007771 void (*pfx)(char *home) = dlsym(pylib, "Py_SetPythonHome");
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007772 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7773 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7774 void (*final)(void) = dlsym(pylib, "Py_Finalize");
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007775 (*pfx)(prefix);
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007776 (*init)();
7777 needed = (*simple)("import termios") == -1;
7778 (*final)();
7779 dlclose(pylib);
7780 }
7781 return !needed;
7782 }
7783
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007784 int main()
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007785 {
7786 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007787 if (no_rtl_global_needed_for("${vi_cv_dll_name_python}", "${vi_cv_path_python_pfx}"))
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007788 not_needed = 1;
7789 return !not_needed;
7790 }
7791_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007792if ac_fn_c_try_run "$LINENO"
7793then :
7794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7795printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007796
Christian Brabandt9670f612025-05-07 21:44:33 +02007797else case e in #(
7798 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7799printf "%s\n" "no" >&6; } ;;
7800esac
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007801fi
7802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +02007803 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
7804esac
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007805fi
7806
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007807
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007808 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007809 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007810
Illia Bobyra96d5442023-08-30 16:30:15 +02007811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can do without RTLD_GLOBAL for Python3" >&5
7812printf %s "checking whether we can do without RTLD_GLOBAL for Python3... " >&6; }
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007813 cflags_save=$CFLAGS
7814 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007815 libs_save=$LIBS
7816 LIBS="-ldl $LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +02007817 if test "$cross_compiling" = yes
7818then :
Christian Brabandt9670f612025-05-07 21:44:33 +02007819 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
7820printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +01007821as_fn_error $? "cannot run test program while cross compiling
Christian Brabandt9670f612025-05-07 21:44:33 +02007822See 'config.log' for more details" "$LINENO" 5; }
7823else case e in #(
7824 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007825/* end confdefs.h. */
7826
7827 #include <dlfcn.h>
7828 #include <wchar.h>
7829 /* If this program fails, then RTLD_GLOBAL is needed.
7830 * RTLD_GLOBAL will be used and then it is not possible to
7831 * have both python versions enabled in the same vim instance.
Bram Moolenaar84a05ac2013-05-06 04:24:17 +02007832 * Only the first python version used will be switched on.
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007833 */
7834
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007835 static int no_rtl_global_needed_for(char *python_instsoname, wchar_t *prefix)
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007836 {
7837 int needed = 0;
Bram Moolenaarba59ddb2016-01-28 15:34:25 +01007838 void* pylib = dlopen(python_instsoname, RTLD_LAZY|RTLD_LOCAL);
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007839 if (pylib != 0)
7840 {
7841 void (*pfx)(wchar_t *home) = dlsym(pylib, "Py_SetPythonHome");
7842 void (*init)(void) = dlsym(pylib, "Py_Initialize");
7843 int (*simple)(char*) = dlsym(pylib, "PyRun_SimpleString");
7844 void (*final)(void) = dlsym(pylib, "Py_Finalize");
7845 (*pfx)(prefix);
7846 (*init)();
7847 needed = (*simple)("import termios") == -1;
7848 (*final)();
7849 dlclose(pylib);
7850 }
7851 return !needed;
7852 }
7853
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +01007854 int main()
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007855 {
7856 int not_needed = 0;
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007857 if (no_rtl_global_needed_for("${vi_cv_dll_name_python3}", L"${vi_cv_path_python3_pfx}"))
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007858 not_needed = 1;
7859 return !not_needed;
7860 }
7861_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007862if ac_fn_c_try_run "$LINENO"
7863then :
7864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7865printf "%s\n" "yes" >&6; };printf "%s\n" "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007866
Christian Brabandt9670f612025-05-07 21:44:33 +02007867else case e in #(
7868 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7869printf "%s\n" "no" >&6; } ;;
7870esac
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007871fi
7872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +02007873 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
7874esac
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007875fi
7876
7877
7878 CFLAGS=$cflags_save
Bram Moolenaar5d3fbf32015-03-05 16:47:20 +01007879 LIBS=$libs_save
Bram Moolenaar644d37b2010-11-16 19:26:02 +01007880
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007881 PYTHON_SRC="if_python.c"
7882 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007883 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007884 PYTHON_LIBS=
7885 PYTHON3_SRC="if_python3.c"
7886 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007887 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007888 PYTHON3_LIBS=
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007889elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007890 printf "%s\n" "#define DYNAMIC_PYTHON 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007891
7892 PYTHON_SRC="if_python.c"
7893 PYTHON_OBJ="objects/if_python.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007894 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${vi_cv_dll_name_python}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007895 PYTHON_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007896elif test "$python_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5
7898printf %s "checking if -fPIE can be added for Python... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007899 cflags_save=$CFLAGS
7900 libs_save=$LIBS
7901 CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE"
7902 LIBS="$LIBS $PYTHON_LIBS"
7903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7904/* end confdefs.h. */
7905
7906int
Illia Bobyra96d5442023-08-30 16:30:15 +02007907main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007908{
7909
7910 ;
7911 return 0;
7912}
7913_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007914if ac_fn_c_try_link "$LINENO"
7915then :
7916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7917printf "%s\n" "yes" >&6; }; fpie_ok=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02007918else case e in #(
7919 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7920printf "%s\n" "no" >&6; }; fpie_ok=no ;;
7921esac
Bram Moolenaare741f272013-07-09 21:57:52 +02007922fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007923rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007924 conftest$ac_exeext conftest.$ac_ext
7925 CFLAGS=$cflags_save
7926 LIBS=$libs_save
7927 if test $fpie_ok = yes; then
7928 PYTHON_CFLAGS="$PYTHON_CFLAGS -fPIE"
7929 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007930elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007931 printf "%s\n" "#define DYNAMIC_PYTHON3 1" >>confdefs.h
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007932
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007933 if test "X$vi_cv_var_python3_stable_abi_hex" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007934 printf "%s\n" "#define DYNAMIC_PYTHON3_STABLE_ABI 1" >>confdefs.h
Yee Cheng Chinc13b3d12023-08-20 21:18:38 +02007935
7936 fi
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007937 PYTHON3_SRC="if_python3.c"
7938 PYTHON3_OBJ="objects/if_python3.o"
Bram Moolenaarcf1b0572014-05-22 14:44:22 +02007939 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${vi_cv_dll_name_python3}\\\""
Bram Moolenaarb744b2f2010-08-13 16:22:57 +02007940 PYTHON3_LIBS=
Bram Moolenaare741f272013-07-09 21:57:52 +02007941elif test "$python3_ok" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02007942 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5
7943printf %s "checking if -fPIE can be added for Python3... " >&6; }
Bram Moolenaare741f272013-07-09 21:57:52 +02007944 cflags_save=$CFLAGS
7945 libs_save=$LIBS
7946 CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE"
7947 LIBS="$LIBS $PYTHON3_LIBS"
7948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7949/* end confdefs.h. */
7950
7951int
Illia Bobyra96d5442023-08-30 16:30:15 +02007952main (void)
Bram Moolenaare741f272013-07-09 21:57:52 +02007953{
7954
7955 ;
7956 return 0;
7957}
7958_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02007959if ac_fn_c_try_link "$LINENO"
7960then :
7961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7962printf "%s\n" "yes" >&6; }; fpie_ok=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02007963else case e in #(
7964 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7965printf "%s\n" "no" >&6; }; fpie_ok=no ;;
7966esac
Bram Moolenaare741f272013-07-09 21:57:52 +02007967fi
Illia Bobyra96d5442023-08-30 16:30:15 +02007968rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare741f272013-07-09 21:57:52 +02007969 conftest$ac_exeext conftest.$ac_ext
7970 CFLAGS=$cflags_save
7971 LIBS=$libs_save
7972 if test $fpie_ok = yes; then
7973 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -fPIE"
7974 fi
Bram Moolenaarbd5e15f2010-07-17 21:19:38 +02007975fi
7976
Illia Bobyra96d5442023-08-30 16:30:15 +02007977{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5
7978printf %s "checking --enable-tclinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00007979# Check whether --enable-tclinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007980if test ${enable_tclinterp+y}
7981then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00007982 enableval=$enable_tclinterp;
Christian Brabandt9670f612025-05-07 21:44:33 +02007983else case e in #(
7984 e) enable_tclinterp="no" ;;
7985esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00007986fi
7987
Illia Bobyra96d5442023-08-30 16:30:15 +02007988{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_tclinterp" >&5
7989printf "%s\n" "$enable_tclinterp" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00007990
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01007991if test "$enable_tclinterp" = "yes" -o "$enable_tclinterp" = "dynamic"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00007992
Illia Bobyra96d5442023-08-30 16:30:15 +02007993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tclsh argument" >&5
7994printf %s "checking --with-tclsh argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00007995
Bram Moolenaar446cb832008-06-24 21:56:24 +00007996# Check whether --with-tclsh was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02007997if test ${with_tclsh+y}
7998then :
7999 withval=$with_tclsh; tclsh_name="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclsh_name" >&5
8000printf "%s\n" "$tclsh_name" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02008001else case e in #(
8002 e) tclsh_name="tclsh8.5"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8003printf "%s\n" "no" >&6; } ;;
8004esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00008005fi
8006
Bram Moolenaar071d4272004-06-13 20:20:40 +00008007 # Extract the first word of "$tclsh_name", so it can be a program name with args.
8008set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008009{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8010printf %s "checking for $ac_word... " >&6; }
8011if test ${ac_cv_path_vi_cv_path_tcl+y}
8012then :
8013 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008014else case e in #(
8015 e) case $vi_cv_path_tcl in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008016 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008017 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
8018 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008019 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8021for as_dir in $PATH
8022do
8023 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008024 case $as_dir in #(((
8025 '') as_dir=./ ;;
8026 */) ;;
8027 *) as_dir=$as_dir/ ;;
8028 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008029 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008030 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8031 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
8032 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008033 break 2
8034 fi
8035done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008036 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008037IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008038
Bram Moolenaar071d4272004-06-13 20:20:40 +00008039 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02008040esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008041esac
8042fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008043vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00008044if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
8046printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008047else
Illia Bobyra96d5442023-08-30 16:30:15 +02008048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8049printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008050fi
8051
Bram Moolenaar071d4272004-06-13 20:20:40 +00008052
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008053
Bram Moolenaar446cb832008-06-24 21:56:24 +00008054
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008055 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.5"; then
8056 tclsh_name="tclsh8.4"
8057 # Extract the first word of "$tclsh_name", so it can be a program name with args.
8058set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008059{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8060printf %s "checking for $ac_word... " >&6; }
8061if test ${ac_cv_path_vi_cv_path_tcl+y}
8062then :
8063 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008064else case e in #(
8065 e) case $vi_cv_path_tcl in
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008066 [\\/]* | ?:[\\/]*)
8067 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
8068 ;;
8069 *)
8070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8071for as_dir in $PATH
8072do
8073 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008074 case $as_dir in #(((
8075 '') as_dir=./ ;;
8076 */) ;;
8077 *) as_dir=$as_dir/ ;;
8078 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008079 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008080 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8081 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
8082 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008083 break 2
8084 fi
8085done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008086 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008087IFS=$as_save_IFS
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008088
8089 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02008090esac ;;
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008091esac
8092fi
8093vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008094if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
8096printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008097else
Illia Bobyra96d5442023-08-30 16:30:15 +02008098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8099printf "%s\n" "no" >&6; }
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008100fi
8101
Bram Moolenaar446cb832008-06-24 21:56:24 +00008102
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008103 fi
8104 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.4"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008105 tclsh_name="tclsh8.2"
8106 # Extract the first word of "$tclsh_name", so it can be a program name with args.
8107set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008108{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8109printf %s "checking for $ac_word... " >&6; }
8110if test ${ac_cv_path_vi_cv_path_tcl+y}
8111then :
8112 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008113else case e in #(
8114 e) case $vi_cv_path_tcl in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008115 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008116 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
8117 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008118 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8120for as_dir in $PATH
8121do
8122 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008123 case $as_dir in #(((
8124 '') as_dir=./ ;;
8125 */) ;;
8126 *) as_dir=$as_dir/ ;;
8127 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008128 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008129 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8130 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
8131 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008132 break 2
8133 fi
8134done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008135 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008136IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008137
Bram Moolenaar071d4272004-06-13 20:20:40 +00008138 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02008139esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008140esac
8141fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008142vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00008143if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
8145printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008146else
Illia Bobyra96d5442023-08-30 16:30:15 +02008147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8148printf "%s\n" "no" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008149fi
8150
Bram Moolenaar446cb832008-06-24 21:56:24 +00008151
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008152 fi
8153 if test "X$vi_cv_path_tcl" = "X" -a $tclsh_name = "tclsh8.2"; then
8154 tclsh_name="tclsh8.0"
8155 # Extract the first word of "$tclsh_name", so it can be a program name with args.
8156set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8158printf %s "checking for $ac_word... " >&6; }
8159if test ${ac_cv_path_vi_cv_path_tcl+y}
8160then :
8161 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008162else case e in #(
8163 e) case $vi_cv_path_tcl in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008164 [\\/]* | ?:[\\/]*)
8165 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
8166 ;;
8167 *)
8168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8169for as_dir in $PATH
8170do
8171 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008172 case $as_dir in #(((
8173 '') as_dir=./ ;;
8174 */) ;;
8175 *) as_dir=$as_dir/ ;;
8176 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008177 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008178 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8179 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
8180 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008181 break 2
8182 fi
8183done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008184 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008185IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008186
8187 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02008188esac ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008189esac
8190fi
8191vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008192if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
8194printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008195else
Illia Bobyra96d5442023-08-30 16:30:15 +02008196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8197printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008198fi
8199
Bram Moolenaar446cb832008-06-24 21:56:24 +00008200
Bram Moolenaar071d4272004-06-13 20:20:40 +00008201 fi
8202 if test "X$vi_cv_path_tcl" = "X"; then
8203 tclsh_name="tclsh"
8204 # Extract the first word of "$tclsh_name", so it can be a program name with args.
8205set dummy $tclsh_name; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8207printf %s "checking for $ac_word... " >&6; }
8208if test ${ac_cv_path_vi_cv_path_tcl+y}
8209then :
8210 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008211else case e in #(
8212 e) case $vi_cv_path_tcl in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008213 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008214 ac_cv_path_vi_cv_path_tcl="$vi_cv_path_tcl" # Let the user override the test with a path.
8215 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008216 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8218for as_dir in $PATH
8219do
8220 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008221 case $as_dir in #(((
8222 '') as_dir=./ ;;
8223 */) ;;
8224 *) as_dir=$as_dir/ ;;
8225 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008226 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008227 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8228 ac_cv_path_vi_cv_path_tcl="$as_dir$ac_word$ac_exec_ext"
8229 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008230 break 2
8231 fi
8232done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008233 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008234IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008235
Bram Moolenaar071d4272004-06-13 20:20:40 +00008236 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02008237esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008238esac
8239fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008240vi_cv_path_tcl=$ac_cv_path_vi_cv_path_tcl
Bram Moolenaar071d4272004-06-13 20:20:40 +00008241if test -n "$vi_cv_path_tcl"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_tcl" >&5
8243printf "%s\n" "$vi_cv_path_tcl" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008244else
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 Moolenaar071d4272004-06-13 20:20:40 +00008247fi
8248
Bram Moolenaar446cb832008-06-24 21:56:24 +00008249
Bram Moolenaar071d4272004-06-13 20:20:40 +00008250 fi
8251 if test "X$vi_cv_path_tcl" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Tcl version" >&5
8253printf %s "checking Tcl version... " >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01008254 if echo 'exit [expr [info tclversion] < 8.0]' | "$vi_cv_path_tcl" - ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008255 tclver=`echo 'puts [info tclversion]' | $vi_cv_path_tcl -`
Illia Bobyra96d5442023-08-30 16:30:15 +02008256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tclver - OK" >&5
8257printf "%s\n" "$tclver - OK" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +00008258 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 +01008259 tcldll=`echo 'puts libtcl[info tclversion][info sharedlibextension]' | $vi_cv_path_tcl -`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008260
Illia Bobyra96d5442023-08-30 16:30:15 +02008261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
8262printf %s "checking for location of Tcl include... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02008263 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00008264 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 +00008265 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02008266 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 +00008267 fi
Bram Moolenaar0ff8f602008-02-20 11:44:03 +00008268 TCL_INC=
Bram Moolenaar071d4272004-06-13 20:20:40 +00008269 for try in $tclinc; do
8270 if test -f "$try/tcl.h"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tcl.h" >&5
8272printf "%s\n" "$try/tcl.h" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008273 TCL_INC=$try
8274 break
8275 fi
8276 done
8277 if test -z "$TCL_INC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
8279printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008280 SKIP_TCL=YES
8281 fi
8282 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
8284printf %s "checking for location of tclConfig.sh script... " >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +02008285 if test "x$MACOS_X" != "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008286 tclcnf=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008287 tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008288 else
Bram Moolenaarf4ee5282020-07-30 20:18:08 +02008289 tclcnf=`echo $tclinc | sed s/include/lib/g`
8290 tclcnf="$tclcnf /System/Library/Frameworks/Tcl.framework `xcrun --show-sdk-path`/System/Library/Frameworks/Tcl.framework"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008291 fi
8292 for try in $tclcnf; do
Bram Moolenaar49222be2015-12-11 18:11:30 +01008293 if test -f "$try/tclConfig.sh"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
8295printf "%s\n" "$try/tclConfig.sh" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01008296 . "$try/tclConfig.sh"
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008297 if test "$enable_tclinterp" = "dynamic"; then
8298 TCL_LIBS=`eval echo "$TCL_STUB_LIB_SPEC $TCL_LIBS"`
8299 else
8300 TCL_LIBS=`eval echo "$TCL_LIB_SPEC $TCL_LIBS"`
8301 fi
Bram Moolenaar4394bff2008-07-24 11:21:31 +00008302 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 +00008303 break
8304 fi
8305 done
8306 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
8308printf "%s\n" "<not found>" >&6; }
8309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Tcl library by myself" >&5
8310printf %s "checking for Tcl library by myself... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008311 tcllib=`echo $tclinc | sed s/include/lib/g`
Bram Moolenaar9b5d4dd2008-01-01 15:26:45 +00008312 tcllib="$tcllib `echo $tclinc | sed s/include/lib64/g`"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008313 for ext in .so .a ; do
8314 for ver in "" $tclver ; do
8315 for try in $tcllib ; do
8316 trylib=tcl$ver$ext
Bram Moolenaar49222be2015-12-11 18:11:30 +01008317 if test -f "$try/lib$trylib" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $try/lib$trylib" >&5
8319printf "%s\n" "$try/lib$trylib" >&6; }
Bram Moolenaar49222be2015-12-11 18:11:30 +01008320 TCL_LIBS="-L\"$try\" -ltcl$ver -ldl -lm"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +00008321 if test "$vim_cv_uname_output" = SunOS &&
8322 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00008323 TCL_LIBS="$TCL_LIBS -R $try"
8324 fi
8325 break 3
8326 fi
8327 done
8328 done
8329 done
8330 if test -z "$TCL_LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
8332printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008333 SKIP_TCL=YES
8334 fi
8335 fi
8336 if test -z "$SKIP_TCL"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008337 printf "%s\n" "#define FEAT_TCL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008338
8339 TCL_SRC=if_tcl.c
8340 TCL_OBJ=objects/if_tcl.o
8341 TCL_PRO=if_tcl.pro
8342 TCL_CFLAGS="-I$TCL_INC $TCL_DEFS"
8343 fi
8344 fi
8345 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Tcl version 8.0 or later" >&5
8347printf "%s\n" "too old; need Tcl version 8.0 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008348 fi
8349 fi
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008350 if test "$enable_tclinterp" = "dynamic"; then
8351 if test "X$TCL_SRC" != "X" -a "X$tcldll" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008352 printf "%s\n" "#define DYNAMIC_TCL 1" >>confdefs.h
Bram Moolenaar8a5115c2016-01-09 19:41:11 +01008353
8354 TCL_CFLAGS="-DDYNAMIC_TCL_DLL=\\\"$tcldll\\\" -DDYNAMIC_TCL_VER=\\\"$tclver\\\" $TCL_CFLAGS"
8355 fi
8356 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008357 if test "$fail_if_missing" = "yes" -a -z "$TCL_SRC"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008358 as_fn_error $? "could not configure Tcl" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008359 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008360fi
8361
8362
8363
8364
8365
8366
ichizok8bb3fe42021-12-28 15:51:45 +00008367
Illia Bobyra96d5442023-08-30 16:30:15 +02008368{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-rubyinterp argument" >&5
8369printf %s "checking --enable-rubyinterp argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008370# Check whether --enable-rubyinterp was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008371if test ${enable_rubyinterp+y}
8372then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008373 enableval=$enable_rubyinterp;
Christian Brabandt9670f612025-05-07 21:44:33 +02008374else case e in #(
8375 e) enable_rubyinterp="no" ;;
8376esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00008377fi
8378
Illia Bobyra96d5442023-08-30 16:30:15 +02008379{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_rubyinterp" >&5
8380printf "%s\n" "$enable_rubyinterp" >&6; }
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008381if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008382 if test "$has_eval" = "no"; then
Martin Tournoij7904fa42022-10-04 16:28:45 +01008383 as_fn_error $? "cannot use Ruby with tiny features" "$LINENO" 5
Bram Moolenaar0b105412014-11-30 13:34:23 +01008384 fi
8385
Illia Bobyra96d5442023-08-30 16:30:15 +02008386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-ruby-command argument" >&5
8387printf %s "checking --with-ruby-command argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008388
Bram Moolenaar948733a2011-05-05 18:10:16 +02008389
Bram Moolenaar165641d2010-02-17 16:23:09 +01008390# Check whether --with-ruby-command was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008391if test ${with_ruby_command+y}
8392then :
8393 withval=$with_ruby_command; RUBY_CMD="$withval"; vi_cv_path_ruby="$withval"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RUBY_CMD" >&5
8394printf "%s\n" "$RUBY_CMD" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02008395else case e in #(
8396 e) RUBY_CMD="ruby"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to $RUBY_CMD" >&5
8397printf "%s\n" "defaulting to $RUBY_CMD" >&6; } ;;
8398esac
Bram Moolenaar165641d2010-02-17 16:23:09 +01008399fi
8400
Bram Moolenaar165641d2010-02-17 16:23:09 +01008401 # Extract the first word of "$RUBY_CMD", so it can be a program name with args.
8402set dummy $RUBY_CMD; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02008403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8404printf %s "checking for $ac_word... " >&6; }
8405if test ${ac_cv_path_vi_cv_path_ruby+y}
8406then :
8407 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008408else case e in #(
8409 e) case $vi_cv_path_ruby in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008410 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008411 ac_cv_path_vi_cv_path_ruby="$vi_cv_path_ruby" # Let the user override the test with a path.
8412 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008413 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8415for as_dir in $PATH
8416do
8417 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02008418 case $as_dir in #(((
8419 '') as_dir=./ ;;
8420 */) ;;
8421 *) as_dir=$as_dir/ ;;
8422 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008423 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02008424 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8425 ac_cv_path_vi_cv_path_ruby="$as_dir$ac_word$ac_exec_ext"
8426 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008427 break 2
8428 fi
8429done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008430 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00008431IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008432
Bram Moolenaar071d4272004-06-13 20:20:40 +00008433 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02008434esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008435esac
8436fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008437vi_cv_path_ruby=$ac_cv_path_vi_cv_path_ruby
Bram Moolenaar071d4272004-06-13 20:20:40 +00008438if test -n "$vi_cv_path_ruby"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_ruby" >&5
8440printf "%s\n" "$vi_cv_path_ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008441else
Illia Bobyra96d5442023-08-30 16:30:15 +02008442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8443printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008444fi
8445
Bram Moolenaar446cb832008-06-24 21:56:24 +00008446
Bram Moolenaar071d4272004-06-13 20:20:40 +00008447 if test "X$vi_cv_path_ruby" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby version" >&5
8449printf %s "checking Ruby version... " >&6; }
K.Takata236ccbf2022-09-22 16:12:06 +01008450 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 +02008451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
8452printf "%s\n" "OK" >&6; }
8453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby rbconfig" >&5
8454printf %s "checking Ruby rbconfig... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008455 ruby_rbconfig="RbConfig"
8456 if ! $vi_cv_path_ruby -r rbconfig -e 'RbConfig' >/dev/null 2>/dev/null; then
8457 ruby_rbconfig="Config"
8458 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ruby_rbconfig" >&5
8460printf "%s\n" "$ruby_rbconfig" >&6; }
8461 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5
8462printf %s "checking Ruby header files... " >&6; }
Bram Moolenaar81398892012-10-03 21:09:35 +02008463 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 +00008464 if test "X$rubyhdrdir" != "X"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008465 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5
8466printf "%s\n" "$rubyhdrdir" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008467 RUBY_CFLAGS="-I$rubyhdrdir"
Bram Moolenaara6fd37b2014-03-27 17:19:09 +01008468 rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
8469 if test -d "$rubyarchdir"; then
8470 RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
Bram Moolenaar165641d2010-02-17 16:23:09 +01008471 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008472 rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008473 if test "X$rubyversion" = "X"; then
K.Takata236ccbf2022-09-22 16:12:06 +01008474 rubyversion=`$vi_cv_path_ruby -e "print RUBY_VERSION.gsub(/\./, '')[0,2]"`
Bram Moolenaar026a4452013-08-07 15:22:23 +02008475 fi
Bram Moolenaar165641d2010-02-17 16:23:09 +01008476 RUBY_CFLAGS="$RUBY_CFLAGS -DRUBY_VERSION=$rubyversion"
Bram Moolenaar81398892012-10-03 21:09:35 +02008477 rubylibs=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['LIBS']"`
Bram Moolenaar071d4272004-06-13 20:20:40 +00008478 if test "X$rubylibs" != "X"; then
8479 RUBY_LIBS="$rubylibs"
8480 fi
Bram Moolenaar81398892012-10-03 21:09:35 +02008481 librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBYARG'])"`
8482 librubya=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['LIBRUBY_A'])"`
Bram Moolenaarac499e32013-06-02 19:14:17 +02008483 rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig.expand($ruby_rbconfig::CONFIG['libdir'])"`
Illia Bobyre379e212023-09-30 22:59:27 +02008484 if test -f "$rubylibdir/$librubya" || expr "$librubyarg" : "-lruby" >/dev/null; then
Bram Moolenaarac499e32013-06-02 19:14:17 +02008485 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
8486 elif test "$librubyarg" = "libruby.a"; then
8487 librubyarg="-lruby"
8488 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
Bram Moolenaar071d4272004-06-13 20:20:40 +00008489 fi
8490
8491 if test "X$librubyarg" != "X"; then
8492 RUBY_LIBS="$librubyarg $RUBY_LIBS"
8493 fi
Zdenek Dohnal1d822af2022-11-23 12:06:08 +00008494
8495
Bram Moolenaar071d4272004-06-13 20:20:40 +00008496 RUBY_SRC="if_ruby.c"
8497 RUBY_OBJ="objects/if_ruby.o"
8498 RUBY_PRO="if_ruby.pro"
Illia Bobyra96d5442023-08-30 16:30:15 +02008499 printf "%s\n" "#define FEAT_RUBY 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008500
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008501 if test "$enable_rubyinterp" = "dynamic"; then
Bram Moolenaar92021622017-10-12 12:33:43 +02008502 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_ALIASES'].split[0]"`
Bram Moolenaar87ea64c2018-08-04 15:13:34 +02008503 if test -z "$libruby_soname"; then
8504 libruby_soname=`$vi_cv_path_ruby -r rbconfig -e "puts $ruby_rbconfig::CONFIG['LIBRUBY_SO']"`
8505 fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008506 printf "%s\n" "#define DYNAMIC_RUBY 1" >>confdefs.h
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008507
Bram Moolenaar41a41412020-01-07 21:32:19 +01008508 RUBY_CFLAGS="-DDYNAMIC_RUBY_DLL=\\\"$libruby_soname\\\" $RUBY_CFLAGS"
Bram Moolenaar3ca71f12010-10-27 16:49:47 +02008509 RUBY_LIBS=
8510 fi
Bram Moolenaar864a28b2020-12-28 21:36:56 +01008511 if test "X$CLANG_VERSION" != "X" -a "$rubyversion" -ge 30; then
8512 RUBY_CFLAGS="$RUBY_CFLAGS -fdeclspec"
8513 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008514 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found; disabling Ruby" >&5
8516printf "%s\n" "not found; disabling Ruby" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008517 fi
8518 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: too old; need Ruby version 1.9.1 or later" >&5
8520printf "%s\n" "too old; need Ruby version 1.9.1 or later" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008521 fi
8522 fi
Bram Moolenaarf788a062011-12-14 20:51:25 +01008523
8524 if test "$fail_if_missing" = "yes" -a -z "$RUBY_OBJ"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01008525 as_fn_error $? "could not configure Ruby" "$LINENO" 5
Bram Moolenaarf788a062011-12-14 20:51:25 +01008526 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008527fi
8528
8529
8530
8531
8532
8533
ichizok8bb3fe42021-12-28 15:51:45 +00008534
Illia Bobyra96d5442023-08-30 16:30:15 +02008535{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-cscope argument" >&5
8536printf %s "checking --enable-cscope argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008537# Check whether --enable-cscope was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008538if test ${enable_cscope+y}
8539then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008540 enableval=$enable_cscope;
Christian Brabandt9670f612025-05-07 21:44:33 +02008541else case e in #(
8542 e) enable_cscope="no" ;;
8543esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00008544fi
8545
Illia Bobyra96d5442023-08-30 16:30:15 +02008546{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_cscope" >&5
8547printf "%s\n" "$enable_cscope" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00008548if test "$enable_cscope" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008549 printf "%s\n" "#define FEAT_CSCOPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008550
8551fi
8552
Illia Bobyra96d5442023-08-30 16:30:15 +02008553{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-netbeans argument" >&5
8554printf %s "checking --disable-netbeans argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008555# Check whether --enable-netbeans was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008556if test ${enable_netbeans+y}
8557then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008558 enableval=$enable_netbeans;
Christian Brabandt9670f612025-05-07 21:44:33 +02008559else case e in #(
8560 e) enable_netbeans="yes" ;;
8561esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00008562fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008563
Bram Moolenaar446cb832008-06-24 21:56:24 +00008564if test "$enable_netbeans" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008565 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use NetBeans with tiny features" >&5
8567printf "%s\n" "cannot use NetBeans with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008568 enable_netbeans="no"
8569 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8571printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008572 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008573else
Illia Bobyra96d5442023-08-30 16:30:15 +02008574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8575printf "%s\n" "yes" >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008576fi
8577
Illia Bobyra96d5442023-08-30 16:30:15 +02008578{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-channel argument" >&5
8579printf %s "checking --disable-channel argument... " >&6; }
Bram Moolenaare0874f82016-01-24 20:36:41 +01008580# Check whether --enable-channel was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008581if test ${enable_channel+y}
8582then :
Bram Moolenaare0874f82016-01-24 20:36:41 +01008583 enableval=$enable_channel;
Christian Brabandt9670f612025-05-07 21:44:33 +02008584else case e in #(
8585 e) enable_channel="yes" ;;
8586esac
Bram Moolenaare0874f82016-01-24 20:36:41 +01008587fi
8588
8589if test "$enable_channel" = "yes"; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008590 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use channels with tiny features" >&5
8592printf "%s\n" "cannot use channels with tiny features" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008593 enable_channel="no"
8594 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8596printf "%s\n" "no" >&6; }
Bram Moolenaar3c124e32016-01-31 14:36:58 +01008597 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008598else
Bram Moolenaar16435482016-01-24 21:31:54 +01008599 if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, netbeans also disabled" >&5
8601printf "%s\n" "yes, netbeans also disabled" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008602 enable_netbeans="no"
8603 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008604 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8605printf "%s\n" "yes" >&6; }
Bram Moolenaar16435482016-01-24 21:31:54 +01008606 fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008607fi
8608
Bram Moolenaar16435482016-01-24 21:31:54 +01008609if test "$enable_channel" = "yes"; then
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008610 if test "x$HAIKU" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
8612printf %s "checking for socket in -lnetwork... " >&6; }
8613if test ${ac_cv_lib_network_socket+y}
8614then :
8615 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008616else case e in #(
8617 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008618LIBS="-lnetwork $LIBS"
8619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8620/* end confdefs.h. */
8621
8622/* Override any GCC internal prototype to avoid an error.
8623 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02008624 builtin and then its argument prototype would still apply.
8625 The 'extern "C"' is for builds by C++ compilers;
8626 although this is not generally supported in C code supporting it here
8627 has little cost and some practical benefit (sr 110532). */
8628#ifdef __cplusplus
8629extern "C"
8630#endif
8631char socket (void);
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008632int
Illia Bobyra96d5442023-08-30 16:30:15 +02008633main (void)
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008634{
8635return socket ();
8636 ;
8637 return 0;
8638}
8639_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008640if ac_fn_c_try_link "$LINENO"
8641then :
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008642 ac_cv_lib_network_socket=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02008643else case e in #(
8644 e) ac_cv_lib_network_socket=no ;;
8645esac
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008646fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008647rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008648 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02008649LIBS=$ac_check_lib_save_LIBS ;;
8650esac
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008651fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
8653printf "%s\n" "$ac_cv_lib_network_socket" >&6; }
8654if test "x$ac_cv_lib_network_socket" = xyes
8655then :
8656 printf "%s\n" "#define HAVE_LIBNETWORK 1" >>confdefs.h
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008657
8658 LIBS="-lnetwork $LIBS"
8659
8660fi
8661
8662 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8664printf %s "checking for socket in -lsocket... " >&6; }
8665if test ${ac_cv_lib_socket_socket+y}
8666then :
8667 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008668else case e in #(
8669 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008670LIBS="-lsocket $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008672/* end confdefs.h. */
8673
Bram Moolenaar446cb832008-06-24 21:56:24 +00008674/* Override any GCC internal prototype to avoid an error.
8675 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02008676 builtin and then its argument prototype would still apply.
8677 The 'extern "C"' is for builds by C++ compilers;
8678 although this is not generally supported in C code supporting it here
8679 has little cost and some practical benefit (sr 110532). */
8680#ifdef __cplusplus
8681extern "C"
8682#endif
8683char socket (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008684int
Illia Bobyra96d5442023-08-30 16:30:15 +02008685main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008686{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008687return socket ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008688 ;
8689 return 0;
8690}
8691_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008692if ac_fn_c_try_link "$LINENO"
8693then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008694 ac_cv_lib_socket_socket=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02008695else case e in #(
8696 e) ac_cv_lib_socket_socket=no ;;
8697esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008698fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008699rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008700 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02008701LIBS=$ac_check_lib_save_LIBS ;;
8702esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008703fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8705printf "%s\n" "$ac_cv_lib_socket_socket" >&6; }
8706if test "x$ac_cv_lib_socket_socket" = xyes
8707then :
8708 printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008709
8710 LIBS="-lsocket $LIBS"
8711
Bram Moolenaar071d4272004-06-13 20:20:40 +00008712fi
8713
Bram Moolenaarb3f74062020-02-26 16:16:53 +01008714 fi
8715
Illia Bobyra96d5442023-08-30 16:30:15 +02008716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv6 networking is possible" >&5
8717printf %s "checking whether compiling with IPv6 networking is possible... " >&6; }
8718if test ${vim_cv_ipv6_networking+y}
8719then :
8720 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008721else case e in #(
8722 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008723/* end confdefs.h. */
8724
8725#include <stdio.h>
8726#include <stdlib.h>
8727#include <stdarg.h>
8728#include <fcntl.h>
8729#include <netdb.h>
8730#include <netinet/in.h>
8731#include <errno.h>
8732#include <sys/types.h>
8733#include <sys/socket.h>
8734 /* Check bitfields */
8735 struct nbbuf {
8736 unsigned int initDone:1;
8737 unsigned short signmaplen;
8738 };
8739
8740int
Illia Bobyra96d5442023-08-30 16:30:15 +02008741main (void)
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008742{
8743
8744 /* Check creating a socket. */
8745 struct sockaddr_in server;
8746 struct addrinfo *res;
8747 (void)socket(AF_INET, SOCK_STREAM, 0);
8748 (void)htons(100);
8749 (void)getaddrinfo("microsoft.com", NULL, NULL, &res);
8750 if (errno == ECONNREFUSED)
8751 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
8752 (void)freeaddrinfo(res);
8753
8754 ;
8755 return 0;
8756}
8757_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008758if ac_fn_c_try_link "$LINENO"
8759then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008760 vim_cv_ipv6_networking="yes"
Christian Brabandt9670f612025-05-07 21:44:33 +02008761else case e in #(
8762 e) vim_cv_ipv6_networking="no" ;;
8763esac
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008764fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008765rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +02008766 conftest$ac_exeext conftest.$ac_ext ;;
8767esac
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008768fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008769{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv6_networking" >&5
8770printf "%s\n" "$vim_cv_ipv6_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008771
8772 if test "x$vim_cv_ipv6_networking" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008773 printf "%s\n" "#define FEAT_IPV6 1" >>confdefs.h
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008774
Illia Bobyra96d5442023-08-30 16:30:15 +02008775 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
8776if test "x$ac_cv_func_inet_ntop" = xyes
8777then :
8778 printf "%s\n" "#define HAVE_INET_NTOP 1" >>confdefs.h
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008779
8780fi
Bram Moolenaarb6fb0512020-04-18 18:24:18 +02008781
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008782 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008783 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
8784printf %s "checking for gethostbyname in -lnsl... " >&6; }
8785if test ${ac_cv_lib_nsl_gethostbyname+y}
8786then :
8787 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008788else case e in #(
8789 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00008790LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008792/* end confdefs.h. */
8793
Bram Moolenaar446cb832008-06-24 21:56:24 +00008794/* Override any GCC internal prototype to avoid an error.
8795 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02008796 builtin and then its argument prototype would still apply.
8797 The 'extern "C"' is for builds by C++ compilers;
8798 although this is not generally supported in C code supporting it here
8799 has little cost and some practical benefit (sr 110532). */
8800#ifdef __cplusplus
8801extern "C"
8802#endif
8803char gethostbyname (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008804int
Illia Bobyra96d5442023-08-30 16:30:15 +02008805main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008806{
Bram Moolenaar446cb832008-06-24 21:56:24 +00008807return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008808 ;
8809 return 0;
8810}
8811_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008812if ac_fn_c_try_link "$LINENO"
8813then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008814 ac_cv_lib_nsl_gethostbyname=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02008815else case e in #(
8816 e) ac_cv_lib_nsl_gethostbyname=no ;;
8817esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008818fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008819rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02008820 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02008821LIBS=$ac_check_lib_save_LIBS ;;
8822esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008823fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008824{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
8825printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
8826if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
8827then :
8828 printf "%s\n" "#define HAVE_LIBNSL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008829
8830 LIBS="-lnsl $LIBS"
8831
Bram Moolenaar071d4272004-06-13 20:20:40 +00008832fi
8833
Illia Bobyra96d5442023-08-30 16:30:15 +02008834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiling with IPv4 networking is possible" >&5
8835printf %s "checking whether compiling with IPv4 networking is possible... " >&6; }
8836if test ${vim_cv_ipv4_networking+y}
8837then :
8838 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02008839else case e in #(
8840 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008841/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00008842
8843#include <stdio.h>
8844#include <stdlib.h>
8845#include <stdarg.h>
8846#include <fcntl.h>
8847#include <netdb.h>
8848#include <netinet/in.h>
8849#include <errno.h>
8850#include <sys/types.h>
8851#include <sys/socket.h>
8852 /* Check bitfields */
8853 struct nbbuf {
8854 unsigned int initDone:1;
Bram Moolenaar63de19e2016-12-09 20:11:26 +01008855 unsigned short signmaplen;
Bram Moolenaar071d4272004-06-13 20:20:40 +00008856 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008857
8858int
Illia Bobyra96d5442023-08-30 16:30:15 +02008859main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008860{
Bram Moolenaar071d4272004-06-13 20:20:40 +00008861
8862 /* Check creating a socket. */
8863 struct sockaddr_in server;
8864 (void)socket(AF_INET, SOCK_STREAM, 0);
8865 (void)htons(100);
8866 (void)gethostbyname("microsoft.com");
8867 if (errno == ECONNREFUSED)
8868 (void)connect(1, (struct sockaddr *)&server, sizeof(server));
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008869
8870 ;
8871 return 0;
8872}
8873_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02008874if ac_fn_c_try_link "$LINENO"
8875then :
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008876 vim_cv_ipv4_networking="yes"
Christian Brabandt9670f612025-05-07 21:44:33 +02008877else case e in #(
8878 e) vim_cv_ipv4_networking="no"; enable_netbeans="no"; enable_channel="no" ;;
8879esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008880fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008881rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +02008882 conftest$ac_exeext conftest.$ac_ext ;;
8883esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00008884fi
Illia Bobyra96d5442023-08-30 16:30:15 +02008885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_ipv4_networking" >&5
8886printf "%s\n" "$vim_cv_ipv4_networking" >&6; }
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +02008887 fi
8888fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008889if test "$enable_netbeans" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008890 printf "%s\n" "#define FEAT_NETBEANS_INTG 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00008891
8892 NETBEANS_SRC="netbeans.c"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008893
Bram Moolenaar071d4272004-06-13 20:20:40 +00008894 NETBEANS_OBJ="objects/netbeans.o"
Bram Moolenaar495de9c2005-01-25 22:03:25 +00008895
Bram Moolenaar071d4272004-06-13 20:20:40 +00008896fi
Bram Moolenaare0874f82016-01-24 20:36:41 +01008897if test "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008898 printf "%s\n" "#define FEAT_JOB_CHANNEL 1" >>confdefs.h
Bram Moolenaare0874f82016-01-24 20:36:41 +01008899
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008900 CHANNEL_SRC="job.c channel.c"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008901
Bram Moolenaar8b5866d2020-09-05 15:48:51 +02008902 CHANNEL_OBJ="objects/job.o objects/channel.o"
Bram Moolenaare0874f82016-01-24 20:36:41 +01008903
8904fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00008905
Illia Bobyra96d5442023-08-30 16:30:15 +02008906{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-terminal argument" >&5
8907printf %s "checking --enable-terminal argument... " >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008908# Check whether --enable-terminal was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008909if test ${enable_terminal+y}
8910then :
Bram Moolenaaref839562017-10-28 20:28:23 +02008911 enableval=$enable_terminal;
Christian Brabandt9670f612025-05-07 21:44:33 +02008912else case e in #(
8913 e) enable_terminal="auto" ;;
8914esac
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008915fi
8916
Bram Moolenaar595a4022017-09-03 19:15:57 +02008917if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
Bram Moolenaar12471262022-01-18 11:11:25 +00008918 if test "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny features" >&5
8920printf "%s\n" "cannot use terminal emulator with tiny features" >&6; }
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008921 enable_terminal="no"
8922 else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008923 if test "$enable_terminal" = "auto"; then
8924 enable_terminal="yes"
Illia Bobyra96d5442023-08-30 16:30:15 +02008925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to yes" >&5
8926printf "%s\n" "defaulting to yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008927 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8929printf "%s\n" "yes" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008930 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008931 fi
8932else
Bram Moolenaar595a4022017-09-03 19:15:57 +02008933 if test "$enable_terminal" = "auto"; then
8934 enable_terminal="no"
Illia Bobyra96d5442023-08-30 16:30:15 +02008935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to no" >&5
8936printf "%s\n" "defaulting to no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008937 else
Illia Bobyra96d5442023-08-30 16:30:15 +02008938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8939printf "%s\n" "no" >&6; }
Bram Moolenaar595a4022017-09-03 19:15:57 +02008940 fi
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008941fi
Bram Moolenaar8b423282017-12-16 14:37:06 +01008942if test "$enable_terminal" = "yes" -a "$enable_channel" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008943 printf "%s\n" "#define FEAT_TERMINAL 1" >>confdefs.h
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008944
Bram Moolenaar93268052019-10-10 13:22:54 +02008945 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 +02008946
Bram Moolenaar93268052019-10-10 13:22:54 +02008947 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 +02008948
Bram Moolenaar823edd12019-10-23 22:35:36 +02008949 TERM_TEST="test_libvterm"
8950
Bram Moolenaare4f25e42017-07-07 11:54:15 +02008951fi
8952
Illia Bobyra96d5442023-08-30 16:30:15 +02008953{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-autoservername argument" >&5
8954printf %s "checking --enable-autoservername argument... " >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008955# Check whether --enable-autoservername was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008956if test ${enable_autoservername+y}
8957then :
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008958 enableval=$enable_autoservername;
Christian Brabandt9670f612025-05-07 21:44:33 +02008959else case e in #(
8960 e) enable_autoservername="no" ;;
8961esac
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008962fi
8963
Illia Bobyra96d5442023-08-30 16:30:15 +02008964{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_autoservername" >&5
8965printf "%s\n" "$enable_autoservername" >&6; }
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008966if test "$enable_autoservername" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02008967 printf "%s\n" "#define FEAT_AUTOSERVERNAME 1" >>confdefs.h
Bram Moolenaare42a6d22017-11-12 19:21:51 +01008968
8969fi
8970
Illia Bobyra96d5442023-08-30 16:30:15 +02008971{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-multibyte argument" >&5
8972printf %s "checking --enable-multibyte argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00008973# Check whether --enable-multibyte was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008974if test ${enable_multibyte+y}
8975then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00008976 enableval=$enable_multibyte;
Christian Brabandt9670f612025-05-07 21:44:33 +02008977else case e in #(
8978 e) enable_multibyte="yes" ;;
8979esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00008980fi
8981
Illia Bobyra96d5442023-08-30 16:30:15 +02008982{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_multibyte" >&5
8983printf "%s\n" "$enable_multibyte" >&6; }
Bram Moolenaar30276f22019-01-24 17:59:39 +01008984if test "$enable_multibyte" != "yes"; then
Bram Moolenaar2be7cb72019-01-12 16:10:51 +01008985 as_fn_error $? "The multi-byte feature can no longer be disabled. If you have
8986 a problem with this, discuss on the Vim mailing list." "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +00008987fi
8988
Illia Bobyra96d5442023-08-30 16:30:15 +02008989{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-rightleft argument" >&5
8990printf %s "checking --disable-rightleft argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008991# Check whether --enable-rightleft was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02008992if test ${enable_rightleft+y}
8993then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008994 enableval=$enable_rightleft;
Christian Brabandt9670f612025-05-07 21:44:33 +02008995else case e in #(
8996 e) enable_rightleft="yes" ;;
8997esac
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01008998fi
8999
9000if test "$enable_rightleft" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9002printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009003else
Illia Bobyra96d5442023-08-30 16:30:15 +02009004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9005printf "%s\n" "yes" >&6; }
9006 printf "%s\n" "#define DISABLE_RIGHTLEFT 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009007
9008fi
9009
Illia Bobyra96d5442023-08-30 16:30:15 +02009010{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-arabic argument" >&5
9011printf %s "checking --disable-arabic argument... " >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009012# Check whether --enable-arabic was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009013if test ${enable_arabic+y}
9014then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009015 enableval=$enable_arabic;
Christian Brabandt9670f612025-05-07 21:44:33 +02009016else case e in #(
9017 e) enable_arabic="yes" ;;
9018esac
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009019fi
9020
9021if test "$enable_arabic" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009022 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9023printf "%s\n" "no" >&6; }
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009024else
Illia Bobyra96d5442023-08-30 16:30:15 +02009025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9026printf "%s\n" "yes" >&6; }
9027 printf "%s\n" "#define DISABLE_ARABIC 1" >>confdefs.h
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009028
9029fi
9030
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009031# Check whether --enable-farsi was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009032if test ${enable_farsi+y}
9033then :
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009034 enableval=$enable_farsi;
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009035fi
9036
Bram Moolenaar5c5697f2018-12-12 20:34:09 +01009037
Illia Bobyra96d5442023-08-30 16:30:15 +02009038{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-xim argument" >&5
9039printf %s "checking --enable-xim argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009040# Check whether --enable-xim was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009041if test ${enable_xim+y}
9042then :
9043 enableval=$enable_xim; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_xim" >&5
9044printf "%s\n" "$enable_xim" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +02009045else case e in #(
9046 e) enable_xim="auto"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to auto" >&5
9047printf "%s\n" "defaulting to auto" >&6; } ;;
9048esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00009049fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009050
Bram Moolenaar446cb832008-06-24 21:56:24 +00009051
Illia Bobyra96d5442023-08-30 16:30:15 +02009052{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-fontset argument" >&5
9053printf %s "checking --enable-fontset argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009054# Check whether --enable-fontset was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009055if test ${enable_fontset+y}
9056then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009057 enableval=$enable_fontset;
Christian Brabandt9670f612025-05-07 21:44:33 +02009058else case e in #(
9059 e) enable_fontset="no" ;;
9060esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00009061fi
9062
Illia Bobyra96d5442023-08-30 16:30:15 +02009063{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_fontset" >&5
9064printf "%s\n" "$enable_fontset" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009065
Foxe Chenb90c2392025-06-27 21:10:35 +02009066{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if shm_open is available" >&5
9067printf %s "checking if shm_open is available... " >&6; }
9068cppflags_save=$CPPFLAGS
9069CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9071/* end confdefs.h. */
9072#include <sys/mman.h>
9073 #include <sys/stat.h>
9074 #include <fcntl.h>
9075int
9076main (void)
9077{
9078shm_open("/test", O_CREAT, 0600);
9079 ;
9080 return 0;
9081}
9082_ACEOF
Christian Brabandte92989b2025-06-29 22:39:14 +02009083if ac_fn_c_try_link "$LINENO"
Foxe Chenb90c2392025-06-27 21:10:35 +02009084then :
9085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9086printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SHM_OPEN 1" >>confdefs.h
9087
9088else case e in #(
9089 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9090printf "%s\n" "no" >&6; } ;;
9091esac
9092fi
Christian Brabandte92989b2025-06-29 22:39:14 +02009093rm -f core conftest.err conftest.$ac_objext conftest.beam \
9094 conftest$ac_exeext conftest.$ac_ext
Foxe Chenb90c2392025-06-27 21:10:35 +02009095CPPFLAGS=$cppflags_save
9096
9097{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-wayland argument" >&5
9098printf %s "checking --with-wayland argument... " >&6; }
9099
9100# Check whether --with-wayland was given.
9101if test ${with_wayland+y}
9102then :
9103 withval=$with_wayland;
9104fi
9105
9106
9107test -z "$with_wayland" && with_wayland=yes
9108if test "$with_wayland" = yes; then
9109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9110printf "%s\n" "yes" >&6; }
Hirohito Higashi73b96502025-06-28 18:18:21 +02009111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Wayland client header files can be found" >&5
9112printf %s "checking if Wayland client header files can be found... " >&6; }
Foxe Chenb90c2392025-06-27 21:10:35 +02009113 cppflags_save=$CPPFLAGS
9114 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
9115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9116/* end confdefs.h. */
9117#include <wayland-client.h>
9118int
9119main (void)
9120{
9121
9122 ;
9123 return 0;
9124}
9125_ACEOF
9126if ac_fn_c_try_compile "$LINENO"
9127then :
9128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9129printf "%s\n" "yes" >&6; }
9130else case e in #(
9131 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9132printf "%s\n" "no" >&6; }; no_wl=yes ;;
9133esac
9134fi
9135rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9136 CPPFLAGS=$cppflags_save
9137
9138 if test "$no_wl" = yes; then
9139 with_wayland=no
9140 else
9141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wl_display_connect in -lwayland-client" >&5
9142printf %s "checking for wl_display_connect in -lwayland-client... " >&6; }
9143if test ${ac_cv_lib_wayland_client_wl_display_connect+y}
9144then :
9145 printf %s "(cached) " >&6
9146else case e in #(
9147 e) ac_check_lib_save_LIBS=$LIBS
9148LIBS="-lwayland-client $LIBS"
9149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9150/* end confdefs.h. */
9151
9152/* Override any GCC internal prototype to avoid an error.
9153 Use char because int might match the return type of a GCC
9154 builtin and then its argument prototype would still apply.
9155 The 'extern "C"' is for builds by C++ compilers;
9156 although this is not generally supported in C code supporting it here
9157 has little cost and some practical benefit (sr 110532). */
9158#ifdef __cplusplus
9159extern "C"
9160#endif
9161char wl_display_connect (void);
9162int
9163main (void)
9164{
9165return wl_display_connect ();
9166 ;
9167 return 0;
9168}
9169_ACEOF
9170if ac_fn_c_try_link "$LINENO"
9171then :
9172 ac_cv_lib_wayland_client_wl_display_connect=yes
9173else case e in #(
9174 e) ac_cv_lib_wayland_client_wl_display_connect=no ;;
9175esac
9176fi
9177rm -f core conftest.err conftest.$ac_objext conftest.beam \
9178 conftest$ac_exeext conftest.$ac_ext
9179LIBS=$ac_check_lib_save_LIBS ;;
9180esac
9181fi
9182{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wayland_client_wl_display_connect" >&5
9183printf "%s\n" "$ac_cv_lib_wayland_client_wl_display_connect" >&6; }
9184if test "x$ac_cv_lib_wayland_client_wl_display_connect" = xyes
9185then :
9186 no_wl=no
9187fi
9188
9189
9190 if test "$no_wl" = no; then
9191 printf "%s\n" "#define HAVE_WAYLAND 1" >>confdefs.h
9192
9193 WAYLAND_LIBS="-lwayland-client";
9194
9195 WAYLAND_SRC=" \
9196 auto/wayland/wlr-data-control-unstable-v1.c \
9197 auto/wayland/ext-data-control-v1.c \
9198 auto/wayland/xdg-shell.c \
9199 auto/wayland/primary-selection-unstable-v1.c \
9200 wayland.c"
9201
9202 WAYLAND_OBJ=" \
9203 objects/wlr-data-control-unstable-v1.o \
9204 objects/ext-data-control-v1.o \
9205 objects/xdg-shell.o \
9206 objects/primary-selection-unstable-v1.o \
9207 objects/wayland.o"
9208
9209
9210 else
9211 with_wayland=no
9212 fi
9213 fi
9214else
9215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9216printf "%s\n" "no" >&6; }
9217fi
9218
Bram Moolenaar071d4272004-06-13 20:20:40 +00009219test -z "$with_x" && with_x=yes
Bram Moolenaard0573012017-10-28 21:11:06 +02009220test "${enable_gui-yes}" != no -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +00009221if test "$with_x" = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009222 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: defaulting to: don't HAVE_X11" >&5
9223printf "%s\n" "defaulting to: don't HAVE_X11" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009224else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009225
Bram Moolenaar071d4272004-06-13 20:20:40 +00009226 # Extract the first word of "xmkmf", so it can be a program name with args.
9227set dummy xmkmf; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +02009228{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9229printf %s "checking for $ac_word... " >&6; }
9230if test ${ac_cv_path_xmkmfpath+y}
9231then :
9232 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009233else case e in #(
9234 e) case $xmkmfpath in
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009235 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009236 ac_cv_path_xmkmfpath="$xmkmfpath" # Let the user override the test with a path.
9237 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009238 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9240for as_dir in $PATH
9241do
9242 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +02009243 case $as_dir in #(((
9244 '') as_dir=./ ;;
9245 */) ;;
9246 *) as_dir=$as_dir/ ;;
9247 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009248 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +02009249 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9250 ac_cv_path_xmkmfpath="$as_dir$ac_word$ac_exec_ext"
9251 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009252 break 2
9253 fi
9254done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009255 done
Bram Moolenaar446cb832008-06-24 21:56:24 +00009256IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009257
Bram Moolenaar071d4272004-06-13 20:20:40 +00009258 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02009259esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009260esac
9261fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009262xmkmfpath=$ac_cv_path_xmkmfpath
Bram Moolenaar071d4272004-06-13 20:20:40 +00009263if test -n "$xmkmfpath"; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xmkmfpath" >&5
9265printf "%s\n" "$xmkmfpath" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009266else
Illia Bobyra96d5442023-08-30 16:30:15 +02009267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9268printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009269fi
9270
9271
Bram Moolenaar446cb832008-06-24 21:56:24 +00009272
Illia Bobyra96d5442023-08-30 16:30:15 +02009273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9274printf %s "checking for X... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009275
Bram Moolenaar071d4272004-06-13 20:20:40 +00009276
Bram Moolenaar446cb832008-06-24 21:56:24 +00009277# Check whether --with-x was given.
Illia Bobyra96d5442023-08-30 16:30:15 +02009278if test ${with_x+y}
9279then :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009280 withval=$with_x;
9281fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009282
Christian Brabandt9670f612025-05-07 21:44:33 +02009283# $have_x is 'yes', 'no', 'disabled', or empty when we do not yet know.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009284if test "x$with_x" = xno; then
9285 # The user explicitly disabled X.
9286 have_x=disabled
9287else
Bram Moolenaar446cb832008-06-24 21:56:24 +00009288 case $x_includes,$x_libraries in #(
Bram Moolenaar7db77842014-03-27 17:40:59 +01009289 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
Illia Bobyra96d5442023-08-30 16:30:15 +02009290 *,NONE | NONE,*) if test ${ac_cv_have_x+y}
9291then :
9292 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009293else case e in #(
9294 e) # One or both of the vars are not set, and there is no cached value.
Illia Bobyra96d5442023-08-30 16:30:15 +02009295ac_x_includes=no
9296ac_x_libraries=no
9297# Do we need to do anything special at all?
9298ac_save_LIBS=$LIBS
9299LIBS="-lX11 $LIBS"
9300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9301/* end confdefs.h. */
9302#include <X11/Xlib.h>
9303int
9304main (void)
9305{
9306XrmInitialize ()
9307 ;
9308 return 0;
9309}
9310_ACEOF
9311if ac_fn_c_try_link "$LINENO"
9312then :
9313 # We can compile and link X programs with no special options.
9314 ac_x_includes=
9315 ac_x_libraries=
9316fi
9317rm -f core conftest.err conftest.$ac_objext conftest.beam \
9318 conftest$ac_exeext conftest.$ac_ext
9319LIBS="$ac_save_LIBS"
9320# If that didn't work, only try xmkmf and file system searches
9321# for native compilation.
9322if test x"$ac_x_includes" = xno && test "$cross_compiling" = no
9323then :
9324 rm -f -r conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009325if mkdir conftest.dir; then
9326 cd conftest.dir
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009327 cat >Imakefile <<'_ACEOF'
Bram Moolenaar446cb832008-06-24 21:56:24 +00009328incroot:
9329 @echo incroot='${INCROOT}'
9330usrlibdir:
9331 @echo usrlibdir='${USRLIBDIR}'
9332libdir:
9333 @echo libdir='${LIBDIR}'
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009334_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +00009335 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
Bram Moolenaar7db77842014-03-27 17:40:59 +01009336 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
Bram Moolenaar446cb832008-06-24 21:56:24 +00009337 for ac_var in incroot usrlibdir libdir; do
9338 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9339 done
Bram Moolenaar071d4272004-06-13 20:20:40 +00009340 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
Bram Moolenaar446cb832008-06-24 21:56:24 +00009341 for ac_extension in a so sl dylib la dll; do
9342 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9343 test -f "$ac_im_libdir/libX11.$ac_extension"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009344 ac_im_usrlibdir=$ac_im_libdir; break
Bram Moolenaar071d4272004-06-13 20:20:40 +00009345 fi
9346 done
9347 # Screen out bogus values from the imake configuration. They are
9348 # bogus both because they are the default anyway, and because
9349 # using them would break gcc on systems where it needs fixed includes.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009350 case $ac_im_incroot in
Bram Moolenaar446cb832008-06-24 21:56:24 +00009351 /usr/include) ac_x_includes= ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009352 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009353 esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009354 case $ac_im_usrlibdir in
Bram Moolenaar32f31b12009-05-21 13:20:59 +00009355 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009356 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +00009357 esac
9358 fi
9359 cd ..
Bram Moolenaar446cb832008-06-24 21:56:24 +00009360 rm -f -r conftest.dir
Bram Moolenaar071d4272004-06-13 20:20:40 +00009361fi
9362
Illia Bobyra96d5442023-08-30 16:30:15 +02009363 # Standard set of common directories for X headers.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009364# Check X11 before X11Rn because it is often a symlink to the current release.
9365ac_x_header_dirs='
9366/usr/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009367/usr/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009368/usr/X11R6/include
9369/usr/X11R5/include
9370/usr/X11R4/include
Bram Moolenaar071d4272004-06-13 20:20:40 +00009371
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009372/usr/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009373/usr/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009374/usr/include/X11R6
9375/usr/include/X11R5
9376/usr/include/X11R4
9377
9378/usr/local/X11/include
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009379/usr/local/X11R7/include
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009380/usr/local/X11R6/include
9381/usr/local/X11R5/include
9382/usr/local/X11R4/include
9383
9384/usr/local/include/X11
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009385/usr/local/include/X11R7
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009386/usr/local/include/X11R6
9387/usr/local/include/X11R5
9388/usr/local/include/X11R4
9389
Illia Bobyra96d5442023-08-30 16:30:15 +02009390/opt/X11/include
9391
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009392/usr/X386/include
9393/usr/x386/include
9394/usr/XFree86/include/X11
9395
9396/usr/include
9397/usr/local/include
9398/usr/unsupported/include
9399/usr/athena/include
9400/usr/local/x11r5/include
9401/usr/lpp/Xamples/include
9402
9403/usr/openwin/include
9404/usr/openwin/share/include'
9405
9406if test "$ac_x_includes" = no; then
Bram Moolenaar446cb832008-06-24 21:56:24 +00009407 # Guess where to find include files, by looking for Xlib.h.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009408 # First, try using that file with no special directory specified.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009410/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00009411#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009412_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009413if ac_fn_c_try_cpp "$LINENO"
9414then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009415 # We can compile using X headers with no special include directory.
9416ac_x_includes=
Christian Brabandt9670f612025-05-07 21:44:33 +02009417else case e in #(
9418 e) for ac_dir in $ac_x_header_dirs; do
Bram Moolenaar446cb832008-06-24 21:56:24 +00009419 if test -r "$ac_dir/X11/Xlib.h"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009420 ac_x_includes=$ac_dir
9421 break
9422 fi
Christian Brabandt9670f612025-05-07 21:44:33 +02009423done ;;
9424esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009425fi
Bram Moolenaar7db77842014-03-27 17:40:59 +01009426rm -f conftest.err conftest.i conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009427fi # $ac_x_includes = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009428
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009429if test "$ac_x_libraries" = no; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009430 # Check for the libraries.
Bram Moolenaar071d4272004-06-13 20:20:40 +00009431 # See if we find them without any special options.
9432 # Don't add to $LIBS permanently.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009433 ac_save_LIBS=$LIBS
Bram Moolenaar446cb832008-06-24 21:56:24 +00009434 LIBS="-lX11 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009436/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +00009437#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009438int
Illia Bobyra96d5442023-08-30 16:30:15 +02009439main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009440{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009441XrmInitialize ()
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009442 ;
9443 return 0;
9444}
9445_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009446if ac_fn_c_try_link "$LINENO"
9447then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009448 LIBS=$ac_save_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009449# We can link X programs with no special library path.
9450ac_x_libraries=
Christian Brabandt9670f612025-05-07 21:44:33 +02009451else case e in #(
9452 e) LIBS=$ac_save_LIBS
Illia Bobyra96d5442023-08-30 16:30:15 +02009453for 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 +00009454do
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009455 # Don't even attempt the hair of trying to link an X program!
Bram Moolenaar446cb832008-06-24 21:56:24 +00009456 for ac_extension in a so sl dylib la dll; do
9457 if test -r "$ac_dir/libX11.$ac_extension"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +00009458 ac_x_libraries=$ac_dir
9459 break 2
9460 fi
9461 done
Christian Brabandt9670f612025-05-07 21:44:33 +02009462done ;;
9463esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009464fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009465rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009466 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009467fi # $ac_x_libraries = no
Bram Moolenaar071d4272004-06-13 20:20:40 +00009468
Illia Bobyra96d5442023-08-30 16:30:15 +02009469fi
9470# Record the results.
Bram Moolenaar446cb832008-06-24 21:56:24 +00009471case $ac_x_includes,$ac_x_libraries in #(
Illia Bobyra96d5442023-08-30 16:30:15 +02009472 no,* | *,no | *\'*) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009473 # Didn't find X, or a directory has "'" in its name.
Illia Bobyra96d5442023-08-30 16:30:15 +02009474 ac_cv_have_x="have_x=no" ;; #(
9475 *) :
Bram Moolenaar446cb832008-06-24 21:56:24 +00009476 # Record where we found X for the cache.
9477 ac_cv_have_x="have_x=yes\
9478 ac_x_includes='$ac_x_includes'\
Illia Bobyra96d5442023-08-30 16:30:15 +02009479 ac_x_libraries='$ac_x_libraries'" ;;
Christian Brabandt9670f612025-05-07 21:44:33 +02009480esac ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +00009481esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009482fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009483;; #(
9484 *) have_x=yes;;
9485 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009486 eval "$ac_cv_have_x"
9487fi # $with_x != no
9488
9489if test "$have_x" != yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9491printf "%s\n" "$have_x" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009492 no_x=yes
9493else
9494 # If each of the values was on the command line, it overrides each guess.
9495 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9496 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9497 # Update the cache value to reflect the command line values.
Bram Moolenaar446cb832008-06-24 21:56:24 +00009498 ac_cv_have_x="have_x=yes\
9499 ac_x_includes='$x_includes'\
9500 ac_x_libraries='$x_libraries'"
Illia Bobyra96d5442023-08-30 16:30:15 +02009501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9502printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +00009503fi
9504
9505if test "$no_x" = yes; then
9506 # Not all programs may use this symbol, but it does not hurt to define it.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009507
Illia Bobyra96d5442023-08-30 16:30:15 +02009508printf "%s\n" "#define X_DISPLAY_MISSING 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +00009509
9510 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9511else
9512 if test -n "$x_includes"; then
9513 X_CFLAGS="$X_CFLAGS -I$x_includes"
9514 fi
9515
9516 # It would also be nice to do this for all -L options, not just this one.
9517 if test -n "$x_libraries"; then
9518 X_LIBS="$X_LIBS -L$x_libraries"
9519 # For Solaris; some versions of Sun CC require a space after -R and
9520 # others require no space. Words are not sufficient . . . .
Illia Bobyra96d5442023-08-30 16:30:15 +02009521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
9522printf %s "checking whether -R must be followed by a space... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009523 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9524 ac_xsave_c_werror_flag=$ac_c_werror_flag
9525 ac_c_werror_flag=yes
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009527/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009528
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009529int
Illia Bobyra96d5442023-08-30 16:30:15 +02009530main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009531{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009532
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009533 ;
9534 return 0;
9535}
9536_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009537if ac_fn_c_try_link "$LINENO"
9538then :
9539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9540printf "%s\n" "no" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009541 X_LIBS="$X_LIBS -R$x_libraries"
Christian Brabandt9670f612025-05-07 21:44:33 +02009542else case e in #(
9543 e) LIBS="$ac_xsave_LIBS -R $x_libraries"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009545/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +00009546
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009547int
Illia Bobyra96d5442023-08-30 16:30:15 +02009548main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009549{
Bram Moolenaar071d4272004-06-13 20:20:40 +00009550
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009551 ;
9552 return 0;
9553}
9554_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009555if ac_fn_c_try_link "$LINENO"
9556then :
9557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9558printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +00009559 X_LIBS="$X_LIBS -R $x_libraries"
Christian Brabandt9670f612025-05-07 21:44:33 +02009560else case e in #(
9561 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
9562printf "%s\n" "neither works" >&6; } ;;
9563esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009564fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009565rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +02009566 conftest$ac_exeext conftest.$ac_ext ;;
9567esac
Bram Moolenaar446cb832008-06-24 21:56:24 +00009568fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009569rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009570 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +00009571 ac_c_werror_flag=$ac_xsave_c_werror_flag
9572 LIBS=$ac_xsave_LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009573 fi
9574
9575 # Check for system-dependent libraries X programs must link with.
9576 # Do this before checking for the system-independent R6 libraries
9577 # (-lICE), since we may need -lsocket or whatever for X linking.
9578
9579 if test "$ISC" = yes; then
9580 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
9581 else
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009582 # Martyn Johnson says this is needed for Ultrix, if the X
9583 # libraries were built with DECnet support. And Karl Berry says
Bram Moolenaar071d4272004-06-13 20:20:40 +00009584 # the Alpha needs dnet_stub (dnet does not exist).
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009585 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009587/* end confdefs.h. */
9588
Bram Moolenaar446cb832008-06-24 21:56:24 +00009589/* Override any GCC internal prototype to avoid an error.
9590 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009591 builtin and then its argument prototype would still apply.
9592 The 'extern "C"' is for builds by C++ compilers;
9593 although this is not generally supported in C code supporting it here
9594 has little cost and some practical benefit (sr 110532). */
9595#ifdef __cplusplus
9596extern "C"
9597#endif
9598char XOpenDisplay (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009599int
Illia Bobyra96d5442023-08-30 16:30:15 +02009600main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009601{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009602return XOpenDisplay ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009603 ;
9604 return 0;
9605}
9606_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009607if ac_fn_c_try_link "$LINENO"
9608then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009609
Christian Brabandt9670f612025-05-07 21:44:33 +02009610else case e in #(
9611 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +02009612printf %s "checking for dnet_ntoa in -ldnet... " >&6; }
9613if test ${ac_cv_lib_dnet_dnet_ntoa+y}
9614then :
9615 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009616else case e in #(
9617 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009618LIBS="-ldnet $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009620/* end confdefs.h. */
9621
Bram Moolenaar446cb832008-06-24 21:56:24 +00009622/* Override any GCC internal prototype to avoid an error.
9623 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009624 builtin and then its argument prototype would still apply.
9625 The 'extern "C"' is for builds by C++ compilers;
9626 although this is not generally supported in C code supporting it here
9627 has little cost and some practical benefit (sr 110532). */
9628#ifdef __cplusplus
9629extern "C"
9630#endif
9631char dnet_ntoa (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009632int
Illia Bobyra96d5442023-08-30 16:30:15 +02009633main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009634{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009635return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009636 ;
9637 return 0;
9638}
9639_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009640if ac_fn_c_try_link "$LINENO"
9641then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009642 ac_cv_lib_dnet_dnet_ntoa=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009643else case e in #(
9644 e) ac_cv_lib_dnet_dnet_ntoa=no ;;
9645esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009646fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009647rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009648 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009649LIBS=$ac_check_lib_save_LIBS ;;
9650esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009651fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9653printf "%s\n" "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
9654if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes
9655then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009656 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009657fi
9658
9659 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
9661printf %s "checking for dnet_ntoa in -ldnet_stub... " >&6; }
9662if test ${ac_cv_lib_dnet_stub_dnet_ntoa+y}
9663then :
9664 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009665else case e in #(
9666 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009667LIBS="-ldnet_stub $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009669/* end confdefs.h. */
9670
Bram Moolenaar446cb832008-06-24 21:56:24 +00009671/* Override any GCC internal prototype to avoid an error.
9672 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009673 builtin and then its argument prototype would still apply.
9674 The 'extern "C"' is for builds by C++ compilers;
9675 although this is not generally supported in C code supporting it here
9676 has little cost and some practical benefit (sr 110532). */
9677#ifdef __cplusplus
9678extern "C"
9679#endif
9680char dnet_ntoa (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009681int
Illia Bobyra96d5442023-08-30 16:30:15 +02009682main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009683{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009684return dnet_ntoa ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009685 ;
9686 return 0;
9687}
9688_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009689if ac_fn_c_try_link "$LINENO"
9690then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009691 ac_cv_lib_dnet_stub_dnet_ntoa=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009692else case e in #(
9693 e) ac_cv_lib_dnet_stub_dnet_ntoa=no ;;
9694esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009695fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009696rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009697 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009698LIBS=$ac_check_lib_save_LIBS ;;
9699esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009700fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009701{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9702printf "%s\n" "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
9703if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes
9704then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009705 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009706fi
9707
Christian Brabandt9670f612025-05-07 21:44:33 +02009708 fi ;;
9709esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009710fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009711rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009712 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009713 LIBS="$ac_xsave_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009714
9715 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9716 # to get the SysV transport functions.
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009717 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009718 # needs -lnsl.
9719 # The nsl library prevents programs from opening the X display
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009720 # on Irix 5.2, according to T.E. Dickey.
9721 # The functions gethostbyname, getservbyname, and inet_addr are
9722 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009723 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Illia Bobyra96d5442023-08-30 16:30:15 +02009724if test "x$ac_cv_func_gethostbyname" = xyes
9725then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009726
Bram Moolenaar071d4272004-06-13 20:20:40 +00009727fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009728
Bram Moolenaar071d4272004-06-13 20:20:40 +00009729 if test $ac_cv_func_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
9731printf %s "checking for gethostbyname in -lnsl... " >&6; }
9732if test ${ac_cv_lib_nsl_gethostbyname+y}
9733then :
9734 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009735else case e in #(
9736 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009737LIBS="-lnsl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009739/* end confdefs.h. */
9740
Bram Moolenaar446cb832008-06-24 21:56:24 +00009741/* Override any GCC internal prototype to avoid an error.
9742 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009743 builtin and then its argument prototype would still apply.
9744 The 'extern "C"' is for builds by C++ compilers;
9745 although this is not generally supported in C code supporting it here
9746 has little cost and some practical benefit (sr 110532). */
9747#ifdef __cplusplus
9748extern "C"
9749#endif
9750char gethostbyname (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009751int
Illia Bobyra96d5442023-08-30 16:30:15 +02009752main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009753{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009754return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009755 ;
9756 return 0;
9757}
9758_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009759if ac_fn_c_try_link "$LINENO"
9760then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009761 ac_cv_lib_nsl_gethostbyname=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009762else case e in #(
9763 e) ac_cv_lib_nsl_gethostbyname=no ;;
9764esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009765fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009766rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009767 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009768LIBS=$ac_check_lib_save_LIBS ;;
9769esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009770fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
9772printf "%s\n" "$ac_cv_lib_nsl_gethostbyname" >&6; }
9773if test "x$ac_cv_lib_nsl_gethostbyname" = xyes
9774then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009775 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009776fi
9777
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009778 if test $ac_cv_lib_nsl_gethostbyname = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
9780printf %s "checking for gethostbyname in -lbsd... " >&6; }
9781if test ${ac_cv_lib_bsd_gethostbyname+y}
9782then :
9783 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009784else case e in #(
9785 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009786LIBS="-lbsd $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009788/* end confdefs.h. */
9789
Bram Moolenaar446cb832008-06-24 21:56:24 +00009790/* Override any GCC internal prototype to avoid an error.
9791 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009792 builtin and then its argument prototype would still apply.
9793 The 'extern "C"' is for builds by C++ compilers;
9794 although this is not generally supported in C code supporting it here
9795 has little cost and some practical benefit (sr 110532). */
9796#ifdef __cplusplus
9797extern "C"
9798#endif
9799char gethostbyname (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009800int
Illia Bobyra96d5442023-08-30 16:30:15 +02009801main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009802{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009803return gethostbyname ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009804 ;
9805 return 0;
9806}
9807_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009808if ac_fn_c_try_link "$LINENO"
9809then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009810 ac_cv_lib_bsd_gethostbyname=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009811else case e in #(
9812 e) ac_cv_lib_bsd_gethostbyname=no ;;
9813esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009814fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009815rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009816 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009817LIBS=$ac_check_lib_save_LIBS ;;
9818esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009819fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009820{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
9821printf "%s\n" "$ac_cv_lib_bsd_gethostbyname" >&6; }
9822if test "x$ac_cv_lib_bsd_gethostbyname" = xyes
9823then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009824 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9825fi
9826
9827 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +00009828 fi
9829
9830 # lieder@skyler.mavd.honeywell.com says without -lsocket,
9831 # socket/setsockopt and other routines are undefined under SCO ODT
9832 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009833 # on later versions), says Simon Leinen: it contains gethostby*
9834 # variants that don't use the name server (or something). -lsocket
9835 # must be given before -lnsl if both are needed. We assume that
9836 # if connect needs -lnsl, so does gethostbyname.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009837 ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
Illia Bobyra96d5442023-08-30 16:30:15 +02009838if test "x$ac_cv_func_connect" = xyes
9839then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009840
Bram Moolenaar071d4272004-06-13 20:20:40 +00009841fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009842
Bram Moolenaar071d4272004-06-13 20:20:40 +00009843 if test $ac_cv_func_connect = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
9845printf %s "checking for connect in -lsocket... " >&6; }
9846if test ${ac_cv_lib_socket_connect+y}
9847then :
9848 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009849else case e in #(
9850 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009851LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009853/* end confdefs.h. */
9854
Bram Moolenaar446cb832008-06-24 21:56:24 +00009855/* Override any GCC internal prototype to avoid an error.
9856 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009857 builtin and then its argument prototype would still apply.
9858 The 'extern "C"' is for builds by C++ compilers;
9859 although this is not generally supported in C code supporting it here
9860 has little cost and some practical benefit (sr 110532). */
9861#ifdef __cplusplus
9862extern "C"
9863#endif
9864char connect (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009865int
Illia Bobyra96d5442023-08-30 16:30:15 +02009866main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009867{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009868return connect ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009869 ;
9870 return 0;
9871}
9872_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009873if ac_fn_c_try_link "$LINENO"
9874then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009875 ac_cv_lib_socket_connect=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009876else case e in #(
9877 e) ac_cv_lib_socket_connect=no ;;
9878esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009879fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009880rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009881 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009882LIBS=$ac_check_lib_save_LIBS ;;
9883esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009884fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
9886printf "%s\n" "$ac_cv_lib_socket_connect" >&6; }
9887if test "x$ac_cv_lib_socket_connect" = xyes
9888then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009889 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009890fi
9891
9892 fi
9893
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009894 # Guillermo Gomez says -lposix is necessary on A/UX.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009895 ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove"
Illia Bobyra96d5442023-08-30 16:30:15 +02009896if test "x$ac_cv_func_remove" = xyes
9897then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009898
Bram Moolenaar071d4272004-06-13 20:20:40 +00009899fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009900
Bram Moolenaar071d4272004-06-13 20:20:40 +00009901 if test $ac_cv_func_remove = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
9903printf %s "checking for remove in -lposix... " >&6; }
9904if test ${ac_cv_lib_posix_remove+y}
9905then :
9906 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009907else case e in #(
9908 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009909LIBS="-lposix $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009911/* end confdefs.h. */
9912
Bram Moolenaar446cb832008-06-24 21:56:24 +00009913/* Override any GCC internal prototype to avoid an error.
9914 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009915 builtin and then its argument prototype would still apply.
9916 The 'extern "C"' is for builds by C++ compilers;
9917 although this is not generally supported in C code supporting it here
9918 has little cost and some practical benefit (sr 110532). */
9919#ifdef __cplusplus
9920extern "C"
9921#endif
9922char remove (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009923int
Illia Bobyra96d5442023-08-30 16:30:15 +02009924main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009925{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009926return remove ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009927 ;
9928 return 0;
9929}
9930_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009931if ac_fn_c_try_link "$LINENO"
9932then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009933 ac_cv_lib_posix_remove=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009934else case e in #(
9935 e) ac_cv_lib_posix_remove=no ;;
9936esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009937fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009938rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009939 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009940LIBS=$ac_check_lib_save_LIBS ;;
9941esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009942fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009943{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
9944printf "%s\n" "$ac_cv_lib_posix_remove" >&6; }
9945if test "x$ac_cv_lib_posix_remove" = xyes
9946then :
Bram Moolenaar071d4272004-06-13 20:20:40 +00009947 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
Bram Moolenaar071d4272004-06-13 20:20:40 +00009948fi
9949
9950 fi
9951
9952 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009953 ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
Illia Bobyra96d5442023-08-30 16:30:15 +02009954if test "x$ac_cv_func_shmat" = xyes
9955then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009956
Bram Moolenaar071d4272004-06-13 20:20:40 +00009957fi
Bram Moolenaar446cb832008-06-24 21:56:24 +00009958
Bram Moolenaar071d4272004-06-13 20:20:40 +00009959 if test $ac_cv_func_shmat = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +02009960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
9961printf %s "checking for shmat in -lipc... " >&6; }
9962if test ${ac_cv_lib_ipc_shmat+y}
9963then :
9964 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +02009965else case e in #(
9966 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +00009967LIBS="-lipc $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009969/* end confdefs.h. */
9970
Bram Moolenaar446cb832008-06-24 21:56:24 +00009971/* Override any GCC internal prototype to avoid an error.
9972 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +02009973 builtin and then its argument prototype would still apply.
9974 The 'extern "C"' is for builds by C++ compilers;
9975 although this is not generally supported in C code supporting it here
9976 has little cost and some practical benefit (sr 110532). */
9977#ifdef __cplusplus
9978extern "C"
9979#endif
9980char shmat (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009981int
Illia Bobyra96d5442023-08-30 16:30:15 +02009982main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009983{
Bram Moolenaar446cb832008-06-24 21:56:24 +00009984return shmat ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009985 ;
9986 return 0;
9987}
9988_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +02009989if ac_fn_c_try_link "$LINENO"
9990then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +00009991 ac_cv_lib_ipc_shmat=yes
Christian Brabandt9670f612025-05-07 21:44:33 +02009992else case e in #(
9993 e) ac_cv_lib_ipc_shmat=no ;;
9994esac
Bram Moolenaar071d4272004-06-13 20:20:40 +00009995fi
Illia Bobyra96d5442023-08-30 16:30:15 +02009996rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +02009997 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +02009998LIBS=$ac_check_lib_save_LIBS ;;
9999esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010000fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010001{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
10002printf "%s\n" "$ac_cv_lib_ipc_shmat" >&6; }
10003if test "x$ac_cv_lib_ipc_shmat" = xyes
10004then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010005 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010006fi
10007
10008 fi
10009 fi
10010
10011 # Check for libraries that X11R6 Xt/Xaw programs need.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010012 ac_save_LDFLAGS=$LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010013 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10014 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10015 # check for ICE first), but we must link in the order -lSM -lICE or
10016 # we get undefined symbols. So assume we have SM if we have ICE.
10017 # These have to be linked with before -lX11, unlike the other
10018 # libraries we check for below, so use a different variable.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010019 # John Interrante, Karl Berry
Illia Bobyra96d5442023-08-30 16:30:15 +020010020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
10021printf %s "checking for IceConnectionNumber in -lICE... " >&6; }
10022if test ${ac_cv_lib_ICE_IceConnectionNumber+y}
10023then :
10024 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010025else case e in #(
10026 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010027LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010029/* end confdefs.h. */
10030
Bram Moolenaar446cb832008-06-24 21:56:24 +000010031/* Override any GCC internal prototype to avoid an error.
10032 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020010033 builtin and then its argument prototype would still apply.
10034 The 'extern "C"' is for builds by C++ compilers;
10035 although this is not generally supported in C code supporting it here
10036 has little cost and some practical benefit (sr 110532). */
10037#ifdef __cplusplus
10038extern "C"
10039#endif
10040char IceConnectionNumber (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010041int
Illia Bobyra96d5442023-08-30 16:30:15 +020010042main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010043{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010044return IceConnectionNumber ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010045 ;
10046 return 0;
10047}
10048_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010049if ac_fn_c_try_link "$LINENO"
10050then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010051 ac_cv_lib_ICE_IceConnectionNumber=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020010052else case e in #(
10053 e) ac_cv_lib_ICE_IceConnectionNumber=no ;;
10054esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010055fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010056rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010057 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020010058LIBS=$ac_check_lib_save_LIBS ;;
10059esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010060fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010061{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10062printf "%s\n" "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
10063if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes
10064then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010065 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010066fi
10067
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010068 LDFLAGS=$ac_save_LDFLAGS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010069
10070fi
10071
10072
Bram Moolenaar2c704a72010-06-03 21:17:25 +020010073 if test "$zOSUnix" = "yes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010074 CFLAGS="$CFLAGS -W c,dll"
10075 LDFLAGS="$LDFLAGS -W l,dll"
10076 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE -lXmu"
10077 fi
10078
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010079
Bram Moolenaar071d4272004-06-13 20:20:40 +000010080 if test -d "$x_includes" && test ! -d "$x_libraries"; then
10081 x_libraries=`echo "$x_includes" | sed s/include/lib/`
Illia Bobyra96d5442023-08-30 16:30:15 +020010082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X libraries to $x_libraries" >&5
10083printf "%s\n" "Corrected X libraries to $x_libraries" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010084 X_LIBS="$X_LIBS -L$x_libraries"
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000010085 if test "$vim_cv_uname_output" = SunOS &&
10086 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010087 X_LIBS="$X_LIBS -R $x_libraries"
10088 fi
10089 fi
10090
10091 if test -d "$x_libraries" && test ! -d "$x_includes"; then
10092 x_includes=`echo "$x_libraries" | sed s/lib/include/`
Illia Bobyra96d5442023-08-30 16:30:15 +020010093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Corrected X includes to $x_includes" >&5
10094printf "%s\n" "Corrected X includes to $x_includes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010095 X_CFLAGS="$X_CFLAGS -I$x_includes"
10096 fi
10097
10098 X_CFLAGS="`echo $X_CFLAGS\ | sed 's%-I/usr/include %%'`"
10099 X_LIBS="`echo $X_LIBS\ | sed 's%-L/usr/lib %%'`"
10100 X_LIBS="`echo $X_LIBS\ | sed -e 's%-R/usr/lib %%' -e 's%-R /usr/lib %%'`"
10101
10102
Illia Bobyra96d5442023-08-30 16:30:15 +020010103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files can be found" >&5
10104printf %s "checking if X11 header files can be found... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010105 cflags_save=$CFLAGS
10106 CFLAGS="$CFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010108/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010109#include <X11/Xlib.h>
Bram Moolenaar00ca2842008-06-26 20:14:00 +000010110#include <X11/Intrinsic.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010111int
Illia Bobyra96d5442023-08-30 16:30:15 +020010112main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010113{
Bram Moolenaar071d4272004-06-13 20:20:40 +000010114
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010115 ;
10116 return 0;
10117}
10118_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010119if ac_fn_c_try_compile "$LINENO"
10120then :
10121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10122printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020010123else case e in #(
10124 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10125printf "%s\n" "no" >&6; }; no_x=yes ;;
10126esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010127fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010128rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000010129 CFLAGS=$cflags_save
10130
10131 if test "${no_x-no}" = yes; then
10132 with_x=no
10133 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010134 printf "%s\n" "#define HAVE_X11 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000010135
10136 X_LIB="-lXt -lX11";
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010137
Bram Moolenaar071d4272004-06-13 20:20:40 +000010138
10139 ac_save_LDFLAGS="$LDFLAGS"
10140 LDFLAGS="-L$x_libraries $LDFLAGS"
10141
Illia Bobyra96d5442023-08-30 16:30:15 +020010142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _XdmcpAuthDoIt in -lXdmcp" >&5
10143printf %s "checking for _XdmcpAuthDoIt in -lXdmcp... " >&6; }
10144if test ${ac_cv_lib_Xdmcp__XdmcpAuthDoIt+y}
10145then :
10146 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010147else case e in #(
10148 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010149LIBS="-lXdmcp -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lXdmcp $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010151/* end confdefs.h. */
10152
Bram Moolenaar446cb832008-06-24 21:56:24 +000010153/* Override any GCC internal prototype to avoid an error.
10154 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020010155 builtin and then its argument prototype would still apply.
10156 The 'extern "C"' is for builds by C++ compilers;
10157 although this is not generally supported in C code supporting it here
10158 has little cost and some practical benefit (sr 110532). */
10159#ifdef __cplusplus
10160extern "C"
10161#endif
10162char _XdmcpAuthDoIt (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010163int
Illia Bobyra96d5442023-08-30 16:30:15 +020010164main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010165{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010166return _XdmcpAuthDoIt ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010167 ;
10168 return 0;
10169}
10170_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010171if ac_fn_c_try_link "$LINENO"
10172then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010173 ac_cv_lib_Xdmcp__XdmcpAuthDoIt=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020010174else case e in #(
10175 e) ac_cv_lib_Xdmcp__XdmcpAuthDoIt=no ;;
10176esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010177fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010178rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010179 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020010180LIBS=$ac_check_lib_save_LIBS ;;
10181esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010182fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010183{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&5
10184printf "%s\n" "$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" >&6; }
10185if test "x$ac_cv_lib_Xdmcp__XdmcpAuthDoIt" = xyes
10186then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010187 X_EXTRA_LIBS="$X_EXTRA_LIBS -lXdmcp"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010188fi
10189
10190
Illia Bobyra96d5442023-08-30 16:30:15 +020010191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IceOpenConnection in -lICE" >&5
10192printf %s "checking for IceOpenConnection in -lICE... " >&6; }
10193if test ${ac_cv_lib_ICE_IceOpenConnection+y}
10194then :
10195 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010196else case e in #(
10197 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010198LIBS="-lICE $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010200/* end confdefs.h. */
10201
Bram Moolenaar446cb832008-06-24 21:56:24 +000010202/* Override any GCC internal prototype to avoid an error.
10203 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020010204 builtin and then its argument prototype would still apply.
10205 The 'extern "C"' is for builds by C++ compilers;
10206 although this is not generally supported in C code supporting it here
10207 has little cost and some practical benefit (sr 110532). */
10208#ifdef __cplusplus
10209extern "C"
10210#endif
10211char IceOpenConnection (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010212int
Illia Bobyra96d5442023-08-30 16:30:15 +020010213main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010214{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010215return IceOpenConnection ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010216 ;
10217 return 0;
10218}
10219_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010220if ac_fn_c_try_link "$LINENO"
10221then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010222 ac_cv_lib_ICE_IceOpenConnection=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020010223else case e in #(
10224 e) ac_cv_lib_ICE_IceOpenConnection=no ;;
10225esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010226fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010227rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010228 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020010229LIBS=$ac_check_lib_save_LIBS ;;
10230esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010231fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010232{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceOpenConnection" >&5
10233printf "%s\n" "$ac_cv_lib_ICE_IceOpenConnection" >&6; }
10234if test "x$ac_cv_lib_ICE_IceOpenConnection" = xyes
10235then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010236 X_EXTRA_LIBS="$X_EXTRA_LIBS -lSM -lICE"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010237fi
10238
10239
10240 LDFLAGS="$X_LIBS $ac_save_LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020010241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmCreatePixmapFromData in -lXpm" >&5
10242printf %s "checking for XpmCreatePixmapFromData in -lXpm... " >&6; }
10243if test ${ac_cv_lib_Xpm_XpmCreatePixmapFromData+y}
10244then :
10245 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010246else case e in #(
10247 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000010248LIBS="-lXpm -lXt $X_PRE_LIBS -lXpm -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010250/* end confdefs.h. */
10251
Bram Moolenaar446cb832008-06-24 21:56:24 +000010252/* Override any GCC internal prototype to avoid an error.
10253 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020010254 builtin and then its argument prototype would still apply.
10255 The 'extern "C"' is for builds by C++ compilers;
10256 although this is not generally supported in C code supporting it here
10257 has little cost and some practical benefit (sr 110532). */
10258#ifdef __cplusplus
10259extern "C"
10260#endif
10261char XpmCreatePixmapFromData (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010262int
Illia Bobyra96d5442023-08-30 16:30:15 +020010263main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010264{
Bram Moolenaar446cb832008-06-24 21:56:24 +000010265return XpmCreatePixmapFromData ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010266 ;
10267 return 0;
10268}
10269_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010270if ac_fn_c_try_link "$LINENO"
10271then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010272 ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020010273else case e in #(
10274 e) ac_cv_lib_Xpm_XpmCreatePixmapFromData=no ;;
10275esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010276fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010277rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010278 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020010279LIBS=$ac_check_lib_save_LIBS ;;
10280esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010281fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010282{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
10283printf "%s\n" "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6; }
10284if test "x$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = xyes
10285then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010286 X_PRE_LIBS="$X_PRE_LIBS -lXpm"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010287fi
10288
10289
Illia Bobyra96d5442023-08-30 16:30:15 +020010290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if X11 header files implicitly declare return values" >&5
10291printf %s "checking if X11 header files implicitly declare return values... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010292 cflags_save=$CFLAGS
Bram Moolenaard1864592013-05-04 04:40:15 +020010293 if test "$GCC" = yes; then
10294 CFLAGS="$CFLAGS $X_CFLAGS -Werror"
10295 else
10296 CFLAGS="$CFLAGS $X_CFLAGS"
10297 fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010299/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010300#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010301int
Illia Bobyra96d5442023-08-30 16:30:15 +020010302main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010303{
Bram Moolenaar071d4272004-06-13 20:20:40 +000010304
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010305 ;
10306 return 0;
10307}
10308_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010309if ac_fn_c_try_compile "$LINENO"
10310then :
10311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10312printf "%s\n" "no" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020010313else case e in #(
10314 e) CFLAGS="$CFLAGS -Wno-implicit-int"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010316/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010317#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010318int
Illia Bobyra96d5442023-08-30 16:30:15 +020010319main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010320{
Bram Moolenaar071d4272004-06-13 20:20:40 +000010321
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010322 ;
10323 return 0;
10324}
10325_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010326if ac_fn_c_try_compile "$LINENO"
10327then :
10328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10329printf "%s\n" "yes" >&6; }; cflags_save="$cflags_save -Wno-implicit-int"
Christian Brabandt9670f612025-05-07 21:44:33 +020010330else case e in #(
10331 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: test failed" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020010332printf "%s\n" "test failed" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020010333 ;;
10334esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010335fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010336rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020010337 ;;
10338esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010339fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010340rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000010341 CFLAGS=$cflags_save
10342
10343 LDFLAGS="$ac_save_LDFLAGS"
10344
Mike Gilberta055b442023-08-20 19:01:41 +020010345 # The cast to long int works around a bug in the HP C Compiler
10346# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020010347# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Mike Gilberta055b442023-08-20 19:01:41 +020010348# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020010349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
10350printf %s "checking size of wchar_t... " >&6; }
10351if test ${ac_cv_sizeof_wchar_t+y}
10352then :
10353 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010354else case e in #(
10355 e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020010356then :
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +000010357
Christian Brabandt9670f612025-05-07 21:44:33 +020010358else case e in #(
10359 e) if test "$ac_cv_type_wchar_t" = yes; then
10360 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
10361printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Mike Gilberta055b442023-08-20 19:01:41 +020010362as_fn_error 77 "cannot compute sizeof (wchar_t)
Christian Brabandt9670f612025-05-07 21:44:33 +020010363See 'config.log' for more details" "$LINENO" 5; }
Mike Gilberta055b442023-08-20 19:01:41 +020010364 else
10365 ac_cv_sizeof_wchar_t=0
Christian Brabandt9670f612025-05-07 21:44:33 +020010366 fi ;;
10367esac
Mike Gilberta055b442023-08-20 19:01:41 +020010368fi
Christian Brabandt9670f612025-05-07 21:44:33 +020010369 ;;
10370esac
Mike Gilberta055b442023-08-20 19:01:41 +020010371fi
Illia Bobyra96d5442023-08-30 16:30:15 +020010372{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
10373printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; }
Mike Gilberta055b442023-08-20 19:01:41 +020010374
10375
10376
Illia Bobyra96d5442023-08-30 16:30:15 +020010377printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +000010378
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +000010379
Mike Gilberta055b442023-08-20 19:01:41 +020010380 if test "$ac_cv_sizeof_wchar_t" -le 2; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010381 printf "%s\n" "#define SMALL_WCHAR_T 1" >>confdefs.h
Bram Moolenaar4bdbbf72009-05-21 21:27:43 +000010382
10383 fi
10384
Bram Moolenaar071d4272004-06-13 20:20:40 +000010385 fi
10386fi
10387
Bram Moolenaard2a05492018-07-27 22:35:15 +020010388if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then
10389 as_fn_error $? "could not configure X" "$LINENO" 5
10390fi
10391
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010392test "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 +000010393
Illia Bobyra96d5442023-08-30 16:30:15 +020010394{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5
10395printf %s "checking --enable-gui argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000010396# Check whether --enable-gui was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010397if test ${enable_gui+y}
10398then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010399 enableval=$enable_gui;
Christian Brabandt9670f612025-05-07 21:44:33 +020010400else case e in #(
10401 e) enable_gui="auto" ;;
10402esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000010403fi
10404
Bram Moolenaar071d4272004-06-13 20:20:40 +000010405
10406enable_gui_canon=`echo "_$enable_gui" | \
10407 sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10408
Bram Moolenaar071d4272004-06-13 20:20:40 +000010409SKIP_GTK2=YES
Bram Moolenaar1858a842016-02-23 22:30:31 +010010410SKIP_GTK3=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +000010411SKIP_GNOME=YES
10412SKIP_MOTIF=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +000010413SKIP_PHOTON=YES
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010414SKIP_HAIKU=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +000010415GUITYPE=NONE
10416
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010417if test "x$HAIKU" = "xyes"; then
10418 SKIP_HAIKU=
10419 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +020010420 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
10421printf "%s\n" "no GUI support" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010422 SKIP_HAIKU=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010423 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
10424printf "%s\n" "yes - automatic GUI support" >&6; } ;;
10425 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5
10426printf "%s\n" "auto - automatic GUI support" >&6; } ;;
10427 haiku) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Haiku GUI support" >&5
10428printf "%s\n" "Haiku GUI support" >&6; } ;;
10429 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
10430printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaarb3f74062020-02-26 16:16:53 +010010431 SKIP_HAIKU=YES ;;
10432 esac
10433elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010434 SKIP_PHOTON=
10435 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +020010436 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
10437printf "%s\n" "no GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010438 SKIP_PHOTON=YES ;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010439 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: automatic GUI support" >&5
10440printf "%s\n" "automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010441 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010442 photon) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Photon GUI support" >&5
10443printf "%s\n" "Photon GUI support" >&6; } ;;
10444 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
10445printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010446 SKIP_PHOTON=YES ;;
10447 esac
10448
Bram Moolenaar040f9752020-08-11 23:08:48 +020010449elif test "x$MACOS_X" = "xyes" -a "x$with_x" = "xno" ; then
10450 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +020010451 no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
10452printf "%s\n" "no GUI support" >&6; } ;;
10453 yes|"") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5
10454printf "%s\n" "yes - automatic GUI support" >&6; }
Bram Moolenaar040f9752020-08-11 23:08:48 +020010455 gui_auto=yes ;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010456 auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: auto - disable GUI support for Mac OS" >&5
10457printf "%s\n" "auto - disable GUI support for Mac OS" >&6; } ;;
10458 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
10459printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar040f9752020-08-11 23:08:48 +020010460 esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000010461else
10462
Bram Moolenaar071d4272004-06-13 20:20:40 +000010463 case "$enable_gui_canon" in
Illia Bobyra96d5442023-08-30 16:30:15 +020010464 no|none) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5
10465printf "%s\n" "no GUI support" >&6; } ;;
10466 yes|""|auto) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes/auto - automatic GUI support" >&5
10467printf "%s\n" "yes/auto - automatic GUI support" >&6; }
Bram Moolenaaraf0839a2018-12-30 22:55:47 +010010468 gui_auto=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +000010469 SKIP_GTK2=
Bram Moolenaarf272ae12021-01-31 19:52:50 +010010470 SKIP_GTK3=
Bram Moolenaar071d4272004-06-13 20:20:40 +000010471 SKIP_GNOME=
Bram Moolenaarf52fac22022-03-11 16:01:26 +000010472 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010473 gtk2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2.x GUI support" >&5
10474printf "%s\n" "GTK+ 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010475 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010476 gnome2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GNOME 2.x GUI support" >&5
10477printf "%s\n" "GNOME 2.x GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010478 SKIP_GNOME=
Bram Moolenaar071d4272004-06-13 20:20:40 +000010479 SKIP_GTK2=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010480 gtk3) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 3.x GUI support" >&5
10481printf "%s\n" "GTK+ 3.x GUI support" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010482 SKIP_GTK3=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010483 motif) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Motif GUI support" >&5
10484printf "%s\n" "Motif GUI support" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010485 SKIP_MOTIF=;;
Illia Bobyra96d5442023-08-30 16:30:15 +020010486 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5
10487printf "%s\n" "Sorry, $enable_gui GUI is not supported" >&6; } ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010488 esac
10489
10490fi
10491
Bram Moolenaar071d4272004-06-13 20:20:40 +000010492if test "x$SKIP_GTK2" != "xYES" -a "$enable_gui_canon" != "gtk2" \
10493 -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 2" >&5
10495printf %s "checking whether or not to look for GTK+ 2... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000010496 # Check whether --enable-gtk2-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010497if test ${enable_gtk2_check+y}
10498then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010499 enableval=$enable_gtk2_check;
Christian Brabandt9670f612025-05-07 21:44:33 +020010500else case e in #(
10501 e) enable_gtk2_check="yes" ;;
10502esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000010503fi
10504
Illia Bobyra96d5442023-08-30 16:30:15 +020010505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk2_check" >&5
10506printf "%s\n" "$enable_gtk2_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010507 if test "x$enable_gtk2_check" = "xno"; then
10508 SKIP_GTK2=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010509 SKIP_GNOME=YES
Bram Moolenaar071d4272004-06-13 20:20:40 +000010510 fi
10511fi
10512
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010513if test "x$SKIP_GNOME" != "xYES" -a "$enable_gui_canon" != "gnome2"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GNOME" >&5
10515printf %s "checking whether or not to look for GNOME... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000010516 # Check whether --enable-gnome-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010517if test ${enable_gnome_check+y}
10518then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010519 enableval=$enable_gnome_check;
Christian Brabandt9670f612025-05-07 21:44:33 +020010520else case e in #(
10521 e) enable_gnome_check="no" ;;
10522esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000010523fi
10524
Illia Bobyra96d5442023-08-30 16:30:15 +020010525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gnome_check" >&5
10526printf "%s\n" "$enable_gnome_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010527 if test "x$enable_gnome_check" = "xno"; then
10528 SKIP_GNOME=YES
10529 fi
10530fi
10531
Bram Moolenaar98921892016-02-23 17:14:37 +010010532if test "x$SKIP_GTK3" != "xYES" -a "$enable_gui_canon" != "gtk3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for GTK+ 3" >&5
10534printf %s "checking whether or not to look for GTK+ 3... " >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010535 # Check whether --enable-gtk3-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010536if test ${enable_gtk3_check+y}
10537then :
Bram Moolenaar98921892016-02-23 17:14:37 +010010538 enableval=$enable_gtk3_check;
Christian Brabandt9670f612025-05-07 21:44:33 +020010539else case e in #(
10540 e) enable_gtk3_check="yes" ;;
10541esac
Bram Moolenaar98921892016-02-23 17:14:37 +010010542fi
10543
Illia Bobyra96d5442023-08-30 16:30:15 +020010544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk3_check" >&5
10545printf "%s\n" "$enable_gtk3_check" >&6; }
Bram Moolenaar98921892016-02-23 17:14:37 +010010546 if test "x$enable_gtk3_check" = "xno"; then
10547 SKIP_GTK3=YES
10548 fi
10549fi
10550
Bram Moolenaar071d4272004-06-13 20:20:40 +000010551if test "x$SKIP_MOTIF" != "xYES" -a "$enable_gui_canon" != "motif"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not to look for Motif" >&5
10553printf %s "checking whether or not to look for Motif... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000010554 # Check whether --enable-motif-check was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010555if test ${enable_motif_check+y}
10556then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000010557 enableval=$enable_motif_check;
Christian Brabandt9670f612025-05-07 21:44:33 +020010558else case e in #(
10559 e) enable_motif_check="yes" ;;
10560esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000010561fi
10562
Illia Bobyra96d5442023-08-30 16:30:15 +020010563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_motif_check" >&5
10564printf "%s\n" "$enable_motif_check" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010565 if test "x$enable_motif_check" = "xno"; then
10566 SKIP_MOTIF=YES
10567 fi
10568fi
10569
Bram Moolenaar071d4272004-06-13 20:20:40 +000010570
10571
10572
10573
10574
10575
Drew Vogel51995672025-05-28 21:13:52 +020010576if test -z "$PKG_CONFIG"; then
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010577 if test -n "$ac_tool_prefix"; then
Bram Moolenaard6d30422018-01-28 22:48:55 +010010578 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10579set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010580{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10581printf %s "checking for $ac_word... " >&6; }
10582if test ${ac_cv_path_PKG_CONFIG+y}
10583then :
10584 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010585else case e in #(
10586 e) case $PKG_CONFIG in
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010587 [\\/]* | ?:[\\/]*)
Bram Moolenaar071d4272004-06-13 20:20:40 +000010588 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10589 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010590 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010591 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10592for as_dir in $PATH
10593do
10594 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010595 case $as_dir in #(((
10596 '') as_dir=./ ;;
10597 */) ;;
10598 *) as_dir=$as_dir/ ;;
10599 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010600 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010601 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10602 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
10603 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010604 break 2
10605 fi
10606done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010607 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000010608IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010609
Bram Moolenaar071d4272004-06-13 20:20:40 +000010610 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020010611esac ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010612esac
10613fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010614PKG_CONFIG=$ac_cv_path_PKG_CONFIG
Bram Moolenaar071d4272004-06-13 20:20:40 +000010615if test -n "$PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10617printf "%s\n" "$PKG_CONFIG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010618else
Illia Bobyra96d5442023-08-30 16:30:15 +020010619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10620printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010621fi
10622
Bram Moolenaar446cb832008-06-24 21:56:24 +000010623
Bram Moolenaard6d30422018-01-28 22:48:55 +010010624fi
10625if test -z "$ac_cv_path_PKG_CONFIG"; then
10626 ac_pt_PKG_CONFIG=$PKG_CONFIG
10627 # Extract the first word of "pkg-config", so it can be a program name with args.
10628set dummy pkg-config; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020010629{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10630printf %s "checking for $ac_word... " >&6; }
10631if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
10632then :
10633 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020010634else case e in #(
10635 e) case $ac_pt_PKG_CONFIG in
Bram Moolenaard6d30422018-01-28 22:48:55 +010010636 [\\/]* | ?:[\\/]*)
10637 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10638 ;;
10639 *)
10640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10641for as_dir in $PATH
10642do
10643 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020010644 case $as_dir in #(((
10645 '') as_dir=./ ;;
10646 */) ;;
10647 *) as_dir=$as_dir/ ;;
10648 esac
Bram Moolenaard6d30422018-01-28 22:48:55 +010010649 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020010650 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10651 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
10652 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaard6d30422018-01-28 22:48:55 +010010653 break 2
10654 fi
10655done
10656 done
10657IFS=$as_save_IFS
10658
10659 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020010660esac ;;
Bram Moolenaard6d30422018-01-28 22:48:55 +010010661esac
10662fi
10663ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10664if test -n "$ac_pt_PKG_CONFIG"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10666printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010010667else
Illia Bobyra96d5442023-08-30 16:30:15 +020010668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10669printf "%s\n" "no" >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010010670fi
10671
10672 if test "x$ac_pt_PKG_CONFIG" = x; then
10673 PKG_CONFIG="no"
10674 else
10675 case $cross_compiling:$ac_tool_warned in
10676yes:)
Illia Bobyra96d5442023-08-30 16:30:15 +020010677{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10678printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Bram Moolenaard6d30422018-01-28 22:48:55 +010010679ac_tool_warned=yes ;;
10680esac
10681 PKG_CONFIG=$ac_pt_PKG_CONFIG
10682 fi
10683else
10684 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10685fi
10686
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010687fi
10688
Drew Vogel51995672025-05-28 21:13:52 +020010689if test -z "$SKIP_GTK3"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10691printf %s "checking --disable-gtktest argument... " >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010692 # Check whether --enable-gtktest was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020010693if test ${enable_gtktest+y}
10694then :
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010695 enableval=$enable_gtktest;
Christian Brabandt9670f612025-05-07 21:44:33 +020010696else case e in #(
10697 e) enable_gtktest=yes ;;
10698esac
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010699fi
10700
10701 if test "x$enable_gtktest" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020010702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10703printf "%s\n" "gtk test enabled" >&6; }
Bram Moolenaar427f5b62019-06-09 13:43:51 +020010704 else
Illia Bobyra96d5442023-08-30 16:30:15 +020010705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10706printf "%s\n" "gtk test disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000010707 fi
10708
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010709 if test "x$PKG_CONFIG" != "xno"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010710
Drew Vogel51995672025-05-28 21:13:52 +020010711 min_gtk_version="3.0.0"
10712
10713 if test "$PKG_CONFIG" != "no"; then
10714 case $min_gtk_version in #(
10715 2.*) :
10716 gtk_pkg_name="gtk+-2.0" ;; #(
10717 3.*) :
10718 gtk_pkg_name="gtk+-3.0" ;; #(
10719 *) :
10720 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
10721printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
10722as_fn_error $? "The configure script does not know which pkg-config name to use for GTK $min_gtk_version\"
10723See 'config.log' for more details" "$LINENO" 5; } ;;
10724esac
10725
10726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pkg-config $gtk_pkg_name" >&5
10727printf %s "checking for pkg-config $gtk_pkg_name... " >&6; }
10728 if "$PKG_CONFIG" --exists "$gtk_pkg_name"
10729then :
10730
10731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
10732printf "%s\n" "found" >&6; }
10733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10734printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
10735 GTK_CFLAGS=`$PKG_CONFIG --cflags $gtk_pkg_name`
10736 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L $gtk_pkg_name`
10737 GTK_LIBS=`$PKG_CONFIG --libs $gtk_pkg_name`
10738 gtk_major_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10739 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10740 gtk_minor_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10741 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10742 gtk_micro_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10743 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10745printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
10746
10747else case e in #(
10748 e)
10749 GTK_CFLAGS=""
10750 GTK_LIBDIR=""
10751 GTK_LIBS=""
10752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; consider installing your distro GTK -dev package" >&5
10753printf "%s\n" "no; consider installing your distro GTK -dev package" >&6; }
10754 if test "$fail_if_missing" = "yes" -a "$gui_auto" != "yes"; then
10755 as_fn_error $? "pkg-config could not find $gtk_pkg_name" "$LINENO" 5
10756 fi
10757 ;;
10758esac
10759fi
10760 fi
10761
10762 gtktest_success="yes"
10763 if test "$enable_gtktest" = "yes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000010764 {
Drew Vogel51995672025-05-28 21:13:52 +020010765 ac_save_CFLAGS="$CFLAGS"
10766 ac_save_LIBS="$LIBS"
10767 CFLAGS="$CFLAGS $GTK_CFLAGS"
10768 LIBS="$LIBS $GTK_LIBS"
Bram Moolenaar98921892016-02-23 17:14:37 +010010769
Drew Vogel51995672025-05-28 21:13:52 +020010770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ability to compile GTK test program" >&5
10771printf %s "checking ability to compile GTK test program... " >&6; }
10772 if test "$cross_compiling" = yes
Illia Bobyra96d5442023-08-30 16:30:15 +020010773then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000010774 echo $ac_n "cross compiling; assumed OK... $ac_c"
Christian Brabandt9670f612025-05-07 21:44:33 +020010775else case e in #(
10776 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010777/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000010778
10779#include <gtk/gtk.h>
10780#include <stdio.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000010781#if STDC_HEADERS
10782# include <stdlib.h>
10783# include <stddef.h>
10784#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000010785
10786int
10787main ()
10788{
Drew Vogel51995672025-05-28 21:13:52 +020010789 int ex_major = $gtk_major_version;
10790 int ex_minor = $gtk_minor_version;
10791 int ex_micro = $gtk_micro_version;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010792
Drew Vogel51995672025-05-28 21:13:52 +020010793 #if $gtk_major_version == 2
10794 guint ob_major = gtk_major_version;
10795 guint ob_minor = gtk_minor_version;
10796 guint ob_micro = gtk_micro_version;
10797 #else
10798 guint ob_major = gtk_get_major_version();
10799 guint ob_minor = gtk_get_minor_version();
10800 guint ob_micro = gtk_get_micro_version();
10801 #endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000010802
Drew Vogel51995672025-05-28 21:13:52 +020010803 if ((ob_major > ex_major) ||
10804 ((ob_major == ex_major)
10805 && (ob_minor > ex_minor)) ||
10806 ((ob_major == ex_major)
10807 && (ob_minor == ex_minor)
10808 && (ob_micro >= ex_micro)))
10809 return 0;
10810 else
10811 return 1;
Bram Moolenaar071d4272004-06-13 20:20:40 +000010812}
10813
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010814_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020010815if ac_fn_c_try_run "$LINENO"
10816then :
Drew Vogel51995672025-05-28 21:13:52 +020010817 gtktest_success="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10818printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020010819else case e in #(
Drew Vogel51995672025-05-28 21:13:52 +020010820 e) gtktest_success="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10821printf "%s\n" "no" >&6; } ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020010822esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010823fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020010824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020010825 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
10826esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010827fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000010828
Drew Vogel51995672025-05-28 21:13:52 +020010829 CFLAGS="$ac_save_CFLAGS"
10830 LIBS="$ac_save_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010831 }
Drew Vogel51995672025-05-28 21:13:52 +020010832 fi
10833
10834 if test "$gtktest_success" = "yes"; then
10835 GUI_LIB_LOC="$GTK_LIBDIR"
10836 GTK_LIBNAME="$GTK_LIBS"
10837 GUI_INC_LOC="$GTK_CFLAGS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000010838 else
Drew Vogel51995672025-05-28 21:13:52 +020010839 GTK_CFLAGS=""
10840 GTK_LIBDIR=""
Bram Moolenaar071d4272004-06-13 20:20:40 +000010841 GTK_LIBS=""
Drew Vogel51995672025-05-28 21:13:52 +020010842 if test "$fail_if_missing" = "yes" -a "$gui_auto" != "yes"; then
10843 as_fn_error $? "Failed to compile GTK test program." "$LINENO" 5
10844 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000010845 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010846
10847
Bram Moolenaar071d4272004-06-13 20:20:40 +000010848
Drew Vogel51995672025-05-28 21:13:52 +020010849
10850 if test -n "$GTK_CFLAGS"; then
10851 SKIP_GTK2=YES
10852 SKIP_GNOME=YES
Bram Moolenaar182c5be2010-06-25 05:37:59 +020010853 SKIP_MOTIF=YES
10854 GUITYPE=GTK
Bram Moolenaar495de9c2005-01-25 22:03:25 +000010855
Drew Vogel51995672025-05-28 21:13:52 +020010856 printf "%s\n" "#define USE_GTK3 1" >>confdefs.h
10857
10858 fi
10859 fi
10860fi
10861
10862if test -z "$SKIP_GTK2"; then
10863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-gtktest argument" >&5
10864printf %s "checking --disable-gtktest argument... " >&6; }
10865 # Check whether --enable-gtktest was given.
10866if test ${enable_gtktest+y}
10867then :
10868 enableval=$enable_gtktest;
10869else case e in #(
10870 e) enable_gtktest=yes ;;
10871esac
10872fi
10873
10874 if test "x$enable_gtktest" = "xyes" ; then
10875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test enabled" >&5
10876printf "%s\n" "gtk test enabled" >&6; }
10877 else
10878 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gtk test disabled" >&5
10879printf "%s\n" "gtk test disabled" >&6; }
10880 fi
10881
10882 if test "x$PKG_CONFIG" != "xno"; then
10883
10884 min_gtk_version="2.2.0"
10885
10886 if test "$PKG_CONFIG" != "no"; then
10887 case $min_gtk_version in #(
10888 2.*) :
10889 gtk_pkg_name="gtk+-2.0" ;; #(
10890 3.*) :
10891 gtk_pkg_name="gtk+-3.0" ;; #(
10892 *) :
10893 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
10894printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
10895as_fn_error $? "The configure script does not know which pkg-config name to use for GTK $min_gtk_version\"
10896See 'config.log' for more details" "$LINENO" 5; } ;;
10897esac
10898
10899 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pkg-config $gtk_pkg_name" >&5
10900printf %s "checking for pkg-config $gtk_pkg_name... " >&6; }
10901 if "$PKG_CONFIG" --exists "$gtk_pkg_name"
10902then :
10903
10904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5
10905printf "%s\n" "found" >&6; }
10906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTK - version >= $min_gtk_version" >&5
10907printf %s "checking for GTK - version >= $min_gtk_version... " >&6; }
10908 GTK_CFLAGS=`$PKG_CONFIG --cflags $gtk_pkg_name`
10909 GTK_LIBDIR=`$PKG_CONFIG --libs-only-L $gtk_pkg_name`
10910 GTK_LIBS=`$PKG_CONFIG --libs $gtk_pkg_name`
10911 gtk_major_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10912 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'`
10913 gtk_minor_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10914 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'`
10915 gtk_micro_version=`$PKG_CONFIG --modversion $gtk_pkg_name | \
10916 sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'`
10917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&5
10918printf "%s\n" "yes; found version $gtk_major_version.$gtk_minor_version.$gtk_micro_version" >&6; }
10919
10920else case e in #(
10921 e)
10922 GTK_CFLAGS=""
10923 GTK_LIBDIR=""
10924 GTK_LIBS=""
10925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; consider installing your distro GTK -dev package" >&5
10926printf "%s\n" "no; consider installing your distro GTK -dev package" >&6; }
10927 if test "$fail_if_missing" = "yes" -a "$gui_auto" != "yes"; then
10928 as_fn_error $? "pkg-config could not find $gtk_pkg_name" "$LINENO" 5
10929 fi
10930 ;;
10931esac
10932fi
10933 fi
10934
10935 gtktest_success="yes"
10936 if test "$enable_gtktest" = "yes"; then
10937 {
10938 ac_save_CFLAGS="$CFLAGS"
10939 ac_save_LIBS="$LIBS"
10940 CFLAGS="$CFLAGS $GTK_CFLAGS"
10941 LIBS="$LIBS $GTK_LIBS"
10942
10943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ability to compile GTK test program" >&5
10944printf %s "checking ability to compile GTK test program... " >&6; }
10945 if test "$cross_compiling" = yes
10946then :
10947 echo $ac_n "cross compiling; assumed OK... $ac_c"
10948else case e in #(
10949 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10950/* end confdefs.h. */
10951
10952#include <gtk/gtk.h>
10953#include <stdio.h>
10954#if STDC_HEADERS
10955# include <stdlib.h>
10956# include <stddef.h>
10957#endif
10958
10959int
10960main ()
10961{
10962 int ex_major = $gtk_major_version;
10963 int ex_minor = $gtk_minor_version;
10964 int ex_micro = $gtk_micro_version;
10965
10966 #if $gtk_major_version == 2
10967 guint ob_major = gtk_major_version;
10968 guint ob_minor = gtk_minor_version;
10969 guint ob_micro = gtk_micro_version;
10970 #else
10971 guint ob_major = gtk_get_major_version();
10972 guint ob_minor = gtk_get_minor_version();
10973 guint ob_micro = gtk_get_micro_version();
10974 #endif
10975
10976 if ((ob_major > ex_major) ||
10977 ((ob_major == ex_major)
10978 && (ob_minor > ex_minor)) ||
10979 ((ob_major == ex_major)
10980 && (ob_minor == ex_minor)
10981 && (ob_micro >= ex_micro)))
10982 return 0;
10983 else
10984 return 1;
10985}
10986
10987_ACEOF
10988if ac_fn_c_try_run "$LINENO"
10989then :
10990 gtktest_success="yes"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10991printf "%s\n" "yes" >&6; }
10992else case e in #(
10993 e) gtktest_success="no"; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10994printf "%s\n" "no" >&6; } ;;
10995esac
10996fi
10997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10998 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
10999esac
11000fi
11001
11002 CFLAGS="$ac_save_CFLAGS"
11003 LIBS="$ac_save_LIBS"
11004 }
11005 fi
11006
11007 if test "$gtktest_success" = "yes"; then
11008 GUI_LIB_LOC="$GTK_LIBDIR"
11009 GTK_LIBNAME="$GTK_LIBS"
11010 GUI_INC_LOC="$GTK_CFLAGS"
11011 else
11012 GTK_CFLAGS=""
11013 GTK_LIBDIR=""
11014 GTK_LIBS=""
11015 if test "$fail_if_missing" = "yes" -a "$gui_auto" != "yes"; then
11016 as_fn_error $? "Failed to compile GTK test program." "$LINENO" 5
11017 fi
11018 fi
11019
11020
11021
11022
11023 if test -n "$GTK_CFLAGS"; then
11024 SKIP_MOTIF=YES
11025 GUITYPE=GTK
11026
Bram Moolenaar071d4272004-06-13 20:20:40 +000011027 fi
11028 fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011029 if test "x$GUITYPE" = "xGTK"; then
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011030 if test -z "$SKIP_GNOME"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011031 {
Bram Moolenaar071d4272004-06-13 20:20:40 +000011032
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011033
11034
11035
11036
11037
Bram Moolenaar446cb832008-06-24 21:56:24 +000011038# Check whether --with-gnome-includes was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011039if test ${with_gnome_includes+y}
11040then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011041 withval=$with_gnome_includes; CFLAGS="$CFLAGS -I$withval"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011042
Bram Moolenaar446cb832008-06-24 21:56:24 +000011043fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011044
11045
Bram Moolenaar446cb832008-06-24 21:56:24 +000011046
11047# Check whether --with-gnome-libs was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011048if test ${with_gnome_libs+y}
11049then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011050 withval=$with_gnome_libs; LDFLAGS="$LDFLAGS -L$withval" gnome_prefix=$withval
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011051
Bram Moolenaar446cb832008-06-24 21:56:24 +000011052fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011053
11054
Bram Moolenaar446cb832008-06-24 21:56:24 +000011055
11056# Check whether --with-gnome was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011057if test ${with_gnome+y}
11058then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011059 withval=$with_gnome; if test x$withval = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011060 want_gnome=yes
11061 have_gnome=yes
11062 else
11063 if test "x$withval" = xno; then
11064 want_gnome=no
11065 else
11066 want_gnome=yes
11067 LDFLAGS="$LDFLAGS -L$withval/lib"
11068 CFLAGS="$CFLAGS -I$withval/include"
11069 gnome_prefix=$withval/lib
11070 fi
11071 fi
Christian Brabandt9670f612025-05-07 21:44:33 +020011072else case e in #(
11073 e) want_gnome=yes ;;
11074esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000011075fi
11076
Bram Moolenaar071d4272004-06-13 20:20:40 +000011077
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011078 if test "x$want_gnome" = xyes; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011079 {
Illia Bobyra96d5442023-08-30 16:30:15 +020011080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libgnomeui-2.0" >&5
11081printf %s "checking for libgnomeui-2.0... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011082 if $PKG_CONFIG --exists libgnomeui-2.0; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11084printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011085 GNOME_LIBS=`$PKG_CONFIG --libs-only-l libgnomeui-2.0`
11086 GNOME_LIBDIR=`$PKG_CONFIG --libs-only-L libgnomeui-2.0`
11087 GNOME_INCLUDEDIR=`$PKG_CONFIG --cflags libgnomeui-2.0`
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000011088
Illia Bobyra96d5442023-08-30 16:30:15 +020011089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FreeBSD" >&5
11090printf %s "checking for FreeBSD... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011091 if test "$vim_cv_uname_output" = FreeBSD; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11093printf "%s\n" "yes" >&6; }
Bram Moolenaarc9b4b052006-04-30 18:54:39 +000011094 GNOME_INCLUDEDIR="$GNOME_INCLUDEDIR -D_THREAD_SAFE"
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000011095 GNOME_LIBS="$GNOME_LIBS -pthread"
11096 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11098printf "%s\n" "no" >&6; }
Bram Moolenaar97b2ad32006-03-18 21:40:56 +000011099 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011100 have_gnome=yes
11101 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11103printf "%s\n" "not found" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011104 if test "x" = xfail; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010011105 as_fn_error $? "Could not find libgnomeui-2.0 via pkg-config" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000011106 fi
11107 fi
11108 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011109 fi
11110
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011111 if test "x$have_gnome" = xyes ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011112 printf "%s\n" "#define FEAT_GUI_GNOME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011113
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011114 GUI_INC_LOC="$GUI_INC_LOC $GNOME_INCLUDEDIR"
11115 GTK_LIBNAME="$GTK_LIBNAME $GNOME_LIBDIR $GNOME_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011116 fi
11117 }
11118 fi
11119 fi
11120fi
11121
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011122if test "x$GUITYPE" = "xGTK"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of Gdk-Pixbuf" >&5
11124printf %s "checking version of Gdk-Pixbuf... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011125 gdk_pixbuf_version=`$PKG_CONFIG --modversion gdk-pixbuf-2.0`
11126 if test "x$gdk_pixbuf_version" != x ; then
11127 gdk_pixbuf_version_minor=`echo $gdk_pixbuf_version | \
11128 sed -e 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`
11129 if test "x$gdk_pixbuf_version_minor" != x -a \
Bram Moolenaar33c31d52016-02-22 21:07:06 +010011130 $gdk_pixbuf_version_minor -ge 31 ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK." >&5
11132printf "%s\n" "OK." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011133 # Extract the first word of "glib-compile-resources", so it can be a program name with args.
11134set dummy glib-compile-resources; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020011135{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11136printf %s "checking for $ac_word... " >&6; }
11137if test ${ac_cv_path_GLIB_COMPILE_RESOURCES+y}
11138then :
11139 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011140else case e in #(
11141 e) case $GLIB_COMPILE_RESOURCES in
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011142 [\\/]* | ?:[\\/]*)
11143 ac_cv_path_GLIB_COMPILE_RESOURCES="$GLIB_COMPILE_RESOURCES" # Let the user override the test with a path.
11144 ;;
11145 *)
11146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11147for as_dir in $PATH
11148do
11149 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020011150 case $as_dir in #(((
11151 '') as_dir=./ ;;
11152 */) ;;
11153 *) as_dir=$as_dir/ ;;
11154 esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011155 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011156 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11157 ac_cv_path_GLIB_COMPILE_RESOURCES="$as_dir$ac_word$ac_exec_ext"
11158 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011159 break 2
11160 fi
11161done
11162 done
11163IFS=$as_save_IFS
11164
11165 test -z "$ac_cv_path_GLIB_COMPILE_RESOURCES" && ac_cv_path_GLIB_COMPILE_RESOURCES="no"
11166 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020011167esac ;;
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011168esac
11169fi
11170GLIB_COMPILE_RESOURCES=$ac_cv_path_GLIB_COMPILE_RESOURCES
11171if test -n "$GLIB_COMPILE_RESOURCES"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GLIB_COMPILE_RESOURCES" >&5
11173printf "%s\n" "$GLIB_COMPILE_RESOURCES" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011174else
Illia Bobyra96d5442023-08-30 16:30:15 +020011175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11176printf "%s\n" "no" >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011177fi
11178
11179
Illia Bobyra96d5442023-08-30 16:30:15 +020011180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking glib-compile-resources" >&5
11181printf %s "checking glib-compile-resources... " >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011182 if test "x$GLIB_COMPILE_RESOURCES" = xno ; then
Bram Moolenaar33c31d52016-02-22 21:07:06 +010011183 GLIB_COMPILE_RESOURCES=""
Illia Bobyra96d5442023-08-30 16:30:15 +020011184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot be found in PATH." >&5
11185printf "%s\n" "cannot be found in PATH." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011186 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: usable." >&5
11188printf "%s\n" "usable." >&6; }
11189 printf "%s\n" "#define USE_GRESOURCE 1" >>confdefs.h
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011190
Bram Moolenaar33c31d52016-02-22 21:07:06 +010011191 GRESOURCE_SRC="auto/gui_gtk_gresources.c"
11192 GRESOURCE_OBJ="objects/gui_gtk_gresources.o"
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011193 fi
11194 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable." >&5
11196printf "%s\n" "not usable." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011197 fi
11198 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot obtain from pkg_config." >&5
11200printf "%s\n" "cannot obtain from pkg_config." >&6; }
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011201 fi
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011202
Illia Bobyra96d5442023-08-30 16:30:15 +020011203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-icon-cache-update argument" >&5
11204printf %s "checking --disable-icon-cache-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011205 # Check whether --enable-icon_cache_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011206if test ${enable_icon_cache_update+y}
11207then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011208 enableval=$enable_icon_cache_update;
Christian Brabandt9670f612025-05-07 21:44:33 +020011209else case e in #(
11210 e) enable_icon_cache_update="yes" ;;
11211esac
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011212fi
11213
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011214 if test "$enable_icon_cache_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
11216printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011217 # Extract the first word of "gtk-update-icon-cache", so it can be a program name with args.
11218set dummy gtk-update-icon-cache; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020011219{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11220printf %s "checking for $ac_word... " >&6; }
11221if test ${ac_cv_path_GTK_UPDATE_ICON_CACHE+y}
11222then :
11223 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011224else case e in #(
11225 e) case $GTK_UPDATE_ICON_CACHE in
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011226 [\\/]* | ?:[\\/]*)
11227 ac_cv_path_GTK_UPDATE_ICON_CACHE="$GTK_UPDATE_ICON_CACHE" # Let the user override the test with a path.
11228 ;;
11229 *)
11230 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11231for as_dir in $PATH
11232do
11233 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020011234 case $as_dir in #(((
11235 '') as_dir=./ ;;
11236 */) ;;
11237 *) as_dir=$as_dir/ ;;
11238 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011239 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011240 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11241 ac_cv_path_GTK_UPDATE_ICON_CACHE="$as_dir$ac_word$ac_exec_ext"
11242 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011243 break 2
11244 fi
11245done
11246 done
11247IFS=$as_save_IFS
11248
11249 test -z "$ac_cv_path_GTK_UPDATE_ICON_CACHE" && ac_cv_path_GTK_UPDATE_ICON_CACHE="no"
11250 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020011251esac ;;
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011252esac
11253fi
11254GTK_UPDATE_ICON_CACHE=$ac_cv_path_GTK_UPDATE_ICON_CACHE
11255if test -n "$GTK_UPDATE_ICON_CACHE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTK_UPDATE_ICON_CACHE" >&5
11257printf "%s\n" "$GTK_UPDATE_ICON_CACHE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011258else
Illia Bobyra96d5442023-08-30 16:30:15 +020011259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11260printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011261fi
11262
11263
11264 if test "x$GTK_UPDATE_ICON_CACHE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
11266printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011267 fi
11268 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
11270printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011271 fi
11272
Illia Bobyra96d5442023-08-30 16:30:15 +020011273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-desktop-database-update argument" >&5
11274printf %s "checking --disable-desktop-database-update argument... " >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011275 # Check whether --enable-desktop_database_update was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011276if test ${enable_desktop_database_update+y}
11277then :
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011278 enableval=$enable_desktop_database_update;
Christian Brabandt9670f612025-05-07 21:44:33 +020011279else case e in #(
11280 e) enable_desktop_database_update="yes" ;;
11281esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011282fi
11283
11284 if test "$enable_desktop_database_update" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not set" >&5
11286printf "%s\n" "not set" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011287 # Extract the first word of "update-desktop-database", so it can be a program name with args.
11288set dummy update-desktop-database; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020011289{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11290printf %s "checking for $ac_word... " >&6; }
11291if test ${ac_cv_path_UPDATE_DESKTOP_DATABASE+y}
11292then :
11293 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011294else case e in #(
11295 e) case $UPDATE_DESKTOP_DATABASE in
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011296 [\\/]* | ?:[\\/]*)
11297 ac_cv_path_UPDATE_DESKTOP_DATABASE="$UPDATE_DESKTOP_DATABASE" # Let the user override the test with a path.
11298 ;;
11299 *)
11300 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11301for as_dir in $PATH
11302do
11303 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020011304 case $as_dir in #(((
11305 '') as_dir=./ ;;
11306 */) ;;
11307 *) as_dir=$as_dir/ ;;
11308 esac
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011309 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020011310 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
11311 ac_cv_path_UPDATE_DESKTOP_DATABASE="$as_dir$ac_word$ac_exec_ext"
11312 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011313 break 2
11314 fi
11315done
11316 done
11317IFS=$as_save_IFS
11318
11319 test -z "$ac_cv_path_UPDATE_DESKTOP_DATABASE" && ac_cv_path_UPDATE_DESKTOP_DATABASE="no"
11320 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020011321esac ;;
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011322esac
11323fi
11324UPDATE_DESKTOP_DATABASE=$ac_cv_path_UPDATE_DESKTOP_DATABASE
11325if test -n "$UPDATE_DESKTOP_DATABASE"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UPDATE_DESKTOP_DATABASE" >&5
11327printf "%s\n" "$UPDATE_DESKTOP_DATABASE" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011328else
Illia Bobyra96d5442023-08-30 16:30:15 +020011329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11330printf "%s\n" "no" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011331fi
11332
11333
11334 if test "x$UPDATE_DESKTOP_DATABASE" = "xno" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011335 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found in PATH." >&5
11336printf "%s\n" "not found in PATH." >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011337 fi
11338 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: update disabled" >&5
11340printf "%s\n" "update disabled" >&6; }
Bram Moolenaar4adfaab2016-04-21 18:20:11 +020011341 fi
11342fi
11343
11344
11345
Bram Moolenaar36e294c2015-12-29 18:55:46 +010011346
11347
11348
11349
Bram Moolenaar071d4272004-06-13 20:20:40 +000011350if test -z "$SKIP_MOTIF"; then
11351 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"
11352 GUI_INC_LOC="`echo $GUI_INC_LOC|sed 's%-I%%g'`"
11353
Illia Bobyra96d5442023-08-30 16:30:15 +020011354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI includes" >&5
11355printf %s "checking for location of Motif GUI includes... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011356 gui_includes="`echo $x_includes|sed 's%/^/^/*$%%'` `echo "$gui_XXX" | sed s/XXX/include/g` $GUI_INC_LOC"
11357 GUI_INC_LOC=
11358 for try in $gui_includes; do
11359 if test -f "$try/Xm/Xm.h"; then
11360 GUI_INC_LOC=$try
11361 fi
11362 done
11363 if test -n "$GUI_INC_LOC"; then
11364 if test "$GUI_INC_LOC" = /usr/include; then
11365 GUI_INC_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020011366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
11367printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011368 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_INC_LOC" >&5
11370printf "%s\n" "$GUI_INC_LOC" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011371 fi
11372 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
11374printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011375 SKIP_MOTIF=YES
11376 fi
11377fi
11378
11379
11380if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011381 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-motif-lib argument" >&5
11382printf %s "checking --with-motif-lib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011383
Bram Moolenaar446cb832008-06-24 21:56:24 +000011384# Check whether --with-motif-lib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020011385if test ${with_motif_lib+y}
11386then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000011387 withval=$with_motif_lib; MOTIF_LIBNAME="${withval}"
11388fi
11389
Bram Moolenaar071d4272004-06-13 20:20:40 +000011390
11391 if test -n "$MOTIF_LIBNAME"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MOTIF_LIBNAME" >&5
11393printf "%s\n" "$MOTIF_LIBNAME" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011394 GUI_LIB_LOC=
11395 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11397printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011398
11399 GUI_LIB_LOC="`echo $GUI_LIB_LOC|sed 's%-L%%g'`"
11400
Illia Bobyra96d5442023-08-30 16:30:15 +020011401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for location of Motif GUI libs" >&5
11402printf %s "checking for location of Motif GUI libs... " >&6; }
Bram Moolenaar01967f52023-04-12 16:24:03 +010011403 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 +000011404 GUI_LIB_LOC=
11405 for try in $gui_libs; do
Kelvin Leeb4716902022-04-04 17:20:01 +010011406 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 +000011407 if test -f "$libtry"; then
11408 GUI_LIB_LOC=$try
11409 fi
11410 done
11411 done
11412 if test -n "$GUI_LIB_LOC"; then
Bram Moolenaar01967f52023-04-12 16:24:03 +010011413 if test "$GUI_LIB_LOC" = /usr/lib \
11414 -o "$GUI_LIB_LOC" = /usr/lib64 \
Bram Moolenaar6324c3b2013-06-17 20:27:18 +020011415 -o "$GUI_LIB_LOC" = /usr/lib/i386-linux-gnu \
11416 -o "$GUI_LIB_LOC" = /usr/lib/x86_64-linux-gnu; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011417 GUI_LIB_LOC=
Illia Bobyra96d5442023-08-30 16:30:15 +020011418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in default path" >&5
11419printf "%s\n" "in default path" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011420 else
11421 if test -n "$GUI_LIB_LOC"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GUI_LIB_LOC" >&5
11423printf "%s\n" "$GUI_LIB_LOC" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011424 if test "$vim_cv_uname_output" = SunOS &&
11425 echo $vim_cv_uname_r_output | grep '^5' >/dev/null; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011426 GUI_LIB_LOC="$GUI_LIB_LOC -R $GUI_LIB_LOC"
11427 fi
11428 fi
11429 fi
11430 MOTIF_LIBNAME=-lXm
11431 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: <not found>" >&5
11433printf "%s\n" "<not found>" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011434 SKIP_MOTIF=YES
11435 fi
11436 fi
11437fi
11438
11439if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011440 GUITYPE=MOTIF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011441
Bram Moolenaar071d4272004-06-13 20:20:40 +000011442fi
11443
Bram Moolenaare2adcf32022-03-12 11:57:25 +000011444if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011445 if test -n "$GUI_INC_LOC"; then
11446 GUI_INC_LOC=-I"`echo $GUI_INC_LOC|sed 's%-I%%'`"
11447 fi
11448 if test -n "$GUI_LIB_LOC"; then
11449 GUI_LIB_LOC=-L"`echo $GUI_LIB_LOC|sed 's%-L%%'`"
11450 fi
11451
11452 ldflags_save=$LDFLAGS
11453 LDFLAGS="$X_LIBS $LDFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11455printf %s "checking for XShapeQueryExtension in -lXext... " >&6; }
11456if test ${ac_cv_lib_Xext_XShapeQueryExtension+y}
11457then :
11458 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011459else case e in #(
11460 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011461LIBS="-lXext -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011463/* end confdefs.h. */
11464
Bram Moolenaar446cb832008-06-24 21:56:24 +000011465/* Override any GCC internal prototype to avoid an error.
11466 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011467 builtin and then its argument prototype would still apply.
11468 The 'extern "C"' is for builds by C++ compilers;
11469 although this is not generally supported in C code supporting it here
11470 has little cost and some practical benefit (sr 110532). */
11471#ifdef __cplusplus
11472extern "C"
11473#endif
11474char XShapeQueryExtension (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011475int
Illia Bobyra96d5442023-08-30 16:30:15 +020011476main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011477{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011478return XShapeQueryExtension ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011479 ;
11480 return 0;
11481}
11482_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011483if ac_fn_c_try_link "$LINENO"
11484then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011485 ac_cv_lib_Xext_XShapeQueryExtension=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011486else case e in #(
11487 e) ac_cv_lib_Xext_XShapeQueryExtension=no ;;
11488esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011489fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011490rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011491 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011492LIBS=$ac_check_lib_save_LIBS ;;
11493esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011494fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011495{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11496printf "%s\n" "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
11497if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = xyes
11498then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011499 GUI_X_LIBS="-lXext"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011500fi
11501
Illia Bobyra96d5442023-08-30 16:30:15 +020011502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wslen in -lw" >&5
11503printf %s "checking for wslen in -lw... " >&6; }
11504if test ${ac_cv_lib_w_wslen+y}
11505then :
11506 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011507else case e in #(
11508 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011509LIBS="-lw $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011511/* end confdefs.h. */
11512
Bram Moolenaar446cb832008-06-24 21:56:24 +000011513/* Override any GCC internal prototype to avoid an error.
11514 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011515 builtin and then its argument prototype would still apply.
11516 The 'extern "C"' is for builds by C++ compilers;
11517 although this is not generally supported in C code supporting it here
11518 has little cost and some practical benefit (sr 110532). */
11519#ifdef __cplusplus
11520extern "C"
11521#endif
11522char wslen (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011523int
Illia Bobyra96d5442023-08-30 16:30:15 +020011524main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011525{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011526return wslen ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011527 ;
11528 return 0;
11529}
11530_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011531if ac_fn_c_try_link "$LINENO"
11532then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011533 ac_cv_lib_w_wslen=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011534else case e in #(
11535 e) ac_cv_lib_w_wslen=no ;;
11536esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011537fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011538rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011539 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011540LIBS=$ac_check_lib_save_LIBS ;;
11541esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011542fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_w_wslen" >&5
11544printf "%s\n" "$ac_cv_lib_w_wslen" >&6; }
11545if test "x$ac_cv_lib_w_wslen" = xyes
11546then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011547 X_EXTRA_LIBS="$X_EXTRA_LIBS -lw"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011548fi
11549
Illia Bobyra96d5442023-08-30 16:30:15 +020011550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
11551printf %s "checking for dlsym in -ldl... " >&6; }
11552if test ${ac_cv_lib_dl_dlsym+y}
11553then :
11554 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011555else case e in #(
11556 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011557LIBS="-ldl $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011559/* end confdefs.h. */
11560
Bram Moolenaar446cb832008-06-24 21:56:24 +000011561/* Override any GCC internal prototype to avoid an error.
11562 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011563 builtin and then its argument prototype would still apply.
11564 The 'extern "C"' is for builds by C++ compilers;
11565 although this is not generally supported in C code supporting it here
11566 has little cost and some practical benefit (sr 110532). */
11567#ifdef __cplusplus
11568extern "C"
11569#endif
11570char dlsym (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011571int
Illia Bobyra96d5442023-08-30 16:30:15 +020011572main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011573{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011574return dlsym ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011575 ;
11576 return 0;
11577}
11578_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011579if ac_fn_c_try_link "$LINENO"
11580then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011581 ac_cv_lib_dl_dlsym=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011582else case e in #(
11583 e) ac_cv_lib_dl_dlsym=no ;;
11584esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011585fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011586rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011587 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011588LIBS=$ac_check_lib_save_LIBS ;;
11589esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011590fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011591{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
11592printf "%s\n" "$ac_cv_lib_dl_dlsym" >&6; }
11593if test "x$ac_cv_lib_dl_dlsym" = xyes
11594then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011595 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldl"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011596fi
11597
Illia Bobyra96d5442023-08-30 16:30:15 +020011598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XmuCreateStippledPixmap in -lXmu" >&5
11599printf %s "checking for XmuCreateStippledPixmap in -lXmu... " >&6; }
11600if test ${ac_cv_lib_Xmu_XmuCreateStippledPixmap+y}
11601then :
11602 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011603else case e in #(
11604 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011605LIBS="-lXmu $GUI_X_LIBS -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011607/* end confdefs.h. */
11608
Bram Moolenaar446cb832008-06-24 21:56:24 +000011609/* Override any GCC internal prototype to avoid an error.
11610 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011611 builtin and then its argument prototype would still apply.
11612 The 'extern "C"' is for builds by C++ compilers;
11613 although this is not generally supported in C code supporting it here
11614 has little cost and some practical benefit (sr 110532). */
11615#ifdef __cplusplus
11616extern "C"
11617#endif
11618char XmuCreateStippledPixmap (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011619int
Illia Bobyra96d5442023-08-30 16:30:15 +020011620main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011621{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011622return XmuCreateStippledPixmap ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011623 ;
11624 return 0;
11625}
11626_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011627if ac_fn_c_try_link "$LINENO"
11628then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011629 ac_cv_lib_Xmu_XmuCreateStippledPixmap=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011630else case e in #(
11631 e) ac_cv_lib_Xmu_XmuCreateStippledPixmap=no ;;
11632esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011633fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011634rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011635 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011636LIBS=$ac_check_lib_save_LIBS ;;
11637esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011638fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011639{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&5
11640printf "%s\n" "$ac_cv_lib_Xmu_XmuCreateStippledPixmap" >&6; }
11641if test "x$ac_cv_lib_Xmu_XmuCreateStippledPixmap" = xyes
11642then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011643 GUI_X_LIBS="-lXmu $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011644fi
11645
11646 if test -z "$SKIP_MOTIF"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpEndJob in -lXp" >&5
11648printf %s "checking for XpEndJob in -lXp... " >&6; }
11649if test ${ac_cv_lib_Xp_XpEndJob+y}
11650then :
11651 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020011652else case e in #(
11653 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000011654LIBS="-lXp $GUI_X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011656/* end confdefs.h. */
11657
Bram Moolenaar446cb832008-06-24 21:56:24 +000011658/* Override any GCC internal prototype to avoid an error.
11659 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020011660 builtin and then its argument prototype would still apply.
11661 The 'extern "C"' is for builds by C++ compilers;
11662 although this is not generally supported in C code supporting it here
11663 has little cost and some practical benefit (sr 110532). */
11664#ifdef __cplusplus
11665extern "C"
11666#endif
11667char XpEndJob (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011668int
Illia Bobyra96d5442023-08-30 16:30:15 +020011669main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011670{
Bram Moolenaar446cb832008-06-24 21:56:24 +000011671return XpEndJob ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011672 ;
11673 return 0;
11674}
11675_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011676if ac_fn_c_try_link "$LINENO"
11677then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011678 ac_cv_lib_Xp_XpEndJob=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020011679else case e in #(
11680 e) ac_cv_lib_Xp_XpEndJob=no ;;
11681esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011682fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011683rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011684 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020011685LIBS=$ac_check_lib_save_LIBS ;;
11686esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011687fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011688{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpEndJob" >&5
11689printf "%s\n" "$ac_cv_lib_Xp_XpEndJob" >&6; }
11690if test "x$ac_cv_lib_Xp_XpEndJob" = xyes
11691then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000011692 GUI_X_LIBS="-lXp $GUI_X_LIBS"
Bram Moolenaar071d4272004-06-13 20:20:40 +000011693fi
11694
11695 fi
11696 LDFLAGS=$ldflags_save
11697
Illia Bobyra96d5442023-08-30 16:30:15 +020011698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extra X11 defines" >&5
11699printf %s "checking for extra X11 defines... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011700 NARROW_PROTO=
11701 rm -fr conftestdir
11702 if mkdir conftestdir; then
11703 cd conftestdir
11704 cat > Imakefile <<'EOF'
11705acfindx:
11706 @echo 'NARROW_PROTO="${PROTO_DEFINES}"'
11707EOF
11708 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
11709 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
11710 fi
11711 cd ..
11712 rm -fr conftestdir
11713 fi
11714 if test -z "$NARROW_PROTO"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011715 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11716printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011717 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NARROW_PROTO" >&5
11719printf "%s\n" "$NARROW_PROTO" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011720 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011721
Bram Moolenaar071d4272004-06-13 20:20:40 +000011722fi
11723
11724if test "$enable_xsmp" = "yes"; then
11725 cppflags_save=$CPPFLAGS
11726 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011727 ac_fn_c_check_header_compile "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
11728if test "x$ac_cv_header_X11_SM_SMlib_h" = xyes
11729then :
11730 printf "%s\n" "#define HAVE_X11_SM_SMLIB_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011731
11732fi
11733
Bram Moolenaar071d4272004-06-13 20:20:40 +000011734 CPPFLAGS=$cppflags_save
11735fi
11736
11737
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011738if test -z "$SKIP_MOTIF" -o -z "$SKIP_GTK2" -o -z "$SKIP_GTK3"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011739 cppflags_save=$CPPFLAGS
11740 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011741 ac_fn_c_check_header_compile "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
11742if test "x$ac_cv_header_X11_xpm_h" = xyes
11743then :
11744 printf "%s\n" "#define HAVE_X11_XPM_H 1" >>confdefs.h
11745
11746fi
11747ac_fn_c_check_header_compile "$LINENO" "X11/Sunkeysym.h" "ac_cv_header_X11_Sunkeysym_h" "$ac_includes_default"
11748if test "x$ac_cv_header_X11_Sunkeysym_h" = xyes
11749then :
11750 printf "%s\n" "#define HAVE_X11_SUNKEYSYM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011751
11752fi
11753
Bram Moolenaar071d4272004-06-13 20:20:40 +000011754
11755 if test ! "$enable_xim" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XIMText in X11/Xlib.h" >&5
11757printf %s "checking for XIMText in X11/Xlib.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011759/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000011760#include <X11/Xlib.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011761_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000011762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020011763 $EGREP_TRADITIONAL "XIMText" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +020011764then :
11765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11766printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020011767else case e in #(
11768 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; xim has been disabled" >&5
11769printf "%s\n" "no; xim has been disabled" >&6; }; enable_xim="no" ;;
11770esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011771fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011772rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000011773
11774 fi
11775 CPPFLAGS=$cppflags_save
11776
Bram Moolenaar54612582019-11-21 17:13:31 +010011777 if test "$enable_xim" = "auto" -a "x$GUITYPE" != "xNONE" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: X GUI selected; xim has been enabled" >&5
11779printf "%s\n" "X GUI selected; xim has been enabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011780 enable_xim="yes"
11781 fi
11782fi
11783
Bram Moolenaarf52fac22022-03-11 16:01:26 +000011784if test -z "$SKIP_MOTIF"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000011785 cppflags_save=$CPPFLAGS
11786 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Illia Bobyra96d5442023-08-30 16:30:15 +020011787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X11/Xmu/Editres.h" >&5
11788printf %s "checking for X11/Xmu/Editres.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011790/* end confdefs.h. */
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011791
11792#include <X11/Intrinsic.h>
11793#include <X11/Xmu/Editres.h>
11794int
Illia Bobyra96d5442023-08-30 16:30:15 +020011795main (void)
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011796{
11797int i; i = 0;
11798 ;
11799 return 0;
11800}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011801_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011802if ac_fn_c_try_compile "$LINENO"
11803then :
11804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11805printf "%s\n" "yes" >&6; }
11806 printf "%s\n" "#define HAVE_X11_XMU_EDITRES_H 1" >>confdefs.h
Bram Moolenaar2ce06f62005-01-31 19:19:04 +000011807
Christian Brabandt9670f612025-05-07 21:44:33 +020011808else case e in #(
11809 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11810printf "%s\n" "no" >&6; } ;;
11811esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011812fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011813rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000011814 CPPFLAGS=$cppflags_save
11815fi
11816
11817if test -z "$SKIP_MOTIF"; then
11818 cppflags_save=$CPPFLAGS
11819 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaar77c19352012-06-13 19:19:41 +020011820 if test "$zOSUnix" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011821 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11822if test "x$ac_cv_header_Xm_Xm_h" = xyes
11823then :
11824 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011825
11826fi
11827
Bram Moolenaar77c19352012-06-13 19:19:41 +020011828 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011829 ac_fn_c_check_header_compile "$LINENO" "Xm/Xm.h" "ac_cv_header_Xm_Xm_h" "$ac_includes_default"
11830if test "x$ac_cv_header_Xm_Xm_h" = xyes
11831then :
11832 printf "%s\n" "#define HAVE_XM_XM_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011833
11834fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011835ac_fn_c_check_header_compile "$LINENO" "Xm/XpmP.h" "ac_cv_header_Xm_XpmP_h" "$ac_includes_default"
11836if test "x$ac_cv_header_Xm_XpmP_h" = xyes
11837then :
11838 printf "%s\n" "#define HAVE_XM_XPMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000011839
Illia Bobyra96d5442023-08-30 16:30:15 +020011840fi
11841ac_fn_c_check_header_compile "$LINENO" "Xm/JoinSideT.h" "ac_cv_header_Xm_JoinSideT_h" "$ac_includes_default"
11842if test "x$ac_cv_header_Xm_JoinSideT_h" = xyes
11843then :
11844 printf "%s\n" "#define HAVE_XM_JOINSIDET_H 1" >>confdefs.h
11845
11846fi
11847ac_fn_c_check_header_compile "$LINENO" "Xm/TraitP.h" "ac_cv_header_Xm_TraitP_h" "$ac_includes_default"
11848if test "x$ac_cv_header_Xm_TraitP_h" = xyes
11849then :
11850 printf "%s\n" "#define HAVE_XM_TRAITP_H 1" >>confdefs.h
11851
11852fi
11853ac_fn_c_check_header_compile "$LINENO" "Xm/Manager.h" "ac_cv_header_Xm_Manager_h" "$ac_includes_default"
11854if test "x$ac_cv_header_Xm_Manager_h" = xyes
11855then :
11856 printf "%s\n" "#define HAVE_XM_MANAGER_H 1" >>confdefs.h
11857
11858fi
11859ac_fn_c_check_header_compile "$LINENO" "Xm/UnhighlightT.h" "ac_cv_header_Xm_UnhighlightT_h" "$ac_includes_default"
11860if test "x$ac_cv_header_Xm_UnhighlightT_h" = xyes
11861then :
11862 printf "%s\n" "#define HAVE_XM_UNHIGHLIGHTT_H 1" >>confdefs.h
11863
11864fi
11865ac_fn_c_check_header_compile "$LINENO" "Xm/Notebook.h" "ac_cv_header_Xm_Notebook_h" "$ac_includes_default"
11866if test "x$ac_cv_header_Xm_Notebook_h" = xyes
11867then :
11868 printf "%s\n" "#define HAVE_XM_NOTEBOOK_H 1" >>confdefs.h
11869
11870fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011871
Bram Moolenaar1004b3d2022-06-05 19:51:55 +010011872 fi
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011873
Bram Moolenaar77c19352012-06-13 19:19:41 +020011874 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for XpmAttributes_21 in Xm/XpmP.h" >&5
11876printf %s "checking for XpmAttributes_21 in Xm/XpmP.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020011877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011878/* end confdefs.h. */
11879#include <Xm/XpmP.h>
11880int
Illia Bobyra96d5442023-08-30 16:30:15 +020011881main (void)
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011882{
11883XpmAttributes_21 attr;
11884 ;
11885 return 0;
11886}
11887_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020011888if ac_fn_c_try_compile "$LINENO"
11889then :
11890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11891printf "%s\n" "yes" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes_21" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011892
Christian Brabandt9670f612025-05-07 21:44:33 +020011893else case e in #(
11894 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020011895printf "%s\n" "no" >&6; }; printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011896
Christian Brabandt9670f612025-05-07 21:44:33 +020011897 ;;
11898esac
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011899fi
Illia Bobyra96d5442023-08-30 16:30:15 +020011900rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011901 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011902 printf "%s\n" "#define XPMATTRIBUTES_TYPE XpmAttributes" >>confdefs.h
Bram Moolenaar910f66f2006-04-05 20:41:53 +000011903
11904 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011905 CPPFLAGS=$cppflags_save
11906fi
11907
11908if test "x$GUITYPE" = "xNONE" -a "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; xim has been disabled" >&5
11910printf "%s\n" "no GUI selected; xim has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011911 enable_xim="no"
11912fi
11913if test "x$GUITYPE" = "xNONE" -a "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no GUI selected; fontset has been disabled" >&5
11915printf "%s\n" "no GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011916 enable_fontset="no"
11917fi
Bram Moolenaar182c5be2010-06-25 05:37:59 +020011918if test "x$GUITYPE:$enable_fontset" = "xGTK:yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GTK+ 2 GUI selected; fontset has been disabled" >&5
11920printf "%s\n" "GTK+ 2 GUI selected; fontset has been disabled" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000011921 enable_fontset="no"
11922fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000011923
Bram Moolenaarb3f74062020-02-26 16:16:53 +010011924if test -z "$SKIP_HAIKU"; then
11925 GUITYPE=HAIKUGUI
11926fi
11927
Bram Moolenaar071d4272004-06-13 20:20:40 +000011928if test -z "$SKIP_PHOTON"; then
11929 GUITYPE=PHOTONGUI
11930fi
11931
11932
11933
11934
11935
11936
11937if test "$enable_workshop" = "yes" -a -n "$SKIP_MOTIF"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010011938 as_fn_error $? "cannot use workshop without Motif" "$LINENO" 5
Bram Moolenaar071d4272004-06-13 20:20:40 +000011939fi
11940
11941if test "$enable_xim" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011942 printf "%s\n" "#define FEAT_XIM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011943
11944fi
11945if test "$enable_fontset" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011946 printf "%s\n" "#define FEAT_XFONTSET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000011947
11948fi
11949
11950
11951
Illia Bobyra96d5442023-08-30 16:30:15 +020011952{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /proc link to executable" >&5
11953printf %s "checking for /proc link to executable... " >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011954if test -L "/proc/self/exe"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/exe" >&5
11956printf "%s\n" "/proc/self/exe" >&6; }
11957 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/exe\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011958
11959elif test -L "/proc/self/path/a.out"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/self/path/a.out" >&5
11961printf "%s\n" "/proc/self/path/a.out" >&6; }
11962 printf "%s\n" "#define PROC_EXE_LINK \"/proc/self/path/a.out\"" >>confdefs.h
Bram Moolenaarf3757f02017-03-16 15:13:45 +010011963
11964elif test -L "/proc/curproc/file"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020011965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: /proc/curproc/file" >&5
11966printf "%s\n" "/proc/curproc/file" >&6; }
11967 printf "%s\n" "#define PROC_EXE_LINK \"/proc/curproc/file\"" >>confdefs.h
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011968
11969else
Illia Bobyra96d5442023-08-30 16:30:15 +020011970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11971printf "%s\n" "no" >&6; }
Bram Moolenaar5f69fee2017-03-09 11:58:40 +010011972fi
11973
Illia Bobyra96d5442023-08-30 16:30:15 +020011974{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN or MSYS environment" >&5
11975printf %s "checking for CYGWIN or MSYS environment... " >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000011976case $vim_cv_uname_output in
Illia Bobyra96d5442023-08-30 16:30:15 +020011977 CYGWIN*|MSYS*) CYGWIN=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11978printf "%s\n" "yes" >&6; }
11979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CYGWIN clipboard support" >&5
11980printf %s "checking for CYGWIN clipboard support... " >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011981 if test "x$with_x" = "xno" ; then
11982 OS_EXTRA_SRC=winclip.c; OS_EXTRA_OBJ=objects/winclip.o
Illia Bobyra96d5442023-08-30 16:30:15 +020011983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11984printf "%s\n" "yes" >&6; }
11985 printf "%s\n" "#define FEAT_CYGWIN_WIN32_CLIPBOARD 1" >>confdefs.h
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011986
11987 else
Illia Bobyra96d5442023-08-30 16:30:15 +020011988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - using X11" >&5
11989printf "%s\n" "no - using X11" >&6; }
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011990 fi ;;
11991
Illia Bobyra96d5442023-08-30 16:30:15 +020011992 *) CYGWIN=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
11993printf "%s\n" "no" >&6; };;
Bram Moolenaar693e40c2013-02-26 14:56:42 +010011994esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000011995
Bram Moolenaar071d4272004-06-13 20:20:40 +000011996
Illia Bobyra96d5442023-08-30 16:30:15 +020011997{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether toupper is broken" >&5
11998printf %s "checking whether toupper is broken... " >&6; }
11999if test ${vim_cv_toupper_broken+y}
12000then :
12001 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012002else case e in #(
12003 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012004 if test "$cross_compiling" = yes
12005then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012006
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010012007 vim_cv_toupper_broken=no
12008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_toupper_broken'" >&5
12009printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_toupper_broken'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000012010
Christian Brabandt9670f612025-05-07 21:44:33 +020012011else case e in #(
12012 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012013/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012014
12015#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000012016#include <ctype.h>
Bram Moolenaar446cb832008-06-24 21:56:24 +000012017#if STDC_HEADERS
12018# include <stdlib.h>
12019# include <stddef.h>
12020#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010012021int main() { exit(toupper('A') == 'A' && tolower('z') == 'z'); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012022
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012023_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012024if ac_fn_c_try_run "$LINENO"
12025then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012026
12027 vim_cv_toupper_broken=yes
12028
Christian Brabandt9670f612025-05-07 21:44:33 +020012029else case e in #(
12030 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000012031 vim_cv_toupper_broken=no
Christian Brabandt9670f612025-05-07 21:44:33 +020012032 ;;
12033esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012034fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020012036 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12037esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012038fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012039 ;;
12040esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000012041fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012042{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_toupper_broken" >&5
12043printf "%s\n" "$vim_cv_toupper_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012044
12045if test "x$vim_cv_toupper_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012046 printf "%s\n" "#define BROKEN_TOUPPER 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000012047
12048fi
12049
Illia Bobyra96d5442023-08-30 16:30:15 +020012050{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __DATE__ and __TIME__ work" >&5
12051printf %s "checking whether __DATE__ and __TIME__ work... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012053/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012054#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012055int
Illia Bobyra96d5442023-08-30 16:30:15 +020012056main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012057{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012058printf("(" __DATE__ " " __TIME__ ")");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012059 ;
12060 return 0;
12061}
12062_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012063if ac_fn_c_try_compile "$LINENO"
12064then :
12065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12066printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DATE_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012067
Christian Brabandt9670f612025-05-07 21:44:33 +020012068else case e in #(
12069 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12070printf "%s\n" "no" >&6; } ;;
12071esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012072fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012073rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012074
Illia Bobyra96d5442023-08-30 16:30:15 +020012075{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) is allowed" >&5
12076printf %s "checking whether __attribute__((unused)) is allowed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000012078/* end confdefs.h. */
12079#include <stdio.h>
12080int
Illia Bobyra96d5442023-08-30 16:30:15 +020012081main (void)
Bram Moolenaar0c094b92009-05-14 20:20:33 +000012082{
12083int x __attribute__((unused));
12084 ;
12085 return 0;
12086}
12087_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012088if ac_fn_c_try_compile "$LINENO"
12089then :
12090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12091printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ATTRIBUTE_UNUSED 1" >>confdefs.h
Bram Moolenaar0c094b92009-05-14 20:20:33 +000012092
Christian Brabandt9670f612025-05-07 21:44:33 +020012093else case e in #(
12094 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12095printf "%s\n" "no" >&6; } ;;
12096esac
Bram Moolenaar0c094b92009-05-14 20:20:33 +000012097fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012098rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0c094b92009-05-14 20:20:33 +000012099
Bram Moolenaar071d4272004-06-13 20:20:40 +000012100ac_header_dirent=no
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012101for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Christian Brabandt9670f612025-05-07 21:44:33 +020012102 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | sed "$as_sed_sh"`
Illia Bobyra96d5442023-08-30 16:30:15 +020012103{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
12104printf %s "checking for $ac_hdr that defines DIR... " >&6; }
12105if eval test \${$as_ac_Header+y}
12106then :
12107 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012108else case e in #(
12109 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012110/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012111#include <sys/types.h>
12112#include <$ac_hdr>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012113
12114int
Illia Bobyra96d5442023-08-30 16:30:15 +020012115main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012116{
12117if ((DIR *) 0)
12118return 0;
12119 ;
12120 return 0;
12121}
12122_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012123if ac_fn_c_try_compile "$LINENO"
12124then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012125 eval "$as_ac_Header=yes"
Christian Brabandt9670f612025-05-07 21:44:33 +020012126else case e in #(
12127 e) eval "$as_ac_Header=no" ;;
12128esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012129fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012130rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12131esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012132fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012133eval ac_res=\$$as_ac_Header
Illia Bobyra96d5442023-08-30 16:30:15 +020012134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12135printf "%s\n" "$ac_res" >&6; }
12136if eval test \"x\$"$as_ac_Header"\" = x"yes"
12137then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012138 cat >>confdefs.h <<_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020012139#define `printf "%s\n" "HAVE_$ac_hdr" | sed "$as_sed_cpp"` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012140_ACEOF
12141
12142ac_header_dirent=$ac_hdr; break
Bram Moolenaar071d4272004-06-13 20:20:40 +000012143fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012144
Bram Moolenaar071d4272004-06-13 20:20:40 +000012145done
12146# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12147if test $ac_header_dirent = dirent.h; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
12149printf %s "checking for library containing opendir... " >&6; }
12150if test ${ac_cv_search_opendir+y}
12151then :
12152 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012153else case e in #(
12154 e) ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012156/* end confdefs.h. */
12157
Bram Moolenaar446cb832008-06-24 21:56:24 +000012158/* Override any GCC internal prototype to avoid an error.
12159 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020012160 builtin and then its argument prototype would still apply.
12161 The 'extern "C"' is for builds by C++ compilers;
12162 although this is not generally supported in C code supporting it here
12163 has little cost and some practical benefit (sr 110532). */
12164#ifdef __cplusplus
12165extern "C"
12166#endif
12167char opendir (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012168int
Illia Bobyra96d5442023-08-30 16:30:15 +020012169main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012170{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012171return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012172 ;
12173 return 0;
12174}
12175_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012176for ac_lib in '' dir
12177do
Bram Moolenaar446cb832008-06-24 21:56:24 +000012178 if test -z "$ac_lib"; then
12179 ac_res="none required"
12180 else
12181 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012182 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000012183 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012184 if ac_fn_c_try_link "$LINENO"
12185then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012186 ac_cv_search_opendir=$ac_res
Bram Moolenaar071d4272004-06-13 20:20:40 +000012187fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012188rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012189 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020012190 if test ${ac_cv_search_opendir+y}
12191then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012192 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012193fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012194done
Illia Bobyra96d5442023-08-30 16:30:15 +020012195if test ${ac_cv_search_opendir+y}
12196then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012197
Christian Brabandt9670f612025-05-07 21:44:33 +020012198else case e in #(
12199 e) ac_cv_search_opendir=no ;;
12200esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000012201fi
12202rm conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020012203LIBS=$ac_func_search_save_LIBS ;;
12204esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012205fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
12207printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012208ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020012209if test "$ac_res" != no
12210then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012211 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012212
12213fi
12214
Bram Moolenaar071d4272004-06-13 20:20:40 +000012215else
Illia Bobyra96d5442023-08-30 16:30:15 +020012216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
12217printf %s "checking for library containing opendir... " >&6; }
12218if test ${ac_cv_search_opendir+y}
12219then :
12220 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012221else case e in #(
12222 e) ac_func_search_save_LIBS=$LIBS
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012224/* end confdefs.h. */
12225
Bram Moolenaar446cb832008-06-24 21:56:24 +000012226/* Override any GCC internal prototype to avoid an error.
12227 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020012228 builtin and then its argument prototype would still apply.
12229 The 'extern "C"' is for builds by C++ compilers;
12230 although this is not generally supported in C code supporting it here
12231 has little cost and some practical benefit (sr 110532). */
12232#ifdef __cplusplus
12233extern "C"
12234#endif
12235char opendir (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012236int
Illia Bobyra96d5442023-08-30 16:30:15 +020012237main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012238{
Bram Moolenaar446cb832008-06-24 21:56:24 +000012239return opendir ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012240 ;
12241 return 0;
12242}
12243_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012244for ac_lib in '' x
12245do
Bram Moolenaar446cb832008-06-24 21:56:24 +000012246 if test -z "$ac_lib"; then
12247 ac_res="none required"
12248 else
12249 ac_res=-l$ac_lib
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012250 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Bram Moolenaar446cb832008-06-24 21:56:24 +000012251 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012252 if ac_fn_c_try_link "$LINENO"
12253then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012254 ac_cv_search_opendir=$ac_res
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012255fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012256rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012257 conftest$ac_exeext
Illia Bobyra96d5442023-08-30 16:30:15 +020012258 if test ${ac_cv_search_opendir+y}
12259then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012260 break
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012261fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000012262done
Illia Bobyra96d5442023-08-30 16:30:15 +020012263if test ${ac_cv_search_opendir+y}
12264then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012265
Christian Brabandt9670f612025-05-07 21:44:33 +020012266else case e in #(
12267 e) ac_cv_search_opendir=no ;;
12268esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000012269fi
12270rm conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020012271LIBS=$ac_func_search_save_LIBS ;;
12272esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012273fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012274{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
12275printf "%s\n" "$ac_cv_search_opendir" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012276ac_res=$ac_cv_search_opendir
Illia Bobyra96d5442023-08-30 16:30:15 +020012277if test "$ac_res" != no
12278then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000012279 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012280
12281fi
12282
12283fi
12284
12285
Bram Moolenaar071d4272004-06-13 20:20:40 +000012286if test $ac_cv_header_sys_wait_h = no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that defines union wait" >&5
12288printf %s "checking for sys/wait.h that defines union wait... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012290/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012291#include <sys/wait.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012292int
Illia Bobyra96d5442023-08-30 16:30:15 +020012293main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012294{
Bram Moolenaar071d4272004-06-13 20:20:40 +000012295union wait xx, yy; xx = yy
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012296 ;
12297 return 0;
12298}
12299_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012300if ac_fn_c_try_compile "$LINENO"
12301then :
12302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12303printf "%s\n" "yes" >&6; }
12304 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012305
Illia Bobyra96d5442023-08-30 16:30:15 +020012306 printf "%s\n" "#define HAVE_UNION_WAIT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012307
Christian Brabandt9670f612025-05-07 21:44:33 +020012308else case e in #(
12309 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12310printf "%s\n" "no" >&6; } ;;
12311esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012312fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012313rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012314fi
12315
Illia Bobyra96d5442023-08-30 16:30:15 +020012316ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
12317if test "x$ac_cv_header_stdint_h" = xyes
12318then :
12319 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
12320
12321fi
12322ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
12323if test "x$ac_cv_header_stdlib_h" = xyes
12324then :
12325 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
12326
12327fi
12328ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
12329if test "x$ac_cv_header_string_h" = xyes
12330then :
12331 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
12332
12333fi
12334ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
12335if test "x$ac_cv_header_sys_select_h" = xyes
12336then :
12337 printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
12338
12339fi
12340ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
12341if test "x$ac_cv_header_sys_utsname_h" = xyes
12342then :
12343 printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h
12344
12345fi
12346ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default"
12347if test "x$ac_cv_header_termcap_h" = xyes
12348then :
12349 printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h
12350
12351fi
12352ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
12353if test "x$ac_cv_header_fcntl_h" = xyes
12354then :
12355 printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
12356
12357fi
12358ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default"
12359if test "x$ac_cv_header_sgtty_h" = xyes
12360then :
12361 printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h
12362
12363fi
12364ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
12365if test "x$ac_cv_header_sys_ioctl_h" = xyes
12366then :
12367 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
12368
12369fi
12370ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
12371if test "x$ac_cv_header_sys_time_h" = xyes
12372then :
12373 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
12374
12375fi
12376ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
12377if test "x$ac_cv_header_sys_types_h" = xyes
12378then :
12379 printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
12380
12381fi
12382ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
12383if test "x$ac_cv_header_termio_h" = xyes
12384then :
12385 printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
12386
12387fi
12388ac_fn_c_check_header_compile "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
12389if test "x$ac_cv_header_iconv_h" = xyes
12390then :
12391 printf "%s\n" "#define HAVE_ICONV_H 1" >>confdefs.h
12392
12393fi
12394ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
12395if test "x$ac_cv_header_inttypes_h" = xyes
12396then :
12397 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
12398
12399fi
12400ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
12401if test "x$ac_cv_header_langinfo_h" = xyes
12402then :
12403 printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h
12404
12405fi
12406ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
12407if test "x$ac_cv_header_math_h" = xyes
12408then :
12409 printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h
12410
12411fi
12412ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
12413if test "x$ac_cv_header_unistd_h" = xyes
12414then :
12415 printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
12416
12417fi
12418ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
12419if test "x$ac_cv_header_stropts_h" = xyes
12420then :
12421 printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
12422
12423fi
12424ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
12425if test "x$ac_cv_header_errno_h" = xyes
12426then :
12427 printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
12428
12429fi
12430ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
12431if test "x$ac_cv_header_sys_resource_h" = xyes
12432then :
12433 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
12434
12435fi
12436ac_fn_c_check_header_compile "$LINENO" "sys/systeminfo.h" "ac_cv_header_sys_systeminfo_h" "$ac_includes_default"
12437if test "x$ac_cv_header_sys_systeminfo_h" = xyes
12438then :
12439 printf "%s\n" "#define HAVE_SYS_SYSTEMINFO_H 1" >>confdefs.h
12440
12441fi
12442ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
12443if test "x$ac_cv_header_locale_h" = xyes
12444then :
12445 printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
12446
12447fi
12448ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
12449if test "x$ac_cv_header_sys_stream_h" = xyes
12450then :
12451 printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
12452
12453fi
12454ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
12455if test "x$ac_cv_header_termios_h" = xyes
12456then :
12457 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
12458
12459fi
12460ac_fn_c_check_header_compile "$LINENO" "libc.h" "ac_cv_header_libc_h" "$ac_includes_default"
12461if test "x$ac_cv_header_libc_h" = xyes
12462then :
12463 printf "%s\n" "#define HAVE_LIBC_H 1" >>confdefs.h
12464
12465fi
12466ac_fn_c_check_header_compile "$LINENO" "sys/statfs.h" "ac_cv_header_sys_statfs_h" "$ac_includes_default"
12467if test "x$ac_cv_header_sys_statfs_h" = xyes
12468then :
12469 printf "%s\n" "#define HAVE_SYS_STATFS_H 1" >>confdefs.h
12470
12471fi
12472ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
12473if test "x$ac_cv_header_poll_h" = xyes
12474then :
12475 printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
12476
12477fi
12478ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
12479if test "x$ac_cv_header_sys_poll_h" = xyes
12480then :
12481 printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
12482
12483fi
12484ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default"
12485if test "x$ac_cv_header_pwd_h" = xyes
12486then :
12487 printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h
12488
12489fi
12490ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
12491if test "x$ac_cv_header_utime_h" = xyes
12492then :
12493 printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
12494
12495fi
12496ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
12497if test "x$ac_cv_header_sys_param_h" = xyes
12498then :
12499 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
12500
12501fi
12502ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "$ac_includes_default"
12503if test "x$ac_cv_header_sys_ptms_h" = xyes
12504then :
12505 printf "%s\n" "#define HAVE_SYS_PTMS_H 1" >>confdefs.h
12506
12507fi
12508ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
12509if test "x$ac_cv_header_libintl_h" = xyes
12510then :
12511 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
12512
12513fi
12514ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
12515if test "x$ac_cv_header_libgen_h" = xyes
12516then :
12517 printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
12518
12519fi
12520ac_fn_c_check_header_compile "$LINENO" "util/debug.h" "ac_cv_header_util_debug_h" "$ac_includes_default"
12521if test "x$ac_cv_header_util_debug_h" = xyes
12522then :
12523 printf "%s\n" "#define HAVE_UTIL_DEBUG_H 1" >>confdefs.h
12524
12525fi
12526ac_fn_c_check_header_compile "$LINENO" "util/msg18n.h" "ac_cv_header_util_msg18n_h" "$ac_includes_default"
12527if test "x$ac_cv_header_util_msg18n_h" = xyes
12528then :
12529 printf "%s\n" "#define HAVE_UTIL_MSG18N_H 1" >>confdefs.h
12530
12531fi
12532ac_fn_c_check_header_compile "$LINENO" "frame.h" "ac_cv_header_frame_h" "$ac_includes_default"
12533if test "x$ac_cv_header_frame_h" = xyes
12534then :
12535 printf "%s\n" "#define HAVE_FRAME_H 1" >>confdefs.h
12536
12537fi
12538ac_fn_c_check_header_compile "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
12539if test "x$ac_cv_header_sys_acl_h" = xyes
12540then :
12541 printf "%s\n" "#define HAVE_SYS_ACL_H 1" >>confdefs.h
12542
12543fi
12544ac_fn_c_check_header_compile "$LINENO" "sys/access.h" "ac_cv_header_sys_access_h" "$ac_includes_default"
12545if test "x$ac_cv_header_sys_access_h" = xyes
12546then :
12547 printf "%s\n" "#define HAVE_SYS_ACCESS_H 1" >>confdefs.h
12548
12549fi
12550ac_fn_c_check_header_compile "$LINENO" "sys/sysinfo.h" "ac_cv_header_sys_sysinfo_h" "$ac_includes_default"
12551if test "x$ac_cv_header_sys_sysinfo_h" = xyes
12552then :
12553 printf "%s\n" "#define HAVE_SYS_SYSINFO_H 1" >>confdefs.h
12554
12555fi
12556ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
12557if test "x$ac_cv_header_wchar_h" = xyes
12558then :
12559 printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
12560
12561fi
12562ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
12563if test "x$ac_cv_header_wctype_h" = xyes
12564then :
12565 printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012566
12567fi
12568
Bram Moolenaar071d4272004-06-13 20:20:40 +000012569
Illia Bobyra96d5442023-08-30 16:30:15 +020012570ac_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 +000012571# include <sys/stream.h>
12572#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012573"
Illia Bobyra96d5442023-08-30 16:30:15 +020012574if test "x$ac_cv_header_sys_ptem_h" = xyes
12575then :
12576 printf "%s\n" "#define HAVE_SYS_PTEM_H 1" >>confdefs.h
Bram Moolenaar32f31b12009-05-21 13:20:59 +000012577
12578fi
12579
Bram Moolenaar32f31b12009-05-21 13:20:59 +000012580
Illia Bobyra96d5442023-08-30 16:30:15 +020012581ac_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 +000012582# include <sys/param.h>
12583#endif
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012584"
Illia Bobyra96d5442023-08-30 16:30:15 +020012585if test "x$ac_cv_header_sys_sysctl_h" = xyes
12586then :
12587 printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
Bram Moolenaar00ca2842008-06-26 20:14:00 +000012588
12589fi
12590
Bram Moolenaar00ca2842008-06-26 20:14:00 +000012591
12592
Illia Bobyra96d5442023-08-30 16:30:15 +020012593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_np.h" >&5
12594printf %s "checking for pthread_np.h... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012596/* end confdefs.h. */
12597
12598#include <pthread.h>
12599#include <pthread_np.h>
12600int
Illia Bobyra96d5442023-08-30 16:30:15 +020012601main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012602{
12603int i; i = 0;
12604 ;
12605 return 0;
12606}
12607_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012608if ac_fn_c_try_compile "$LINENO"
12609then :
12610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12611printf "%s\n" "yes" >&6; }
12612 printf "%s\n" "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012613
Christian Brabandt9670f612025-05-07 21:44:33 +020012614else case e in #(
12615 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
12616printf "%s\n" "no" >&6; } ;;
12617esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012618fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012619rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012620
Illia Bobyra96d5442023-08-30 16:30:15 +020012621ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
12622if test "x$ac_cv_header_strings_h" = xyes
12623then :
12624 printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012625
12626fi
12627
Bram Moolenaard0573012017-10-28 21:11:06 +020012628if test "x$MACOS_X" = "xyes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020012629 printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar9372a112005-12-06 19:59:18 +000012630
12631else
Bram Moolenaar071d4272004-06-13 20:20:40 +000012632
Illia Bobyra96d5442023-08-30 16:30:15 +020012633{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if strings.h can be included after string.h" >&5
12634printf %s "checking if strings.h can be included after string.h... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012635cppflags_save=$CPPFLAGS
12636CPPFLAGS="$CPPFLAGS $X_CFLAGS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012638/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012639
12640#if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
12641# define _NO_PROTO /* like in os_unix.h, causes conflict for AIX (Winn) */
12642 /* but don't do it on AIX 5.1 (Uribarri) */
12643#endif
12644#ifdef HAVE_XM_XM_H
12645# include <Xm/Xm.h> /* This breaks it for HP-UX 11 (Squassabia) */
12646#endif
12647#ifdef HAVE_STRING_H
12648# include <string.h>
12649#endif
12650#if defined(HAVE_STRINGS_H)
12651# include <strings.h>
12652#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012653
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012654int
Illia Bobyra96d5442023-08-30 16:30:15 +020012655main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012656{
12657int i; i = 0;
12658 ;
12659 return 0;
12660}
12661_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012662if ac_fn_c_try_compile "$LINENO"
12663then :
12664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12665printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020012666else case e in #(
12667 e) printf "%s\n" "#define NO_STRINGS_WITH_STRING_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012668
Illia Bobyra96d5442023-08-30 16:30:15 +020012669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Christian Brabandt9670f612025-05-07 21:44:33 +020012670printf "%s\n" "no" >&6; } ;;
12671esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012672fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012673rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000012674CPPFLAGS=$cppflags_save
Bram Moolenaar9372a112005-12-06 19:59:18 +000012675fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000012676
Illia Bobyra96d5442023-08-30 16:30:15 +020012677{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12678printf %s "checking for an ANSI C-conforming const... " >&6; }
12679if test ${ac_cv_c_const+y}
12680then :
12681 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012682else case e in #(
12683 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012684/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000012685
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012686int
Illia Bobyra96d5442023-08-30 16:30:15 +020012687main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012688{
Bram Moolenaar7db77842014-03-27 17:40:59 +010012689
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012690#ifndef __cplusplus
Bram Moolenaar7db77842014-03-27 17:40:59 +010012691 /* Ultrix mips cc rejects this sort of thing. */
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012692 typedef int charset[2];
Bram Moolenaar7db77842014-03-27 17:40:59 +010012693 const charset cs = { 0, 0 };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012694 /* SunOS 4.1.1 cc rejects this. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012695 char const *const *pcpcc;
12696 char **ppc;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012697 /* NEC SVR4.0.2 mips cc rejects this. */
12698 struct point {int x, y;};
12699 static struct point const zero = {0,0};
Illia Bobyra96d5442023-08-30 16:30:15 +020012700 /* IBM XL C 1.02.0.0 rejects this.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012701 It does not let you subtract one const X* pointer from another in
12702 an arm of an if-expression whose if-part is not a constant
12703 expression */
12704 const char *g = "string";
Bram Moolenaar446cb832008-06-24 21:56:24 +000012705 pcpcc = &g + (g ? g-g : 0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012706 /* HPUX 7.0 cc rejects these. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000012707 ++pcpcc;
12708 ppc = (char**) pcpcc;
12709 pcpcc = (char const *const *) ppc;
Bram Moolenaar7db77842014-03-27 17:40:59 +010012710 { /* SCO 3.2v4 cc rejects this sort of thing. */
12711 char tx;
12712 char *t = &tx;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012713 char const *s = 0 ? (char *) 0 : (char const *) 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012714
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012715 *t++ = 0;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012716 if (s) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012717 }
12718 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12719 int x[] = {25, 17};
12720 const int *foo = &x[0];
12721 ++foo;
12722 }
12723 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12724 typedef const int *iptr;
12725 iptr p = 0;
12726 ++p;
12727 }
Illia Bobyra96d5442023-08-30 16:30:15 +020012728 { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012729 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Bram Moolenaar7db77842014-03-27 17:40:59 +010012730 struct s { int j; const int *ap[3]; } bx;
12731 struct s *b = &bx; b->j = 5;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012732 }
12733 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12734 const int foo = 10;
Bram Moolenaar446cb832008-06-24 21:56:24 +000012735 if (!foo) return 0;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012736 }
Bram Moolenaar446cb832008-06-24 21:56:24 +000012737 return !cs[0] && !zero.x;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012738#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000012739
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012740 ;
12741 return 0;
Bram Moolenaar071d4272004-06-13 20:20:40 +000012742}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012743_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012744if ac_fn_c_try_compile "$LINENO"
12745then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012746 ac_cv_c_const=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020012747else case e in #(
12748 e) ac_cv_c_const=no ;;
12749esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012750fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012751rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12752esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012753fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12755printf "%s\n" "$ac_cv_c_const" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000012756if test $ac_cv_c_const = no; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012757
Illia Bobyra96d5442023-08-30 16:30:15 +020012758printf "%s\n" "#define const /**/" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000012759
12760fi
12761
Illia Bobyra96d5442023-08-30 16:30:15 +020012762{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12763printf %s "checking for working volatile... " >&6; }
12764if test ${ac_cv_c_volatile+y}
12765then :
12766 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012767else case e in #(
12768 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012769/* end confdefs.h. */
12770
12771int
Illia Bobyra96d5442023-08-30 16:30:15 +020012772main (void)
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012773{
12774
12775volatile int x;
12776int * volatile y = (int *) 0;
12777return !x && !y;
12778 ;
12779 return 0;
12780}
12781_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012782if ac_fn_c_try_compile "$LINENO"
12783then :
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012784 ac_cv_c_volatile=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020012785else case e in #(
12786 e) ac_cv_c_volatile=no ;;
12787esac
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012788fi
Christian Brabandt9670f612025-05-07 21:44:33 +020012789rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
12790esac
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012791fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012792{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
12793printf "%s\n" "$ac_cv_c_volatile" >&6; }
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012794if test $ac_cv_c_volatile = no; then
12795
Illia Bobyra96d5442023-08-30 16:30:15 +020012796printf "%s\n" "#define volatile /**/" >>confdefs.h
Bram Moolenaar76243bd2009-03-02 01:47:02 +000012797
12798fi
12799
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012800ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012801if test "x$ac_cv_type_mode_t" = xyes
12802then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012803
Christian Brabandt9670f612025-05-07 21:44:33 +020012804else case e in #(
12805 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012806printf "%s\n" "#define mode_t int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012807 ;;
12808esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012809fi
12810
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012811ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012812if test "x$ac_cv_type_off_t" = xyes
12813then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012814
Christian Brabandt9670f612025-05-07 21:44:33 +020012815else case e in #(
12816 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012817printf "%s\n" "#define off_t long int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012818 ;;
12819esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012820fi
12821
Bram Moolenaar071d4272004-06-13 20:20:40 +000012822
Illia Bobyra96d5442023-08-30 16:30:15 +020012823 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
12824"
12825if test "x$ac_cv_type_pid_t" = xyes
12826then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012827
Christian Brabandt9670f612025-05-07 21:44:33 +020012828else case e in #(
12829 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020012830/* end confdefs.h. */
12831
12832 #if defined _WIN64 && !defined __CYGWIN__
12833 LLP64
12834 #endif
12835
12836int
12837main (void)
12838{
12839
12840 ;
12841 return 0;
12842}
12843
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012844_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012845if ac_fn_c_try_compile "$LINENO"
12846then :
12847 ac_pid_type='int'
Christian Brabandt9670f612025-05-07 21:44:33 +020012848else case e in #(
12849 e) ac_pid_type='__int64' ;;
12850esac
Illia Bobyra96d5442023-08-30 16:30:15 +020012851fi
12852rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12853
12854printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
12855
Christian Brabandt9670f612025-05-07 21:44:33 +020012856 ;;
12857esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012858fi
12859
Illia Bobyra96d5442023-08-30 16:30:15 +020012860
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012861ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012862if test "x$ac_cv_type_size_t" = xyes
12863then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012864
Christian Brabandt9670f612025-05-07 21:44:33 +020012865else case e in #(
12866 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012867printf "%s\n" "#define size_t unsigned int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012868 ;;
12869esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012870fi
12871
Christian Brabandt9670f612025-05-07 21:44:33 +020012872ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default"
12873if test "x$ac_cv_type_uid_t" = xyes
Illia Bobyra96d5442023-08-30 16:30:15 +020012874then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012875
Christian Brabandt9670f612025-05-07 21:44:33 +020012876else case e in #(
12877 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012878printf "%s\n" "#define uid_t int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012879 ;;
12880esac
12881fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012882
Christian Brabandt9670f612025-05-07 21:44:33 +020012883ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default"
12884if test "x$ac_cv_type_gid_t" = xyes
12885then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012886
Christian Brabandt9670f612025-05-07 21:44:33 +020012887else case e in #(
12888 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012889printf "%s\n" "#define gid_t int" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012890 ;;
12891esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000012892fi
12893
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012894ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
12895case $ac_cv_c_uint32_t in #(
12896 no|yes) ;; #(
12897 *)
12898
Illia Bobyra96d5442023-08-30 16:30:15 +020012899printf "%s\n" "#define _UINT32_T 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012900
12901
Illia Bobyra96d5442023-08-30 16:30:15 +020012902printf "%s\n" "#define uint32_t $ac_cv_c_uint32_t" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012903;;
12904 esac
12905
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020012906
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012907
Illia Bobyrf39842f2023-08-27 18:21:23 +020012908
12909
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012910ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012911if test "x$ac_cv_type_ino_t" = xyes
12912then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000012913
Christian Brabandt9670f612025-05-07 21:44:33 +020012914else case e in #(
12915 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012916printf "%s\n" "#define ino_t long" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012917 ;;
12918esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012919fi
12920
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020012921ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020012922if test "x$ac_cv_type_dev_t" = xyes
12923then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012924
Christian Brabandt9670f612025-05-07 21:44:33 +020012925else case e in #(
12926 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020012927printf "%s\n" "#define dev_t unsigned" >>confdefs.h
Christian Brabandt9670f612025-05-07 21:44:33 +020012928 ;;
12929esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000012930fi
12931
Illia Bobyra96d5442023-08-30 16:30:15 +020012932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12933printf %s "checking whether byte ordering is bigendian... " >&6; }
12934if test ${ac_cv_c_bigendian+y}
12935then :
12936 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020012937else case e in #(
12938 e) ac_cv_c_bigendian=unknown
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012939 # See if we're dealing with a universal compiler.
12940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12941/* end confdefs.h. */
12942#ifndef __APPLE_CC__
12943 not a universal capable compiler
12944 #endif
12945 typedef int dummy;
12946
12947_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012948if ac_fn_c_try_compile "$LINENO"
12949then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012950
12951 # Check for potential -arch flags. It is not universal unless
12952 # there are at least two -arch flags with different values.
12953 ac_arch=
12954 ac_prev=
12955 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12956 if test -n "$ac_prev"; then
12957 case $ac_word in
12958 i?86 | x86_64 | ppc | ppc64)
12959 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12960 ac_arch=$ac_word
12961 else
12962 ac_cv_c_bigendian=universal
12963 break
12964 fi
12965 ;;
12966 esac
12967 ac_prev=
12968 elif test "x$ac_word" = "x-arch"; then
12969 ac_prev=arch
12970 fi
12971 done
12972fi
Illia Bobyra96d5442023-08-30 16:30:15 +020012973rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012974 if test $ac_cv_c_bigendian = unknown; then
12975 # See if sys/param.h defines the BYTE_ORDER macro.
12976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12977/* end confdefs.h. */
12978#include <sys/types.h>
12979 #include <sys/param.h>
12980
12981int
Illia Bobyra96d5442023-08-30 16:30:15 +020012982main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012983{
Christian Brabandt9670f612025-05-07 21:44:33 +020012984#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
12985 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012986 && LITTLE_ENDIAN)
12987 bogus endian macros
12988 #endif
12989
12990 ;
12991 return 0;
12992}
12993_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020012994if ac_fn_c_try_compile "$LINENO"
12995then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020012996 # It does; now see whether it defined to BIG_ENDIAN or not.
12997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12998/* end confdefs.h. */
12999#include <sys/types.h>
13000 #include <sys/param.h>
13001
13002int
Illia Bobyra96d5442023-08-30 16:30:15 +020013003main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013004{
13005#if BYTE_ORDER != BIG_ENDIAN
13006 not big endian
13007 #endif
13008
13009 ;
13010 return 0;
13011}
13012_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013013if ac_fn_c_try_compile "$LINENO"
13014then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013015 ac_cv_c_bigendian=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013016else case e in #(
13017 e) ac_cv_c_bigendian=no ;;
13018esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013019fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013020rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013021fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013022rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013023 fi
13024 if test $ac_cv_c_bigendian = unknown; then
13025 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13027/* end confdefs.h. */
13028#include <limits.h>
13029
13030int
Illia Bobyra96d5442023-08-30 16:30:15 +020013031main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013032{
13033#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13034 bogus endian macros
13035 #endif
13036
13037 ;
13038 return 0;
13039}
13040_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013041if ac_fn_c_try_compile "$LINENO"
13042then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013043 # It does; now see whether it defined to _BIG_ENDIAN or not.
13044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13045/* end confdefs.h. */
13046#include <limits.h>
13047
13048int
Illia Bobyra96d5442023-08-30 16:30:15 +020013049main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013050{
13051#ifndef _BIG_ENDIAN
13052 not big endian
13053 #endif
13054
13055 ;
13056 return 0;
13057}
13058_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013059if ac_fn_c_try_compile "$LINENO"
13060then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013061 ac_cv_c_bigendian=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013062else case e in #(
13063 e) ac_cv_c_bigendian=no ;;
13064esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013065fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013066rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013067fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013068rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013069 fi
13070 if test $ac_cv_c_bigendian = unknown; then
13071 # Compile a test program.
Illia Bobyra96d5442023-08-30 16:30:15 +020013072 if test "$cross_compiling" = yes
13073then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013074 # Try to guess by grepping values from an object file.
13075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13076/* end confdefs.h. */
Illia Bobyra96d5442023-08-30 16:30:15 +020013077unsigned short int ascii_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013078 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020013079 unsigned short int ascii_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013080 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13081 int use_ascii (int i) {
13082 return ascii_mm[i] + ascii_ii[i];
13083 }
Illia Bobyra96d5442023-08-30 16:30:15 +020013084 unsigned short int ebcdic_ii[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013085 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
Illia Bobyra96d5442023-08-30 16:30:15 +020013086 unsigned short int ebcdic_mm[] =
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013087 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13088 int use_ebcdic (int i) {
13089 return ebcdic_mm[i] + ebcdic_ii[i];
13090 }
Christian Brabandt9670f612025-05-07 21:44:33 +020013091 int
13092 main (int argc, char **argv)
13093 {
13094 /* Intimidate the compiler so that it does not
13095 optimize the arrays away. */
13096 char *p = argv[0];
13097 ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
13098 ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
13099 return use_ascii (argc) == use_ebcdic (*p);
13100 }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013101_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020013102if ac_fn_c_try_link "$LINENO"
Illia Bobyra96d5442023-08-30 16:30:15 +020013103then :
Christian Brabandt9670f612025-05-07 21:44:33 +020013104 if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013105 ac_cv_c_bigendian=yes
13106 fi
Christian Brabandt9670f612025-05-07 21:44:33 +020013107 if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013108 if test "$ac_cv_c_bigendian" = unknown; then
13109 ac_cv_c_bigendian=no
13110 else
13111 # finding both strings is unlikely to happen, but who knows?
13112 ac_cv_c_bigendian=unknown
13113 fi
13114 fi
13115fi
Christian Brabandt9670f612025-05-07 21:44:33 +020013116rm -f core conftest.err conftest.$ac_objext conftest.beam \
13117 conftest$ac_exeext conftest.$ac_ext
13118else case e in #(
13119 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013120/* end confdefs.h. */
13121$ac_includes_default
13122int
Illia Bobyra96d5442023-08-30 16:30:15 +020013123main (void)
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013124{
13125
13126 /* Are we little or big endian? From Harbison&Steele. */
13127 union
13128 {
13129 long int l;
13130 char c[sizeof (long int)];
13131 } u;
13132 u.l = 1;
13133 return u.c[sizeof (long int) - 1] == 1;
13134
13135 ;
13136 return 0;
13137}
13138_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013139if ac_fn_c_try_run "$LINENO"
13140then :
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013141 ac_cv_c_bigendian=no
Christian Brabandt9670f612025-05-07 21:44:33 +020013142else case e in #(
13143 e) ac_cv_c_bigendian=yes ;;
13144esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013145fi
13146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013147 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13148esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013149fi
13150
Christian Brabandt9670f612025-05-07 21:44:33 +020013151 fi ;;
13152esac
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013153fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013154{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13155printf "%s\n" "$ac_cv_c_bigendian" >&6; }
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013156 case $ac_cv_c_bigendian in #(
13157 yes)
Illia Bobyra96d5442023-08-30 16:30:15 +020013158 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013159;; #(
13160 no)
13161 ;; #(
13162 universal)
13163
Illia Bobyra96d5442023-08-30 16:30:15 +020013164printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013165
13166 ;; #(
13167 *)
Bram Moolenaar7db77842014-03-27 17:40:59 +010013168 as_fn_error $? "unknown endianness
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020013169 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13170 esac
13171
Illia Bobyra96d5442023-08-30 16:30:15 +020013172{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
13173printf %s "checking for inline... " >&6; }
13174if test ${ac_cv_c_inline+y}
13175then :
13176 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013177else case e in #(
13178 e) ac_cv_c_inline=no
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013179for ac_kw in inline __inline__ __inline; do
13180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13181/* end confdefs.h. */
13182#ifndef __cplusplus
13183typedef int foo_t;
Illia Bobyra96d5442023-08-30 16:30:15 +020013184static $ac_kw foo_t static_foo (void) {return 0; }
13185$ac_kw foo_t foo (void) {return 0; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013186#endif
13187
13188_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013189if ac_fn_c_try_compile "$LINENO"
13190then :
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013191 ac_cv_c_inline=$ac_kw
13192fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013193rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013194 test "$ac_cv_c_inline" != no && break
13195done
Christian Brabandt9670f612025-05-07 21:44:33 +020013196 ;;
13197esac
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013198fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013199{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
13200printf "%s\n" "$ac_cv_c_inline" >&6; }
Bram Moolenaar136f29a2016-02-27 20:14:15 +010013201
13202case $ac_cv_c_inline in
13203 inline | yes) ;;
13204 *)
13205 case $ac_cv_c_inline in
13206 no) ac_val=;;
13207 *) ac_val=$ac_cv_c_inline;;
13208 esac
13209 cat >>confdefs.h <<_ACEOF
13210#ifndef __cplusplus
13211#define inline $ac_val
13212#endif
13213_ACEOF
13214 ;;
13215esac
13216
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013217
Illia Bobyra96d5442023-08-30 16:30:15 +020013218{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rlim_t" >&5
13219printf %s "checking for rlim_t... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013220if eval "test \"`echo '$''{'ac_cv_type_rlim_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_rlim_t" >&5
13222printf "%s\n" "(cached) $ac_cv_type_rlim_t" >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013223else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013225/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013226
13227#include <sys/types.h>
13228#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000013229# include <stdlib.h>
13230# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013231#endif
13232#ifdef HAVE_SYS_RESOURCE_H
Bram Moolenaar446cb832008-06-24 21:56:24 +000013233# include <sys/resource.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013234#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013235
13236_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013237if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020013238 $EGREP_TRADITIONAL "(^|[^a-zA-Z_0-9])rlim_t[^a-zA-Z_0-9]" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +020013239then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013240 ac_cv_type_rlim_t=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013241else case e in #(
13242 e) ac_cv_type_rlim_t=no ;;
13243esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013244fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013245rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013246
Illia Bobyra96d5442023-08-30 16:30:15 +020013247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_rlim_t" >&5
13248printf "%s\n" "$ac_cv_type_rlim_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013249fi
13250if test $ac_cv_type_rlim_t = no; then
13251 cat >> confdefs.h <<\EOF
13252#define rlim_t unsigned long
13253EOF
13254fi
13255
Illia Bobyra96d5442023-08-30 16:30:15 +020013256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stack_t" >&5
13257printf %s "checking for stack_t... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013258if eval "test \"`echo '$''{'ac_cv_type_stack_t'+set}'`\" = set"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: (cached) $ac_cv_type_stack_t" >&5
13260printf "%s\n" "(cached) $ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013261else
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013263/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013264
13265#include <sys/types.h>
13266#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000013267# include <stdlib.h>
13268# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013269#endif
13270#include <signal.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013271
13272_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020013274 $EGREP_TRADITIONAL "stack_t" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +020013275then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013276 ac_cv_type_stack_t=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013277else case e in #(
13278 e) ac_cv_type_stack_t=no ;;
13279esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013280fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013281rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013282
Illia Bobyra96d5442023-08-30 16:30:15 +020013283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_stack_t" >&5
13284printf "%s\n" "$ac_cv_type_stack_t" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013285fi
13286if test $ac_cv_type_stack_t = no; then
13287 cat >> confdefs.h <<\EOF
13288#define stack_t struct sigaltstack
13289EOF
13290fi
13291
Illia Bobyra96d5442023-08-30 16:30:15 +020013292{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stack_t has an ss_base field" >&5
13293printf %s "checking whether stack_t has an ss_base field... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013295/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013296
13297#include <sys/types.h>
13298#if STDC_HEADERS
Bram Moolenaar446cb832008-06-24 21:56:24 +000013299# include <stdlib.h>
13300# include <stddef.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000013301#endif
13302#include <signal.h>
13303#include "confdefs.h"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013304
13305int
Illia Bobyra96d5442023-08-30 16:30:15 +020013306main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013307{
13308stack_t sigstk; sigstk.ss_base = 0;
13309 ;
13310 return 0;
13311}
13312_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013313if ac_fn_c_try_compile "$LINENO"
13314then :
13315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13316printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SS_BASE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013317
Christian Brabandt9670f612025-05-07 21:44:33 +020013318else case e in #(
13319 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13320printf "%s\n" "no" >&6; } ;;
13321esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013322fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013323rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013324
13325olibs="$LIBS"
Illia Bobyra96d5442023-08-30 16:30:15 +020013326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-tlib argument" >&5
13327printf %s "checking --with-tlib argument... " >&6; }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013328
Bram Moolenaar446cb832008-06-24 21:56:24 +000013329# Check whether --with-tlib was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020013330if test ${with_tlib+y}
13331then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013332 withval=$with_tlib;
13333fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013334
13335if test -n "$with_tlib"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_tlib" >&5
13337printf "%s\n" "$with_tlib" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013338 LIBS="$LIBS -l$with_tlib"
Illia Bobyra96d5442023-08-30 16:30:15 +020013339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking with $with_tlib library" >&5
13340printf %s "checking for linking with $with_tlib library... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013342/* end confdefs.h. */
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013343
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013344int
Illia Bobyra96d5442023-08-30 16:30:15 +020013345main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013346{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013347
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013348 ;
13349 return 0;
13350}
13351_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013352if ac_fn_c_try_link "$LINENO"
13353then :
13354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: OK" >&5
13355printf "%s\n" "OK" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020013356else case e in #(
13357 e) as_fn_error $? "FAILED" "$LINENO" 5 ;;
13358esac
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013359fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013360rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013361 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013362 olibs="$LIBS"
13363else
Illia Bobyra96d5442023-08-30 16:30:15 +020013364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty: automatic terminal library selection" >&5
13365printf "%s\n" "empty: automatic terminal library selection" >&6; }
Bram Moolenaar6840a0f2021-12-13 20:37:59 +000013366 case "$vim_cv_uname_output" in
Bram Moolenaar4e509b62011-02-09 17:42:57 +010013367 OSF1|SCO_SV) tlibs="tinfo ncurses curses termlib termcap";;
13368 *) tlibs="tinfo ncurses termlib termcap curses";;
Bram Moolenaar071d4272004-06-13 20:20:40 +000013369 esac
13370 for libname in $tlibs; do
Christian Brabandt9670f612025-05-07 21:44:33 +020013371 as_ac_Lib=`printf "%s\n" "ac_cv_lib_${libname}""_tgetent" | sed "$as_sed_sh"`
Illia Bobyra96d5442023-08-30 16:30:15 +020013372{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l${libname}" >&5
13373printf %s "checking for tgetent in -l${libname}... " >&6; }
13374if eval test \${$as_ac_Lib+y}
13375then :
13376 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013377else case e in #(
13378 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000013379LIBS="-l${libname} $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013381/* end confdefs.h. */
13382
Bram Moolenaar446cb832008-06-24 21:56:24 +000013383/* Override any GCC internal prototype to avoid an error.
13384 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020013385 builtin and then its argument prototype would still apply.
13386 The 'extern "C"' is for builds by C++ compilers;
13387 although this is not generally supported in C code supporting it here
13388 has little cost and some practical benefit (sr 110532). */
13389#ifdef __cplusplus
13390extern "C"
13391#endif
13392char tgetent (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013393int
Illia Bobyra96d5442023-08-30 16:30:15 +020013394main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013395{
Bram Moolenaar446cb832008-06-24 21:56:24 +000013396return tgetent ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013397 ;
13398 return 0;
13399}
13400_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013401if ac_fn_c_try_link "$LINENO"
13402then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013403 eval "$as_ac_Lib=yes"
Christian Brabandt9670f612025-05-07 21:44:33 +020013404else case e in #(
13405 e) eval "$as_ac_Lib=no" ;;
13406esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013407fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013408rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013409 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020013410LIBS=$ac_check_lib_save_LIBS ;;
13411esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013412fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013413eval ac_res=\$$as_ac_Lib
Illia Bobyra96d5442023-08-30 16:30:15 +020013414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13415printf "%s\n" "$ac_res" >&6; }
13416if eval test \"x\$"$as_ac_Lib"\" = x"yes"
13417then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013418 cat >>confdefs.h <<_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020013419#define `printf "%s\n" "HAVE_LIB${libname}" | sed "$as_sed_cpp"` 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013420_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013421
13422 LIBS="-l${libname} $LIBS"
13423
Bram Moolenaar071d4272004-06-13 20:20:40 +000013424fi
13425
13426 if test "x$olibs" != "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013427 if test "$cross_compiling" = yes
13428then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013429 res="OK"
Christian Brabandt9670f612025-05-07 21:44:33 +020013430else case e in #(
13431 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013432/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013433
13434#ifdef HAVE_TERMCAP_H
13435# include <termcap.h>
13436#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000013437#if STDC_HEADERS
13438# include <stdlib.h>
13439# include <stddef.h>
13440#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013441int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013442_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013443if ac_fn_c_try_run "$LINENO"
13444then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013445 res="OK"
Christian Brabandt9670f612025-05-07 21:44:33 +020013446else case e in #(
13447 e) res="FAIL" ;;
13448esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013449fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013451 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13452esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013453fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000013454
Bram Moolenaar071d4272004-06-13 20:20:40 +000013455 if test "$res" = "OK"; then
13456 break
13457 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libname library is not usable" >&5
13459printf "%s\n" "$libname library is not usable" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013460 LIBS="$olibs"
13461 fi
13462 done
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013463 if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no terminal library found" >&5
13465printf "%s\n" "no terminal library found" >&6; }
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013466 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013467fi
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013468
13469if test "x$olibs" = "x$LIBS"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent()" >&5
13471printf %s "checking for tgetent()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013473/* end confdefs.h. */
Bram Moolenaarbd7f7c12020-07-28 21:03:37 +020013474int tgetent(char *, const char *);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013475int
Illia Bobyra96d5442023-08-30 16:30:15 +020013476main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013477{
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013478char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013479 ;
13480 return 0;
13481}
13482_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013483if ac_fn_c_try_link "$LINENO"
13484then :
13485 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13486printf "%s\n" "yes" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020013487else case e in #(
13488 e) as_fn_error $? "NOT FOUND!
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013489 You need to install a terminal library; for example ncurses.
Bram Moolenaar16678eb2021-04-21 11:57:59 +020013490 On Linux that would be the libncurses-dev package.
Christian Brabandt9670f612025-05-07 21:44:33 +020013491 Or specify the name of the library with --with-tlib." "$LINENO" 5 ;;
13492esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013493fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013494rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013495 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar1cd871b2004-12-19 22:46:22 +000013496fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000013497
Illia Bobyra96d5442023-08-30 16:30:15 +020013498{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we talk terminfo" >&5
13499printf %s "checking whether we talk terminfo... " >&6; }
13500if test ${vim_cv_terminfo+y}
13501then :
13502 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013503else case e in #(
13504 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020013505 if test "$cross_compiling" = yes
13506then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013507
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013508 vim_cv_terminfo=yes
13509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_terminfo'" >&5
13510printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_terminfo'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013511
Christian Brabandt9670f612025-05-07 21:44:33 +020013512else case e in #(
13513 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013514/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013515
Bram Moolenaar446cb832008-06-24 21:56:24 +000013516#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000013517#ifdef HAVE_TERMCAP_H
13518# include <termcap.h>
13519#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000013520#ifdef HAVE_STRING_H
13521# include <string.h>
13522#endif
13523#if STDC_HEADERS
13524# include <stdlib.h>
13525# include <stddef.h>
13526#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013527int main()
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013528{char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!!strcmp(s==0 ? "" : s, "1")); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013529
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013530_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013531if ac_fn_c_try_run "$LINENO"
13532then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013533
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013534 vim_cv_terminfo=yes
Bram Moolenaar446cb832008-06-24 21:56:24 +000013535
Christian Brabandt9670f612025-05-07 21:44:33 +020013536else case e in #(
13537 e)
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013538 vim_cv_terminfo=no
Christian Brabandt9670f612025-05-07 21:44:33 +020013539 ;;
13540esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013541fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013543 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13544esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013545fi
13546
Christian Brabandt9670f612025-05-07 21:44:33 +020013547 ;;
13548esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013549fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013550{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_terminfo" >&5
13551printf "%s\n" "$vim_cv_terminfo" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013552
13553if test "x$vim_cv_terminfo" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013554 printf "%s\n" "#define TERMINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013555
13556fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000013557
Illia Bobyra96d5442023-08-30 16:30:15 +020013558{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking what tgetent() returns for an unknown terminal" >&5
13559printf %s "checking what tgetent() returns for an unknown terminal... " >&6; }
13560if test ${vim_cv_tgetent+y}
13561then :
13562 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013563else case e in #(
13564 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020013565 if test "$cross_compiling" = yes
13566then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013567
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013568 vim_cv_tgetent=zero
13569 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_tgetent'" >&5
13570printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_tgetent'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013571
Christian Brabandt9670f612025-05-07 21:44:33 +020013572else case e in #(
13573 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013574/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013575
Bram Moolenaar446cb832008-06-24 21:56:24 +000013576#include "confdefs.h"
Bram Moolenaar071d4272004-06-13 20:20:40 +000013577#ifdef HAVE_TERMCAP_H
13578# include <termcap.h>
13579#endif
Bram Moolenaar446cb832008-06-24 21:56:24 +000013580#if STDC_HEADERS
13581# include <stdlib.h>
13582# include <stddef.h>
13583#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013584int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013585{char s[10000]; int res = tgetent(s, "thisterminaldoesnotexist"); exit(res != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013586
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013587_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013588if ac_fn_c_try_run "$LINENO"
13589then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013590
Bram Moolenaara88254f2017-11-02 23:04:14 +010013591 vim_cv_tgetent=zero
Bram Moolenaar071d4272004-06-13 20:20:40 +000013592
Christian Brabandt9670f612025-05-07 21:44:33 +020013593else case e in #(
13594 e)
Bram Moolenaara88254f2017-11-02 23:04:14 +010013595 vim_cv_tgetent=non-zero
Christian Brabandt9670f612025-05-07 21:44:33 +020013596 ;;
13597esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013598fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013600 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13601esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013602fi
13603
Christian Brabandt9670f612025-05-07 21:44:33 +020013604 ;;
13605esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013606fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013607{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tgetent" >&5
13608printf "%s\n" "$vim_cv_tgetent" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000013609
Bram Moolenaara88254f2017-11-02 23:04:14 +010013610if test "x$vim_cv_tgetent" = "xzero" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013611 printf "%s\n" "#define TGETENT_ZERO_ERR 0" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000013612
Bram Moolenaar446cb832008-06-24 21:56:24 +000013613fi
13614
Illia Bobyra96d5442023-08-30 16:30:15 +020013615{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains ospeed" >&5
13616printf %s "checking whether termcap.h contains ospeed... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013618/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013619
13620#ifdef HAVE_TERMCAP_H
13621# include <termcap.h>
13622#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013623
13624int
Illia Bobyra96d5442023-08-30 16:30:15 +020013625main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013626{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013627ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013628 ;
13629 return 0;
13630}
13631_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013632if ac_fn_c_try_link "$LINENO"
13633then :
13634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13635printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OSPEED 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013636
Christian Brabandt9670f612025-05-07 21:44:33 +020013637else case e in #(
13638 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020013639printf "%s\n" "no" >&6; }
13640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ospeed can be extern" >&5
13641printf %s "checking whether ospeed can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013643/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013644
13645#ifdef HAVE_TERMCAP_H
13646# include <termcap.h>
13647#endif
13648extern short ospeed;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013649
13650int
Illia Bobyra96d5442023-08-30 16:30:15 +020013651main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013652{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013653ospeed = 20000
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013654 ;
13655 return 0;
13656}
13657_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013658if ac_fn_c_try_link "$LINENO"
13659then :
13660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13661printf "%s\n" "yes" >&6; }; printf "%s\n" "#define OSPEED_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013662
Christian Brabandt9670f612025-05-07 21:44:33 +020013663else case e in #(
13664 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13665printf "%s\n" "no" >&6; } ;;
13666esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013667fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013668rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013669 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020013670 ;;
13671esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013672fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013673rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013674 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013675
Illia Bobyra96d5442023-08-30 16:30:15 +020013676{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termcap.h contains UP, BC and PC" >&5
13677printf %s "checking whether termcap.h contains UP, BC and PC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013679/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013680
13681#ifdef HAVE_TERMCAP_H
13682# include <termcap.h>
13683#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013684
13685int
Illia Bobyra96d5442023-08-30 16:30:15 +020013686main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013687{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013688if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013689 ;
13690 return 0;
13691}
13692_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013693if ac_fn_c_try_link "$LINENO"
13694then :
13695 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13696printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_UP_BC_PC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013697
Christian Brabandt9670f612025-05-07 21:44:33 +020013698else case e in #(
13699 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020013700printf "%s\n" "no" >&6; }
13701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UP, BC and PC can be extern" >&5
13702printf %s "checking whether UP, BC and PC can be extern... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013704/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013705
13706#ifdef HAVE_TERMCAP_H
13707# include <termcap.h>
13708#endif
13709extern char *UP, *BC, PC;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013710
13711int
Illia Bobyra96d5442023-08-30 16:30:15 +020013712main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013713{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013714if (UP == 0 && BC == 0) PC = 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013715 ;
13716 return 0;
13717}
13718_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013719if ac_fn_c_try_link "$LINENO"
13720then :
13721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13722printf "%s\n" "yes" >&6; }; printf "%s\n" "#define UP_BC_PC_EXTERN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013723
Christian Brabandt9670f612025-05-07 21:44:33 +020013724else case e in #(
13725 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13726printf "%s\n" "no" >&6; } ;;
13727esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013728fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013729rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013730 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020013731 ;;
13732esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013733fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013734rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013735 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013736
Illia Bobyra96d5442023-08-30 16:30:15 +020013737{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether tputs() uses outfuntype" >&5
13738printf %s "checking whether tputs() uses outfuntype... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013740/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013741
13742#ifdef HAVE_TERMCAP_H
13743# include <termcap.h>
13744#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013745
13746int
Illia Bobyra96d5442023-08-30 16:30:15 +020013747main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013748{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013749extern int xx(); tputs("test", 1, (outfuntype)xx)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013750 ;
13751 return 0;
13752}
13753_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013754if ac_fn_c_try_compile "$LINENO"
13755then :
13756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13757printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_OUTFUNTYPE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013758
Christian Brabandt9670f612025-05-07 21:44:33 +020013759else case e in #(
13760 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13761printf "%s\n" "no" >&6; } ;;
13762esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013763fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013764rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013765
Illia Bobyra96d5442023-08-30 16:30:15 +020013766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether del_curterm() can be used" >&5
13767printf %s "checking whether del_curterm() can be used... " >&6; }
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13769/* end confdefs.h. */
13770
13771#ifdef HAVE_TERMCAP_H
13772# include <termcap.h>
13773#endif
13774#include <term.h>
13775
13776int
Illia Bobyra96d5442023-08-30 16:30:15 +020013777main (void)
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013778{
13779if (cur_term) del_curterm(cur_term);
13780 ;
13781 return 0;
13782}
13783_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013784if ac_fn_c_try_link "$LINENO"
13785then :
13786 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13787printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DEL_CURTERM 1" >>confdefs.h
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013788
Christian Brabandt9670f612025-05-07 21:44:33 +020013789else case e in #(
13790 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13791printf "%s\n" "no" >&6; } ;;
13792esac
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013793fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013794rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarb3a29552021-11-19 11:28:04 +000013795 conftest$ac_exeext conftest.$ac_ext
13796
Illia Bobyra96d5442023-08-30 16:30:15 +020013797{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13798printf %s "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013800/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013801
13802#include <sys/types.h>
13803#include <sys/time.h>
13804#include <sys/select.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013805int
Illia Bobyra96d5442023-08-30 16:30:15 +020013806main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013807{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013808
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013809 ;
13810 return 0;
13811}
13812_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013813if ac_fn_c_try_compile "$LINENO"
13814then :
13815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13816printf "%s\n" "yes" >&6; }
13817 printf "%s\n" "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013818
Christian Brabandt9670f612025-05-07 21:44:33 +020013819else case e in #(
13820 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13821printf "%s\n" "no" >&6; } ;;
13822esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013823fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013824rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000013825
Illia Bobyra96d5442023-08-30 16:30:15 +020013826{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
13827printf %s "checking for /dev/ptc... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013828if test -r /dev/ptc; then
Illia Bobyra96d5442023-08-30 16:30:15 +020013829 printf "%s\n" "#define HAVE_DEV_PTC 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013830
Illia Bobyra96d5442023-08-30 16:30:15 +020013831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13832printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013833else
Illia Bobyra96d5442023-08-30 16:30:15 +020013834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13835printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013836fi
13837
Illia Bobyra96d5442023-08-30 16:30:15 +020013838{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SVR4 ptys" >&5
13839printf %s "checking for SVR4 ptys... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013840if test -c /dev/ptmx ; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013842/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013843
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013844// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
13845char *ptsname(int);
13846int unlockpt(int);
13847int grantpt(int);
13848
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013849int
Illia Bobyra96d5442023-08-30 16:30:15 +020013850main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013851{
Bram Moolenaarce7be3a2020-11-26 20:11:11 +010013852
13853 ptsname(0);
13854 grantpt(0);
13855 unlockpt(0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013856 ;
13857 return 0;
13858}
13859_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013860if ac_fn_c_try_link "$LINENO"
13861then :
13862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13863printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SVR4_PTYS 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013864
Christian Brabandt9670f612025-05-07 21:44:33 +020013865else case e in #(
13866 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13867printf "%s\n" "no" >&6; } ;;
13868esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013869fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013870rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013871 conftest$ac_exeext conftest.$ac_ext
13872else
Illia Bobyra96d5442023-08-30 16:30:15 +020013873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13874printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013875fi
13876
Illia Bobyra96d5442023-08-30 16:30:15 +020013877{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ptyranges" >&5
13878printf %s "checking for ptyranges... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013879if test -d /dev/ptym ; then
13880 pdir='/dev/ptym'
13881else
13882 pdir='/dev'
13883fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013885/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013886#ifdef M_UNIX
13887 yes;
13888#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013889
13890_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000013891if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Christian Brabandt9670f612025-05-07 21:44:33 +020013892 $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
Illia Bobyra96d5442023-08-30 16:30:15 +020013893then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000013894 ptys=`echo /dev/ptyp??`
Christian Brabandt9670f612025-05-07 21:44:33 +020013895else case e in #(
13896 e) ptys=`echo $pdir/pty??` ;;
13897esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013898fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013899rm -rf conftest*
Bram Moolenaar071d4272004-06-13 20:20:40 +000013900
13901if test "$ptys" != "$pdir/pty??" ; then
13902 p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
13903 p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
Illia Bobyra96d5442023-08-30 16:30:15 +020013904 printf "%s\n" "#define PTYRANGE0 \"$p0\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013905
Illia Bobyra96d5442023-08-30 16:30:15 +020013906 printf "%s\n" "#define PTYRANGE1 \"$p1\"" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013907
Illia Bobyra96d5442023-08-30 16:30:15 +020013908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $p0 / $p1" >&5
13909printf "%s\n" "$p0 / $p1" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013910else
Illia Bobyra96d5442023-08-30 16:30:15 +020013911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: don't know" >&5
13912printf "%s\n" "don't know" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000013913fi
13914
Bram Moolenaar446cb832008-06-24 21:56:24 +000013915
Illia Bobyra96d5442023-08-30 16:30:15 +020013916{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sigcontext" >&5
13917printf %s "checking for struct sigcontext... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013919/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013920
13921#include <signal.h>
Sam Jamesf8ea1062022-11-05 15:13:50 +000013922int test_sig()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013923{
13924 struct sigcontext *scont;
13925 scont = (struct sigcontext *)0;
13926 return 1;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013927}
13928int
Illia Bobyra96d5442023-08-30 16:30:15 +020013929main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013930{
Bram Moolenaar071d4272004-06-13 20:20:40 +000013931
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013932 ;
13933 return 0;
13934}
13935_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013936if ac_fn_c_try_compile "$LINENO"
13937then :
13938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13939printf "%s\n" "yes" >&6; }
13940 printf "%s\n" "#define HAVE_SIGCONTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000013941
Christian Brabandt9670f612025-05-07 21:44:33 +020013942else case e in #(
13943 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
13944printf "%s\n" "no" >&6; } ;;
13945esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000013946fi
Illia Bobyra96d5442023-08-30 16:30:15 +020013947rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000013948
Illia Bobyra96d5442023-08-30 16:30:15 +020013949{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking getcwd implementation is broken" >&5
13950printf %s "checking getcwd implementation is broken... " >&6; }
13951if test ${vim_cv_getcwd_broken+y}
13952then :
13953 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020013954else case e in #(
13955 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020013956 if test "$cross_compiling" = yes
13957then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013958
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010013959 vim_cv_getcwd_broken=no
13960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_getcwd_broken'" >&5
13961printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_getcwd_broken'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013962
Christian Brabandt9670f612025-05-07 21:44:33 +020013963else case e in #(
13964 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013965/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000013966
Bram Moolenaar446cb832008-06-24 21:56:24 +000013967#include "confdefs.h"
13968#ifdef HAVE_UNISTD_H
13969#include <unistd.h>
13970#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000013971char *dagger[] = { "IFS=pwd", 0 };
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010013972int main()
Bram Moolenaar071d4272004-06-13 20:20:40 +000013973{
13974 char buffer[500];
13975 extern char **environ;
13976 environ = dagger;
13977 return getcwd(buffer, 500) ? 0 : 1;
13978}
Bram Moolenaar446cb832008-06-24 21:56:24 +000013979
Bram Moolenaar495de9c2005-01-25 22:03:25 +000013980_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020013981if ac_fn_c_try_run "$LINENO"
13982then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000013983
13984 vim_cv_getcwd_broken=no
13985
Christian Brabandt9670f612025-05-07 21:44:33 +020013986else case e in #(
13987 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000013988 vim_cv_getcwd_broken=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020013989 ;;
13990esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013991fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020013992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020013993 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
13994esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013995fi
13996
Christian Brabandt9670f612025-05-07 21:44:33 +020013997 ;;
13998esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000013999fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014000{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_getcwd_broken" >&5
14001printf "%s\n" "$vim_cv_getcwd_broken" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000014002
14003if test "x$vim_cv_getcwd_broken" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014004 printf "%s\n" "#define BAD_GETCWD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014005
Bram Moolenaar63d25552019-05-10 21:28:38 +020014006 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
Illia Bobyra96d5442023-08-30 16:30:15 +020014007if test "x$ac_cv_func_getwd" = xyes
14008then :
14009 printf "%s\n" "#define HAVE_GETWD 1" >>confdefs.h
Bram Moolenaar63d25552019-05-10 21:28:38 +020014010
Bram Moolenaar071d4272004-06-13 20:20:40 +000014011fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000014012
Illia Bobyra96d5442023-08-30 16:30:15 +020014013fi
14014
14015ac_fn_c_check_func "$LINENO" "fchdir" "ac_cv_func_fchdir"
14016if test "x$ac_cv_func_fchdir" = xyes
14017then :
14018 printf "%s\n" "#define HAVE_FCHDIR 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014019
Bram Moolenaar071d4272004-06-13 20:20:40 +000014020fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014021ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
14022if test "x$ac_cv_func_fchown" = xyes
14023then :
14024 printf "%s\n" "#define HAVE_FCHOWN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014025
Illia Bobyra96d5442023-08-30 16:30:15 +020014026fi
14027ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
14028if test "x$ac_cv_func_fchmod" = xyes
14029then :
14030 printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
14031
14032fi
14033ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync"
14034if test "x$ac_cv_func_fsync" = xyes
14035then :
14036 printf "%s\n" "#define HAVE_FSYNC 1" >>confdefs.h
14037
14038fi
14039ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
14040if test "x$ac_cv_func_getcwd" = xyes
14041then :
14042 printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h
14043
14044fi
14045ac_fn_c_check_func "$LINENO" "getpseudotty" "ac_cv_func_getpseudotty"
14046if test "x$ac_cv_func_getpseudotty" = xyes
14047then :
14048 printf "%s\n" "#define HAVE_GETPSEUDOTTY 1" >>confdefs.h
14049
14050fi
14051ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent"
14052if test "x$ac_cv_func_getpwent" = xyes
14053then :
14054 printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h
14055
14056fi
14057ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
14058if test "x$ac_cv_func_getpwnam" = xyes
14059then :
14060 printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h
14061
14062fi
14063ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid"
14064if test "x$ac_cv_func_getpwuid" = xyes
14065then :
14066 printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h
14067
14068fi
14069ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit"
14070if test "x$ac_cv_func_getrlimit" = xyes
14071then :
14072 printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h
14073
14074fi
14075ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
14076if test "x$ac_cv_func_gettimeofday" = xyes
14077then :
14078 printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
14079
14080fi
14081ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r"
14082if test "x$ac_cv_func_localtime_r" = xyes
14083then :
14084 printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h
14085
14086fi
14087ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
14088if test "x$ac_cv_func_lstat" = xyes
14089then :
14090 printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h
14091
14092fi
14093ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
14094if test "x$ac_cv_func_memset" = xyes
14095then :
14096 printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h
14097
14098fi
14099ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
14100if test "x$ac_cv_func_mkdtemp" = xyes
14101then :
14102 printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h
14103
14104fi
14105ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
14106if test "x$ac_cv_func_nanosleep" = xyes
14107then :
14108 printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
14109
14110fi
14111ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
14112if test "x$ac_cv_func_opendir" = xyes
14113then :
14114 printf "%s\n" "#define HAVE_OPENDIR 1" >>confdefs.h
14115
14116fi
14117ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
14118if test "x$ac_cv_func_putenv" = xyes
14119then :
14120 printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h
14121
14122fi
14123ac_fn_c_check_func "$LINENO" "qsort" "ac_cv_func_qsort"
14124if test "x$ac_cv_func_qsort" = xyes
14125then :
14126 printf "%s\n" "#define HAVE_QSORT 1" >>confdefs.h
14127
14128fi
14129ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
14130if test "x$ac_cv_func_readlink" = xyes
14131then :
14132 printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
14133
14134fi
14135ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
14136if test "x$ac_cv_func_select" = xyes
14137then :
14138 printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
14139
14140fi
14141ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
14142if test "x$ac_cv_func_setenv" = xyes
14143then :
14144 printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h
14145
14146fi
14147ac_fn_c_check_func "$LINENO" "getpgid" "ac_cv_func_getpgid"
14148if test "x$ac_cv_func_getpgid" = xyes
14149then :
14150 printf "%s\n" "#define HAVE_GETPGID 1" >>confdefs.h
14151
14152fi
14153ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
14154if test "x$ac_cv_func_setpgid" = xyes
14155then :
14156 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
14157
14158fi
14159ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
14160if test "x$ac_cv_func_setsid" = xyes
14161then :
14162 printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
14163
14164fi
14165ac_fn_c_check_func "$LINENO" "sigaltstack" "ac_cv_func_sigaltstack"
14166if test "x$ac_cv_func_sigaltstack" = xyes
14167then :
14168 printf "%s\n" "#define HAVE_SIGALTSTACK 1" >>confdefs.h
14169
14170fi
14171ac_fn_c_check_func "$LINENO" "sigstack" "ac_cv_func_sigstack"
14172if test "x$ac_cv_func_sigstack" = xyes
14173then :
14174 printf "%s\n" "#define HAVE_SIGSTACK 1" >>confdefs.h
14175
14176fi
14177ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
14178if test "x$ac_cv_func_sigset" = xyes
14179then :
14180 printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
14181
14182fi
14183ac_fn_c_check_func "$LINENO" "sigsetjmp" "ac_cv_func_sigsetjmp"
14184if test "x$ac_cv_func_sigsetjmp" = xyes
14185then :
14186 printf "%s\n" "#define HAVE_SIGSETJMP 1" >>confdefs.h
14187
14188fi
14189ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
14190if test "x$ac_cv_func_sigaction" = xyes
14191then :
14192 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
14193
14194fi
14195ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
14196if test "x$ac_cv_func_sigprocmask" = xyes
14197then :
14198 printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h
14199
14200fi
14201ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
14202if test "x$ac_cv_func_sigvec" = xyes
14203then :
14204 printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
14205
14206fi
14207ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
14208if test "x$ac_cv_func_strcasecmp" = xyes
14209then :
14210 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
14211
14212fi
14213ac_fn_c_check_func "$LINENO" "strcoll" "ac_cv_func_strcoll"
14214if test "x$ac_cv_func_strcoll" = xyes
14215then :
14216 printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h
14217
14218fi
14219ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
14220if test "x$ac_cv_func_strerror" = xyes
14221then :
14222 printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
14223
14224fi
14225ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
14226if test "x$ac_cv_func_strftime" = xyes
14227then :
14228 printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h
14229
14230fi
14231ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp"
14232if test "x$ac_cv_func_stricmp" = xyes
14233then :
14234 printf "%s\n" "#define HAVE_STRICMP 1" >>confdefs.h
14235
14236fi
14237ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
14238if test "x$ac_cv_func_strncasecmp" = xyes
14239then :
14240 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
14241
14242fi
14243ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp"
14244if test "x$ac_cv_func_strnicmp" = xyes
14245then :
14246 printf "%s\n" "#define HAVE_STRNICMP 1" >>confdefs.h
14247
14248fi
14249ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk"
14250if test "x$ac_cv_func_strpbrk" = xyes
14251then :
14252 printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h
14253
14254fi
14255ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
14256if test "x$ac_cv_func_strptime" = xyes
14257then :
14258 printf "%s\n" "#define HAVE_STRPTIME 1" >>confdefs.h
14259
14260fi
14261ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
14262if test "x$ac_cv_func_strtol" = xyes
14263then :
14264 printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h
14265
14266fi
14267ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent"
14268if test "x$ac_cv_func_tgetent" = xyes
14269then :
14270 printf "%s\n" "#define HAVE_TGETENT 1" >>confdefs.h
14271
14272fi
14273ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
14274if test "x$ac_cv_func_towlower" = xyes
14275then :
14276 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
14277
14278fi
14279ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper"
14280if test "x$ac_cv_func_towupper" = xyes
14281then :
14282 printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h
14283
14284fi
14285ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper"
14286if test "x$ac_cv_func_iswupper" = xyes
14287then :
14288 printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h
14289
14290fi
14291ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset"
14292if test "x$ac_cv_func_tzset" = xyes
14293then :
14294 printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h
14295
14296fi
14297ac_fn_c_check_func "$LINENO" "usleep" "ac_cv_func_usleep"
14298if test "x$ac_cv_func_usleep" = xyes
14299then :
14300 printf "%s\n" "#define HAVE_USLEEP 1" >>confdefs.h
14301
14302fi
14303ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
14304if test "x$ac_cv_func_utime" = xyes
14305then :
14306 printf "%s\n" "#define HAVE_UTIME 1" >>confdefs.h
14307
14308fi
14309ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
14310if test "x$ac_cv_func_utimes" = xyes
14311then :
14312 printf "%s\n" "#define HAVE_UTIMES 1" >>confdefs.h
14313
14314fi
14315ac_fn_c_check_func "$LINENO" "mblen" "ac_cv_func_mblen"
14316if test "x$ac_cv_func_mblen" = xyes
14317then :
14318 printf "%s\n" "#define HAVE_MBLEN 1" >>confdefs.h
14319
14320fi
14321ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
14322if test "x$ac_cv_func_ftruncate" = xyes
14323then :
14324 printf "%s\n" "#define HAVE_FTRUNCATE 1" >>confdefs.h
14325
14326fi
14327ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
14328if test "x$ac_cv_func_unsetenv" = xyes
14329then :
14330 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
14331
14332fi
14333ac_fn_c_check_func "$LINENO" "posix_openpt" "ac_cv_func_posix_openpt"
14334if test "x$ac_cv_func_posix_openpt" = xyes
14335then :
14336 printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h
14337
14338fi
14339ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
14340if test "x$ac_cv_func_clock_gettime" = xyes
14341then :
14342 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014343
14344fi
Jonas Sortie Termansen8bb5eaf2024-11-04 20:32:27 +010014345ac_fn_c_check_func "$LINENO" "sync" "ac_cv_func_sync"
14346if test "x$ac_cv_func_sync" = xyes
14347then :
14348 printf "%s\n" "#define HAVE_SYNC 1" >>confdefs.h
14349
14350fi
Bram Moolenaar643b6142018-09-12 20:29:09 +020014351
Bram Moolenaar643b6142018-09-12 20:29:09 +020014352
Illia Bobyra96d5442023-08-30 16:30:15 +020014353
14354
14355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
14356printf %s "checking types of arguments for select... " >&6; }
14357if test ${ac_cv_func_select_args+y}
14358then :
14359 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014360else case e in #(
14361 e) ac_cv_func_select_args='int,int *,struct timeval *'
Illia Bobyra96d5442023-08-30 16:30:15 +020014362for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
Bram Moolenaar643b6142018-09-12 20:29:09 +020014363 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
14364 for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
14365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14366/* end confdefs.h. */
14367$ac_includes_default
14368#ifdef HAVE_SYS_SELECT_H
14369# include <sys/select.h>
14370#endif
14371#ifdef HAVE_SYS_SOCKET_H
14372# include <sys/socket.h>
14373#endif
14374
14375int
Illia Bobyra96d5442023-08-30 16:30:15 +020014376main (void)
Bram Moolenaar643b6142018-09-12 20:29:09 +020014377{
14378extern int select ($ac_arg1,
14379 $ac_arg234, $ac_arg234, $ac_arg234,
14380 $ac_arg5);
14381 ;
14382 return 0;
14383}
14384_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014385if ac_fn_c_try_compile "$LINENO"
14386then :
Bram Moolenaar643b6142018-09-12 20:29:09 +020014387 ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
14388fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014389rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar643b6142018-09-12 20:29:09 +020014390 done
14391 done
14392done
Christian Brabandt9670f612025-05-07 21:44:33 +020014393 ;;
14394esac
Bram Moolenaar643b6142018-09-12 20:29:09 +020014395fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
14397printf "%s\n" "$ac_cv_func_select_args" >&6; }
Bram Moolenaar643b6142018-09-12 20:29:09 +020014398ac_save_IFS=$IFS; IFS=','
14399set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
14400IFS=$ac_save_IFS
14401shift
14402
Illia Bobyra96d5442023-08-30 16:30:15 +020014403printf "%s\n" "#define SELECT_TYPE_ARG1 $1" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014404
14405
Illia Bobyra96d5442023-08-30 16:30:15 +020014406printf "%s\n" "#define SELECT_TYPE_ARG234 ($2)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014407
14408
Illia Bobyra96d5442023-08-30 16:30:15 +020014409printf "%s\n" "#define SELECT_TYPE_ARG5 ($3)" >>confdefs.h
Bram Moolenaar643b6142018-09-12 20:29:09 +020014410
Illia Bobyra96d5442023-08-30 16:30:15 +020014411rm -rf conftest*
Bram Moolenaar643b6142018-09-12 20:29:09 +020014412
Christian Brabandt9670f612025-05-07 21:44:33 +020014413{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for declarations of fseeko and ftello" >&5
14414printf %s "checking for declarations of fseeko and ftello... " >&6; }
14415if test ${ac_cv_func_fseeko_ftello+y}
Illia Bobyra96d5442023-08-30 16:30:15 +020014416then :
14417 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014418else case e in #(
14419 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar25153e12010-02-24 14:47:08 +010014420/* end confdefs.h. */
Bram Moolenaar25153e12010-02-24 14:47:08 +010014421
Christian Brabandt9670f612025-05-07 21:44:33 +020014422#if defined __hpux && !defined _LARGEFILE_SOURCE
14423# include <limits.h>
14424# if LONG_MAX >> 31 == 0
14425# error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++"
14426# endif
14427#endif
14428#include <sys/types.h> /* for off_t */
14429#include <stdio.h>
14430
14431int
14432main (void)
14433{
14434
14435 int (*fp1) (FILE *, off_t, int) = fseeko;
14436 off_t (*fp2) (FILE *) = ftello;
14437 return fseeko (stdin, 0, 0)
14438 && fp1 (stdin, 0, 0)
14439 && ftello (stdin) >= 0
14440 && fp2 (stdin) >= 0;
14441
14442 ;
14443 return 0;
14444}
14445_ACEOF
14446if ac_fn_c_try_compile "$LINENO"
14447then :
14448 ac_cv_func_fseeko_ftello=yes
14449else case e in #(
14450 e) ac_save_CPPFLAGS="$CPPFLAGS"
14451 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE=1"
14452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14453/* end confdefs.h. */
14454
14455#if defined __hpux && !defined _LARGEFILE_SOURCE
14456# include <limits.h>
14457# if LONG_MAX >> 31 == 0
14458# error "32-bit HP-UX 11/ia64 needs _LARGEFILE_SOURCE for fseeko in C++"
14459# endif
14460#endif
14461#include <sys/types.h> /* for off_t */
14462#include <stdio.h>
14463
14464int
14465main (void)
14466{
14467
14468 int (*fp1) (FILE *, off_t, int) = fseeko;
14469 off_t (*fp2) (FILE *) = ftello;
14470 return fseeko (stdin, 0, 0)
14471 && fp1 (stdin, 0, 0)
14472 && ftello (stdin) >= 0
14473 && fp2 (stdin) >= 0;
14474
14475 ;
14476 return 0;
14477}
14478_ACEOF
14479if ac_fn_c_try_compile "$LINENO"
14480then :
14481 ac_cv_func_fseeko_ftello="need _LARGEFILE_SOURCE"
14482else case e in #(
14483 e) ac_cv_func_fseeko_ftello=no ;;
14484esac
14485fi
14486rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14487esac
14488fi
14489rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14490esac
14491fi
14492{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fseeko_ftello" >&5
14493printf "%s\n" "$ac_cv_func_fseeko_ftello" >&6; }
14494if test "$ac_cv_func_fseeko_ftello" != no
14495then :
Bram Moolenaar25153e12010-02-24 14:47:08 +010014496
Illia Bobyra96d5442023-08-30 16:30:15 +020014497printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h
Bram Moolenaar25153e12010-02-24 14:47:08 +010014498
14499fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014500if test "$ac_cv_func_fseeko_ftello" = "need _LARGEFILE_SOURCE"
14501then :
14502
14503printf "%s\n" "#define _LARGEFILE_SOURCE 1" >>confdefs.h
14504
14505fi
Bram Moolenaar25153e12010-02-24 14:47:08 +010014506
Bram Moolenaar071d4272004-06-13 20:20:40 +000014507
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014508# Check whether --enable-largefile was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014509if test ${enable_largefile+y}
14510then :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014511 enableval=$enable_largefile;
14512fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014513if test "$enable_largefile,$enable_year2038" != no,no
14514then :
14515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable large file support" >&5
14516printf %s "checking for $CC option to enable large file support... " >&6; }
14517if test ${ac_cv_sys_largefile_opts+y}
Illia Bobyra96d5442023-08-30 16:30:15 +020014518then :
14519 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014520else case e in #(
14521 e) ac_save_CC="$CC"
14522 ac_opt_found=no
14523 for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1" "-n32"; do
14524 if test x"$ac_opt" != x"none needed"
14525then :
14526 CC="$ac_save_CC $ac_opt"
14527fi
14528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014529/* end confdefs.h. */
14530#include <sys/types.h>
Christian Brabandt9670f612025-05-07 21:44:33 +020014531#ifndef FTYPE
14532# define FTYPE off_t
14533#endif
14534 /* Check that FTYPE can represent 2**63 - 1 correctly.
14535 We can't simply define LARGE_FTYPE to be 9223372036854775807,
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014536 since some C++ compilers masquerading as C compilers
14537 incorrectly reject 9223372036854775807. */
Christian Brabandt9670f612025-05-07 21:44:33 +020014538#define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31))
14539 int FTYPE_is_large[(LARGE_FTYPE % 2147483629 == 721
14540 && LARGE_FTYPE % 2147483647 == 1)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014541 ? 1 : -1];
14542int
Illia Bobyra96d5442023-08-30 16:30:15 +020014543main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014544{
14545
14546 ;
14547 return 0;
14548}
14549_ACEOF
Christian Brabandt9670f612025-05-07 21:44:33 +020014550if ac_fn_c_try_compile "$LINENO"
14551then :
14552 if test x"$ac_opt" = x"none needed"
14553then :
14554 # GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t.
14555 CC="$CC -DFTYPE=ino_t"
Illia Bobyra96d5442023-08-30 16:30:15 +020014556 if ac_fn_c_try_compile "$LINENO"
14557then :
Christian Brabandt9670f612025-05-07 21:44:33 +020014558
14559else case e in #(
14560 e) CC="$CC -D_FILE_OFFSET_BITS=64"
14561 if ac_fn_c_try_compile "$LINENO"
14562then :
14563 ac_opt='-D_FILE_OFFSET_BITS=64'
14564fi
14565rm -f core conftest.err conftest.$ac_objext conftest.beam ;;
14566esac
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014567fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014568rm -f core conftest.err conftest.$ac_objext conftest.beam
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014569fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014570 ac_cv_sys_largefile_opts=$ac_opt
14571 ac_opt_found=yes
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014572fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014573rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14574 test $ac_opt_found = no || break
14575 done
14576 CC="$ac_save_CC"
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014577
Christian Brabandt9670f612025-05-07 21:44:33 +020014578 test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;;
14579esac
14580fi
14581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5
14582printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; }
14583
14584ac_have_largefile=yes
14585case $ac_cv_sys_largefile_opts in #(
14586 "none needed") :
14587 ;; #(
14588 "supported through gnulib") :
14589 ;; #(
14590 "support not detected") :
14591 ac_have_largefile=no ;; #(
14592 "-D_FILE_OFFSET_BITS=64") :
14593
14594printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
14595 ;; #(
14596 "-D_LARGE_FILES=1") :
14597
14598printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
14599 ;; #(
14600 "-n32") :
14601 CC="$CC -n32" ;; #(
14602 *) :
14603 as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;;
14604esac
14605
14606if test "$enable_year2038" != no
14607then :
14608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option for timestamps after 2038" >&5
14609printf %s "checking for $CC option for timestamps after 2038... " >&6; }
14610if test ${ac_cv_sys_year2038_opts+y}
Illia Bobyra96d5442023-08-30 16:30:15 +020014611then :
14612 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014613else case e in #(
14614 e) ac_save_CPPFLAGS="$CPPFLAGS"
14615 ac_opt_found=no
14616 for ac_opt in "none needed" "-D_TIME_BITS=64" "-D__MINGW_USE_VC2005_COMPAT" "-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"; do
14617 if test x"$ac_opt" != x"none needed"
14618then :
14619 CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"
14620fi
14621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014622/* end confdefs.h. */
Christian Brabandt9670f612025-05-07 21:44:33 +020014623
14624 #include <time.h>
14625 /* Check that time_t can represent 2**32 - 1 correctly. */
14626 #define LARGE_TIME_T \\
14627 ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
14628 int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
14629 && LARGE_TIME_T % 65537 == 0)
14630 ? 1 : -1];
14631
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014632int
Illia Bobyra96d5442023-08-30 16:30:15 +020014633main (void)
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014634{
14635
14636 ;
14637 return 0;
14638}
14639_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014640if ac_fn_c_try_compile "$LINENO"
14641then :
Christian Brabandt9670f612025-05-07 21:44:33 +020014642 ac_cv_sys_year2038_opts="$ac_opt"
14643 ac_opt_found=yes
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014644fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014645rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020014646 test $ac_opt_found = no || break
14647 done
14648 CPPFLAGS="$ac_save_CPPFLAGS"
14649 test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;;
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014650esac
Christian Brabandt9670f612025-05-07 21:44:33 +020014651fi
14652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5
14653printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; }
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014654
Christian Brabandt9670f612025-05-07 21:44:33 +020014655ac_have_year2038=yes
14656case $ac_cv_sys_year2038_opts in #(
14657 "none needed") :
14658 ;; #(
14659 "support not detected") :
14660 ac_have_year2038=no ;; #(
14661 "-D_TIME_BITS=64") :
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014662
Christian Brabandt9670f612025-05-07 21:44:33 +020014663printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
14664 ;; #(
14665 "-D__MINGW_USE_VC2005_COMPAT") :
14666
14667printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
14668 ;; #(
14669 "-U_USE_32_BIT_TIME_T"*) :
14670 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
14671printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
14672as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It
14673will stop working after mid-January 2038. Remove
14674_USE_32BIT_TIME_T from the compiler flags.
14675See 'config.log' for more details" "$LINENO" 5; } ;; #(
14676 *) :
14677 as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;;
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014678esac
Christian Brabandt9670f612025-05-07 21:44:33 +020014679
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014680fi
14681
Christian Brabandt9670f612025-05-07 21:44:33 +020014682fi
Bram Moolenaar317fd3a2010-05-07 16:05:55 +020014683
Illia Bobyra96d5442023-08-30 16:30:15 +020014684{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-canberra argument" >&5
14685printf %s "checking --enable-canberra argument... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014686# Check whether --enable-canberra was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014687if test ${enable_canberra+y}
14688then :
Bram Moolenaar21606672019-06-14 20:40:58 +020014689 enableval=$enable_canberra;
Christian Brabandt9670f612025-05-07 21:44:33 +020014690else case e in #(
14691 e) enable_canberra="maybe" ;;
14692esac
Bram Moolenaar21606672019-06-14 20:40:58 +020014693fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014694
Bram Moolenaar21606672019-06-14 20:40:58 +020014695
14696if test "$enable_canberra" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014697 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14699printf "%s\n" "Defaulting to yes" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014700 enable_canberra="yes"
14701 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14703printf "%s\n" "Defaulting to no" >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014704 enable_canberra="no"
14705 fi
14706else
Bram Moolenaar12471262022-01-18 11:11:25 +000014707 if test "$enable_canberra" = "yes" -a "$has_eval" = "no"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot use sound with tiny features" >&5
14709printf "%s\n" "cannot use sound with tiny features" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014710 enable_canberra="no"
14711 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_canberra" >&5
14713printf "%s\n" "$enable_canberra" >&6; }
Bram Moolenaar12471262022-01-18 11:11:25 +000014714 fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014715fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014716if test "$enable_canberra" = "yes"; then
14717 if test "x$PKG_CONFIG" != "xno"; then
14718 canberra_lib=`$PKG_CONFIG --libs libcanberra 2>/dev/null`
14719 canberra_cflags=`$PKG_CONFIG --cflags libcanberra 2>/dev/null`
14720 fi
14721 if test "x$canberra_lib" = "x"; then
14722 canberra_lib=-lcanberra
14723 canberra_cflags=-D_REENTRANT
14724 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcanberra" >&5
14726printf %s "checking for libcanberra... " >&6; }
Bram Moolenaar21606672019-06-14 20:40:58 +020014727 ac_save_CFLAGS="$CFLAGS"
14728 ac_save_LIBS="$LIBS"
Bram Moolenaar12471262022-01-18 11:11:25 +000014729 if `echo "$CFLAGS" | grep -v "$canberra_cflags" 2>/dev/null`; then
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020014730 CFLAGS="$CFLAGS $canberra_cflags"
14731 fi
Bram Moolenaar21606672019-06-14 20:40:58 +020014732 LIBS="$LIBS $canberra_lib"
14733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014734/* end confdefs.h. */
14735
Bram Moolenaar21606672019-06-14 20:40:58 +020014736 # include <canberra.h>
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014737
14738int
Illia Bobyra96d5442023-08-30 16:30:15 +020014739main (void)
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014740{
14741
Bram Moolenaar21606672019-06-14 20:40:58 +020014742 ca_context *hello;
14743 ca_context_create(&hello);
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014744 ;
14745 return 0;
14746}
14747_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014748if ac_fn_c_try_link "$LINENO"
14749then :
14750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14751printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_CANBERRA 1" >>confdefs.h
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014752
Christian Brabandt9670f612025-05-07 21:44:33 +020014753else case e in #(
14754 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libcanberra-dev" >&5
14755printf "%s\n" "no; try installing libcanberra-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS" ;;
14756esac
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014757fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014758rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014759 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar21606672019-06-14 20:40:58 +020014760fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014761
Illia Bobyra96d5442023-08-30 16:30:15 +020014762{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-libsodium argument" >&5
14763printf %s "checking --enable-libsodium argument... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014764# Check whether --enable-libsodium was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020014765if test ${enable_libsodium+y}
14766then :
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014767 enableval=$enable_libsodium;
Christian Brabandt9670f612025-05-07 21:44:33 +020014768else case e in #(
14769 e) enable_libsodium="maybe" ;;
14770esac
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014771fi
14772
14773
14774if test "$enable_libsodium" = "maybe"; then
Martin Tournoij25f3a142022-10-08 19:26:41 +010014775 if test "$features" = "huge"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020014776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to yes" >&5
14777printf "%s\n" "Defaulting to yes" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014778 enable_libsodium="yes"
14779 else
Illia Bobyra96d5442023-08-30 16:30:15 +020014780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Defaulting to no" >&5
14781printf "%s\n" "Defaulting to no" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014782 enable_libsodium="no"
14783 fi
14784else
Illia Bobyra96d5442023-08-30 16:30:15 +020014785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_libsodium" >&5
14786printf "%s\n" "$enable_libsodium" >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014787fi
14788if test "$enable_libsodium" = "yes"; then
14789 if test "x$PKG_CONFIG" != "xno"; then
14790 libsodium_lib=`$PKG_CONFIG --libs libsodium 2>/dev/null`
14791 libsodium_cflags=`$PKG_CONFIG --cflags libsodium 2>/dev/null`
14792 fi
14793 if test "x$libsodium_lib" = "x"; then
14794 libsodium_lib=-lsodium
14795 libsodium_cflags=
14796 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsodium" >&5
14798printf %s "checking for libsodium... " >&6; }
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014799 ac_save_CFLAGS="$CFLAGS"
14800 ac_save_LIBS="$LIBS"
14801 CFLAGS="$CFLAGS $libsodium_cflags"
14802 LIBS="$LIBS $libsodium_lib"
14803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14804/* end confdefs.h. */
14805
14806 # include <sodium.h>
14807
14808int
Illia Bobyra96d5442023-08-30 16:30:15 +020014809main (void)
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014810{
14811
14812 printf("%d", sodium_init());
14813 ;
14814 return 0;
14815}
14816_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014817if ac_fn_c_try_link "$LINENO"
14818then :
14819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14820printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SODIUM 1" >>confdefs.h
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014821
Christian Brabandt9670f612025-05-07 21:44:33 +020014822else case e in #(
14823 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; try installing libsodium-dev" >&5
14824printf "%s\n" "no; try installing libsodium-dev" >&6; }; CFLAGS="$ac_save_CFLAGS"; LIBS="$ac_save_LIBS" ;;
14825esac
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014826fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014827rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandtf573c6e2021-06-20 14:02:16 +020014828 conftest$ac_exeext conftest.$ac_ext
14829fi
Bram Moolenaar427f5b62019-06-09 13:43:51 +020014830
Illia Bobyra96d5442023-08-30 16:30:15 +020014831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for st_blksize" >&5
14832printf %s "checking for st_blksize... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020014833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014834/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000014835#include <sys/types.h>
14836#include <sys/stat.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014837int
Illia Bobyra96d5442023-08-30 16:30:15 +020014838main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014839{
Bram Moolenaar071d4272004-06-13 20:20:40 +000014840 struct stat st;
14841 int n;
14842
14843 stat("/", &st);
14844 n = (int)st.st_blksize;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000014845 ;
14846 return 0;
14847}
14848_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014849if ac_fn_c_try_compile "$LINENO"
14850then :
14851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14852printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000014853
Christian Brabandt9670f612025-05-07 21:44:33 +020014854else case e in #(
14855 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14856printf "%s\n" "no" >&6; } ;;
14857esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000014858fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014859rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000014860
Illia Bobyra96d5442023-08-30 16:30:15 +020014861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create without -lrt" >&5
14862printf %s "checking for timer_create without -lrt... " >&6; }
14863if test ${vim_cv_timer_create+y}
14864then :
14865 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014866else case e in #(
14867 e)
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Paul Ollis65745772022-06-05 16:55:54 +010014869/* end confdefs.h. */
14870
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014871 #include <time.h>
Paul Ollis65745772022-06-05 16:55:54 +010014872
14873int
Illia Bobyra96d5442023-08-30 16:30:15 +020014874main (void)
Paul Ollis65745772022-06-05 16:55:54 +010014875{
14876
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014877 timer_create(CLOCK_MONOTONIC, NULL, NULL);
Paul Ollis65745772022-06-05 16:55:54 +010014878
14879 ;
14880 return 0;
14881}
14882_ACEOF
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014883if ac_fn_c_try_compile "$LINENO"
Illia Bobyra96d5442023-08-30 16:30:15 +020014884then :
Richard Purdie509695c2022-07-24 20:48:00 +010014885 vim_cv_timer_create=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020014886else case e in #(
14887 e) vim_cv_timer_create=no
14888 ;;
14889esac
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014890fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014891rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14892esac
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014893fi
Illia Bobyra96d5442023-08-30 16:30:15 +020014894{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create" >&5
14895printf "%s\n" "$vim_cv_timer_create" >&6; }
Bram Moolenaarefffa532022-07-28 22:39:54 +010014896
14897if test "x$vim_cv_timer_create" = "xno" ; then
14898 save_LIBS="$LIBS"
14899 LIBS="$LIBS -lrt"
Illia Bobyra96d5442023-08-30 16:30:15 +020014900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for timer_create with -lrt" >&5
14901printf %s "checking for timer_create with -lrt... " >&6; }
14902if test ${vim_cv_timer_create_with_lrt+y}
14903then :
14904 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014905else case e in #(
14906 e)
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14908/* end confdefs.h. */
14909
14910 #include <time.h>
14911
14912int
14913main (void)
14914{
14915
14916 timer_create(CLOCK_MONOTONIC, NULL, NULL);
14917
14918 ;
14919 return 0;
14920}
14921_ACEOF
14922if ac_fn_c_try_compile "$LINENO"
14923then :
14924 vim_cv_timer_create_with_lrt=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020014925else case e in #(
14926 e) vim_cv_timer_create_with_lrt=no
14927 ;;
14928esac
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014929fi
Christian Brabandt9670f612025-05-07 21:44:33 +020014930rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14931esac
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014932fi
14933{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_with_lrt" >&5
14934printf "%s\n" "$vim_cv_timer_create_with_lrt" >&6; }
14935 LIBS="$save_LIBS"
14936else
14937 vim_cv_timer_create_with_lrt=no
14938fi
14939
14940if test "x$vim_cv_timer_create" = "xyes" ||
14941 test "x$vim_cv_timer_create_with_lrt" = "xyes"; then
14942 save_LIBS="$LIBS"
Brandon Maiercbdc3c12024-12-18 21:18:01 +010014943 if test "x$vim_cv_timer_create_with_lrt" = "xyes" ; then
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014944 LIBS="$LIBS -lrt"
14945 fi
14946
14947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if timer_create works" >&5
14948printf %s "checking if timer_create works... " >&6; }
14949if test ${vim_cv_timer_create_works+y}
14950then :
14951 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020014952else case e in #(
14953 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020014954 if test "$cross_compiling" = yes
14955then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014956 vim_cv_timer_create_works=yes
14957 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_timer_create_works'" >&5
14958printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_timer_create_works'" >&2;}
Bram Moolenaarefffa532022-07-28 22:39:54 +010014959
Christian Brabandt9670f612025-05-07 21:44:33 +020014960else case e in #(
14961 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarefffa532022-07-28 22:39:54 +010014962/* end confdefs.h. */
14963
14964 #if STDC_HEADERS
14965 # include <stdlib.h>
14966 # include <stddef.h>
14967 #endif
14968 #include <signal.h>
14969 #include <time.h>
14970 static void set_flag(union sigval sv) {}
14971
14972int
Illia Bobyra96d5442023-08-30 16:30:15 +020014973main (void)
Bram Moolenaarefffa532022-07-28 22:39:54 +010014974{
14975
14976 struct timespec ts;
14977 struct sigevent action = {0};
14978 timer_t timer_id;
14979
14980 action.sigev_notify = SIGEV_THREAD;
14981 action.sigev_notify_function = set_flag;
14982 if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0)
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014983 exit(1); // cannot create a monotonic timer
Bram Moolenaarefffa532022-07-28 22:39:54 +010014984
14985 ;
14986 return 0;
14987}
14988_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020014989if ac_fn_c_try_run "$LINENO"
14990then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010014991 vim_cv_timer_create_works=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020014992else case e in #(
14993 e) vim_cv_timer_create_works=no ;;
14994esac
Bram Moolenaarefffa532022-07-28 22:39:54 +010014995fi
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020014997 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
14998esac
Bram Moolenaarf2ce76a2022-07-02 11:40:40 +010014999fi
Christian Brabandt9670f612025-05-07 21:44:33 +020015000 ;;
15001esac
Richard Purdie509695c2022-07-24 20:48:00 +010015002fi
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010015003{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_timer_create_works" >&5
15004printf "%s\n" "$vim_cv_timer_create_works" >&6; }
Richard Purdie509695c2022-07-24 20:48:00 +010015005
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010015006 if test "x$vim_cv_timer_create_works" = "xyes" ; then
15007 printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
Richard Purdie509695c2022-07-24 20:48:00 +010015008
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010015009 else
15010 LIBS="$save_LIBS"
15011 fi
Bram Moolenaarefffa532022-07-28 22:39:54 +010015012fi
Richard Purdie509695c2022-07-24 20:48:00 +010015013
Illia Bobyra96d5442023-08-30 16:30:15 +020015014{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat() ignores a trailing slash" >&5
15015printf %s "checking whether stat() ignores a trailing slash... " >&6; }
15016if test ${vim_cv_stat_ignores_slash+y}
15017then :
15018 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015019else case e in #(
15020 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020015021 if test "$cross_compiling" = yes
15022then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015023
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010015024 vim_cv_stat_ignores_slash=yes
15025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_stat_ignores_slash'" >&5
15026printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_stat_ignores_slash'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000015027
Christian Brabandt9670f612025-05-07 21:44:33 +020015028else case e in #(
15029 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015030/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000015031
15032#include "confdefs.h"
15033#if STDC_HEADERS
15034# include <stdlib.h>
15035# include <stddef.h>
15036#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000015037#include <sys/types.h>
15038#include <sys/stat.h>
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010015039int main() {struct stat st; exit(stat("configure/", &st) != 0); }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015040
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015041_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015042if ac_fn_c_try_run "$LINENO"
15043then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015044
15045 vim_cv_stat_ignores_slash=yes
Bram Moolenaar071d4272004-06-13 20:20:40 +000015046
Christian Brabandt9670f612025-05-07 21:44:33 +020015047else case e in #(
15048 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000015049 vim_cv_stat_ignores_slash=no
Christian Brabandt9670f612025-05-07 21:44:33 +020015050 ;;
15051esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015052fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015053rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020015054 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
15055esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015056fi
15057
Christian Brabandt9670f612025-05-07 21:44:33 +020015058 ;;
15059esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015060fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015061{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_stat_ignores_slash" >&5
15062printf "%s\n" "$vim_cv_stat_ignores_slash" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015063
15064if test "x$vim_cv_stat_ignores_slash" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015065 printf "%s\n" "#define STAT_IGNORES_SLASH 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015066
15067fi
15068
Illia Bobyra96d5442023-08-30 16:30:15 +020015069{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanoseconds field of struct stat" >&5
15070printf %s "checking for nanoseconds field of struct stat... " >&6; }
15071if test ${ac_cv_struct_st_mtim_nsec+y}
15072then :
15073 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015074else case e in #(
15075 e) ac_save_CPPFLAGS="$CPPFLAGS"
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010015076 ac_cv_struct_st_mtim_nsec=no
15077 # st_mtim.tv_nsec -- the usual case
15078 # st_mtim._tv_nsec -- Solaris 2.6, if
15079 # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
15080 # && !defined __EXTENSIONS__)
15081 # st_mtim.st__tim.tv_nsec -- UnixWare 2.1.2
15082 # st_mtime_n -- AIX 5.2 and above
15083 # st_mtimespec.tv_nsec -- Darwin (Mac OSX)
15084 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
15085 CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
15086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15087/* end confdefs.h. */
15088#include <sys/types.h>
15089#include <sys/stat.h>
15090int
Illia Bobyra96d5442023-08-30 16:30:15 +020015091main (void)
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010015092{
15093struct stat s; s.ST_MTIM_NSEC;
15094 ;
15095 return 0;
15096}
15097_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015098if ac_fn_c_try_compile "$LINENO"
15099then :
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010015100 ac_cv_struct_st_mtim_nsec=$ac_val; break
15101fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015102rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010015103 done
15104 CPPFLAGS="$ac_save_CPPFLAGS"
Christian Brabandt9670f612025-05-07 21:44:33 +020015105 ;;
15106esac
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010015107fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015108{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_mtim_nsec" >&5
15109printf "%s\n" "$ac_cv_struct_st_mtim_nsec" >&6; }
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010015110if test $ac_cv_struct_st_mtim_nsec != no; then
15111
Illia Bobyra96d5442023-08-30 16:30:15 +020015112printf "%s\n" "#define ST_MTIM_NSEC $ac_cv_struct_st_mtim_nsec" >>confdefs.h
Leah Neukirchen0a7984a2021-10-14 21:27:55 +010015113
15114fi
15115
Illia Bobyra96d5442023-08-30 16:30:15 +020015116{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv_open()" >&5
15117printf %s "checking for iconv_open()... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015118save_LIBS="$LIBS"
15119LIBS="$LIBS -liconv"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015121/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015122
15123#ifdef HAVE_ICONV_H
15124# include <iconv.h>
15125#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015126
15127int
Illia Bobyra96d5442023-08-30 16:30:15 +020015128main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015129{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015130iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015131 ;
15132 return 0;
15133}
15134_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015135if ac_fn_c_try_link "$LINENO"
15136then :
15137 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; with -liconv" >&5
15138printf "%s\n" "yes; with -liconv" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015139
Christian Brabandt9670f612025-05-07 21:44:33 +020015140else case e in #(
15141 e) LIBS="$save_LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015143/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015144
15145#ifdef HAVE_ICONV_H
15146# include <iconv.h>
15147#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015148
15149int
Illia Bobyra96d5442023-08-30 16:30:15 +020015150main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015151{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015152iconv_open("fr", "to");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015153 ;
15154 return 0;
15155}
15156_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015157if ac_fn_c_try_link "$LINENO"
15158then :
15159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15160printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015161
Christian Brabandt9670f612025-05-07 21:44:33 +020015162else case e in #(
15163 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15164printf "%s\n" "no" >&6; } ;;
15165esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015166fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015167rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020015168 conftest$ac_exeext conftest.$ac_ext ;;
15169esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015170fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015171rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015172 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015173
15174
Illia Bobyra96d5442023-08-30 16:30:15 +020015175{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo(CODESET)" >&5
15176printf %s "checking for nl_langinfo(CODESET)... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015178/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015179
15180#ifdef HAVE_LANGINFO_H
15181# include <langinfo.h>
15182#endif
15183
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015184int
Illia Bobyra96d5442023-08-30 16:30:15 +020015185main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015186{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015187char *cs = nl_langinfo(CODESET);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015188 ;
15189 return 0;
15190}
15191_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015192if ac_fn_c_try_link "$LINENO"
15193then :
15194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15195printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_LANGINFO_CODESET 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015196
Christian Brabandt9670f612025-05-07 21:44:33 +020015197else case e in #(
15198 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15199printf "%s\n" "no" >&6; } ;;
15200esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015201fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015202rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015203 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015204
Illia Bobyra96d5442023-08-30 16:30:15 +020015205{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strtod in -lm" >&5
15206printf %s "checking for strtod in -lm... " >&6; }
15207if test ${ac_cv_lib_m_strtod+y}
15208then :
15209 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015210else case e in #(
15211 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar446cb832008-06-24 21:56:24 +000015212LIBS="-lm $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015214/* end confdefs.h. */
15215
15216/* Override any GCC internal prototype to avoid an error.
15217 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015218 builtin and then its argument prototype would still apply.
15219 The 'extern "C"' is for builds by C++ compilers;
15220 although this is not generally supported in C code supporting it here
15221 has little cost and some practical benefit (sr 110532). */
15222#ifdef __cplusplus
15223extern "C"
15224#endif
15225char strtod (void);
Bram Moolenaar446cb832008-06-24 21:56:24 +000015226int
Illia Bobyra96d5442023-08-30 16:30:15 +020015227main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000015228{
15229return strtod ();
15230 ;
15231 return 0;
15232}
15233_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015234if ac_fn_c_try_link "$LINENO"
15235then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015236 ac_cv_lib_m_strtod=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015237else case e in #(
15238 e) ac_cv_lib_m_strtod=no ;;
15239esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015240fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015241rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015242 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015243LIBS=$ac_check_lib_save_LIBS ;;
15244esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015245fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_strtod" >&5
15247printf "%s\n" "$ac_cv_lib_m_strtod" >&6; }
15248if test "x$ac_cv_lib_m_strtod" = xyes
15249then :
15250 printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015251
15252 LIBS="-lm $LIBS"
15253
15254fi
15255
Bram Moolenaar446cb832008-06-24 21:56:24 +000015256
Illia Bobyra96d5442023-08-30 16:30:15 +020015257{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isinf()" >&5
15258printf %s "checking for isinf()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010015259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15260/* end confdefs.h. */
15261
15262#ifdef HAVE_MATH_H
15263# include <math.h>
15264#endif
15265#if STDC_HEADERS
15266# include <stdlib.h>
15267# include <stddef.h>
15268#endif
15269
15270int
Illia Bobyra96d5442023-08-30 16:30:15 +020015271main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010015272{
15273int r = isinf(1.11);
15274 ;
15275 return 0;
15276}
15277_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015278if ac_fn_c_try_link "$LINENO"
15279then :
15280 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15281printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISINF 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010015282
Christian Brabandt9670f612025-05-07 21:44:33 +020015283else case e in #(
15284 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15285printf "%s\n" "no" >&6; } ;;
15286esac
Bram Moolenaara6b89762016-02-29 21:38:26 +010015287fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015288rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010015289 conftest$ac_exeext conftest.$ac_ext
15290
Illia Bobyra96d5442023-08-30 16:30:15 +020015291{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isnan()" >&5
15292printf %s "checking for isnan()... " >&6; }
Bram Moolenaara6b89762016-02-29 21:38:26 +010015293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15294/* end confdefs.h. */
15295
15296#ifdef HAVE_MATH_H
15297# include <math.h>
15298#endif
15299#if STDC_HEADERS
15300# include <stdlib.h>
15301# include <stddef.h>
15302#endif
15303
15304int
Illia Bobyra96d5442023-08-30 16:30:15 +020015305main (void)
Bram Moolenaara6b89762016-02-29 21:38:26 +010015306{
15307int r = isnan(1.11);
15308 ;
15309 return 0;
15310}
15311_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015312if ac_fn_c_try_link "$LINENO"
15313then :
15314 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15315printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_ISNAN 1" >>confdefs.h
Bram Moolenaara6b89762016-02-29 21:38:26 +010015316
Christian Brabandt9670f612025-05-07 21:44:33 +020015317else case e in #(
15318 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15319printf "%s\n" "no" >&6; } ;;
15320esac
Bram Moolenaara6b89762016-02-29 21:38:26 +010015321fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015322rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaara6b89762016-02-29 21:38:26 +010015323 conftest$ac_exeext conftest.$ac_ext
15324
Illia Bobyra96d5442023-08-30 16:30:15 +020015325{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-acl argument" >&5
15326printf %s "checking --disable-acl argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015327# Check whether --enable-acl was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015328if test ${enable_acl+y}
15329then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015330 enableval=$enable_acl;
Christian Brabandt9670f612025-05-07 21:44:33 +020015331else case e in #(
15332 e) enable_acl="yes" ;;
15333esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015334fi
15335
Bram Moolenaar071d4272004-06-13 20:20:40 +000015336if test "$enable_acl" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015337 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15338printf "%s\n" "no" >&6; }
15339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lposix1e" >&5
15340printf %s "checking for acl_get_file in -lposix1e... " >&6; }
15341if test ${ac_cv_lib_posix1e_acl_get_file+y}
15342then :
15343 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015344else case e in #(
15345 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015346LIBS="-lposix1e $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015348/* end confdefs.h. */
15349
Bram Moolenaar446cb832008-06-24 21:56:24 +000015350/* Override any GCC internal prototype to avoid an error.
15351 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015352 builtin and then its argument prototype would still apply.
15353 The 'extern "C"' is for builds by C++ compilers;
15354 although this is not generally supported in C code supporting it here
15355 has little cost and some practical benefit (sr 110532). */
15356#ifdef __cplusplus
15357extern "C"
15358#endif
15359char acl_get_file (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015360int
Illia Bobyra96d5442023-08-30 16:30:15 +020015361main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015362{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015363return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015364 ;
15365 return 0;
15366}
15367_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015368if ac_fn_c_try_link "$LINENO"
15369then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015370 ac_cv_lib_posix1e_acl_get_file=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015371else case e in #(
15372 e) ac_cv_lib_posix1e_acl_get_file=no ;;
15373esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015374fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015375rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015376 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015377LIBS=$ac_check_lib_save_LIBS ;;
15378esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015379fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015380{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix1e_acl_get_file" >&5
15381printf "%s\n" "$ac_cv_lib_posix1e_acl_get_file" >&6; }
15382if test "x$ac_cv_lib_posix1e_acl_get_file" = xyes
15383then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015384 LIBS="$LIBS -lposix1e"
Christian Brabandt9670f612025-05-07 21:44:33 +020015385else case e in #(
15386 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get_file in -lacl" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020015387printf %s "checking for acl_get_file in -lacl... " >&6; }
15388if test ${ac_cv_lib_acl_acl_get_file+y}
15389then :
15390 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015391else case e in #(
15392 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015393LIBS="-lacl $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015395/* end confdefs.h. */
15396
Bram Moolenaar446cb832008-06-24 21:56:24 +000015397/* Override any GCC internal prototype to avoid an error.
15398 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015399 builtin and then its argument prototype would still apply.
15400 The 'extern "C"' is for builds by C++ compilers;
15401 although this is not generally supported in C code supporting it here
15402 has little cost and some practical benefit (sr 110532). */
15403#ifdef __cplusplus
15404extern "C"
15405#endif
15406char acl_get_file (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015407int
Illia Bobyra96d5442023-08-30 16:30:15 +020015408main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015409{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015410return acl_get_file ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015411 ;
15412 return 0;
15413}
15414_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015415if ac_fn_c_try_link "$LINENO"
15416then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015417 ac_cv_lib_acl_acl_get_file=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015418else case e in #(
15419 e) ac_cv_lib_acl_acl_get_file=no ;;
15420esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015421fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015422rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015423 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015424LIBS=$ac_check_lib_save_LIBS ;;
15425esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015426fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015427{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_acl_acl_get_file" >&5
15428printf "%s\n" "$ac_cv_lib_acl_acl_get_file" >&6; }
15429if test "x$ac_cv_lib_acl_acl_get_file" = xyes
15430then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015431 LIBS="$LIBS -lacl"
Illia Bobyra96d5442023-08-30 16:30:15 +020015432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
15433printf %s "checking for fgetxattr in -lattr... " >&6; }
15434if test ${ac_cv_lib_attr_fgetxattr+y}
15435then :
15436 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015437else case e in #(
15438 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000015439LIBS="-lattr $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015441/* end confdefs.h. */
15442
Bram Moolenaar446cb832008-06-24 21:56:24 +000015443/* Override any GCC internal prototype to avoid an error.
15444 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015445 builtin and then its argument prototype would still apply.
15446 The 'extern "C"' is for builds by C++ compilers;
15447 although this is not generally supported in C code supporting it here
15448 has little cost and some practical benefit (sr 110532). */
15449#ifdef __cplusplus
15450extern "C"
15451#endif
15452char fgetxattr (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015453int
Illia Bobyra96d5442023-08-30 16:30:15 +020015454main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015455{
Bram Moolenaar446cb832008-06-24 21:56:24 +000015456return fgetxattr ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015457 ;
15458 return 0;
15459}
15460_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015461if ac_fn_c_try_link "$LINENO"
15462then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015463 ac_cv_lib_attr_fgetxattr=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015464else case e in #(
15465 e) ac_cv_lib_attr_fgetxattr=no ;;
15466esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015467fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015468rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015469 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015470LIBS=$ac_check_lib_save_LIBS ;;
15471esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015472fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015473{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
15474printf "%s\n" "$ac_cv_lib_attr_fgetxattr" >&6; }
15475if test "x$ac_cv_lib_attr_fgetxattr" = xyes
15476then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015477 LIBS="$LIBS -lattr"
Bram Moolenaar071d4272004-06-13 20:20:40 +000015478fi
15479
Bram Moolenaar071d4272004-06-13 20:20:40 +000015480fi
Christian Brabandt9670f612025-05-07 21:44:33 +020015481 ;;
15482esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015483fi
15484
15485
Illia Bobyra96d5442023-08-30 16:30:15 +020015486 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POSIX ACL support" >&5
15487printf %s "checking for POSIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010015488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015489/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015490
15491#include <sys/types.h>
15492#ifdef HAVE_SYS_ACL_H
15493# include <sys/acl.h>
15494#endif
15495acl_t acl;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015496int
Illia Bobyra96d5442023-08-30 16:30:15 +020015497main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015498{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015499acl = acl_get_file("foo", ACL_TYPE_ACCESS);
15500 acl_set_file("foo", ACL_TYPE_ACCESS, acl);
15501 acl_free(acl);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015502 ;
15503 return 0;
15504}
15505_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015506if ac_fn_c_try_link "$LINENO"
15507then :
15508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15509printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_POSIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015510
Christian Brabandt9670f612025-05-07 21:44:33 +020015511else case e in #(
15512 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15513printf "%s\n" "no" >&6; } ;;
15514esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015515fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015516rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015517 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015518
Illia Bobyra96d5442023-08-30 16:30:15 +020015519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for acl_get in -lsec" >&5
15520printf %s "checking for acl_get in -lsec... " >&6; }
15521if test ${ac_cv_lib_sec_acl_get+y}
15522then :
15523 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015524else case e in #(
15525 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015526LIBS="-lsec $LIBS"
15527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15528/* end confdefs.h. */
15529
15530/* Override any GCC internal prototype to avoid an error.
15531 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020015532 builtin and then its argument prototype would still apply.
15533 The 'extern "C"' is for builds by C++ compilers;
15534 although this is not generally supported in C code supporting it here
15535 has little cost and some practical benefit (sr 110532). */
15536#ifdef __cplusplus
15537extern "C"
15538#endif
15539char acl_get (void);
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015540int
Illia Bobyra96d5442023-08-30 16:30:15 +020015541main (void)
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015542{
15543return acl_get ();
15544 ;
15545 return 0;
15546}
15547_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015548if ac_fn_c_try_link "$LINENO"
15549then :
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015550 ac_cv_lib_sec_acl_get=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015551else case e in #(
15552 e) ac_cv_lib_sec_acl_get=no ;;
15553esac
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015554fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015555rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015556 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015557LIBS=$ac_check_lib_save_LIBS ;;
15558esac
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015559fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sec_acl_get" >&5
15561printf "%s\n" "$ac_cv_lib_sec_acl_get" >&6; }
15562if test "x$ac_cv_lib_sec_acl_get" = xyes
15563then :
15564 LIBS="$LIBS -lsec"; printf "%s\n" "#define HAVE_SOLARIS_ZFS_ACL 1" >>confdefs.h
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015565
Christian Brabandt9670f612025-05-07 21:44:33 +020015566else case e in #(
15567 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris ACL support" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020015568printf %s "checking for Solaris ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010015569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015570/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015571
15572#ifdef HAVE_SYS_ACL_H
15573# include <sys/acl.h>
15574#endif
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015575int
Illia Bobyra96d5442023-08-30 16:30:15 +020015576main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015577{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015578acl("foo", GETACLCNT, 0, NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015579
15580 ;
15581 return 0;
15582}
15583_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015584if ac_fn_c_try_link "$LINENO"
15585then :
15586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15587printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SOLARIS_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015588
Christian Brabandt9670f612025-05-07 21:44:33 +020015589else case e in #(
15590 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15591printf "%s\n" "no" >&6; } ;;
15592esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015593fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015594rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020015595 conftest$ac_exeext conftest.$ac_ext ;;
15596esac
Bram Moolenaar8d462f92012-02-05 22:51:33 +010015597fi
15598
Bram Moolenaar446cb832008-06-24 21:56:24 +000015599
Illia Bobyra96d5442023-08-30 16:30:15 +020015600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX ACL support" >&5
15601printf %s "checking for AIX ACL support... " >&6; }
Bram Moolenaard6d30422018-01-28 22:48:55 +010015602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015603/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015604
Bram Moolenaar446cb832008-06-24 21:56:24 +000015605#if STDC_HEADERS
15606# include <stdlib.h>
15607# include <stddef.h>
15608#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000015609#ifdef HAVE_SYS_ACL_H
15610# include <sys/acl.h>
15611#endif
15612#ifdef HAVE_SYS_ACCESS_H
15613# include <sys/access.h>
15614#endif
15615#define _ALL_SOURCE
15616
15617#include <sys/stat.h>
15618
15619int aclsize;
15620struct acl *aclent;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015621int
Illia Bobyra96d5442023-08-30 16:30:15 +020015622main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015623{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015624aclsize = sizeof(struct acl);
15625 aclent = (void *)malloc(aclsize);
15626 statacl("foo", STX_NORMAL, aclent, aclsize);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015627
15628 ;
15629 return 0;
15630}
15631_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015632if ac_fn_c_try_link "$LINENO"
15633then :
15634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15635printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_AIX_ACL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015636
Christian Brabandt9670f612025-05-07 21:44:33 +020015637else case e in #(
15638 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15639printf "%s\n" "no" >&6; } ;;
15640esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000015641fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015642rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015643 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000015644else
Illia Bobyra96d5442023-08-30 16:30:15 +020015645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15646printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015647fi
15648
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015649if test "x$GTK_CFLAGS" != "x"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015650 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pango_shape_full" >&5
15651printf %s "checking for pango_shape_full... " >&6; }
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015652 ac_save_CFLAGS="$CFLAGS"
15653 ac_save_LIBS="$LIBS"
15654 CFLAGS="$CFLAGS $GTK_CFLAGS"
15655 LIBS="$LIBS $GTK_LIBS"
15656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15657/* end confdefs.h. */
15658#include <gtk/gtk.h>
15659int
Illia Bobyra96d5442023-08-30 16:30:15 +020015660main (void)
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015661{
15662 pango_shape_full(NULL, 0, NULL, 0, NULL, NULL);
15663 ;
15664 return 0;
15665}
15666_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015667if ac_fn_c_try_link "$LINENO"
15668then :
15669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15670printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_PANGO_SHAPE_FULL 1" >>confdefs.h
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015671
Christian Brabandt9670f612025-05-07 21:44:33 +020015672else case e in #(
15673 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15674printf "%s\n" "no" >&6; } ;;
15675esac
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015676fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015677rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar5325b9b2015-09-09 20:27:02 +020015678 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar3cbe0c02015-09-08 20:00:22 +020015679 CFLAGS="$ac_save_CFLAGS"
15680 LIBS="$ac_save_LIBS"
15681fi
15682
Illia Bobyra96d5442023-08-30 16:30:15 +020015683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --enable-gpm argument" >&5
15684printf %s "checking --enable-gpm argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015685# Check whether --enable-gpm was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015686if test ${enable_gpm+y}
15687then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015688 enableval=$enable_gpm;
Christian Brabandt9670f612025-05-07 21:44:33 +020015689else case e in #(
15690 e) enable_gpm="yes" ;;
15691esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015692fi
15693
Bram Moolenaar071d4272004-06-13 20:20:40 +000015694
Bram Moolenaar0b40d082022-03-08 13:32:37 +000015695if test "$enable_gpm" = "yes" -o "$enable_gpm" = "dynamic"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gpm" >&5
15697printf "%s\n" "$enable_gpm" >&6; }
15698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gpm" >&5
15699printf %s "checking for gpm... " >&6; }
15700if test ${vi_cv_have_gpm+y}
15701then :
15702 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015703else case e in #(
15704 e) olibs="$LIBS" ; LIBS="-lgpm"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015706/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015707#include <gpm.h>
15708 #include <linux/keyboard.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015709int
Illia Bobyra96d5442023-08-30 16:30:15 +020015710main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015711{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015712Gpm_GetLibVersion(NULL);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015713 ;
15714 return 0;
15715}
15716_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015717if ac_fn_c_try_link "$LINENO"
15718then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000015719 vi_cv_have_gpm=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015720else case e in #(
15721 e) vi_cv_have_gpm=no ;;
15722esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015723fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015724rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015725 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015726 LIBS="$olibs"
Christian Brabandt9670f612025-05-07 21:44:33 +020015727 ;;
15728esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015729fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015730{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_gpm" >&5
15731printf "%s\n" "$vi_cv_have_gpm" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015732 if test $vi_cv_have_gpm = yes; then
Bram Moolenaar0b40d082022-03-08 13:32:37 +000015733 if test "$enable_gpm" = "yes"; then
15734 LIBS="$LIBS -lgpm"
15735 else
Illia Bobyra96d5442023-08-30 16:30:15 +020015736 printf "%s\n" "#define DYNAMIC_GPM 1" >>confdefs.h
Bram Moolenaar0b40d082022-03-08 13:32:37 +000015737
15738 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015739 printf "%s\n" "#define HAVE_GPM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015740
15741 fi
15742else
Illia Bobyra96d5442023-08-30 16:30:15 +020015743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15744printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000015745fi
15746
Illia Bobyra96d5442023-08-30 16:30:15 +020015747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-sysmouse argument" >&5
15748printf %s "checking --disable-sysmouse argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015749# Check whether --enable-sysmouse was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020015750if test ${enable_sysmouse+y}
15751then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015752 enableval=$enable_sysmouse;
Christian Brabandt9670f612025-05-07 21:44:33 +020015753else case e in #(
15754 e) enable_sysmouse="yes" ;;
15755esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015756fi
15757
15758
15759if test "$enable_sysmouse" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15761printf "%s\n" "no" >&6; }
15762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysmouse" >&5
15763printf %s "checking for sysmouse... " >&6; }
15764if test ${vi_cv_have_sysmouse+y}
15765then :
15766 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020015767else case e in #(
15768 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015769/* end confdefs.h. */
15770#include <sys/consio.h>
15771 #include <signal.h>
15772 #include <sys/fbio.h>
15773int
Illia Bobyra96d5442023-08-30 16:30:15 +020015774main (void)
Bram Moolenaar446cb832008-06-24 21:56:24 +000015775{
15776struct mouse_info mouse;
15777 mouse.operation = MOUSE_MODE;
15778 mouse.operation = MOUSE_SHOW;
15779 mouse.u.mode.mode = 0;
15780 mouse.u.mode.signal = SIGUSR2;
15781 ;
15782 return 0;
15783}
15784_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015785if ac_fn_c_try_link "$LINENO"
15786then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000015787 vi_cv_have_sysmouse=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020015788else case e in #(
15789 e) vi_cv_have_sysmouse=no ;;
15790esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015791fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015792rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015793 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020015794 ;;
15795esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000015796fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015797{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_have_sysmouse" >&5
15798printf "%s\n" "$vi_cv_have_sysmouse" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015799 if test $vi_cv_have_sysmouse = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020015800 printf "%s\n" "#define HAVE_SYSMOUSE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000015801
15802 fi
15803else
Illia Bobyra96d5442023-08-30 16:30:15 +020015804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15805printf "%s\n" "yes" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000015806fi
15807
Illia Bobyra96d5442023-08-30 16:30:15 +020015808{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FD_CLOEXEC" >&5
15809printf %s "checking for FD_CLOEXEC... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015811/* end confdefs.h. */
15812#if HAVE_FCNTL_H
15813# include <fcntl.h>
15814#endif
15815int
Illia Bobyra96d5442023-08-30 16:30:15 +020015816main (void)
Bram Moolenaarf05da212009-11-17 16:13:15 +000015817{
15818 int flag = FD_CLOEXEC;
15819 ;
15820 return 0;
15821}
15822_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015823if ac_fn_c_try_compile "$LINENO"
15824then :
15825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15826printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FD_CLOEXEC 1" >>confdefs.h
Bram Moolenaarf05da212009-11-17 16:13:15 +000015827
Christian Brabandt9670f612025-05-07 21:44:33 +020015828else case e in #(
15829 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15830printf "%s\n" "not usable" >&6; } ;;
15831esac
Bram Moolenaarf05da212009-11-17 16:13:15 +000015832fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015833rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf05da212009-11-17 16:13:15 +000015834
Illia Bobyra96d5442023-08-30 16:30:15 +020015835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for rename" >&5
15836printf %s "checking for rename... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015838/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015839#include <stdio.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015840int
Illia Bobyra96d5442023-08-30 16:30:15 +020015841main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015842{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015843rename("this", "that")
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015844 ;
15845 return 0;
15846}
15847_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015848if ac_fn_c_try_link "$LINENO"
15849then :
15850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15851printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015852
Christian Brabandt9670f612025-05-07 21:44:33 +020015853else case e in #(
15854 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15855printf "%s\n" "no" >&6; } ;;
15856esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015857fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015858rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015859 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015860
Illia Bobyra96d5442023-08-30 16:30:15 +020015861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dirfd" >&5
15862printf %s "checking for dirfd... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15864/* end confdefs.h. */
15865#include <sys/types.h>
15866#include <dirent.h>
15867int
Illia Bobyra96d5442023-08-30 16:30:15 +020015868main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015869{
15870DIR * dir=opendir("dirname"); dirfd(dir);
15871 ;
15872 return 0;
15873}
15874_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015875if ac_fn_c_try_link "$LINENO"
15876then :
15877 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15878printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DIRFD 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015879
Christian Brabandt9670f612025-05-07 21:44:33 +020015880else case e in #(
15881 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15882printf "%s\n" "not usable" >&6; } ;;
15883esac
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015884fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015885rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015886 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015887
Illia Bobyra96d5442023-08-30 16:30:15 +020015888{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock" >&5
15889printf %s "checking for flock... " >&6; }
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15891/* end confdefs.h. */
15892#include <sys/file.h>
15893int
Illia Bobyra96d5442023-08-30 16:30:15 +020015894main (void)
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015895{
15896flock(10, LOCK_SH);
15897 ;
15898 return 0;
15899}
15900_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015901if ac_fn_c_try_link "$LINENO"
15902then :
15903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15904printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015905
Christian Brabandt9670f612025-05-07 21:44:33 +020015906else case e in #(
15907 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15908printf "%s\n" "not usable" >&6; } ;;
15909esac
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015910fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015911rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaar9d8bfae2020-09-02 21:21:35 +020015912 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaarb2d0e512020-05-07 18:37:03 +020015913
Illia Bobyra96d5442023-08-30 16:30:15 +020015914{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysctl" >&5
15915printf %s "checking for sysctl... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015917/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015918#include <sys/types.h>
15919#include <sys/sysctl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015920int
Illia Bobyra96d5442023-08-30 16:30:15 +020015921main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015922{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015923 int mib[2], r;
15924 size_t len;
15925
15926 mib[0] = CTL_HW;
15927 mib[1] = HW_USERMEM;
15928 len = sizeof(r);
15929 (void)sysctl(mib, 2, &r, &len, (void *)0, (size_t)0);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015930
15931 ;
15932 return 0;
15933}
15934_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015935if ac_fn_c_try_compile "$LINENO"
15936then :
15937 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15938printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCTL 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015939
Christian Brabandt9670f612025-05-07 21:44:33 +020015940else case e in #(
15941 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15942printf "%s\n" "not usable" >&6; } ;;
15943esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015944fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015945rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015946
Illia Bobyra96d5442023-08-30 16:30:15 +020015947{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo" >&5
15948printf %s "checking for sysinfo... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015950/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000015951#include <sys/types.h>
15952#include <sys/sysinfo.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015953int
Illia Bobyra96d5442023-08-30 16:30:15 +020015954main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015955{
Bram Moolenaar071d4272004-06-13 20:20:40 +000015956 struct sysinfo sinfo;
15957 int t;
15958
15959 (void)sysinfo(&sinfo);
15960 t = sinfo.totalram;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015961
15962 ;
15963 return 0;
15964}
15965_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015966if ac_fn_c_try_link "$LINENO"
15967then :
15968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15969printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000015970
Christian Brabandt9670f612025-05-07 21:44:33 +020015971else case e in #(
15972 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
15973printf "%s\n" "not usable" >&6; } ;;
15974esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000015975fi
Illia Bobyra96d5442023-08-30 16:30:15 +020015976rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaare2982d62021-10-06 11:27:21 +010015977 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000015978
Illia Bobyra96d5442023-08-30 16:30:15 +020015979{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.mem_unit" >&5
15980printf %s "checking for sysinfo.mem_unit... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020015981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar914572a2007-05-01 11:37:47 +000015982/* end confdefs.h. */
15983#include <sys/types.h>
15984#include <sys/sysinfo.h>
15985int
Illia Bobyra96d5442023-08-30 16:30:15 +020015986main (void)
Bram Moolenaar914572a2007-05-01 11:37:47 +000015987{
15988 struct sysinfo sinfo;
Bram Moolenaar3c7ad012013-06-11 19:53:45 +020015989 sinfo.mem_unit = 1;
Bram Moolenaar914572a2007-05-01 11:37:47 +000015990
15991 ;
15992 return 0;
15993}
15994_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020015995if ac_fn_c_try_compile "$LINENO"
15996then :
15997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15998printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_MEM_UNIT 1" >>confdefs.h
Bram Moolenaar914572a2007-05-01 11:37:47 +000015999
Christian Brabandt9670f612025-05-07 21:44:33 +020016000else case e in #(
16001 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16002printf "%s\n" "no" >&6; } ;;
16003esac
Bram Moolenaar914572a2007-05-01 11:37:47 +000016004fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016005rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar446cb832008-06-24 21:56:24 +000016006
Illia Bobyra96d5442023-08-30 16:30:15 +020016007{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysinfo.uptime" >&5
16008printf %s "checking for sysinfo.uptime... " >&6; }
Bram Moolenaarf52f0602021-03-10 21:26:37 +010016009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16010/* end confdefs.h. */
16011#include <sys/types.h>
16012#include <sys/sysinfo.h>
16013int
Illia Bobyra96d5442023-08-30 16:30:15 +020016014main (void)
Bram Moolenaarf52f0602021-03-10 21:26:37 +010016015{
16016 struct sysinfo sinfo;
16017 long ut;
16018
16019 (void)sysinfo(&sinfo);
16020 ut = sinfo.uptime;
16021
16022 ;
16023 return 0;
16024}
16025_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016026if ac_fn_c_try_compile "$LINENO"
16027then :
16028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16029printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h
Bram Moolenaarf52f0602021-03-10 21:26:37 +010016030
Christian Brabandt9670f612025-05-07 21:44:33 +020016031else case e in #(
16032 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16033printf "%s\n" "no" >&6; } ;;
16034esac
Bram Moolenaarf52f0602021-03-10 21:26:37 +010016035fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016036rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarf52f0602021-03-10 21:26:37 +010016037
Illia Bobyra96d5442023-08-30 16:30:15 +020016038{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5
16039printf %s "checking for sysconf... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016041/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016042#include <unistd.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016043int
Illia Bobyra96d5442023-08-30 16:30:15 +020016044main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016045{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016046 (void)sysconf(_SC_PAGESIZE);
16047 (void)sysconf(_SC_PHYS_PAGES);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016048
16049 ;
16050 return 0;
16051}
16052_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016053if ac_fn_c_try_compile "$LINENO"
16054then :
16055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16056printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016057
Christian Brabandt9670f612025-05-07 21:44:33 +020016058else case e in #(
16059 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
16060printf "%s\n" "not usable" >&6; } ;;
16061esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016062fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016063rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016064
Illia Bobyra96d5442023-08-30 16:30:15 +020016065{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _SC_SIGSTKSZ via sysconf()" >&5
16066printf %s "checking for _SC_SIGSTKSZ via sysconf()... " >&6; }
Bram Moolenaar0e62a672021-02-25 17:17:56 +010016067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16068/* end confdefs.h. */
16069#include <unistd.h>
16070int
Illia Bobyra96d5442023-08-30 16:30:15 +020016071main (void)
Bram Moolenaar0e62a672021-02-25 17:17:56 +010016072{
16073 (void)sysconf(_SC_SIGSTKSZ);
16074
16075 ;
16076 return 0;
16077}
16078_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016079if ac_fn_c_try_compile "$LINENO"
16080then :
16081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16082printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_SYSCONF_SIGSTKSZ 1" >>confdefs.h
Bram Moolenaar0e62a672021-02-25 17:17:56 +010016083
Christian Brabandt9670f612025-05-07 21:44:33 +020016084else case e in #(
16085 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not usable" >&5
16086printf "%s\n" "not usable" >&6; } ;;
16087esac
Bram Moolenaar0e62a672021-02-25 17:17:56 +010016088fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016089rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaar0e62a672021-02-25 17:17:56 +010016090
Bram Moolenaar914703b2010-05-31 21:59:46 +020016091# The cast to long int works around a bug in the HP C Compiler
16092# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020016093# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020016094# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020016095{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
16096printf %s "checking size of int... " >&6; }
16097if test ${ac_cv_sizeof_int+y}
16098then :
16099 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016100else case e in #(
16101 e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020016102then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020016103
Christian Brabandt9670f612025-05-07 21:44:33 +020016104else case e in #(
16105 e) if test "$ac_cv_type_int" = yes; then
16106 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16107printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016108as_fn_error 77 "cannot compute sizeof (int)
Christian Brabandt9670f612025-05-07 21:44:33 +020016109See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016110 else
16111 ac_cv_sizeof_int=0
Christian Brabandt9670f612025-05-07 21:44:33 +020016112 fi ;;
16113esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016114fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016115 ;;
16116esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016117fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016118{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
16119printf "%s\n" "$ac_cv_sizeof_int" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016120
16121
16122
Illia Bobyra96d5442023-08-30 16:30:15 +020016123printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016124
16125
Bram Moolenaar914703b2010-05-31 21:59:46 +020016126# The cast to long int works around a bug in the HP C Compiler
16127# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020016128# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020016129# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020016130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
16131printf %s "checking size of long... " >&6; }
16132if test ${ac_cv_sizeof_long+y}
16133then :
16134 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016135else case e in #(
16136 e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020016137then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020016138
Christian Brabandt9670f612025-05-07 21:44:33 +020016139else case e in #(
16140 e) if test "$ac_cv_type_long" = yes; then
16141 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16142printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016143as_fn_error 77 "cannot compute sizeof (long)
Christian Brabandt9670f612025-05-07 21:44:33 +020016144See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016145 else
16146 ac_cv_sizeof_long=0
Christian Brabandt9670f612025-05-07 21:44:33 +020016147 fi ;;
16148esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020016149fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016150 ;;
16151esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020016152fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
16154printf "%s\n" "$ac_cv_sizeof_long" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016155
16156
16157
Illia Bobyra96d5442023-08-30 16:30:15 +020016158printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020016159
16160
16161# The cast to long int works around a bug in the HP C Compiler
16162# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020016163# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020016164# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020016165{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
16166printf %s "checking size of time_t... " >&6; }
16167if test ${ac_cv_sizeof_time_t+y}
16168then :
16169 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016170else case e in #(
16171 e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020016172then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020016173
Christian Brabandt9670f612025-05-07 21:44:33 +020016174else case e in #(
16175 e) if test "$ac_cv_type_time_t" = yes; then
16176 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16177printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016178as_fn_error 77 "cannot compute sizeof (time_t)
Christian Brabandt9670f612025-05-07 21:44:33 +020016179See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016180 else
16181 ac_cv_sizeof_time_t=0
Christian Brabandt9670f612025-05-07 21:44:33 +020016182 fi ;;
16183esac
Bram Moolenaar644fdff2010-05-30 13:26:21 +020016184fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016185 ;;
16186esac
Bram Moolenaar644fdff2010-05-30 13:26:21 +020016187fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016188{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
16189printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016190
16191
16192
Illia Bobyra96d5442023-08-30 16:30:15 +020016193printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
Bram Moolenaar644fdff2010-05-30 13:26:21 +020016194
16195
Bram Moolenaar914703b2010-05-31 21:59:46 +020016196# The cast to long int works around a bug in the HP C Compiler
16197# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
Christian Brabandt9670f612025-05-07 21:44:33 +020016198# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
Bram Moolenaar914703b2010-05-31 21:59:46 +020016199# This bug is HP SR number 8606223364.
Illia Bobyra96d5442023-08-30 16:30:15 +020016200{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
16201printf %s "checking size of off_t... " >&6; }
16202if test ${ac_cv_sizeof_off_t+y}
16203then :
16204 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016205else case e in #(
16206 e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020016207then :
Bram Moolenaar914703b2010-05-31 21:59:46 +020016208
Christian Brabandt9670f612025-05-07 21:44:33 +020016209else case e in #(
16210 e) if test "$ac_cv_type_off_t" = yes; then
16211 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
16212printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010016213as_fn_error 77 "cannot compute sizeof (off_t)
Christian Brabandt9670f612025-05-07 21:44:33 +020016214See 'config.log' for more details" "$LINENO" 5; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016215 else
16216 ac_cv_sizeof_off_t=0
Christian Brabandt9670f612025-05-07 21:44:33 +020016217 fi ;;
16218esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020016219fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016220 ;;
16221esac
Bram Moolenaar914703b2010-05-31 21:59:46 +020016222fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
16224printf "%s\n" "$ac_cv_sizeof_off_t" >&6; }
Bram Moolenaar914703b2010-05-31 21:59:46 +020016225
16226
16227
Illia Bobyra96d5442023-08-30 16:30:15 +020016228printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h
Bram Moolenaar914703b2010-05-31 21:59:46 +020016229
16230
16231
Illia Bobyra96d5442023-08-30 16:30:15 +020016232printf "%s\n" "#define VIM_SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010016233
Illia Bobyra96d5442023-08-30 16:30:15 +020016234printf "%s\n" "#define VIM_SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
Bram Moolenaara2aa31a2014-02-23 22:52:40 +010016235
16236
Illia Bobyra96d5442023-08-30 16:30:15 +020016237{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking uint32_t is 32 bits" >&5
16238printf %s "checking uint32_t is 32 bits... " >&6; }
16239if test "$cross_compiling" = yes
16240then :
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: assuming uint32_t is correct when cross-compiling" >&5
16242printf "%s\n" "$as_me: WARNING: assuming uint32_t is correct when cross-compiling" >&2;}
Christian Brabandt9670f612025-05-07 21:44:33 +020016243else case e in #(
16244 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016245/* end confdefs.h. */
16246
16247#ifdef HAVE_STDINT_H
16248# include <stdint.h>
16249#endif
16250#ifdef HAVE_INTTYPES_H
16251# include <inttypes.h>
16252#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010016253int main() {
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016254 uint32_t nr1 = (uint32_t)-1;
16255 uint32_t nr2 = (uint32_t)0xffffffffUL;
Bram Moolenaar52897832020-07-02 22:50:37 +020016256 if (sizeof(uint32_t) != 4 || nr1 != 0xffffffffUL || nr2 + 1 != 0) return 1;
16257 return 0;
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016258}
16259_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016260if ac_fn_c_try_run "$LINENO"
16261then :
16262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16263printf "%s\n" "ok" >&6; }
Christian Brabandt9670f612025-05-07 21:44:33 +020016264else case e in #(
16265 e) as_fn_error $? "WRONG! uint32_t not defined correctly." "$LINENO" 5 ;;
16266esac
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016267fi
16268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016269 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16270esac
Bram Moolenaarfa7584c2010-05-19 21:57:45 +020016271fi
16272
16273
Bram Moolenaar446cb832008-06-24 21:56:24 +000016274
Bram Moolenaar071d4272004-06-13 20:20:40 +000016275bcopy_test_prog='
Bram Moolenaar446cb832008-06-24 21:56:24 +000016276#include "confdefs.h"
16277#ifdef HAVE_STRING_H
16278# include <string.h>
16279#endif
16280#if STDC_HEADERS
16281# include <stdlib.h>
16282# include <stddef.h>
16283#endif
Bram Moolenaar0f0d3a72022-06-19 18:02:05 +010016284int main() {
Bram Moolenaar071d4272004-06-13 20:20:40 +000016285 char buf[10];
16286 strcpy(buf, "abcdefghi");
16287 mch_memmove(buf, buf + 2, 3);
16288 if (strncmp(buf, "ababcf", 6))
16289 exit(1);
16290 strcpy(buf, "abcdefghi");
16291 mch_memmove(buf + 2, buf, 3);
16292 if (strncmp(buf, "cdedef", 6))
16293 exit(1);
16294 exit(0); /* libc version works properly. */
16295}'
16296
Illia Bobyra96d5442023-08-30 16:30:15 +020016297{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memmove handles overlaps" >&5
16298printf %s "checking whether memmove handles overlaps... " >&6; }
16299if test ${vim_cv_memmove_handles_overlap+y}
16300then :
16301 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016302else case e in #(
16303 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020016304 if test "$cross_compiling" = yes
16305then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016306
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016307 vim_cv_memmove_handles_overlap=yes
16308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_memmove_handles_overlap'" >&5
16309printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_memmove_handles_overlap'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000016310
Christian Brabandt9670f612025-05-07 21:44:33 +020016311else case e in #(
16312 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016313/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016314#define mch_memmove(s,d,l) memmove(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016315_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016316if ac_fn_c_try_run "$LINENO"
16317then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016318
16319 vim_cv_memmove_handles_overlap=yes
16320
Christian Brabandt9670f612025-05-07 21:44:33 +020016321else case e in #(
16322 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016323 vim_cv_memmove_handles_overlap=no
Christian Brabandt9670f612025-05-07 21:44:33 +020016324 ;;
16325esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016326fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016328 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16329esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016330fi
16331
Christian Brabandt9670f612025-05-07 21:44:33 +020016332 ;;
16333esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016334fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016335{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memmove_handles_overlap" >&5
16336printf "%s\n" "$vim_cv_memmove_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016337
16338if test "x$vim_cv_memmove_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016339 printf "%s\n" "#define USEMEMMOVE 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000016340
Bram Moolenaar071d4272004-06-13 20:20:40 +000016341else
Illia Bobyra96d5442023-08-30 16:30:15 +020016342 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether bcopy handles overlaps" >&5
16343printf %s "checking whether bcopy handles overlaps... " >&6; }
16344if test ${vim_cv_bcopy_handles_overlap+y}
16345then :
16346 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016347else case e in #(
16348 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020016349 if test "$cross_compiling" = yes
16350then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016351
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016352 vim_cv_bcopy_handles_overlap=yes
16353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_bcopy_handles_overlap'" >&5
16354printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_bcopy_handles_overlap'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000016355
Christian Brabandt9670f612025-05-07 21:44:33 +020016356else case e in #(
16357 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016358/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000016359#define mch_bcopy(s,d,l) bcopy(d,s,l) $bcopy_test_prog
16360_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016361if ac_fn_c_try_run "$LINENO"
16362then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016363
16364 vim_cv_bcopy_handles_overlap=yes
16365
Christian Brabandt9670f612025-05-07 21:44:33 +020016366else case e in #(
16367 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016368 vim_cv_bcopy_handles_overlap=no
Christian Brabandt9670f612025-05-07 21:44:33 +020016369 ;;
16370esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016371fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016372rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016373 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16374esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016375fi
16376
Christian Brabandt9670f612025-05-07 21:44:33 +020016377 ;;
16378esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016379fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016380{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_bcopy_handles_overlap" >&5
16381printf "%s\n" "$vim_cv_bcopy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016382
16383 if test "x$vim_cv_bcopy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016384 printf "%s\n" "#define USEBCOPY 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016385
Bram Moolenaar446cb832008-06-24 21:56:24 +000016386 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memcpy handles overlaps" >&5
16388printf %s "checking whether memcpy handles overlaps... " >&6; }
16389if test ${vim_cv_memcpy_handles_overlap+y}
16390then :
16391 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016392else case e in #(
16393 e)
Illia Bobyra96d5442023-08-30 16:30:15 +020016394 if test "$cross_compiling" = yes
16395then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016396
Jonas Sortie Termansen2cf145b2024-11-03 20:58:21 +010016397 vim_cv_memcpy_handles_overlap=yes
16398 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: consider setting 'vim_cv_memcpy_handles_overlap'" >&5
16399printf "%s\n" "$as_me: WARNING: cross-compiling: consider setting 'vim_cv_memcpy_handles_overlap'" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000016400
Christian Brabandt9670f612025-05-07 21:44:33 +020016401else case e in #(
16402 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016403/* end confdefs.h. */
Bram Moolenaar446cb832008-06-24 21:56:24 +000016404#define mch_memcpy(s,d,l) memcpy(d,s,l) $bcopy_test_prog
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016405_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016406if ac_fn_c_try_run "$LINENO"
16407then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016408
16409 vim_cv_memcpy_handles_overlap=yes
16410
Christian Brabandt9670f612025-05-07 21:44:33 +020016411else case e in #(
16412 e)
Bram Moolenaar446cb832008-06-24 21:56:24 +000016413 vim_cv_memcpy_handles_overlap=no
Christian Brabandt9670f612025-05-07 21:44:33 +020016414 ;;
16415esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016416fi
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016417rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
Christian Brabandt9670f612025-05-07 21:44:33 +020016418 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
16419esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016420fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016421
Christian Brabandt9670f612025-05-07 21:44:33 +020016422 ;;
16423esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016424fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016425{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vim_cv_memcpy_handles_overlap" >&5
16426printf "%s\n" "$vim_cv_memcpy_handles_overlap" >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016427
16428 if test "x$vim_cv_memcpy_handles_overlap" = "xyes" ; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016429 printf "%s\n" "#define USEMEMCPY 1" >>confdefs.h
Bram Moolenaar446cb832008-06-24 21:56:24 +000016430
16431 fi
16432 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016433fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000016434
Bram Moolenaar071d4272004-06-13 20:20:40 +000016435
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016436if test "x$with_x" = "xyes"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016437 cflags_save=$CFLAGS
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016438 libs_save=$LIBS
16439 LIBS="$LIBS $X_LIBS $GUI_LIB_LOC $GUI_X_LIBS $X_PRE_LIBS $X_LIB $X_EXTRA_LIBS"
16440 CFLAGS="$CFLAGS $X_CFLAGS"
16441
Illia Bobyra96d5442023-08-30 16:30:15 +020016442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether X_LOCALE needed" >&5
16443printf %s "checking whether X_LOCALE needed... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016445/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016446#include <X11/Xlocale.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016447int
Illia Bobyra96d5442023-08-30 16:30:15 +020016448main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016449{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016450
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016451 ;
16452 return 0;
16453}
16454_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016455if ac_fn_c_try_compile "$LINENO"
16456then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016458/* end confdefs.h. */
16459
Bram Moolenaar446cb832008-06-24 21:56:24 +000016460/* Override any GCC internal prototype to avoid an error.
16461 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020016462 builtin and then its argument prototype would still apply.
16463 The 'extern "C"' is for builds by C++ compilers;
16464 although this is not generally supported in C code supporting it here
16465 has little cost and some practical benefit (sr 110532). */
16466#ifdef __cplusplus
16467extern "C"
16468#endif
16469char _Xsetlocale (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016470int
Illia Bobyra96d5442023-08-30 16:30:15 +020016471main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016472{
Bram Moolenaar446cb832008-06-24 21:56:24 +000016473return _Xsetlocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016474 ;
16475 return 0;
16476}
16477_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016478if ac_fn_c_try_link "$LINENO"
16479then :
16480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16481printf "%s\n" "yes" >&6; }
16482 printf "%s\n" "#define X_LOCALE 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016483
Christian Brabandt9670f612025-05-07 21:44:33 +020016484else case e in #(
16485 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16486printf "%s\n" "no" >&6; } ;;
16487esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016488fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016489rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016490 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020016491else case e in #(
16492 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16493printf "%s\n" "no" >&6; } ;;
16494esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016495fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016496rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016497
Illia Bobyra96d5442023-08-30 16:30:15 +020016498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Xutf8SetWMProperties() can be used" >&5
16499printf %s "checking whether Xutf8SetWMProperties() can be used... " >&6; }
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16501/* end confdefs.h. */
16502
16503/* Override any GCC internal prototype to avoid an error.
16504 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020016505 builtin and then its argument prototype would still apply.
16506 The 'extern "C"' is for builds by C++ compilers;
16507 although this is not generally supported in C code supporting it here
16508 has little cost and some practical benefit (sr 110532). */
16509#ifdef __cplusplus
16510extern "C"
16511#endif
16512char Xutf8SetWMProperties (void);
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016513int
Illia Bobyra96d5442023-08-30 16:30:15 +020016514main (void)
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016515{
16516return Xutf8SetWMProperties ();
16517 ;
16518 return 0;
16519}
16520_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016521if ac_fn_c_try_link "$LINENO"
16522then :
16523 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16524printf "%s\n" "yes" >&6; }
16525 printf "%s\n" "#define HAVE_XUTF8SETWMPROPERTIES 1" >>confdefs.h
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016526
Christian Brabandt9670f612025-05-07 21:44:33 +020016527else case e in #(
16528 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16529printf "%s\n" "no" >&6; } ;;
16530esac
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016531fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016532rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016533 conftest$ac_exeext conftest.$ac_ext
16534
Bram Moolenaar071d4272004-06-13 20:20:40 +000016535 CFLAGS=$cflags_save
Bram Moolenaarcbc246a2014-10-11 14:47:26 +020016536 LIBS=$libs_save
Bram Moolenaar071d4272004-06-13 20:20:40 +000016537fi
16538
Illia Bobyra96d5442023-08-30 16:30:15 +020016539{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _xpg4_setrunelocale in -lxpg4" >&5
16540printf %s "checking for _xpg4_setrunelocale in -lxpg4... " >&6; }
16541if test ${ac_cv_lib_xpg4__xpg4_setrunelocale+y}
16542then :
16543 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016544else case e in #(
16545 e) ac_check_lib_save_LIBS=$LIBS
Bram Moolenaar071d4272004-06-13 20:20:40 +000016546LIBS="-lxpg4 $LIBS"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016548/* end confdefs.h. */
16549
Bram Moolenaar446cb832008-06-24 21:56:24 +000016550/* Override any GCC internal prototype to avoid an error.
16551 Use char because int might match the return type of a GCC
Christian Brabandt9670f612025-05-07 21:44:33 +020016552 builtin and then its argument prototype would still apply.
16553 The 'extern "C"' is for builds by C++ compilers;
16554 although this is not generally supported in C code supporting it here
16555 has little cost and some practical benefit (sr 110532). */
16556#ifdef __cplusplus
16557extern "C"
16558#endif
16559char _xpg4_setrunelocale (void);
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016560int
Illia Bobyra96d5442023-08-30 16:30:15 +020016561main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016562{
Bram Moolenaar446cb832008-06-24 21:56:24 +000016563return _xpg4_setrunelocale ();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016564 ;
16565 return 0;
16566}
16567_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016568if ac_fn_c_try_link "$LINENO"
16569then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016570 ac_cv_lib_xpg4__xpg4_setrunelocale=yes
Christian Brabandt9670f612025-05-07 21:44:33 +020016571else case e in #(
16572 e) ac_cv_lib_xpg4__xpg4_setrunelocale=no ;;
16573esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016574fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016575rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016576 conftest$ac_exeext conftest.$ac_ext
Christian Brabandt9670f612025-05-07 21:44:33 +020016577LIBS=$ac_check_lib_save_LIBS ;;
16578esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016579fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016580{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xpg4__xpg4_setrunelocale" >&5
16581printf "%s\n" "$ac_cv_lib_xpg4__xpg4_setrunelocale" >&6; }
16582if test "x$ac_cv_lib_xpg4__xpg4_setrunelocale" = xyes
16583then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000016584 LIBS="$LIBS -lxpg4"
Bram Moolenaar071d4272004-06-13 20:20:40 +000016585fi
16586
16587
Illia Bobyra96d5442023-08-30 16:30:15 +020016588{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create tags" >&5
16589printf %s "checking how to create tags... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016590test -f tags && mv tags tags.save
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020016591if (eval ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010016592 TAGPRG="ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020016593elif (eval exctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010016594 TAGPRG="exctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar5897e0c2011-05-10 15:42:03 +020016595elif (eval exuberant-ctags --version /dev/null | grep Exuberant) < /dev/null 1>&5 2>&1; then
Bram Moolenaar509ff062020-01-02 22:38:49 +010016596 TAGPRG="exuberant-ctags -I INIT+,INIT2+,INIT3+,INIT4+,INIT5+ --fields=+S"
Bram Moolenaar071d4272004-06-13 20:20:40 +000016597else
Bram Moolenaar0c7ce772009-05-13 12:49:39 +000016598 TAGPRG="ctags"
Bram Moolenaar071d4272004-06-13 20:20:40 +000016599 (eval etags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags"
16600 (eval etags -c /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="etags -c"
16601 (eval ctags /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags"
16602 (eval ctags -t /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -t"
16603 (eval ctags -ts /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -ts"
16604 (eval ctags -tvs /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -tvs"
16605 (eval ctags -i+m /dev/null) < /dev/null 1>&5 2>&1 && TAGPRG="ctags -i+m"
16606fi
16607test -f tags.save && mv tags.save tags
Illia Bobyra96d5442023-08-30 16:30:15 +020016608{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TAGPRG" >&5
16609printf "%s\n" "$TAGPRG" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016610
Illia Bobyra96d5442023-08-30 16:30:15 +020016611{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run man with a section nr" >&5
16612printf %s "checking how to run man with a section nr... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016613MANDEF="man"
Bram Moolenaar8b131502008-02-13 09:28:19 +000016614(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 +020016615{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANDEF" >&5
16616printf "%s\n" "$MANDEF" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016617if test "$MANDEF" = "man -s"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016618 printf "%s\n" "#define USEMAN_S 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016619
16620fi
16621
Illia Bobyra96d5442023-08-30 16:30:15 +020016622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --disable-nls argument" >&5
16623printf %s "checking --disable-nls argument... " >&6; }
Bram Moolenaar446cb832008-06-24 21:56:24 +000016624# Check whether --enable-nls was given.
Illia Bobyra96d5442023-08-30 16:30:15 +020016625if test ${enable_nls+y}
16626then :
Bram Moolenaar446cb832008-06-24 21:56:24 +000016627 enableval=$enable_nls;
Christian Brabandt9670f612025-05-07 21:44:33 +020016628else case e in #(
16629 e) enable_nls="yes" ;;
16630esac
Bram Moolenaar446cb832008-06-24 21:56:24 +000016631fi
16632
Bram Moolenaar071d4272004-06-13 20:20:40 +000016633
16634if test "$enable_nls" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016635 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16636printf "%s\n" "no" >&6; }
Bram Moolenaar2389c3c2005-05-22 22:07:59 +000016637
16638 INSTALL_LANGS=install-languages
16639
16640 INSTALL_TOOL_LANGS=install-tool-languages
16641
16642
Bram Moolenaar071d4272004-06-13 20:20:40 +000016643 # Extract the first word of "msgfmt", so it can be a program name with args.
16644set dummy msgfmt; ac_word=$2
Illia Bobyra96d5442023-08-30 16:30:15 +020016645{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16646printf %s "checking for $ac_word... " >&6; }
16647if test ${ac_cv_prog_MSGFMT+y}
16648then :
16649 printf %s "(cached) " >&6
Christian Brabandt9670f612025-05-07 21:44:33 +020016650else case e in #(
16651 e) if test -n "$MSGFMT"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000016652 ac_cv_prog_MSGFMT="$MSGFMT" # Let the user override the test.
16653else
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16655for as_dir in $PATH
16656do
16657 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020016658 case $as_dir in #(((
16659 '') as_dir=./ ;;
16660 */) ;;
16661 *) as_dir=$as_dir/ ;;
16662 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016663 for ac_exec_ext in '' $ac_executable_extensions; do
Illia Bobyra96d5442023-08-30 16:30:15 +020016664 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016665 ac_cv_prog_MSGFMT="msgfmt"
Illia Bobyra96d5442023-08-30 16:30:15 +020016666 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016667 break 2
16668 fi
16669done
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016670 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000016671IFS=$as_save_IFS
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016672
Christian Brabandt9670f612025-05-07 21:44:33 +020016673fi ;;
16674esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016675fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016676MSGFMT=$ac_cv_prog_MSGFMT
Bram Moolenaar071d4272004-06-13 20:20:40 +000016677if test -n "$MSGFMT"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
16679printf "%s\n" "$MSGFMT" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016680else
Illia Bobyra96d5442023-08-30 16:30:15 +020016681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16682printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016683fi
16684
Bram Moolenaar446cb832008-06-24 21:56:24 +000016685
Illia Bobyra96d5442023-08-30 16:30:15 +020016686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NLS" >&5
16687printf %s "checking for NLS... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016688 if test -f po/Makefile; then
16689 have_gettext="no"
16690 if test -n "$MSGFMT"; then
Bram Moolenaar49b6a572013-11-17 20:32:54 +010016691 olibs=$LIBS
16692 LIBS=""
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016694/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016695#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016696int
Illia Bobyra96d5442023-08-30 16:30:15 +020016697main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016698{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016699gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016700 ;
16701 return 0;
16702}
16703_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016704if ac_fn_c_try_link "$LINENO"
16705then :
16706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
16707printf "%s\n" "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
Christian Brabandt9670f612025-05-07 21:44:33 +020016708else case e in #(
16709 e) LIBS="-lintl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016711/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016712#include <libintl.h>
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016713int
Illia Bobyra96d5442023-08-30 16:30:15 +020016714main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016715{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016716gettext("Test");
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016717 ;
16718 return 0;
16719}
16720_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016721if ac_fn_c_try_link "$LINENO"
16722then :
16723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
16724printf "%s\n" "gettext() works with -lintl" >&6; }; have_gettext="yes";
Bram Moolenaar49b6a572013-11-17 20:32:54 +010016725 LIBS="$olibs -lintl"
Christian Brabandt9670f612025-05-07 21:44:33 +020016726else case e in #(
16727 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016728printf "%s\n" "gettext() doesn't work" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020016729 LIBS=$olibs ;;
16730esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016731fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016732rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020016733 conftest$ac_exeext conftest.$ac_ext ;;
16734esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016735fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016736rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016737 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000016738 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: msgfmt not found - disabled" >&5
16740printf "%s\n" "msgfmt not found - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016741 fi
Martin Tournoij7904fa42022-10-04 16:28:45 +010016742 if test $have_gettext = "yes" -a "x$features" != "xtiny"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016743 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016744
16745 MAKEMO=yes
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016746
Illia Bobyra96d5442023-08-30 16:30:15 +020016747 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
16748if test "x$ac_cv_func_bind_textdomain_codeset" = xyes
16749then :
16750 printf "%s\n" "#define HAVE_BIND_TEXTDOMAIN_CODESET 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016751
Bram Moolenaar071d4272004-06-13 20:20:40 +000016752fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000016753
Christ van Willegence0ef912024-06-20 23:41:59 +020016754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dgettext" >&5
16755printf %s "checking for dgettext... " >&6; }
16756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16757/* end confdefs.h. */
16758#include <libintl.h>
16759int
16760main (void)
16761{
16762dgettext("Test", "Test");
16763 ;
16764 return 0;
16765}
16766_ACEOF
16767if ac_fn_c_try_link "$LINENO"
16768then :
16769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16770printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DGETTEXT 1" >>confdefs.h
16771
Christian Brabandt9670f612025-05-07 21:44:33 +020016772else case e in #(
16773 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dngettext" >&5
Christ van Willegenc0786752025-02-01 15:42:16 +010016774printf %s "checking for dngettext... " >&6; }
16775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Christian Brabandt9670f612025-05-07 21:44:33 +020016776printf "%s\n" "no" >&6; } ;;
16777esac
Christ van Willegenc0786752025-02-01 15:42:16 +010016778fi
16779rm -f core conftest.err conftest.$ac_objext conftest.beam \
16780 conftest$ac_exeext conftest.$ac_ext
16781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16782/* end confdefs.h. */
16783#include <libintl.h>
16784int
16785main (void)
16786{
16787dngettext("DOMAIN", "Test single", "Test plural", 1);
16788 ;
16789 return 0;
16790}
16791_ACEOF
16792if ac_fn_c_try_link "$LINENO"
16793then :
16794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16795printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_DNGETTEXT 1" >>confdefs.h
16796
Christian Brabandt9670f612025-05-07 21:44:33 +020016797else case e in #(
16798 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16799printf "%s\n" "no" >&6; } ;;
16800esac
Christ van Willegence0ef912024-06-20 23:41:59 +020016801fi
16802rm -f core conftest.err conftest.$ac_objext conftest.beam \
16803 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _nl_msg_cat_cntr" >&5
16805printf %s "checking for _nl_msg_cat_cntr... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016807/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016808#include <libintl.h>
16809 extern int _nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016810int
Illia Bobyra96d5442023-08-30 16:30:15 +020016811main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016812{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016813++_nl_msg_cat_cntr;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016814 ;
16815 return 0;
16816}
16817_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016818if ac_fn_c_try_link "$LINENO"
16819then :
16820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16821printf "%s\n" "yes" >&6; }; printf "%s\n" "#define HAVE_NL_MSG_CAT_CNTR 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016822
Christian Brabandt9670f612025-05-07 21:44:33 +020016823else case e in #(
16824 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16825printf "%s\n" "no" >&6; } ;;
16826esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016827fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016828rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016829 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if msgfmt supports --desktop" >&5
16831printf %s "checking if msgfmt supports --desktop... " >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020016832 MSGFMT_DESKTOP=
16833 if "$MSGFMT" --help | grep -e '--desktop' >/dev/null; then
Bram Moolenaar62a88f42019-06-07 20:44:40 +020016834 if "$MSGFMT" --version | grep '0.19.[3-7]$' >/dev/null; then
Illia Bobyra96d5442023-08-30 16:30:15 +020016835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: broken" >&5
16836printf "%s\n" "broken" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020016837 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16839printf "%s\n" "yes" >&6; }
Bram Moolenaar62a88f42019-06-07 20:44:40 +020016840 MSGFMT_DESKTOP="gvim.desktop vim.desktop"
16841 fi
Bram Moolenaar26096cc2019-04-11 15:25:40 +020016842 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16844printf "%s\n" "no" >&6; }
Bram Moolenaar26096cc2019-04-11 15:25:40 +020016845 fi
16846
Vladimír Marek87319172024-04-11 21:54:34 +020016847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MSGFMT supports --no-convert" >&5
16848printf %s "checking if $MSGFMT supports --no-convert... " >&6; }
RestorerZe498caf2024-03-12 22:11:36 +010016849 if "$MSGFMT" --help | grep -q -- '--no-convert' >/dev/null; then
16850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16851printf "%s\n" "yes" >&6; }
Vladimír Marek87319172024-04-11 21:54:34 +020016852 MSGFMTCMD="OLD_PO_FILE_INPUT=yes $MSGFMT --no-convert -v"
RestorerZe498caf2024-03-12 22:11:36 +010016853 else
16854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16855printf "%s\n" "no" >&6; }
Vladimír Marek87319172024-04-11 21:54:34 +020016856 MSGFMTCMD="OLD_PO_FILE_INPUT=yes $MSGFMT -v"
RestorerZe498caf2024-03-12 22:11:36 +010016857 fi
16858
Bram Moolenaar071d4272004-06-13 20:20:40 +000016859 fi
16860 else
Illia Bobyra96d5442023-08-30 16:30:15 +020016861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no \"po/Makefile\" - disabled" >&5
16862printf "%s\n" "no \"po/Makefile\" - disabled" >&6; };
Bram Moolenaar071d4272004-06-13 20:20:40 +000016863 fi
16864else
Illia Bobyra96d5442023-08-30 16:30:15 +020016865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16866printf "%s\n" "yes" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016867fi
16868
Illia Bobyra96d5442023-08-30 16:30:15 +020016869ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
16870if test "x$ac_cv_header_dlfcn_h" = xyes
16871then :
Bram Moolenaar071d4272004-06-13 20:20:40 +000016872 DLL=dlfcn.h
Christian Brabandt9670f612025-05-07 21:44:33 +020016873else case e in #(
16874 e) ac_fn_c_check_header_compile "$LINENO" "dl.h" "ac_cv_header_dl_h" "$ac_includes_default"
Illia Bobyra96d5442023-08-30 16:30:15 +020016875if test "x$ac_cv_header_dl_h" = xyes
16876then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016877 DLL=dl.h
16878fi
Christian Brabandt9670f612025-05-07 21:44:33 +020016879 ;;
16880esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016881fi
16882
Bram Moolenaar071d4272004-06-13 20:20:40 +000016883if test x${DLL} = xdlfcn.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016884
Illia Bobyra96d5442023-08-30 16:30:15 +020016885printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016886
Illia Bobyra96d5442023-08-30 16:30:15 +020016887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen()" >&5
16888printf %s "checking for dlopen()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016890/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016891
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016892int
Illia Bobyra96d5442023-08-30 16:30:15 +020016893main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016894{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016895
16896 extern void* dlopen();
16897 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016898
16899 ;
16900 return 0;
16901}
16902_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016903if ac_fn_c_try_link "$LINENO"
16904then :
16905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16906printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016907
Illia Bobyra96d5442023-08-30 16:30:15 +020016908printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016909
Christian Brabandt9670f612025-05-07 21:44:33 +020016910else case e in #(
16911 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016912printf "%s\n" "no" >&6; };
16913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen() in -ldl" >&5
16914printf %s "checking for dlopen() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016915 olibs=$LIBS
16916 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016918/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016919
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016920int
Illia Bobyra96d5442023-08-30 16:30:15 +020016921main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016922{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016923
16924 extern void* dlopen();
16925 dlopen();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016926
16927 ;
16928 return 0;
16929}
16930_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016931if ac_fn_c_try_link "$LINENO"
16932then :
16933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16934printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016935
Illia Bobyra96d5442023-08-30 16:30:15 +020016936printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016937
Christian Brabandt9670f612025-05-07 21:44:33 +020016938else case e in #(
16939 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016940printf "%s\n" "no" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020016941 LIBS=$olibs ;;
16942esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016943fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016944rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020016945 conftest$ac_exeext conftest.$ac_ext ;;
16946esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000016947fi
Illia Bobyra96d5442023-08-30 16:30:15 +020016948rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016949 conftest$ac_exeext conftest.$ac_ext
Illia Bobyra96d5442023-08-30 16:30:15 +020016950 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym()" >&5
16951printf %s "checking for dlsym()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016953/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016954
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016955int
Illia Bobyra96d5442023-08-30 16:30:15 +020016956main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016957{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016958
16959 extern void* dlsym();
16960 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016961
16962 ;
16963 return 0;
16964}
16965_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016966if ac_fn_c_try_link "$LINENO"
16967then :
16968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16969printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016970
Illia Bobyra96d5442023-08-30 16:30:15 +020016971printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000016972
Christian Brabandt9670f612025-05-07 21:44:33 +020016973else case e in #(
16974 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020016975printf "%s\n" "no" >&6; };
16976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlsym() in -ldl" >&5
16977printf %s "checking for dlsym() in -ldl... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000016978 olibs=$LIBS
16979 LIBS="$LIBS -ldl"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020016980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016981/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000016982
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016983int
Illia Bobyra96d5442023-08-30 16:30:15 +020016984main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016985{
Bram Moolenaar071d4272004-06-13 20:20:40 +000016986
16987 extern void* dlsym();
16988 dlsym();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016989
16990 ;
16991 return 0;
16992}
16993_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020016994if ac_fn_c_try_link "$LINENO"
16995then :
16996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16997printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000016998
Illia Bobyra96d5442023-08-30 16:30:15 +020016999printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000017000
Christian Brabandt9670f612025-05-07 21:44:33 +020017001else case e in #(
17002 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020017003printf "%s\n" "no" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020017004 LIBS=$olibs ;;
17005esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000017006fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017007rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020017008 conftest$ac_exeext conftest.$ac_ext ;;
17009esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000017010fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017011rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017012 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000017013elif test x${DLL} = xdl.h; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017014
Illia Bobyra96d5442023-08-30 16:30:15 +020017015printf "%s\n" "#define HAVE_DL_H 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000017016
Illia Bobyra96d5442023-08-30 16:30:15 +020017017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load()" >&5
17018printf %s "checking for shl_load()... " >&6; }
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017020/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000017021
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017022int
Illia Bobyra96d5442023-08-30 16:30:15 +020017023main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017024{
Bram Moolenaar071d4272004-06-13 20:20:40 +000017025
17026 extern void* shl_load();
17027 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017028
17029 ;
17030 return 0;
17031}
17032_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020017033if ac_fn_c_try_link "$LINENO"
17034then :
17035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17036printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017037
Illia Bobyra96d5442023-08-30 16:30:15 +020017038printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000017039
Christian Brabandt9670f612025-05-07 21:44:33 +020017040else case e in #(
17041 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020017042printf "%s\n" "no" >&6; };
17043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load() in -ldld" >&5
17044printf %s "checking for shl_load() in -ldld... " >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000017045 olibs=$LIBS
17046 LIBS="$LIBS -ldld"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017048/* end confdefs.h. */
Bram Moolenaar071d4272004-06-13 20:20:40 +000017049
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017050int
Illia Bobyra96d5442023-08-30 16:30:15 +020017051main (void)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017052{
Bram Moolenaar071d4272004-06-13 20:20:40 +000017053
17054 extern void* shl_load();
17055 shl_load();
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017056
17057 ;
17058 return 0;
17059}
17060_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020017061if ac_fn_c_try_link "$LINENO"
17062then :
17063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17064printf "%s\n" "yes" >&6; };
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017065
Illia Bobyra96d5442023-08-30 16:30:15 +020017066printf "%s\n" "#define HAVE_SHL_LOAD 1" >>confdefs.h
Bram Moolenaar071d4272004-06-13 20:20:40 +000017067
Christian Brabandt9670f612025-05-07 21:44:33 +020017068else case e in #(
17069 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
Illia Bobyra96d5442023-08-30 16:30:15 +020017070printf "%s\n" "no" >&6; };
Christian Brabandt9670f612025-05-07 21:44:33 +020017071 LIBS=$olibs ;;
17072esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000017073fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017074rm -f core conftest.err conftest.$ac_objext conftest.beam \
Christian Brabandt9670f612025-05-07 21:44:33 +020017075 conftest$ac_exeext conftest.$ac_ext ;;
17076esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000017077fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017078rm -f core conftest.err conftest.$ac_objext conftest.beam \
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017079 conftest$ac_exeext conftest.$ac_ext
Bram Moolenaar071d4272004-06-13 20:20:40 +000017080fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017081ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
17082if test "x$ac_cv_header_setjmp_h" = xyes
17083then :
17084 printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017085
17086fi
17087
Bram Moolenaar071d4272004-06-13 20:20:40 +000017088
Bram Moolenaard0573012017-10-28 21:11:06 +020017089if test "x$MACOS_X" = "xyes" -a -n "$PERL"; then
Bram Moolenaar071d4272004-06-13 20:20:40 +000017090 if echo $LIBS | grep -e '-ldl' >/dev/null; then
17091 LIBS=`echo $LIBS | sed s/-ldl//`
17092 PERL_LIBS="$PERL_LIBS -ldl"
17093 fi
17094fi
17095
Bram Moolenaard0573012017-10-28 21:11:06 +020017096if test "$MACOS_X" = "yes"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need macOS frameworks" >&5
17098printf %s "checking whether we need macOS frameworks... " >&6; }
Bram Moolenaar097148e2020-08-11 21:58:20 +020017099 if test "$MACOS_X_DARWIN" = "yes"; then
Bram Moolenaard0573012017-10-28 21:11:06 +020017100 if test "$features" = "tiny"; then
17101 OS_EXTRA_SRC=`echo "$OS_EXTRA_SRC" | sed -e 's+os_macosx.m++'`
17102 OS_EXTRA_OBJ=`echo "$OS_EXTRA_OBJ" | sed -e 's+objects/os_macosx.o++'`
Illia Bobyra96d5442023-08-30 16:30:15 +020017103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need CoreServices" >&5
17104printf "%s\n" "yes, we need CoreServices" >&6; }
Bram Moolenaar2be7cb72019-01-12 16:10:51 +010017105 LIBS="$LIBS -framework CoreServices"
Bram Moolenaard0573012017-10-28 21:11:06 +020017106 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, we need AppKit" >&5
17108printf "%s\n" "yes, we need AppKit" >&6; }
Bram Moolenaard0573012017-10-28 21:11:06 +020017109 LIBS="$LIBS -framework AppKit"
Bram Moolenaard0573012017-10-28 21:11:06 +020017110 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017111 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17113printf "%s\n" "no" >&6; }
Bram Moolenaar071d4272004-06-13 20:20:40 +000017114 fi
17115fi
17116
Christian Brabandt6b9efdd2021-09-09 17:14:50 +020017117if `echo "$CFLAGS" | grep -v D_REENTRANT >/dev/null`; then
Bram Moolenaar3ae5fc92021-09-06 18:57:30 +020017118 CFLAGS="$CFLAGS -D_REENTRANT"
17119fi
17120
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000017121DEPEND_CFLAGS_FILTER=
17122if test "$GCC" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017123 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GCC 3 or later" >&5
17124printf %s "checking for GCC 3 or later... " >&6; }
Bram Moolenaar348808f2020-02-07 20:50:07 +010017125 gccmajor=`echo "$gccversion" | sed -e 's/^\([1-9][0-9]*\)\..*$/\1/g'`
Bram Moolenaarf740b292006-02-16 22:11:02 +000017126 if test "$gccmajor" -gt "2"; then
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000017127 DEPEND_CFLAGS_FILTER="| sed 's+-I */+-isystem /+g'"
Illia Bobyra96d5442023-08-30 16:30:15 +020017128 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17129printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000017130 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17132printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000017133 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
17135printf %s "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000017136 if test "$gccmajor" -gt "3"; then
Zdenek Dohnal42196982023-01-18 16:09:51 +000017137 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/'`
17138 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 +020017139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17140printf "%s\n" "yes" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000017141 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17143printf "%s\n" "no" >&6; }
Bram Moolenaar0cd49302008-11-20 09:37:01 +000017144 fi
Bram Moolenaara5792f52005-11-23 21:25:05 +000017145fi
Bram Moolenaard5cdbeb2005-10-10 20:59:28 +000017146
Bram Moolenaar071d4272004-06-13 20:20:40 +000017147
Illia Bobyra96d5442023-08-30 16:30:15 +020017148{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we need to force -D_FILE_OFFSET_BITS=64" >&5
17149printf %s "checking whether we need to force -D_FILE_OFFSET_BITS=64... " >&6; }
Bram Moolenaar9ce42132018-04-11 22:19:36 +020017150if 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 +020017151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17152printf "%s\n" "yes" >&6; }
17153 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Bram Moolenaarec0557f2018-01-31 14:41:37 +010017154
17155else
Illia Bobyra96d5442023-08-30 16:30:15 +020017156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17157printf "%s\n" "no" >&6; }
Bram Moolenaarec0557f2018-01-31 14:41:37 +010017158fi
17159
Bram Moolenaar6cd42db2020-12-04 18:09:54 +010017160LDFLAGS=`echo "$LDFLAGS" | sed -e 's/-L /-L/g'`
17161
Illia Bobyra96d5442023-08-30 16:30:15 +020017162{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking linker --as-needed support" >&5
17163printf %s "checking linker --as-needed support... " >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017164LINK_AS_NEEDED=
17165# Check if linker supports --as-needed and --no-as-needed options
17166if $CC -Wl,--help 2>/dev/null | grep as-needed > /dev/null; then
Natanael Copa761ead42021-05-15 14:25:37 +020017167 if ! echo "$LDFLAGS" | grep -q -- '-Wl,[^[:space:]]*--as-needed'; then
17168 LDFLAGS="$LDFLAGS -Wl,--as-needed"
17169 fi
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017170 LINK_AS_NEEDED=yes
17171fi
17172if test "$LINK_AS_NEEDED" = yes; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17174printf "%s\n" "yes" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017175else
Illia Bobyra96d5442023-08-30 16:30:15 +020017176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17177printf "%s\n" "no" >&6; }
Bram Moolenaar22e193d2010-11-03 22:32:24 +010017178fi
17179
17180
Bram Moolenaar77c19352012-06-13 19:19:41 +020017181# IBM z/OS reset CFLAGS for config.mk
17182if test "$zOSUnix" = "yes"; then
17183 CFLAGS="-D_ALL_SOURCE -Wc,float\(ieee\),dll"
17184fi
17185
Bram Moolenaar446cb832008-06-24 21:56:24 +000017186ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
17187
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017188cat >confcache <<\_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017189# This file is a shell script that caches the results of configure
17190# tests run on this system so they can be shared between configure
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017191# scripts and configure runs, see configure's option --config-cache.
17192# It is not useful on other systems. If it contains results you don't
17193# want to keep, you may remove or edit it.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017194#
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017195# config.status only pays attention to the cache file if you give it
17196# the --recheck option to rerun configure.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017197#
Christian Brabandt9670f612025-05-07 21:44:33 +020017198# 'ac_cv_env_foo' variables (set or unset) will be overridden when
17199# loading this file, other *unset* 'ac_cv_foo' will be assigned the
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017200# following values.
17201
17202_ACEOF
17203
Bram Moolenaar071d4272004-06-13 20:20:40 +000017204# The following way of writing the cache mishandles newlines in values,
17205# but we know of no workaround that is simple, portable, and efficient.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017206# So, we kill variables containing newlines.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017207# Ultrix sh set writes to stderr and can't be redirected directly,
17208# and sets the high bit in the cache file unless we assign to the vars.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017209(
17210 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17211 eval ac_val=\$$ac_var
17212 case $ac_val in #(
17213 *${as_nl}*)
17214 case $ac_var in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020017215 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17216printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017217 esac
17218 case $ac_var in #(
17219 _ | IFS | as_nl) ;; #(
17220 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017221 *) { eval $ac_var=; unset $ac_var;} ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017222 esac ;;
17223 esac
17224 done
17225
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017226 (set) 2>&1 |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017227 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17228 *${as_nl}ac_space=\ *)
Christian Brabandt9670f612025-05-07 21:44:33 +020017229 # 'set' does not quote correctly, so add quotes: double-quote
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017230 # substitution turns \\\\ into \\, and sed turns \\ into \.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017231 sed -n \
17232 "s/'/'\\\\''/g;
17233 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017234 ;; #(
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017235 *)
Christian Brabandt9670f612025-05-07 21:44:33 +020017236 # 'set' quotes correctly as required by POSIX, so do not add quotes.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017237 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017238 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017239 esac |
17240 sort
17241) |
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017242 sed '
Bram Moolenaar446cb832008-06-24 21:56:24 +000017243 /^ac_cv_env_/b end
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017244 t clear
Bram Moolenaar446cb832008-06-24 21:56:24 +000017245 :clear
Illia Bobyra96d5442023-08-30 16:30:15 +020017246 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017247 t end
Bram Moolenaar446cb832008-06-24 21:56:24 +000017248 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17249 :end' >>confcache
17250if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17251 if test -w "$cache_file"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017252 if test "x$cache_file" != "x/dev/null"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17254printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
Bram Moolenaar7db77842014-03-27 17:40:59 +010017255 if test ! -f "$cache_file" || test -h "$cache_file"; then
17256 cat confcache >"$cache_file"
17257 else
17258 case $cache_file in #(
17259 */* | ?:*)
17260 mv -f confcache "$cache_file"$$ &&
17261 mv -f "$cache_file"$$ "$cache_file" ;; #(
17262 *)
17263 mv -f confcache "$cache_file" ;;
17264 esac
17265 fi
17266 fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017267 else
Illia Bobyra96d5442023-08-30 16:30:15 +020017268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17269printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
Bram Moolenaar071d4272004-06-13 20:20:40 +000017270 fi
17271fi
17272rm -f confcache
17273
Bram Moolenaar071d4272004-06-13 20:20:40 +000017274test "x$prefix" = xNONE && prefix=$ac_default_prefix
17275# Let make expand exec_prefix.
17276test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17277
Bram Moolenaar071d4272004-06-13 20:20:40 +000017278DEFS=-DHAVE_CONFIG_H
17279
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017280ac_libobjs=
17281ac_ltlibobjs=
Bram Moolenaar7db77842014-03-27 17:40:59 +010017282U=
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017283for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17284 # 1. Remove the extension, and $U if already installed.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017285 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Illia Bobyra96d5442023-08-30 16:30:15 +020017286 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017287 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17288 # will be set to the directory where LIBOBJS objects are built.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017289 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17290 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017291done
17292LIBOBJS=$ac_libobjs
17293
17294LTLIBOBJS=$ac_ltlibobjs
17295
17296
17297
Christian Brabandt9670f612025-05-07 21:44:33 +020017298# Check whether --enable-year2038 was given.
17299if test ${enable_year2038+y}
17300then :
17301 enableval=$enable_year2038;
17302fi
17303
Bram Moolenaar0bbabe82010-05-17 20:32:55 +020017304
Bram Moolenaar7db77842014-03-27 17:40:59 +010017305: "${CONFIG_STATUS=./config.status}"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017306ac_write_fail=0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017307ac_clean_files_save=$ac_clean_files
17308ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Illia Bobyra96d5442023-08-30 16:30:15 +020017309{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17310printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017311as_write_fail=0
17312cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017313#! $SHELL
17314# Generated by $as_me.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017315# Run this file to recreate the current configuration.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017316# Compiler output produced by configure, useful for debugging
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017317# configure, is in config.log if it exists.
Bram Moolenaar071d4272004-06-13 20:20:40 +000017318
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017319debug=false
17320ac_cs_recheck=false
17321ac_cs_silent=false
Bram Moolenaar071d4272004-06-13 20:20:40 +000017322
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017323SHELL=\${CONFIG_SHELL-$SHELL}
17324export SHELL
17325_ASEOF
17326cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17327## -------------------- ##
17328## M4sh Initialization. ##
17329## -------------------- ##
Bram Moolenaar071d4272004-06-13 20:20:40 +000017330
Bram Moolenaar446cb832008-06-24 21:56:24 +000017331# Be more Bourne compatible
17332DUALCASE=1; export DUALCASE # for MKS sh
Illia Bobyra96d5442023-08-30 16:30:15 +020017333if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
17334then :
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017335 emulate sh
17336 NULLCMD=:
Bram Moolenaar446cb832008-06-24 21:56:24 +000017337 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017338 # is contrary to our usage. Disable this feature.
17339 alias -g '${1+"$@"}'='"$@"'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017340 setopt NO_GLOB_SUBST
Christian Brabandt9670f612025-05-07 21:44:33 +020017341else case e in #(
17342 e) case `(set -o) 2>/dev/null` in #(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017343 *posix*) :
17344 set -o posix ;; #(
17345 *) :
17346 ;;
Christian Brabandt9670f612025-05-07 21:44:33 +020017347esac ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017348esac
Bram Moolenaar071d4272004-06-13 20:20:40 +000017349fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017350
17351
Illia Bobyra96d5442023-08-30 16:30:15 +020017352
17353# Reset variables that may have inherited troublesome values from
17354# the environment.
17355
17356# IFS needs to be set, to space, tab, and newline, in precisely that order.
17357# (If _AS_PATH_WALK were called with IFS unset, it would have the
17358# side effect of setting IFS to empty, thus disabling word splitting.)
17359# Quoting is to prevent editors from complaining about space-tab.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017360as_nl='
17361'
17362export as_nl
Illia Bobyra96d5442023-08-30 16:30:15 +020017363IFS=" "" $as_nl"
17364
17365PS1='$ '
17366PS2='> '
17367PS4='+ '
17368
17369# Ensure predictable behavior from utilities with locale-dependent output.
17370LC_ALL=C
17371export LC_ALL
17372LANGUAGE=C
17373export LANGUAGE
17374
17375# We cannot yet rely on "unset" to work, but we need these variables
17376# to be unset--not just set to an empty or harmless value--now, to
17377# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
17378# also avoids known problems related to "unset" and subshell syntax
17379# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
17380for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
17381do eval test \${$as_var+y} \
17382 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17383done
17384
17385# Ensure that fds 0, 1, and 2 are open.
17386if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
17387if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
17388if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017389
17390# The user is always right.
Illia Bobyra96d5442023-08-30 16:30:15 +020017391if ${PATH_SEPARATOR+false} :; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017392 PATH_SEPARATOR=:
17393 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17394 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17395 PATH_SEPARATOR=';'
17396 }
17397fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000017398
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017399
Bram Moolenaar446cb832008-06-24 21:56:24 +000017400# Find who we are. Look in the path if we contain no directory separator.
Bram Moolenaar7db77842014-03-27 17:40:59 +010017401as_myself=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017402case $0 in #((
Bram Moolenaar446cb832008-06-24 21:56:24 +000017403 *[\\/]* ) as_myself=$0 ;;
17404 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17405for as_dir in $PATH
17406do
17407 IFS=$as_save_IFS
Illia Bobyra96d5442023-08-30 16:30:15 +020017408 case $as_dir in #(((
17409 '') as_dir=./ ;;
17410 */) ;;
17411 *) as_dir=$as_dir/ ;;
17412 esac
17413 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017414 done
Bram Moolenaar446cb832008-06-24 21:56:24 +000017415IFS=$as_save_IFS
17416
17417 ;;
17418esac
Christian Brabandt9670f612025-05-07 21:44:33 +020017419# We did not find ourselves, most probably we were run as 'sh COMMAND'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017420# in which case we are not to be found in the path.
17421if test "x$as_myself" = x; then
17422 as_myself=$0
17423fi
17424if test ! -f "$as_myself"; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017425 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017426 exit 1
Bram Moolenaar446cb832008-06-24 21:56:24 +000017427fi
17428
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017429
17430
Bram Moolenaar7db77842014-03-27 17:40:59 +010017431# as_fn_error STATUS ERROR [LINENO LOG_FD]
17432# ----------------------------------------
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017433# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17434# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Bram Moolenaar7db77842014-03-27 17:40:59 +010017435# script with STATUS, using 1 if that was 0.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017436as_fn_error ()
17437{
Bram Moolenaar7db77842014-03-27 17:40:59 +010017438 as_status=$1; test $as_status -eq 0 && as_status=1
17439 if test "$4"; then
17440 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Illia Bobyra96d5442023-08-30 16:30:15 +020017441 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017442 fi
Illia Bobyra96d5442023-08-30 16:30:15 +020017443 printf "%s\n" "$as_me: error: $2" >&2
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017444 as_fn_exit $as_status
17445} # as_fn_error
17446
17447
17448# as_fn_set_status STATUS
17449# -----------------------
17450# Set $? to STATUS, without forking.
17451as_fn_set_status ()
17452{
17453 return $1
17454} # as_fn_set_status
17455
17456# as_fn_exit STATUS
17457# -----------------
17458# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17459as_fn_exit ()
17460{
17461 set +e
17462 as_fn_set_status $1
17463 exit $1
17464} # as_fn_exit
17465
17466# as_fn_unset VAR
17467# ---------------
17468# Portably unset VAR.
17469as_fn_unset ()
17470{
17471 { eval $1=; unset $1;}
17472}
17473as_unset=as_fn_unset
Illia Bobyra96d5442023-08-30 16:30:15 +020017474
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017475# as_fn_append VAR VALUE
17476# ----------------------
17477# Append the text in VALUE to the end of the definition contained in VAR. Take
17478# advantage of any shell optimizations that allow amortized linear growth over
17479# repeated appends, instead of the typical quadratic growth present in naive
17480# implementations.
Illia Bobyra96d5442023-08-30 16:30:15 +020017481if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
17482then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017483 eval 'as_fn_append ()
17484 {
17485 eval $1+=\$2
17486 }'
Christian Brabandt9670f612025-05-07 21:44:33 +020017487else case e in #(
17488 e) as_fn_append ()
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017489 {
17490 eval $1=\$$1\$2
Christian Brabandt9670f612025-05-07 21:44:33 +020017491 } ;;
17492esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017493fi # as_fn_append
17494
17495# as_fn_arith ARG...
17496# ------------------
17497# Perform arithmetic evaluation on the ARGs, and store the result in the
17498# global $as_val. Take advantage of shells that can avoid forks. The arguments
17499# must be portable across $(()) and expr.
Illia Bobyra96d5442023-08-30 16:30:15 +020017500if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
17501then :
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017502 eval 'as_fn_arith ()
17503 {
17504 as_val=$(( $* ))
17505 }'
Christian Brabandt9670f612025-05-07 21:44:33 +020017506else case e in #(
17507 e) as_fn_arith ()
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017508 {
17509 as_val=`expr "$@" || test $? -eq 1`
Christian Brabandt9670f612025-05-07 21:44:33 +020017510 } ;;
17511esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017512fi # as_fn_arith
17513
17514
Bram Moolenaar446cb832008-06-24 21:56:24 +000017515if expr a : '\(a\)' >/dev/null 2>&1 &&
17516 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017517 as_expr=expr
17518else
17519 as_expr=false
17520fi
17521
Bram Moolenaar446cb832008-06-24 21:56:24 +000017522if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017523 as_basename=basename
17524else
17525 as_basename=false
17526fi
17527
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017528if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17529 as_dirname=dirname
17530else
17531 as_dirname=false
17532fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017533
Bram Moolenaar446cb832008-06-24 21:56:24 +000017534as_me=`$as_basename -- "$0" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017535$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17536 X"$0" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000017537 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017538printf "%s\n" X/"$0" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000017539 sed '/^.*\/\([^/][^/]*\)\/*$/{
17540 s//\1/
17541 q
17542 }
17543 /^X\/\(\/\/\)$/{
17544 s//\1/
17545 q
17546 }
17547 /^X\/\(\/\).*/{
17548 s//\1/
17549 q
17550 }
17551 s/.*/./; q'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017552
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017553# Avoid depending upon Character Ranges.
17554as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17555as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17556as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17557as_cr_digits='0123456789'
17558as_cr_alnum=$as_cr_Letters$as_cr_digits
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017559
Illia Bobyra96d5442023-08-30 16:30:15 +020017560
17561# Determine whether it's possible to make 'echo' print without a newline.
17562# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
17563# for compatibility with existing Makefiles.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017564ECHO_C= ECHO_N= ECHO_T=
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017565case `echo -n x` in #(((((
Bram Moolenaar446cb832008-06-24 21:56:24 +000017566-n*)
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017567 case `echo 'xy\c'` in
Bram Moolenaar446cb832008-06-24 21:56:24 +000017568 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017569 xy) ECHO_C='\c';;
17570 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17571 ECHO_T=' ';;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017572 esac;;
17573*)
17574 ECHO_N='-n';;
17575esac
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017576
Illia Bobyra96d5442023-08-30 16:30:15 +020017577# For backward compatibility with old third-party macros, we provide
17578# the shell variables $as_echo and $as_echo_n. New code should use
17579# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
17580as_echo='printf %s\n'
17581as_echo_n='printf %s'
17582
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017583rm -f conf$$ conf$$.exe conf$$.file
Bram Moolenaar446cb832008-06-24 21:56:24 +000017584if test -d conf$$.dir; then
17585 rm -f conf$$.dir/conf$$.file
17586else
17587 rm -f conf$$.dir
17588 mkdir conf$$.dir 2>/dev/null
17589fi
17590if (echo >conf$$.file) 2>/dev/null; then
17591 if ln -s conf$$.file conf$$ 2>/dev/null; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017592 as_ln_s='ln -s'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017593 # ... but there are two gotchas:
Christian Brabandt9670f612025-05-07 21:44:33 +020017594 # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
17595 # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
17596 # In both cases, we have to default to 'cp -pR'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017597 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017598 as_ln_s='cp -pR'
Bram Moolenaar446cb832008-06-24 21:56:24 +000017599 elif ln conf$$.file conf$$ 2>/dev/null; then
17600 as_ln_s=ln
17601 else
Bram Moolenaar7db77842014-03-27 17:40:59 +010017602 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017603 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017604else
Bram Moolenaar7db77842014-03-27 17:40:59 +010017605 as_ln_s='cp -pR'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017606fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017607rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17608rmdir conf$$.dir 2>/dev/null
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017609
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017610
17611# as_fn_mkdir_p
17612# -------------
17613# Create "$as_dir" as a directory, including parents if necessary.
17614as_fn_mkdir_p ()
17615{
17616
17617 case $as_dir in #(
17618 -*) as_dir=./$as_dir;;
17619 esac
17620 test -d "$as_dir" || eval $as_mkdir_p || {
17621 as_dirs=
17622 while :; do
17623 case $as_dir in #(
Illia Bobyra96d5442023-08-30 16:30:15 +020017624 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017625 *) as_qdir=$as_dir;;
17626 esac
17627 as_dirs="'$as_qdir' $as_dirs"
17628 as_dir=`$as_dirname -- "$as_dir" ||
17629$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17630 X"$as_dir" : 'X\(//\)[^/]' \| \
17631 X"$as_dir" : 'X\(//\)$' \| \
17632 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020017633printf "%s\n" X"$as_dir" |
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017634 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17635 s//\1/
17636 q
17637 }
17638 /^X\(\/\/\)[^/].*/{
17639 s//\1/
17640 q
17641 }
17642 /^X\(\/\/\)$/{
17643 s//\1/
17644 q
17645 }
17646 /^X\(\/\).*/{
17647 s//\1/
17648 q
17649 }
17650 s/.*/./; q'`
17651 test -d "$as_dir" && break
17652 done
17653 test -z "$as_dirs" || eval "mkdir $as_dirs"
Bram Moolenaar7db77842014-03-27 17:40:59 +010017654 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017655
17656
17657} # as_fn_mkdir_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017658if mkdir -p . 2>/dev/null; then
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017659 as_mkdir_p='mkdir -p "$as_dir"'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017660else
17661 test -d ./-p && rmdir ./-p
17662 as_mkdir_p=false
17663fi
17664
Bram Moolenaar7db77842014-03-27 17:40:59 +010017665
17666# as_fn_executable_p FILE
17667# -----------------------
17668# Test if FILE is an executable regular file.
17669as_fn_executable_p ()
17670{
17671 test -f "$1" && test -x "$1"
17672} # as_fn_executable_p
17673as_test_x='test -x'
17674as_executable_p=as_fn_executable_p
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017675
17676# Sed expression to map a string onto a valid CPP name.
Christian Brabandt9670f612025-05-07 21:44:33 +020017677as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
17678as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017679
17680# Sed expression to map a string onto a valid variable name.
Christian Brabandt9670f612025-05-07 21:44:33 +020017681as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
17682as_tr_sh="eval sed '$as_sed_sh'" # deprecated
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017683
17684
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017685exec 6>&1
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017686## ----------------------------------- ##
17687## Main body of $CONFIG_STATUS script. ##
17688## ----------------------------------- ##
17689_ASEOF
17690test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017691
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017692cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17693# Save the log message, to keep $0 and so on meaningful, and to
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017694# report actual input values of CONFIG_FILES etc. instead of their
Bram Moolenaar446cb832008-06-24 21:56:24 +000017695# values after options handling.
17696ac_log="
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017697This file was extended by $as_me, which was
Christian Brabandt9670f612025-05-07 21:44:33 +020017698generated by GNU Autoconf 2.72. Invocation command line was
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017699
17700 CONFIG_FILES = $CONFIG_FILES
17701 CONFIG_HEADERS = $CONFIG_HEADERS
17702 CONFIG_LINKS = $CONFIG_LINKS
17703 CONFIG_COMMANDS = $CONFIG_COMMANDS
17704 $ $0 $@
17705
Bram Moolenaar446cb832008-06-24 21:56:24 +000017706on `(hostname || uname -n) 2>/dev/null | sed 1q`
17707"
17708
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017709_ACEOF
17710
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017711case $ac_config_files in *"
17712"*) set x $ac_config_files; shift; ac_config_files=$*;;
17713esac
17714
17715case $ac_config_headers in *"
17716"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17717esac
17718
17719
Bram Moolenaar446cb832008-06-24 21:56:24 +000017720cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017721# Files that config.status was made for.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017722config_files="$ac_config_files"
17723config_headers="$ac_config_headers"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017724
Bram Moolenaar446cb832008-06-24 21:56:24 +000017725_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017726
Bram Moolenaar446cb832008-06-24 21:56:24 +000017727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017728ac_cs_usage="\
Christian Brabandt9670f612025-05-07 21:44:33 +020017729'$as_me' instantiates files and other configuration actions
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017730from templates according to the current configuration. Unless the files
17731and actions are specified as TAGs, all are instantiated by default.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017732
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017733Usage: $0 [OPTION]... [TAG]...
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017734
17735 -h, --help print this help, then exit
Bram Moolenaar446cb832008-06-24 21:56:24 +000017736 -V, --version print version number and configuration settings, then exit
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017737 --config print configuration, then exit
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017738 -q, --quiet, --silent
17739 do not print progress messages
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017740 -d, --debug don't remove temporary files
17741 --recheck update $as_me by reconfiguring in the same conditions
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017742 --file=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000017743 instantiate the configuration file FILE
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017744 --header=FILE[:TEMPLATE]
Bram Moolenaar446cb832008-06-24 21:56:24 +000017745 instantiate the configuration header FILE
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017746
17747Configuration files:
17748$config_files
17749
17750Configuration headers:
17751$config_headers
17752
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017753Report bugs to the package provider."
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017754
Bram Moolenaar446cb832008-06-24 21:56:24 +000017755_ACEOF
Illia Bobyra96d5442023-08-30 16:30:15 +020017756ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
17757ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017758cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Illia Bobyra96d5442023-08-30 16:30:15 +020017759ac_cs_config='$ac_cs_config_escaped'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017760ac_cs_version="\\
17761config.status
Christian Brabandt9670f612025-05-07 21:44:33 +020017762configured by $0, generated by GNU Autoconf 2.72,
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017763 with options \\"\$ac_cs_config\\"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017764
Christian Brabandt9670f612025-05-07 21:44:33 +020017765Copyright (C) 2023 Free Software Foundation, Inc.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017766This config.status script is free software; the Free Software Foundation
17767gives unlimited permission to copy, distribute and modify it."
Bram Moolenaar446cb832008-06-24 21:56:24 +000017768
17769ac_pwd='$ac_pwd'
17770srcdir='$srcdir'
17771AWK='$AWK'
17772test -n "\$AWK" || AWK=awk
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017773_ACEOF
17774
Bram Moolenaar446cb832008-06-24 21:56:24 +000017775cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17776# The default lists apply if the user does not specify any file.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017777ac_need_defaults=:
17778while test $# != 0
17779do
17780 case $1 in
Bram Moolenaar7db77842014-03-27 17:40:59 +010017781 --*=?*)
Bram Moolenaar446cb832008-06-24 21:56:24 +000017782 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17783 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017784 ac_shift=:
17785 ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017786 --*=)
17787 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17788 ac_optarg=
17789 ac_shift=:
17790 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017791 *)
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017792 ac_option=$1
17793 ac_optarg=$2
17794 ac_shift=shift
17795 ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017796 esac
17797
17798 case $ac_option in
17799 # Handling of the options.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017800 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17801 ac_cs_recheck=: ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017802 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Illia Bobyra96d5442023-08-30 16:30:15 +020017803 printf "%s\n" "$ac_cs_version"; exit ;;
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017804 --config | --confi | --conf | --con | --co | --c )
Illia Bobyra96d5442023-08-30 16:30:15 +020017805 printf "%s\n" "$ac_cs_config"; exit ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017806 --debug | --debu | --deb | --de | --d | -d )
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017807 debug=: ;;
17808 --file | --fil | --fi | --f )
17809 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000017810 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020017811 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar7db77842014-03-27 17:40:59 +010017812 '') as_fn_error $? "missing file argument" ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017813 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017814 as_fn_append CONFIG_FILES " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017815 ac_need_defaults=false;;
17816 --header | --heade | --head | --hea )
17817 $ac_shift
Bram Moolenaar446cb832008-06-24 21:56:24 +000017818 case $ac_optarg in
Illia Bobyra96d5442023-08-30 16:30:15 +020017819 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017820 esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017821 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017822 ac_need_defaults=false;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017823 --he | --h)
17824 # Conflict between --help and --header
Christian Brabandt9670f612025-05-07 21:44:33 +020017825 as_fn_error $? "ambiguous option: '$1'
17826Try '$0 --help' for more information.";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000017827 --help | --hel | -h )
Illia Bobyra96d5442023-08-30 16:30:15 +020017828 printf "%s\n" "$ac_cs_usage"; exit ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017829 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17830 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17831 ac_cs_silent=: ;;
17832
17833 # This is an error.
Christian Brabandt9670f612025-05-07 21:44:33 +020017834 -*) as_fn_error $? "unrecognized option: '$1'
17835Try '$0 --help' for more information." ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017836
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017837 *) as_fn_append ac_config_targets " $1"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017838 ac_need_defaults=false ;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017839
17840 esac
17841 shift
17842done
17843
17844ac_configure_extra_args=
17845
17846if $ac_cs_silent; then
17847 exec 6>/dev/null
17848 ac_configure_extra_args="$ac_configure_extra_args --silent"
17849fi
17850
17851_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017852cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017853if \$ac_cs_recheck; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017854 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Bram Moolenaar446cb832008-06-24 21:56:24 +000017855 shift
Illia Bobyra96d5442023-08-30 16:30:15 +020017856 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
Bram Moolenaar446cb832008-06-24 21:56:24 +000017857 CONFIG_SHELL='$SHELL'
17858 export CONFIG_SHELL
17859 exec "\$@"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017860fi
17861
17862_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017863cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17864exec 5>>auto/config.log
17865{
17866 echo
17867 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17868## Running $as_me. ##
17869_ASBOX
Illia Bobyra96d5442023-08-30 16:30:15 +020017870 printf "%s\n" "$ac_log"
Bram Moolenaar446cb832008-06-24 21:56:24 +000017871} >&5
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017872
Bram Moolenaar446cb832008-06-24 21:56:24 +000017873_ACEOF
17874cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17875_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017876
Bram Moolenaar446cb832008-06-24 21:56:24 +000017877cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017878
Bram Moolenaar446cb832008-06-24 21:56:24 +000017879# Handling of arguments.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017880for ac_config_target in $ac_config_targets
17881do
Bram Moolenaar446cb832008-06-24 21:56:24 +000017882 case $ac_config_target in
17883 "auto/config.h") CONFIG_HEADERS="$CONFIG_HEADERS auto/config.h:config.h.in" ;;
17884 "auto/config.mk") CONFIG_FILES="$CONFIG_FILES auto/config.mk:config.mk.in" ;;
17885
Christian Brabandt9670f612025-05-07 21:44:33 +020017886 *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017887 esac
17888done
17889
Bram Moolenaar446cb832008-06-24 21:56:24 +000017890
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017891# If the user did not use the arguments to specify the items to instantiate,
17892# then the envvar interface is used. Set only those that are not.
17893# We use the long form for the default assignment because of an extremely
17894# bizarre bug on SunOS 4.1.3.
17895if $ac_need_defaults; then
Illia Bobyra96d5442023-08-30 16:30:15 +020017896 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
17897 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017898fi
17899
17900# Have a temporary directory for convenience. Make it in the build tree
Bram Moolenaar446cb832008-06-24 21:56:24 +000017901# simply because there is no reason against having it here, and in addition,
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017902# creating and moving files from /tmp can sometimes cause problems.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017903# Hook for its removal unless debugging.
17904# Note that there is a small window in which the directory will not be cleaned:
Christian Brabandt9670f612025-05-07 21:44:33 +020017905# after its creation but before its name has been assigned to '$tmp'.
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017906$debug ||
17907{
Bram Moolenaar7db77842014-03-27 17:40:59 +010017908 tmp= ac_tmp=
Bram Moolenaar446cb832008-06-24 21:56:24 +000017909 trap 'exit_status=$?
Bram Moolenaar7db77842014-03-27 17:40:59 +010017910 : "${ac_tmp:=$tmp}"
17911 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Bram Moolenaar446cb832008-06-24 21:56:24 +000017912' 0
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017913 trap 'as_fn_exit 1' 1 2 13 15
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017914}
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017915# Create a (secure) tmp directory for tmp files.
17916
17917{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017918 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010017919 test -d "$tmp"
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017920} ||
17921{
Bram Moolenaar446cb832008-06-24 21:56:24 +000017922 tmp=./conf$$-$RANDOM
17923 (umask 077 && mkdir "$tmp")
Bram Moolenaar7db77842014-03-27 17:40:59 +010017924} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
17925ac_tmp=$tmp
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017926
Bram Moolenaar446cb832008-06-24 21:56:24 +000017927# Set up the scripts for CONFIG_FILES section.
17928# No need to generate them if there are no CONFIG_FILES.
Christian Brabandt9670f612025-05-07 21:44:33 +020017929# This happens for instance with './config.status config.h'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000017930if test -n "$CONFIG_FILES"; then
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017931
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017932
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017933ac_cr=`echo X | tr X '\015'`
17934# On cygwin, bash can eat \r inside `` if the user requested igncr.
17935# But we know of no other shell where ac_cr would be empty at this
17936# point, so we can use a bashism as a fallback.
17937if test "x$ac_cr" = x; then
17938 eval ac_cr=\$\'\\r\'
17939fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000017940ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17941if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017942 ac_cs_awk_cr='\\r'
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017943else
Bram Moolenaar446cb832008-06-24 21:56:24 +000017944 ac_cs_awk_cr=$ac_cr
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017945fi
17946
Bram Moolenaar7db77842014-03-27 17:40:59 +010017947echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017948_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000017949
Bram Moolenaar446cb832008-06-24 21:56:24 +000017950
17951{
17952 echo "cat >conf$$subs.awk <<_ACEOF" &&
17953 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17954 echo "_ACEOF"
17955} >conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017956 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17957ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000017958ac_delim='%!_!# '
17959for ac_last_try in false false false false false :; do
17960 . ./conf$$subs.sh ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010017961 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017962
Bram Moolenaar32f31b12009-05-21 13:20:59 +000017963 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17964 if test $ac_delim_n = $ac_delim_num; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000017965 break
17966 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010017967 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000017968 else
17969 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17970 fi
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017971done
Bram Moolenaar446cb832008-06-24 21:56:24 +000017972rm -f conf$$subs.sh
17973
17974cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010017975cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Bram Moolenaar495de9c2005-01-25 22:03:25 +000017976_ACEOF
Bram Moolenaar446cb832008-06-24 21:56:24 +000017977sed -n '
17978h
17979s/^/S["/; s/!.*/"]=/
17980p
17981g
17982s/^[^!]*!//
17983:repl
17984t repl
17985s/'"$ac_delim"'$//
17986t delim
17987:nl
17988h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020017989s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000017990t more1
17991s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17992p
17993n
17994b repl
17995:more1
17996s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17997p
17998g
17999s/.\{148\}//
18000t nl
18001:delim
18002h
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018003s/\(.\{148\}\)..*/\1/
Bram Moolenaar446cb832008-06-24 21:56:24 +000018004t more2
18005s/["\\]/\\&/g; s/^/"/; s/$/"/
18006p
18007b
18008:more2
18009s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18010p
18011g
18012s/.\{148\}//
18013t delim
18014' <conf$$subs.awk | sed '
18015/^[^""]/{
18016 N
18017 s/\n//
18018}
18019' >>$CONFIG_STATUS || ac_write_fail=1
18020rm -f conf$$subs.awk
18021cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18022_ACAWK
Bram Moolenaar7db77842014-03-27 17:40:59 +010018023cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Bram Moolenaar446cb832008-06-24 21:56:24 +000018024 for (key in S) S_is_set[key] = 1
18025 FS = ""
Bram Moolenaar071d4272004-06-13 20:20:40 +000018026
Bram Moolenaar446cb832008-06-24 21:56:24 +000018027}
18028{
18029 line = $ 0
18030 nfields = split(line, field, "@")
18031 substed = 0
18032 len = length(field[1])
18033 for (i = 2; i < nfields; i++) {
18034 key = field[i]
18035 keylen = length(key)
18036 if (S_is_set[key]) {
18037 value = S[key]
18038 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18039 len += length(value) + length(field[++i])
18040 substed = 1
18041 } else
18042 len += 1 + keylen
18043 }
Bram Moolenaar071d4272004-06-13 20:20:40 +000018044
Bram Moolenaar446cb832008-06-24 21:56:24 +000018045 print line
18046}
Bram Moolenaar071d4272004-06-13 20:20:40 +000018047
Bram Moolenaar446cb832008-06-24 21:56:24 +000018048_ACAWK
18049_ACEOF
18050cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18051if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18052 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18053else
18054 cat
Bram Moolenaar7db77842014-03-27 17:40:59 +010018055fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18056 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018057_ACEOF
18058
Bram Moolenaar7db77842014-03-27 17:40:59 +010018059# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18060# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Bram Moolenaar446cb832008-06-24 21:56:24 +000018061# trailing colons and then remove the whole line if VPATH becomes empty
18062# (actually we leave an empty line to preserve line numbers).
18063if test "x$srcdir" = x.; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010018064 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18065h
18066s///
18067s/^/:/
18068s/[ ]*$/:/
18069s/:\$(srcdir):/:/g
18070s/:\${srcdir}:/:/g
18071s/:@srcdir@:/:/g
18072s/^:*//
Bram Moolenaar446cb832008-06-24 21:56:24 +000018073s/:*$//
Bram Moolenaar7db77842014-03-27 17:40:59 +010018074x
18075s/\(=[ ]*\).*/\1/
18076G
18077s/\n//
Bram Moolenaar446cb832008-06-24 21:56:24 +000018078s/^[^=]*=[ ]*$//
18079}'
18080fi
18081
18082cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18083fi # test -n "$CONFIG_FILES"
18084
18085# Set up the scripts for CONFIG_HEADERS section.
18086# No need to generate them if there are no CONFIG_HEADERS.
Christian Brabandt9670f612025-05-07 21:44:33 +020018087# This happens for instance with './config.status Makefile'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000018088if test -n "$CONFIG_HEADERS"; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010018089cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Bram Moolenaar446cb832008-06-24 21:56:24 +000018090BEGIN {
18091_ACEOF
18092
Christian Brabandt9670f612025-05-07 21:44:33 +020018093# Transform confdefs.h into an awk script 'defines.awk', embedded as
Bram Moolenaar446cb832008-06-24 21:56:24 +000018094# here-document in config.status, that substitutes the proper values into
18095# config.h.in to produce config.h.
18096
18097# Create a delimiter string that does not exist in confdefs.h, to ease
18098# handling of long lines.
18099ac_delim='%!_!# '
18100for ac_last_try in false false :; do
Bram Moolenaar7db77842014-03-27 17:40:59 +010018101 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18102 if test -z "$ac_tt"; then
Bram Moolenaar446cb832008-06-24 21:56:24 +000018103 break
18104 elif $ac_last_try; then
Bram Moolenaar7db77842014-03-27 17:40:59 +010018105 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018106 else
18107 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18108 fi
18109done
18110
18111# For the awk script, D is an array of macro values keyed by name,
18112# likewise P contains macro parameters if any. Preserve backslash
18113# newline sequences.
18114
18115ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18116sed -n '
18117s/.\{148\}/&'"$ac_delim"'/g
18118t rset
18119:rset
18120s/^[ ]*#[ ]*define[ ][ ]*/ /
18121t def
18122d
18123:def
18124s/\\$//
18125t bsnl
18126s/["\\]/\\&/g
18127s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18128D["\1"]=" \3"/p
18129s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18130d
18131:bsnl
18132s/["\\]/\\&/g
18133s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18134D["\1"]=" \3\\\\\\n"\\/p
18135t cont
18136s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18137t cont
18138d
18139:cont
18140n
18141s/.\{148\}/&'"$ac_delim"'/g
18142t clear
18143:clear
18144s/\\$//
18145t bsnlc
18146s/["\\]/\\&/g; s/^/"/; s/$/"/p
18147d
18148:bsnlc
18149s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18150b cont
18151' <confdefs.h | sed '
18152s/'"$ac_delim"'/"\\\
18153"/g' >>$CONFIG_STATUS || ac_write_fail=1
18154
18155cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18156 for (key in D) D_is_set[key] = 1
18157 FS = ""
18158}
18159/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18160 line = \$ 0
18161 split(line, arg, " ")
18162 if (arg[1] == "#") {
18163 defundef = arg[2]
18164 mac1 = arg[3]
18165 } else {
18166 defundef = substr(arg[1], 2)
18167 mac1 = arg[2]
18168 }
18169 split(mac1, mac2, "(") #)
18170 macro = mac2[1]
Bram Moolenaar32f31b12009-05-21 13:20:59 +000018171 prefix = substr(line, 1, index(line, defundef) - 1)
Bram Moolenaar446cb832008-06-24 21:56:24 +000018172 if (D_is_set[macro]) {
18173 # Preserve the white space surrounding the "#".
Bram Moolenaar446cb832008-06-24 21:56:24 +000018174 print prefix "define", macro P[macro] D[macro]
18175 next
18176 } else {
18177 # Replace #undef with comments. This is necessary, for example,
18178 # in the case of _POSIX_SOURCE, which is predefined and required
18179 # on some systems where configure will not decide to define it.
18180 if (defundef == "undef") {
Bram Moolenaar32f31b12009-05-21 13:20:59 +000018181 print "/*", prefix defundef, macro, "*/"
Bram Moolenaar446cb832008-06-24 21:56:24 +000018182 next
18183 }
18184 }
18185}
18186{ print }
18187_ACAWK
18188_ACEOF
18189cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Bram Moolenaar7db77842014-03-27 17:40:59 +010018190 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018191fi # test -n "$CONFIG_HEADERS"
18192
18193
18194eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18195shift
18196for ac_tag
18197do
18198 case $ac_tag in
18199 :[FHLC]) ac_mode=$ac_tag; continue;;
18200 esac
18201 case $ac_mode$ac_tag in
18202 :[FHL]*:*);;
Christian Brabandt9670f612025-05-07 21:44:33 +020018203 :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018204 :[FH]-) ac_tag=-:-;;
18205 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18206 esac
18207 ac_save_IFS=$IFS
18208 IFS=:
18209 set x $ac_tag
18210 IFS=$ac_save_IFS
18211 shift
18212 ac_file=$1
18213 shift
18214
18215 case $ac_mode in
18216 :L) ac_source=$1;;
18217 :[FH])
18218 ac_file_inputs=
18219 for ac_f
18220 do
18221 case $ac_f in
Bram Moolenaar7db77842014-03-27 17:40:59 +010018222 -) ac_f="$ac_tmp/stdin";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018223 *) # Look for the file first in the build tree, then in the source tree
18224 # (if the path is not absolute). The absolute path cannot be DOS-style,
Christian Brabandt9670f612025-05-07 21:44:33 +020018225 # because $ac_f cannot contain ':'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000018226 test -f "$ac_f" ||
18227 case $ac_f in
18228 [\\/$]*) false;;
18229 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18230 esac ||
Christian Brabandt9670f612025-05-07 21:44:33 +020018231 as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018232 esac
Illia Bobyra96d5442023-08-30 16:30:15 +020018233 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018234 as_fn_append ac_file_inputs " '$ac_f'"
Bram Moolenaar446cb832008-06-24 21:56:24 +000018235 done
18236
Christian Brabandt9670f612025-05-07 21:44:33 +020018237 # Let's still pretend it is 'configure' which instantiates (i.e., don't
Bram Moolenaar446cb832008-06-24 21:56:24 +000018238 # use $as_me), people would be surprised to read:
18239 # /* config.h. Generated by config.status. */
18240 configure_input='Generated from '`
Illia Bobyra96d5442023-08-30 16:30:15 +020018241 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
Bram Moolenaar446cb832008-06-24 21:56:24 +000018242 `' by configure.'
18243 if test x"$ac_file" != x-; then
18244 configure_input="$ac_file. $configure_input"
Illia Bobyra96d5442023-08-30 16:30:15 +020018245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18246printf "%s\n" "$as_me: creating $ac_file" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018247 fi
18248 # Neutralize special characters interpreted by sed in replacement strings.
18249 case $configure_input in #(
18250 *\&* | *\|* | *\\* )
Illia Bobyra96d5442023-08-30 16:30:15 +020018251 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000018252 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18253 *) ac_sed_conf_input=$configure_input;;
18254 esac
18255
18256 case $ac_tag in
Bram Moolenaar7db77842014-03-27 17:40:59 +010018257 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18258 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018259 esac
18260 ;;
Bram Moolenaar071d4272004-06-13 20:20:40 +000018261 esac
18262
Bram Moolenaar446cb832008-06-24 21:56:24 +000018263 ac_dir=`$as_dirname -- "$ac_file" ||
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018264$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18265 X"$ac_file" : 'X\(//\)[^/]' \| \
18266 X"$ac_file" : 'X\(//\)$' \| \
Bram Moolenaar446cb832008-06-24 21:56:24 +000018267 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Illia Bobyra96d5442023-08-30 16:30:15 +020018268printf "%s\n" X"$ac_file" |
Bram Moolenaar446cb832008-06-24 21:56:24 +000018269 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18270 s//\1/
18271 q
18272 }
18273 /^X\(\/\/\)[^/].*/{
18274 s//\1/
18275 q
18276 }
18277 /^X\(\/\/\)$/{
18278 s//\1/
18279 q
18280 }
18281 /^X\(\/\).*/{
18282 s//\1/
18283 q
18284 }
18285 s/.*/./; q'`
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018286 as_dir="$ac_dir"; as_fn_mkdir_p
Bram Moolenaar446cb832008-06-24 21:56:24 +000018287 ac_builddir=.
Bram Moolenaar071d4272004-06-13 20:20:40 +000018288
Bram Moolenaar446cb832008-06-24 21:56:24 +000018289case "$ac_dir" in
18290.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18291*)
Illia Bobyra96d5442023-08-30 16:30:15 +020018292 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000018293 # A ".." for each directory in $ac_dir_suffix.
Illia Bobyra96d5442023-08-30 16:30:15 +020018294 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Bram Moolenaar446cb832008-06-24 21:56:24 +000018295 case $ac_top_builddir_sub in
18296 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18297 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18298 esac ;;
18299esac
18300ac_abs_top_builddir=$ac_pwd
18301ac_abs_builddir=$ac_pwd$ac_dir_suffix
18302# for backward compatibility:
18303ac_top_builddir=$ac_top_build_prefix
18304
18305case $srcdir in
18306 .) # We are building in place.
18307 ac_srcdir=.
18308 ac_top_srcdir=$ac_top_builddir_sub
18309 ac_abs_top_srcdir=$ac_pwd ;;
18310 [\\/]* | ?:[\\/]* ) # Absolute name.
18311 ac_srcdir=$srcdir$ac_dir_suffix;
18312 ac_top_srcdir=$srcdir
18313 ac_abs_top_srcdir=$srcdir ;;
18314 *) # Relative name.
18315 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18316 ac_top_srcdir=$ac_top_build_prefix$srcdir
18317 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18318esac
18319ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18320
18321
18322 case $ac_mode in
18323 :F)
18324 #
18325 # CONFIG_FILE
18326 #
18327
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018328_ACEOF
Bram Moolenaar071d4272004-06-13 20:20:40 +000018329
Bram Moolenaar446cb832008-06-24 21:56:24 +000018330cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18331# If the template does not know about datarootdir, expand it.
18332# FIXME: This hack should be removed a few years after 2.60.
18333ac_datarootdir_hack=; ac_datarootdir_seen=
Bram Moolenaar446cb832008-06-24 21:56:24 +000018334ac_sed_dataroot='
18335/datarootdir/ {
18336 p
18337 q
18338}
18339/@datadir@/p
18340/@docdir@/p
18341/@infodir@/p
18342/@localedir@/p
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018343/@mandir@/p'
Bram Moolenaar446cb832008-06-24 21:56:24 +000018344case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18345*datarootdir*) ac_datarootdir_seen=yes;;
18346*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Illia Bobyra96d5442023-08-30 16:30:15 +020018347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18348printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018349_ACEOF
18350cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18351 ac_datarootdir_hack='
18352 s&@datadir@&$datadir&g
18353 s&@docdir@&$docdir&g
18354 s&@infodir@&$infodir&g
18355 s&@localedir@&$localedir&g
18356 s&@mandir@&$mandir&g
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018357 s&\\\${datarootdir}&$datarootdir&g' ;;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018358esac
18359_ACEOF
18360
Christian Brabandt9670f612025-05-07 21:44:33 +020018361# Neutralize VPATH when '$srcdir' = '.'.
Bram Moolenaar446cb832008-06-24 21:56:24 +000018362# Shell code in configure.ac might set extrasub.
18363# FIXME: do we really want to maintain this feature?
18364cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18365ac_sed_extra="$ac_vpsub
18366$extrasub
18367_ACEOF
18368cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18369:t
18370/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18371s|@configure_input@|$ac_sed_conf_input|;t t
18372s&@top_builddir@&$ac_top_builddir_sub&;t t
18373s&@top_build_prefix@&$ac_top_build_prefix&;t t
18374s&@srcdir@&$ac_srcdir&;t t
18375s&@abs_srcdir@&$ac_abs_srcdir&;t t
18376s&@top_srcdir@&$ac_top_srcdir&;t t
18377s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18378s&@builddir@&$ac_builddir&;t t
18379s&@abs_builddir@&$ac_abs_builddir&;t t
18380s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18381$ac_datarootdir_hack
18382"
Bram Moolenaar7db77842014-03-27 17:40:59 +010018383eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18384 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018385
18386test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Bram Moolenaar7db77842014-03-27 17:40:59 +010018387 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18388 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18389 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Christian Brabandt9670f612025-05-07 21:44:33 +020018390 { 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 +010018391which seems to be undefined. Please make sure it is defined" >&5
Christian Brabandt9670f612025-05-07 21:44:33 +020018392printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
Bram Moolenaar7db77842014-03-27 17:40:59 +010018393which seems to be undefined. Please make sure it is defined" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018394
Bram Moolenaar7db77842014-03-27 17:40:59 +010018395 rm -f "$ac_tmp/stdin"
Bram Moolenaar446cb832008-06-24 21:56:24 +000018396 case $ac_file in
Bram Moolenaar7db77842014-03-27 17:40:59 +010018397 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18398 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Bram Moolenaar446cb832008-06-24 21:56:24 +000018399 esac \
Bram Moolenaar7db77842014-03-27 17:40:59 +010018400 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018401 ;;
18402 :H)
18403 #
18404 # CONFIG_HEADER
18405 #
18406 if test x"$ac_file" != x-; then
18407 {
Illia Bobyra96d5442023-08-30 16:30:15 +020018408 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010018409 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18410 } >"$ac_tmp/config.h" \
18411 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18412 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Illia Bobyra96d5442023-08-30 16:30:15 +020018413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18414printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018415 else
18416 rm -f "$ac_file"
Bram Moolenaar7db77842014-03-27 17:40:59 +010018417 mv "$ac_tmp/config.h" "$ac_file" \
18418 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018419 fi
18420 else
Illia Bobyra96d5442023-08-30 16:30:15 +020018421 printf "%s\n" "/* $configure_input */" >&1 \
Bram Moolenaar7db77842014-03-27 17:40:59 +010018422 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
18423 || as_fn_error $? "could not create -" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018424 fi
18425 ;;
18426
18427
18428 esac
18429
18430done # for ac_tag
18431
Bram Moolenaar071d4272004-06-13 20:20:40 +000018432
Bram Moolenaarabb8d0b2010-05-15 15:04:53 +020018433as_fn_exit 0
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018434_ACEOF
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018435ac_clean_files=$ac_clean_files_save
18436
Bram Moolenaar446cb832008-06-24 21:56:24 +000018437test $ac_write_fail = 0 ||
Bram Moolenaar7db77842014-03-27 17:40:59 +010018438 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Bram Moolenaar446cb832008-06-24 21:56:24 +000018439
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018440
18441# configure is writing to config.log, and then calls config.status.
18442# config.status does its own redirection, appending to config.log.
18443# Unfortunately, on DOS this fails, as config.log is still kept open
18444# by configure, so config.status won't be able to write to it; its
18445# output is simply discarded. So we exec the FD to /dev/null,
18446# effectively closing config.log, so it can be properly (re)opened and
18447# appended to by config.status. When coming back to configure, we
18448# need to make the FD available again.
18449if test "$no_create" != yes; then
18450 ac_cs_success=:
18451 ac_config_status_args=
18452 test "$silent" = yes &&
18453 ac_config_status_args="$ac_config_status_args --quiet"
18454 exec 5>/dev/null
18455 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Bram Moolenaarc7453f52006-02-10 23:20:28 +000018456 exec 5>>auto/config.log
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018457 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18458 # would make configure fail if this is the last instruction.
Bram Moolenaar7db77842014-03-27 17:40:59 +010018459 $ac_cs_success || as_fn_exit 1
Bram Moolenaar495de9c2005-01-25 22:03:25 +000018460fi
Bram Moolenaar446cb832008-06-24 21:56:24 +000018461if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
Illia Bobyra96d5442023-08-30 16:30:15 +020018462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18463printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Bram Moolenaar446cb832008-06-24 21:56:24 +000018464fi
Bram Moolenaar071d4272004-06-13 20:20:40 +000018465
18466
Illia Bobyra96d5442023-08-30 16:30:15 +020018467